New module 'stdio'.
[gnulib.git] / ChangeLog
1 2007-02-20  Bruno Haible  <bruno@clisp.org>
2
3         * modules/stdio: New file.
4         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
5         * lib/snprintf.h: Remove file.
6         * lib/vsnprintf.h: Remove file.
7         * lib/.cppi-disable: Remove snprintf.h.
8         * m4/stdio_h.m4: New file.
9         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
10
11 2007-02-20  Jim Meyering  <jim@meyering.net>
12
13         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
14         used by e.g., mingw.  From Bruno Haible.
15
16 2007-02-19  Bruno Haible  <bruno@clisp.org>
17
18         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
19         warnings.
20         Reported by Ben Pfaff <blp@cs.stanford.edu>.
21
22 2007-02-19  Bruno Haible  <bruno@clisp.org>
23
24         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
25         from mingw users.
26
27 2007-02-19  Bruno Haible  <bruno@clisp.org>
28
29         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
30         warnings.
31         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
32
33 2007-02-19  Jim Meyering  <jim@meyering.net>
34
35         Don't use FD after a successful "fdopendir (fd)".
36         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
37         Reset it by calling dirfd on the just-obtained DIR*.
38
39         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
40         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
41
42 2007-02-18  Bruno Haible  <bruno@clisp.org>
43
44         * lib/readlink.c: Include <unistd.h>.
45         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
46         HAVE_READLINK.
47         * modules/readlink (Depends-on): Add unistd.
48         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
49         (Include): Add <unistd.h>.
50
51         * lib/getlogin_r.h: Remove file.
52         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
53         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
54         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
55         HAVE_DECL_GETLOGIN_R.
56         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
57         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
58         (Include): Use <unistd.h> instead of getlogin_r.h.
59
60         * lib/getcwd.h: Remove file.
61         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
62         * lib/xgetcwd.c: Likewise.
63         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
64         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
65         * modules/getcwd (Files): Remove lib/getcwd.h.
66         (Depends-on): Add unistd.
67         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
68         (Include): Use <unistd.h> instad of getcwd.h.
69
70         * lib/ftruncate.c: Include <unistd.h> first.
71         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
72         Set HAVE_FTRUNCATE.
73         * modules/ftruncate (Depends-on): Add unistd.
74         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
75
76         * lib/fchdir.c: Include <unistd.h> first.
77         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
78         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
79         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
80         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
81         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
82
83         * lib/dup2.c: Include <unistd.h> first.
84         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
85         HAVE_DUP2.
86         * modules/dup2 (Depends-on): Add unistd.
87         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
88
89         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
90         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
91         REPLACE_CHOWN. Don't define chown as a macro here.
92         * modules/chown (Depends-on): Add unistd.
93         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
94
95         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
96         Add definition for GL_LINK_WARNING.
97         (chown, dup2): New declarations.
98         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
99         link warning.
100         (ftruncate): New declaration.
101         (getcwd): New declaration, taken from old getcwd.h.
102         (getlogin_r): New declaration, taken from old getlogin_r.h.
103         (readlink): New declaration.
104         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
105         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
106         (gl_PREREQ_UNISTD): Remove macro.
107         (gl_UNISTD_MODULE_INDICATOR): New macro.
108         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
109         many new variables. Don't set UNISTD_H.
110         * modules/unistd (Description): Change.
111         (Depends-on): Add link-warning.
112         (configure.ac): Update.
113         (Makefile.am): Create unistd.h always. Substitute many new variables
114         into it.
115
116 2007-02-18  Bruno Haible  <bruno@clisp.org>
117
118         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
119         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
120         HAVE_GETSUBOPT.
121         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
122         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
123         * lib/getsubopt.h: Remove file.
124         * modules/getsubopt (Files): Remove lib/getsubopt.h.
125         (Depends-on): Add stdlib.
126         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
127         (Includes): Use <stdlib.h> instead of getsubopt.h.
128         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
129         Set HAVE_GETSUBOPT.
130         * lib/getsubopt.c: Don't include getsubopt.h.
131
132 2007-02-18  Bruno Haible  <bruno@clisp.org>
133
134         * modules/fchdir (Depends-on): Add dup2.
135
136 2007-02-18  Bruno Haible  <bruno@clisp.org>
137
138         * lib/stdlib_.h: Handle glibc's special invocation convention
139         specially.
140
141 2007-02-18  Bruno Haible  <bruno@clisp.org>
142
143         * modules/stdlib-tests: New file.
144         * tests/test-stdlib.c: New file.
145
146         * modules/mkstemp (Files): Remove lib/mkstemp.h.
147         (Depends-on): Add stdlib.
148         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
149         (Includes): Use <stdlib.h> instead of mkstemp.h.
150         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
151         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
152         * lib/mkstemp.c: Don't include mkstemp.h.
153         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
154         * lib/stdlib--.h: Don't include mkstemp.h.
155
156         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
157         (Depends-on): Add stdlib.
158         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
159         (Includes): Use <stdlib.h> instead of mkdtemp.h.
160         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
161         HAVE_MKDTEMP.
162         * lib/mkdtemp.c: Don't include mkdtemp.h.
163         * lib/clean-temp.c: Don't include mkdtemp.h.
164
165         * modules/exit (Files): Remove lib/exit.h.
166         (Depends-on): Add stdlib.
167         (Makefile.am): Remove lib_SOURCES.
168         (Include): Use <stdlib.h> instead of exit.h.
169         * lib/argmatch.c: Don't include exit.h.
170         * lib/execute.c: Likewise.
171         * lib/pagealign_alloc.c: Likewise.
172         * lib/pipe.c: Likewise.
173         * lib/wait-process.c: Likewise.
174         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
175         * lib/exitfail.c: Likewise.
176         * lib/savewd.c: Likewise.
177         * lib/xsetenv.c: Likewise.
178
179         * modules/stdlib: New file.
180         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
181         and extra comments about mkstemp().
182         * lib/exit.h: Remove file.
183         * lib/mkdtemp.h: Remove file.
184         * lib/mkstemp.h: Remove file.
185         * m4/stdlib_h.m4: New file.
186         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
187
188 2007-02-18  Bruno Haible  <bruno@clisp.org>
189
190         * modules/math-tests: New file.
191         * tests/test-math.c: New file.
192
193         * modules/math: New file.
194         * modules/mathl (Files): Remove lib/mathl.h.
195         (Depends-on): Add math.
196         (Makefile.am): Don't mention mathl.h.
197         (Include): Use <math.h> instead of mathl.h.
198         * lib/math_.h: New file.
199         * lib/mathl.h: Remove file.
200         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
201         mathl.h.
202         * lib/asinl.c: Likewise.
203         * lib/atanl.c: Likewise.
204         * lib/ceill.c: Likewise.
205         * lib/cosl.c: Likewise.
206         * lib/expl.c: Likewise.
207         * lib/floorl.c: Likewise.
208         * lib/frexpl.c: Likewise.
209         * lib/ldexpl.c: Likewise.
210         * lib/logl.c: Likewise.
211         * lib/sincosl.c: Likewise.
212         * lib/sinl.c: Likewise.
213         * lib/sqrtl.c: Likewise.
214         * lib/tanl.c: Likewise.
215         * lib/trigl.c: Likewise.
216         * m4/math_h.m4: New file.
217         * MODULES.html.sh (Mathematics): Add math.
218
219 2007-02-17  Bruno Haible  <bruno@clisp.org>
220
221         * modules/wctype-tests: New file.
222         * tests/test-wctype.c: New file.
223
224         * modules/wchar-tests: New file.
225         * tests/test-wchar.c: New file.
226
227         * modules/unistd-tests: New file.
228         * tests/test-unistd.c: New file.
229
230         * modules/time-tests: New file.
231         * tests/test-time.c: New file.
232
233         * modules/sysexits-tests: New file.
234         * tests/test-sysexits.c: New file.
235
236         * modules/sys_time-tests: New file.
237         * tests/test-sys_time.c: New file.
238
239         * modules/sys_stat-tests: New file.
240         * tests/test-sys_stat.c: New file.
241
242         * modules/sys_socket-tests: New file.
243         * tests/test-sys_socket.c: New file.
244
245         * modules/sys_select-tests: New file.
246         * tests/test-sys_select.c: New file.
247
248         * modules/string-tests: New file.
249         * tests/test-string.c: New file.
250
251         * modules/stdbool-tests: New file.
252         * tests/test-stdbool.c: New file.
253
254         * modules/netinet_in-tests: New file.
255         * tests/test-netinet_in.c: New file.
256
257         * modules/inttypes-tests: New file.
258         * tests/test-inttypes.c: New file.
259
260         * modules/fcntl-tests: New file.
261         * tests/test-fcntl.c: New file.
262
263         * modules/byteswap-tests: New file.
264         * tests/test-byteswap.c: New file.
265
266         * modules/arpa_inet-tests: New file.
267         * tests/test-arpa_inet.c: New file.
268
269 2007-02-17  Bruno Haible  <bruno@clisp.org>
270
271         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
272         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
273         if the corresponding module is not enabled. Emit link warnings if
274         the function is used nevertheless.
275         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
276         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
277         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
278         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
279         * modules/inttypes (Depends-on): Add link-warning.
280         (Makefile.am): Copy the contents of build-aux/link-warning.h into
281         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
282         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
283         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
284         * modules/imaxdiv (configure.ac): Likewise.
285         * modules/strtoimax (configure.ac): Likewise.
286         * modules/strtoumax (configure.ac): Likewise.
287
288 2007-02-17  Bruno Haible  <bruno@clisp.org>
289
290         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
291         gl_STRING_MODULE_INDICATOR_DEFAULTS.
292         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
293         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
294
295 2007-02-17  Bruno Haible  <bruno@clisp.org>
296
297         * modules/link-warning: New file.
298         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
299         * lib/string_.h (GL_LINK_WARNING): Remove definition.
300         * modules/string (Depends-on): Add link-warning.
301         (Makefile.am): Copy the contents of build-aux/link-warning.h into
302         string.h.
303         * MODULES.html.sh (Support for building libraries and executables): Add
304         link-warning.
305
306 2007-02-17  Bruno Haible  <bruno@clisp.org>
307
308         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
309         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
310         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
311         long lines.
312
313 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
314             Bruno Haible  <bruno@clisp.org>
315
316         * modules/tmpfile: New file.
317         * lib/tmpfile.c: New file.
318         * m4/tmpfile.m4: New file.
319         * MODULES.html.sh (func_all_modules): New section "Input/output".
320
321 2007-02-15  Bruno Haible  <bruno@clisp.org>
322
323         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
324         (supports_delete_on_close): New function.
325         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
326
327 2007-02-14  Bruno Haible  <bruno@clisp.org>
328
329         * modules/mbspcasecmp-tests: New file.
330         * tests/test-mbspcasecmp.sh: New file.
331         * tests/test-mbspcasecmp.c: New file.
332
333         New module mbspcasecmp.
334         * modules/mbspcasecmp: New file.
335         * lib/mbspcasecmp.c: New file.
336         * lib/string_.h (strncasecmp): Change warning message.
337         (mbspcasecmp): New declaration.
338         * m4/mbspcasecmp.m4: New file.
339         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
340         GNULIB_MBSPCASECMP.
341         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
342         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
343
344 2007-02-14  Bruno Haible  <bruno@clisp.org>
345
346         * modules/mbsncasecmp-tests: New file.
347         * tests/test-mbsncasecmp.sh: New file.
348         * tests/test-mbsncasecmp.c: New file.
349
350         New module mbsncasecmp.
351         * modules/mbsncasecmp: New file.
352         * lib/mbsncasecmp.c: New file.
353         * lib/string_.h (mbsncasecmp): New declaration.
354         * m4/mbsncasecmp.m4: New file.
355         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
356         GNULIB_MBSNCASECMP.
357         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
358         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
359
360 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
361
362         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
363         Verify that it doesn't overlap with our flags.
364         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
365         do not have the desired effect in multibyte locales; instead, use
366         mbscasecmp.
367         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
368         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
369         we don't require GNU fnmatch ourselves (if our users require it, they
370         should do so explicitly).
371
372         Fix regex code so it doesn't rely on strcasecmp.
373         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
374         Otherwise, include gnulib's langinfo.h.
375         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
376         undesirable behavior in non-C locales.  Instead, rely on localecharset.
377         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
378         * modules/regex (FILES): Remove m4/codeset.m4.
379         (Depends-on): Add localcharset.  Remove strcase.
380
381 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
382
383         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
384         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
385
386 2007-02-13  Bruno Haible  <bruno@clisp.org>
387
388         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
389         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
390
391 2007-02-12  Bruno Haible  <bruno@clisp.org>
392
393         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
394         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
395         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
396         time warning rather than a link error.
397
398 2007-02-12  Bruno Haible  <bruno@clisp.org>
399
400         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
401         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
402         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
403
404 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
405
406         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
407         args, not 2.
408
409 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
410
411         New module 'time', so that apps can include <time.h> as per
412         POSIX and GNU instead of separate include files like time_r.h
413         and timegm.h.  This implementation tries out a simpler approach
414         for replacing decls in standard include files (as compared to
415         the string module), somewhat as an experiment.
416
417         * config/srclist.txt: Comment out mktime.c for now.
418         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
419         since it doesn't apply any more.  Use generic wording instead.
420         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
421         'time'.
422         * lib/time_.h, m4/time_h.m4, modules/time: New files.
423         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
424         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
425         Don't include <sys/types.h>; no longer needed since we assume C89.
426         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
427         * lib/strftime.c: Likewise.
428         * lib/time_r.c: Likewise.
429         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
430         * lib/nanosleep.c: Include <time.h> first, to check interface.
431         * lib/strptime.c: Likewise.
432         * lib/time_r.c: Likewise.
433         * lib/timegm.c: Likewise.
434         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
435         needed.
436         * lib/timegm.c: Don't include timegm.h; no longer needed.
437         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
438         time.h now handles any problems in that area.
439         (struct timespec, nanosleep): Remove; time.h now arranges for these.
440         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
441         that time.h defines struct timespec.
442         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
443         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
444         handles that.
445         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
446         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
447         needed.  Set REPLACE_LOCALTIME.
448         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
449         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
450         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
451         nanosleep; time_h.m4 now does that.  Don't require
452         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
453         module handles this now.
454         * modules/getdate (Depends-on): Remove timespec.  Add time.
455         * modules/nanosleep (Depends-on): Likewise.
456         * modules/stat-time (Depends-on): Likewise.
457         * modules/nanosleep (Include): Include time.h, not timespec.h.
458         * modules/strptime (Files): Remove lib/strptime.h.
459         (Depends-on): Add extensions, time.
460         (Include): Include time.h, not strptime.h.
461         * modules/time_r (Files): Remove lib/time_r.h.
462         (Depends-on): Add time.
463         (Include): Include time.h, not time_r.h.
464         * modules/timegm: Likewise.
465         * modules/timespec (Description): Now does timespec-related decls
466         of our own, instead of struct timespec itself.
467         (Depends-on): Add time; remove extensions.
468         (Maintainer): Add self.
469         * modules/utimecmp (Depends-on): Add time; remove timespec.
470         * modules/utimens (Depends-on): Likewise.
471         * modules/xnanosleep (Depends-on): Likewise.
472
473 2007-02-11  Bruno Haible  <bruno@clisp.org>
474
475         * lib/c-strstr.c: Include allocsa.h.
476         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
477         * lib/c-strcasestr.c: Include allocsa.h.
478         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
479         * lib/strcasestr.c: Include allocsa.h.
480         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
481         * lib/mbsstr.c: Include allocsa.h.
482         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
483         allocsa/freesa instead of malloc/free.
484         * lib/mbscasestr.c: Include allocsa.h.
485         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
486         allocsa/freesa instead of malloc/free.
487         * modules/c-strstr (Depends-on): Add allocsa.
488         * modules/c-strcasestr (Depends-on): Likewise.
489         * modules/strcasestr (Depends-on): Likewise.
490         * modules/mbsstr (Depends-on): Likewise.
491         * modules/mbscasestr (Depends-on): Likewise.
492
493 2007-02-11  Bruno Haible  <bruno@clisp.org>
494
495         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
496
497         * modules/mbsspn-tests: New file.
498         * tests/test-mbsspn.sh: New file.
499         * tests/test-mbsspn.c: New file.
500
501 2007-02-11  Bruno Haible  <bruno@clisp.org>
502
503         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
504
505         * modules/mbspbrk-tests: New file.
506         * tests/test-mbspbrk.sh: New file.
507         * tests/test-mbspbrk.c: New file.
508
509 2007-02-11  Bruno Haible  <bruno@clisp.org>
510
511         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
512         unneeded cast.
513
514         * modules/mbscspn-tests: New file.
515         * tests/test-mbscspn.sh: New file.
516         * tests/test-mbscspn.c: New file.
517
518 2007-02-11  Bruno Haible  <bruno@clisp.org>
519
520         * modules/mbscasecmp-tests: New file.
521         * tests/test-mbscasecmp.sh: New file.
522         * tests/test-mbscasecmp.c: New file.
523
524 2007-02-11  Bruno Haible  <bruno@clisp.org>
525
526         Ensure O(n) worst-case complexity of mbscasestr.
527         * lib/mbscasestr.c: Include stdbool.h.
528         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
529         functions.
530         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
531         the bookkeeping indicates that it's worth it.
532         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
533
534         * modules/mbscasestr-tests: New file.
535         * tests/test-mbscasestr1.c: New file.
536         * tests/test-mbscasestr2.sh: New file.
537         * tests/test-mbscasestr2.c: New file.
538         * tests/test-mbscasestr3.sh: New file.
539         * tests/test-mbscasestr3.c: New file.
540         * tests/test-mbscasestr4.sh: New file.
541         * tests/test-mbscasestr4.c: New file.
542         * m4/locale-tr.m4: New file.
543
544 2007-02-11  Bruno Haible  <bruno@clisp.org>
545
546         Ensure O(n) worst-case complexity of mbsstr.
547         * lib/mbsstr.c: Include stdbool.h.
548         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
549         functions.
550         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
551         bookkeeping indicates that it's worth it.
552         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
553
554         * modules/mbsstr-tests: New file.
555         * tests/test-mbsstr1.c: New file.
556         * tests/test-mbsstr2.sh: New file.
557         * tests/test-mbsstr2.c: New file.
558         * tests/test-mbsstr3.sh: New file.
559         * tests/test-mbsstr3.c: New file.
560         * m4/locale-fr.m4: New file.
561
562 2007-02-11  Bruno Haible  <bruno@clisp.org>
563
564         * lib/mbsrchr.c (mbsrchr): Fix bug.
565
566         * modules/mbsrchr-tests: New file.
567         * tests/test-mbsrchr.sh: New file.
568         * tests/test-mbsrchr.c: New file.
569
570 2007-02-11  Bruno Haible  <bruno@clisp.org>
571
572         * lib/mbschr.c (mbschr): Fix bug.
573
574         * modules/mbschr-tests: New file.
575         * tests/test-mbschr.sh: New file.
576         * tests/test-mbschr.c: New file.
577         * m4/locale-zh.m4: New file.
578
579 2007-02-11  Bruno Haible  <bruno@clisp.org>
580
581         Support for copying multibyte string iterators.
582         * lib/mbiter.h: Include <string.h>.
583         (mbiter_multi_copy): New function.
584         (mbi_copy): New macro.
585         * lib/mbuiter.h: Include <string.h>.
586         (mbuiter_multi_copy): New function.
587         (mbui_copy): New macro.
588
589 2007-02-11  Bruno Haible  <bruno@clisp.org>
590
591         New module mbslen.
592         * modules/mbslen: New file.
593         * lib/mbslen.c: New file.
594         * lib/string_.h (mbslen): New declaration.
595         * m4/mbslen.m4: New file.
596         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
597         GNULIB_MBSLEN.
598         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
599         * MODULES.html.sh (Internationalization functions): Add mbslen.
600
601 2007-02-11  Bruno Haible  <bruno@clisp.org>
602
603         Ensure O(n) worst-case complexity of strcasestr substitute.
604         * lib/strcasestr.c: Include stdbool.h.
605         (knuth_morris_pratt): New function.
606         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
607         bookkeeping indicates that it's worth it.
608         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
609
610         * modules/strcasestr-tests: New file.
611         * tests/test-strcasestr.c: New file.
612
613 2007-02-11  Bruno Haible  <bruno@clisp.org>
614
615         Ensure O(n) worst-case complexity of c_strcasestr.
616         * lib/c-strcasestr.c: Include stdbool.h, string.h.
617         (knuth_morris_pratt): New function.
618         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
619         the bookkeeping indicates that it's worth it.
620         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
621
622         * modules/c-strcasestr-tests: New file.
623         * tests/test-c-strcasestr.c: New file.
624
625 2007-02-11  Bruno Haible  <bruno@clisp.org>
626
627         Ensure O(n) worst-case complexity of c_strstr.
628         * lib/c-strstr.c: Include stdbool.h, string.h.
629         (knuth_morris_pratt): New function.
630         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
631         bookkeeping indicates that it's worth it.
632         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
633
634         * lib/c-strstr.c: Complete rewrite for maintainability.
635
636         * modules/c-strstr-tests: New file.
637         * tests/test-c-strstr.c: New file.
638
639 2007-02-11  Bruno Haible  <bruno@clisp.org>
640
641         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
642         5.2.1 and earlier, whereby \055 was treated just like the range
643         delimiter '-'.
644         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
645
646 2007-02-08  Bruno Haible  <bruno@clisp.org>
647
648         * modules/regex (Depends-on): Add stdbool.
649         Reported by Dalibor Topic <robilad@kaffe.org>.
650
651 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
652
653         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
654         Prefer returning from main to exiting from it.
655         Remove unnecessary parens after sizeof.
656
657 2007-02-05  Bruno Haible  <bruno@clisp.org>
658
659         New module mbssep.
660         * modules/mbssep: New file.
661         * lib/mbssep.c: New file.
662         * lib/string_.h (strsep): Add a conditional link warning.
663         (mbssep): New declaration.
664         * m4/mbssep.m4: New file.
665         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
666         GNULIB_MBSSEP.
667         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
668         * MODULES.html.sh (Internationalization functions): Add mbssep.
669
670 2007-02-05  Bruno Haible  <bruno@clisp.org>
671
672         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
673         Optimize search in case of 1 delimiter.
674
675 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
676
677         * lib/acl.h: Include sys/types.h before sys/acl.h.
678
679 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
680
681         Merge upstream fix for glibc bugzilla #3957:
682
683         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
684
685         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
686         bit for RE_HAT_LISTS_NOT_NEWLINE.
687         (build_charclass_op): Remove bogus comment.
688
689 2007-02-05  Simon Josefsson  <simon@josefsson.org>
690
691         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
692
693 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
694
695         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
696         * lib/memmem.c [!defined _LIBC]: Include config.h.
697
698 2007-02-04  Bruno Haible  <bruno@clisp.org>
699
700         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
701         warning message.
702
703 2007-02-04  Bruno Haible  <bruno@clisp.org>
704
705         New module mbstok_r.
706         * modules/mbstok_r: New file.
707         * lib/mbstok_r.c: New file.
708         * lib/string_.h (strtok_r): Change argument names to match the
709         comments. Add a conditional link warning.
710         (mbstok_r): New declaration.
711         * m4/mbstok_r.m4: New file.
712         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
713         GNULIB_MBSTOK_R.
714         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
715         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
716
717 2007-02-04  Bruno Haible  <bruno@clisp.org>
718
719         New module mbsspn.
720         * modules/mbsspn: New file.
721         * lib/mbsspn.c: New file.
722         * lib/string_.h (strspn): Add a conditional link warning.
723         (mbsspn): New declaration.
724         * m4/mbsspn.m4: New file.
725         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
726         GNULIB_MBSSPN.
727         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
728         * MODULES.html.sh (Internationalization functions): Add mbsspn.
729
730 2007-02-04  Bruno Haible  <bruno@clisp.org>
731
732         New module mbspbrk.
733         * modules/mbspbrk: New file.
734         * lib/mbspbrk.c: New file.
735         * lib/string_.h (strpbrk): Add a conditional link warning.
736         (mbspbrk): New declaration.
737         * m4/mbspbrk.m4: New file.
738         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
739         GNULIB_MBSPBRK.
740         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
741         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
742
743 2007-02-04  Bruno Haible  <bruno@clisp.org>
744
745         New module mbscspn.
746         * modules/mbscspn: New file.
747         * lib/mbscspn.c: New file.
748         * lib/string_.h (strcspn): Add a conditional link warning.
749         (mbscspn): New declaration.
750         * m4/mbscspn.m4: New file.
751         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
752         GNULIB_MBSCSPN.
753         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
754         * MODULES.html.sh (Internationalization functions): Add mbscspn.
755
756 2007-02-04  Bruno Haible  <bruno@clisp.org>
757
758         New module mbscasestr, reduced goal of strcasestr.
759         * modules/mbscasestr: New file.
760         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
761         (mbscasestr): Renamed from strcasestr.
762         * lib/strcasestr.c: Don't include mbuiter.h.
763         (strcasestr): Remove support for multibyte locales.
764         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
765         Change the conditional link warning.
766         (mbscasestr): New declaration.
767         * m4/mbscasestr.m4: New file.
768         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
769         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
770         REPLACE_STRCASESTR.
771         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
772         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
773         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
774         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
775         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
776         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
777         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
778         (Depends-on): Remove mbuiter.
779         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
780
781 2007-02-04  Bruno Haible  <bruno@clisp.org>
782
783         Simplify handling of strncasecmp.
784         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
785         the conditional link warning.
786         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
787         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
788         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
789         * modules/strcase (configure.ac): Don't invoke
790         gl_STRING_MODULE_INDICATOR.
791         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
792
793 2007-02-04  Bruno Haible  <bruno@clisp.org>
794
795         New module mbscasecmp, reduced goal of strcasecmp.
796         * modules/mbscasecmp: New file.
797         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
798         (mbscasecmp): Renamed from strcasecmp.
799         * lib/strcasecmp.c: Don't include mbuiter.h.
800         (strcasecmp): Remove support for multibyte locales.
801         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
802         Change the conditional link warning.
803         (mbscasecmp): New declaration.
804         * m4/mbscasecmp.m4: New file.
805         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
806         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
807         REPLACE_STRCASECMP.
808         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
809         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
810         GNULIB_MBSCASECMP.
811         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
812         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
813         * modules/strcase (Files): Remove m4/mbrtowc.m4.
814         (Depends-on): Remove mbuiter.
815         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
816
817 2007-02-04  Bruno Haible  <bruno@clisp.org>
818
819         New module mbsstr. Remove module strstr.
820         * modules/mbsstr: New file.
821         * modules/strstr: Remove file.
822         * lib/mbsstr.c: Renamed from lib/strstr.c.
823         (mbsstr): Renamed from strstr.
824         * lib/string_.h (strstr): Remove declaration. Change the conditional
825         link warning.
826         (mbsstr): New declaration.
827         * m4/mbsstr.m4: New file.
828         * m4/strstr.m4: Remove file.
829         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
830         REPLACE_STRSTR.
831         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
832         Don't initialize GNULIB_STRSTR.
833         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
834         substitute GNULIB_STRSTR and REPLACE_STRSTR.
835         * MODULES.html.sh (Internationalization functions): Add mbsstr.
836         (Support for systems lacking ANSI C 89): Remove strstr.
837
838 2007-02-04  Bruno Haible  <bruno@clisp.org>
839
840         New module mbsrchr.
841         * modules/mbsrchr: New file.
842         * lib/mbsrchr.c: New file.
843         * lib/string_.h (strrchr): Add a conditional link warning.
844         (mbsrchr): New declaration.
845         * m4/mbsrchr.m4: New file.
846         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
847         GNULIB_MBSRCHR.
848         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
849         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
850
851 2007-02-04  Bruno Haible  <bruno@clisp.org>
852
853         New module mbschr.
854         * modules/mbschr: New file.
855         * lib/mbschr.c: New file.
856         * lib/string_.h (strchr): Add a conditional link warning.
857         (mbschr): New declaration.
858         * m4/mbschr.m4: New file.
859         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
860         GNULIB_MBSCHR.
861         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
862         * MODULES.html.sh (Internationalization functions): Add mbschr.
863
864 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
865
866         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
867
868         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
869
870 2007-02-04  Bruno Haible  <bruno@clisp.org>
871
872         New module description section 'configure.ac-early'.
873         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
874         (func_get_autoconf_early_snippet): New function.
875         (func_import, func_create_testdir): Use it. Remove special cases for
876         modules 'extensions' and 'lock'.
877         * modules/extensions (configure.ac-early): Require
878         gl_USE_SYSTEM_EXTENSIONS.
879         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
880
881 2007-02-04  Bruno Haible  <bruno@clisp.org>
882
883         Make use of gcj-4.3's -fsource and -ftarget option.
884         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
885         and if so try the options -fsource and -ftarget.
886         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
887         source_version, ftarget_option, target_version arguments.
888         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
889         (is_envjavac_oldgcj_14_14_usable): Renamed from
890         is_envjavac_gcj_14_14_usable.
891         (is_envjavac_oldgcj_14_13_usable): Renamed from
892         is_envjavac_gcj_14_13_usable.
893         (is_gcj_present): Update.
894         (is_gcj_43, is_gcj43_usable): New functions.
895         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
896         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
897         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
898         try the options -fsource and -ftarget.
899
900 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
901
902         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
903         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
904         larger value.
905
906 2007-02-03  Jim Meyering  <jim@meyering.net>
907
908         Give tools a better chance to allocate space for very large buffers.
909         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
910
911         Make pwd and readlink work also when run with an unreadable parent dir
912         on systems with openat support.
913         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
914         provided getcwd function, even when we have openat support.
915         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
916
917 2007-02-02  Bruno Haible  <bruno@clisp.org>
918
919         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
920         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
921         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
922         portability problems if one of these functions is only used on specific
923         platforms.
924         Reported by Paul Eggert.
925
926 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
927
928         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
929         is causing more trouble than it's curing.
930         * lib/regex_internal.h (__mempcpy): Remove.
931         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
932         (and make the code a tad smaller to boot).
933         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
934
935 2007-02-02  Jim Meyering  <jim@meyering.net>
936
937         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
938         section, not in the Makefile.am: one.
939
940 2007-02-02  Eric Blake  <ebb9@byu.net>
941
942         * lib/strchrnul.c: Always include config.h first.
943
944         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
945         gnulib strstr is not necessary here.
946
947 2007-02-02  Simon Josefsson  <simon@josefsson.org>
948
949         * m4/socklen.m4: Fix typo.
950
951 2007-02-02  Eric Blake  <ebb9@byu.net>
952
953         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
954         * modules/netinet_in (Makefile.am): Likewise.
955
956 2007-02-01  Bruno Haible  <bruno@clisp.org>
957
958         * lib/string_.h (GL_LINK_WARNING): New macro.
959         (strcasecmp, strstr, strcasestr): If provided by the system,
960         conditionally define as a macro that leads to a warning instead of to
961         an error.
962         (strncasecmp): Conditionally define as a macro that leads to a warning.
963
964 2007-02-01  Jim Meyering  <jim@meyering.net>
965
966         Give tools a better chance to allocate space for very large buffers.
967         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
968
969 2007-02-01  Karl Berry  <karl@gnu.org>
970
971         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
972
973 2007-02-01  Bruno Haible  <bruno@clisp.org>
974
975         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
976         renamings.
977
978 2007-02-01  Eric Blake  <ebb9@byu.net>
979
980         * modules/regex (Depends-on): Revert dependence on mempcpy.
981         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
982         module's definition of mempcpy.
983         Reported by Paul Eggert.
984
985 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
986
987         * lib/string_.h: If the gnulib module XYZ is not present, undefine
988         the symbol XYZ before redefining it.  This fixes a problem with
989         programs that don't use XYZ, when compiled on systems that define
990         XYZ to something else.
991
992 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
993
994         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
995         occurs when "mkdir -m foo" creates a setgid directory that is (1)
996         writeable to group or other and (2) is intended to have a special
997         mode bit that is set or cleared.  In such a case, the directory
998         should be neither group- nor other-writeable until the special
999         mode bits are right.
1000
1001 2007-01-31  Eric Blake  <ebb9@byu.net>
1002
1003         * modules/mountlist (Depends-on): Add strstr.
1004
1005         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1006         bug.
1007         * modules/string (Makefile.am): Remove redundant replacement.
1008         * modules/regex (Depends-on): Add mempcpy.
1009
1010 2007-01-31  Bruno Haible  <bruno@clisp.org>
1011
1012         New module description field 'Link'.
1013         * gnulib-tool (func_usage): Document --extract-link-directive.
1014         (sed_extract_prog): Recognize 'Link' directive.
1015         (func_get_link_directive): New function.
1016         (func_import): Show summary of link directives.
1017         Handle --extract-link-directive option.
1018         * modules/acl (Link): New section.
1019         * modules/clock-time (Link): New section.
1020         * modules/euidaccess (Link): New section.
1021         * modules/gettext (Link): New section.
1022         * modules/iconv (Link): New section.
1023         * modules/lock (Link): New section.
1024         * modules/nanosleep (Link): New section.
1025         * modules/readline (Link): New section.
1026
1027 2007-01-27  Bruno Haible  <bruno@clisp.org>
1028
1029         Enforce the use of gnulib modules for unportable <string.h> functions.
1030         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1031         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1032         (gl_HEADER_STRING_H_BODY): Require it.
1033         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1034         the symbol XYZ to one that gives a link error.
1035         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1036         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1037         * modules/mempcpy (configure.ac): Likewise.
1038         * modules/memrchr (configure.ac): Likewise.
1039         * modules/stpcpy (configure.ac): Likewise.
1040         * modules/stpncpy (configure.ac): Likewise.
1041         * modules/strcase (configure.ac): Likewise.
1042         * modules/strcasestr (configure.ac): Likewise.
1043         * modules/strchrnul (configure.ac): Likewise.
1044         * modules/strdup (configure.ac): Likewise.
1045         * modules/strndup (configure.ac): Likewise.
1046         * modules/strnlen (configure.ac): Likewise.
1047         * modules/strpbrk (configure.ac): Likewise.
1048         * modules/strsep (configure.ac): Likewise.
1049         * modules/strstr (configure.ac): Likewise.
1050         * modules/strtok_r (configure.ac): Likewise.
1051
1052 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1053
1054         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1055
1056 2007-01-30  Jim Meyering  <jim@meyering.net>
1057
1058         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1059
1060 2007-01-29  Bruno Haible  <bruno@clisp.org>
1061
1062         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1063         * lib/execute.c: Likewise.
1064         * lib/pipe.c: Likewise.
1065         * lib/printf-args.h: Likewise.
1066         * lib/printf-args.c: Likewise.
1067         * lib/printf-parse.c: Likewise.
1068         * lib/vasnprintf.c: Likewise.
1069
1070 2007-01-29  Eric Blake  <ebb9@byu.net>
1071
1072         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1073         declaration.
1074
1075 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1076
1077         * lib/strptime.h (strptime): Use 'restrict' for args where
1078         POSIX requires this.
1079         * lib/strptime.c (strptime): Likewise.
1080         Change license notice from LGPL to GPL, since gnulib-tool will
1081         change this as needed.
1082         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1083         defined.
1084         Include "strptime.h" first, to check interface.
1085         Do not #undef _LIBC and _NL_CURRENT.
1086         Do not include <stdlib.h>; no longer needed.
1087         Include "time_r.h" and declare ptime_locale_status
1088         only if _LIBC is not defined.
1089         (__P): Remove unused macro.
1090         (match_string): Bring back glibc version, but use it only if _LIBC
1091         is defined.
1092         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1093         Remove unnecessary assertion and abort() call.
1094         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1095         * m4/strptime.m4: Fix serial number comment.
1096         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1097         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1098         (Depends-on): Add time_r.
1099
1100 2007-01-29  Bruno Haible  <bruno@clisp.org>
1101
1102         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1103         strptime.
1104         * modules/strptime (Depends-on): Add stdbool.
1105         * lib/strptime.h: Include <time.h> always. Add comments.
1106
1107 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1108
1109         * modules/strptime: New file.
1110         * lib/strptime.h: New file.
1111         * lib/strptime.c: New file.
1112         * m4/strptime.m4: New file.
1113
1114 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1115
1116         * MODULES.html.sh: New module mpsort.
1117         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1118
1119         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1120         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1121         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1122         All uses changed.
1123         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1124         All uses changed.
1125         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1126         to _Restrict_.
1127         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1128         the parameter matches the prototype.
1129
1130 2007-01-28  Jim Meyering  <jim@meyering.net>
1131
1132         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1133         sys/time.h here, reverting that part of the previous patch:
1134         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1135
1136 2007-01-28  Bruno Haible  <bruno@clisp.org>
1137
1138         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1139         value of $(SYS_TIME_H).
1140         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1141         remove it conditionally, too. [added by Jim Meyering]
1142         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1143         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1144         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1145         GETTIMEOFDAY_REPLACEMENT to 1.
1146
1147 2007-01-28  Bruno Haible  <bruno@clisp.org>
1148
1149         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1150         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1151         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1152         Set UNISTD_H instead of UNISTD_H2.
1153         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1154
1155 2007-01-28  Bruno Haible  <bruno@clisp.org>
1156
1157         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1158         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1159
1160 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1161
1162         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1163         (func_create_testdir): Ensure C locale for `grep' and `tr'
1164         character ranges.
1165         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1166         ACLOCAL_AMFLAGS parsing state machine.
1167
1168 2007-01-27  Bruno Haible  <bruno@clisp.org>
1169
1170         * modules/unistr/base: Update.
1171
1172 2007-01-27  Bruno Haible  <bruno@clisp.org>
1173
1174         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1175         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1176         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1177         modules/unistr/u32-mbtouc.
1178         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1179         * lib/unistr.h: Update.
1180         * lib/linebreak.c: Update.
1181         * modules/unistr/u32-mbtouc: Renamed from
1182         modules/unistr/u32-mbtouc-safe.
1183         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1184         * lib/unistr.h: Update.
1185         * lib/unistr/u32-to-u8.c: Update.
1186         * lib/unistr/u32-to-u16.c: Update.
1187
1188 2007-01-27  Bruno Haible  <bruno@clisp.org>
1189
1190         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1191         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1192         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1193         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1194         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1195         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1196         modules/unistr/u16-mbtouc.
1197         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1198         * lib/unistr.h: Update.
1199         * lib/linebreak.c: Update.
1200         * modules/linebreak: Update.
1201         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1202         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1203         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1204         * modules/unistr/u16-mbtouc: Renamed from
1205         modules/unistr/u16-mbtouc-safe.
1206         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1207         * lib/unistr.h: Update.
1208         * lib/unistr/u16-to-u8.c: Update.
1209         * modules/unistr/u16-to-u8: Update.
1210         * lib/unistr/u16-to-u32.c: Update.
1211         * modules/unistr/u16-to-u32: Update.
1212
1213 2007-01-27  Bruno Haible  <bruno@clisp.org>
1214
1215         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1216         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1217         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1218         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1219         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1220         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1221         modules/unistr/u8-mbtouc.
1222         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1223         * lib/unistr.h: Update.
1224         * lib/striconveh.c: Update.
1225         * modules/striconveh: Update.
1226         * lib/linebreak.c: Update.
1227         * modules/linebreak: Update.
1228         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1229         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1230         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1231         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1232         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1233         * lib/unistr.h: Update.
1234         * lib/striconveh.c: Update.
1235         * modules/striconveh: Update.
1236         * lib/unistr/u8-to-u16.c: Update.
1237         * modules/unistr/u8-to-u16: Update.
1238         * lib/unistr/u8-to-u32.c: Update.
1239         * modules/unistr/u8-to-u32: Update.
1240
1241 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1242
1243         Sync from Libtool.
1244         * lib/argz.c: Do not include strings.h nor memory.h, include
1245         string.h unconditionally.  Patch by Simon Josefsson.
1246
1247 2007-01-27  Bruno Haible  <bruno@clisp.org>
1248
1249         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1250         from gl_HEADER_STRING_H_BODY.
1251         (gl_HEADER_STRING_H_BODY): Require it.
1252         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1253         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1254         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1255         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1256         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1257         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1258         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1259         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1260         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1261         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1262         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1263         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1264         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1265         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1266         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1267
1268 2007-01-27  Bruno Haible  <bruno@clisp.org>
1269
1270         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1271         check_PROGRAMS into noinst_PROGRAMS.
1272         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1273         check_PROGRAMS in this case.
1274         (func_import): Set for_test to false.
1275         (func_create_testdir): Set for_test to true.
1276
1277 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1278             Bruno Haible  <bruno@clisp.org>
1279
1280         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1281         (Depends-on): Add string.
1282         (Includes): Use <string.h> instead of strcasestr.h.
1283         * modules/string (Makefile.am): Also substitute the value of
1284         REPLACE_STRCASESTR.
1285         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1286         assume strcasestr is declared in <string.h> not <strings.h>. Also
1287         set REPLACE_STRCASESTR.
1288         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1289         REPLACE_STRCASESTR.
1290         * lib/strcasestr.h: Remove file.
1291         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1292         * lib/string_.h (strcasestr): New declaration.
1293
1294 2007-01-27  Bruno Haible  <bruno@clisp.org>
1295
1296         * lib/string_.h: Use 'extern'.
1297
1298 2007-01-27  Jim Meyering  <jim@meyering.net>
1299
1300         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1301         of set-but-not-used local, "q".
1302
1303         * lib/mempcpy.c: Include <config.h> before <string.h>.
1304         This fixes a compilation error on HP-UX, due to the system's
1305         "restrict"-using mempcpy prototype.
1306
1307 2007-01-26  Bruno Haible  <bruno@clisp.org>
1308
1309         Small optimization.
1310         * lib/javacomp.c: Include c-strstr.h.
1311          (is_envjavac_gcj): Use c_strstr instead of strstr.
1312         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1313
1314 2007-01-26  Bruno Haible  <bruno@clisp.org>
1315
1316         * MODULES.html.sh (Unicode string functions): Add the new modules.
1317
1318         * modules/uniconv/u32-strconv-to-locale: New file.
1319         * lib/uniconv/u32-strconv-to-locale.c: New file.
1320
1321         * modules/uniconv/u16-strconv-to-locale: New file.
1322         * lib/uniconv/u16-strconv-to-locale.c: New file.
1323
1324         * modules/uniconv/u8-strconv-to-locale: New file.
1325         * lib/uniconv/u8-strconv-to-locale.c: New file.
1326
1327         * modules/uniconv/u32-strconv-from-locale: New file.
1328         * lib/uniconv/u32-strconv-from-locale.c: New file.
1329
1330         * modules/uniconv/u16-strconv-from-locale: New file.
1331         * lib/uniconv/u16-strconv-from-locale.c: New file.
1332
1333         * modules/uniconv/u8-strconv-from-locale: New file.
1334         * lib/uniconv/u8-strconv-from-locale.c: New file.
1335
1336         * modules/uniconv/u32-strconv-to-enc: New file.
1337         * lib/uniconv/u32-strconv-to-enc.c: New file.
1338         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1339         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1340
1341         * modules/uniconv/u16-strconv-to-enc: New file.
1342         * lib/uniconv/u16-strconv-to-enc.c: New file.
1343         * lib/uniconv/u-strconv-to-enc.h: New file.
1344         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1345         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1346
1347         * modules/uniconv/u8-strconv-to-enc: New file.
1348         * lib/uniconv/u8-strconv-to-enc.c: New file.
1349         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1350         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1351
1352         * modules/uniconv/u32-strconv-from-enc: New file.
1353         * lib/uniconv/u32-strconv-from-enc.c: New file.
1354         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1355         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1356
1357         * modules/uniconv/u16-strconv-from-enc: New file.
1358         * lib/uniconv/u16-strconv-from-enc.c: New file.
1359         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1360         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1361
1362         * modules/uniconv/u8-strconv-from-enc: New file.
1363         * lib/uniconv/u8-strconv-from-enc.c: New file.
1364         * lib/uniconv/u-strconv-from-enc.h: New file.
1365         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1366         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1367
1368         * modules/uniconv/u32-conv-from-enc: New file.
1369         * lib/uniconv/u32-conv-from-enc.c: New file.
1370         * modules/uniconv/u32-conv-from-enc-tests: New file.
1371         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1372
1373         * modules/uniconv/u16-conv-from-enc: New file.
1374         * lib/uniconv/u16-conv-from-enc.c: New file.
1375         * lib/uniconv/u-conv-from-enc.h: New file.
1376         * modules/uniconv/u16-conv-from-enc-tests: New file.
1377         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1378
1379         * modules/uniconv/u8-conv-from-enc: New file.
1380         * lib/uniconv/u8-conv-from-enc.c: New file.
1381         * modules/uniconv/u8-conv-from-enc-tests: New file.
1382         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1383
1384         * modules/uniconv/base: New file.
1385         * lib/uniconv.h: New file.
1386
1387 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1388
1389         * doc/gnulib-tool.texi (Initial import): Update to match current
1390         behavior with strdup module.
1391         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1392         * lib/memmem.h: Remove; all uses removed.  This is now done
1393         by <string.h>.
1394         * lib/mempcpy.h: Likewise.
1395         * lib/memrchr.h: Likewise.
1396         * lib/stpcpy.h: Likewise.
1397         * lib/stpncpy.h: Likewise.
1398         * lib/strcase.h: Likewise.
1399         * lib/strchrnul.h: Likewise.
1400         * lib/strdup.h: Likewise.
1401         * lib/strndup.h: Likewise.
1402         * lib/strnlen.h: Likewise.
1403         * lib/strpbrk.h: Likewise.
1404         * lib/strsep.h: Likewise.
1405         * lib/strstr.h: Likewise.
1406         * lib/strtok_r.h: Likewise.
1407         * lib/string_.h: New file.
1408         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1409         Rely on <string.h> instead.
1410         * lib/canon-host.c: Likewise.
1411         * lib/chdir-long.c: Likewise.
1412         * lib/concatpath.c: Likewise.
1413         * lib/exclude.c: Likewise.
1414         * lib/fchdir.c: Likewise.
1415         * lib/getaddrinfo.c: Likewise.
1416         * lib/getcwd.c: Likewise.
1417         * lib/getsubopt.c: Likewise.
1418         * lib/glob.c: Likewise.
1419         * lib/hard-locale.c: Likewise.
1420         * lib/iconvme.c: Likewise.
1421         * lib/javacomp.c: Likewise.
1422         * lib/mempcpy.c: Likewise.
1423         * lib/memrchr.c: Likewise.
1424         * lib/regex_internal.h: Likewise.
1425         * lib/stpncpy.c: Likewise.
1426         * lib/strcasecmp.c: Likewise.
1427         * lib/strchrnul.c: Likewise.
1428         * lib/strdup.c: Likewise.
1429         * lib/striconv.c: Likewise.
1430         * lib/striconveh.c: Likewise.
1431         * lib/striconveha.c: Likewise.
1432         * lib/strncasecmp.c: Likewise.
1433         * lib/strndup.c: Likewise.
1434         * lib/strnlen.c: Likewise.
1435         * lib/strsep.c: Likewise.
1436         * lib/strstr.c: Likewise.
1437         * lib/strtok_r.c: Likewise.
1438         * lib/userspec.c: Likewise.
1439         * lib/w32spawn.h: Likewise.
1440         * lib/xstrndup.c: Likewise.
1441         * lib/mountlist.c (strstr): Remove decl.
1442         * m4/string_h.m4: New file.
1443         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1444         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1445         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1446         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1447         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1448         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1449         Set REPLACE_STRCASECMP if necessary.
1450         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1451         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1452         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1453         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1454         HAVE_DECL_STRDUP if necessary.
1455         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1456         since gl_FUNC_STRNDUP does that now.
1457         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1458         Check for decl here...
1459         (gl_PREREQ_STRNLEN): ... not here.
1460         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1461         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1462         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1463         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1464         necessary.
1465         * modules/string: New file.
1466         * modules/memmem (Files): Remove special-purpose include file.
1467         (Depends-on): Add string.
1468         (Include): Include <string.h>, not the removed file.
1469         * modules/mempcpy: Likewise.
1470         * modules/memrchr: Likewise.
1471         * modules/stpcpy: Likewise.
1472         * modules/stpncpy: Likewise.
1473         * modules/strcase: Likewise.
1474         * modules/strchrnul: Likewise.
1475         * modules/strdup: Likewise.
1476         * modules/strndup: Likewise.
1477         * modules/strnlen: Likewise.
1478         * modules/strpbrk: Likewise.
1479         * modules/strsep: Likewise.
1480         * modules/strstr: Likewise.
1481         * modules/strtok_r: Likewise.
1482         * tests/test-dirname.c: Don't include "strdup.h", since
1483         <string.h> now suffices.
1484         * tests/test-memmem.c: Don't include "memmem.h", since
1485         <string.h> now suffices.
1486
1487 2007-01-25  Bruno Haible  <bruno@clisp.org>
1488
1489         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1490         *resultp is 0.
1491
1492         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1493         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1494         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1495         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1496
1497         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1498         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1499         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1500         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1501         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1502         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1503
1504 2007-01-24  Bruno Haible  <bruno@clisp.org>
1505
1506         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1507         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1508         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1509         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1510         gl_FUNC_FTS_CORE.
1511         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1512         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1513         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1514         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1515         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1516         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1517         gl_FUNC_FCHOWNAT.
1518         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1519         gl_FUNC_STRFTIME.
1520         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1521         Reported by Ralf Wildenhues.
1522
1523 2007-01-24  Bruno Haible  <bruno@clisp.org>
1524
1525         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1526         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1527         gl_GETADDRINFO.
1528         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1529         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1530         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1531
1532 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1533
1534         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1535         Don't use 'exit'; just return from 'main'.
1536         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1537
1538         * lib/fnmatch_.h: Readjust white space and comments to match
1539         glibc, to avoid spurious diffs.
1540
1541 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1542
1543         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1544         2004-12-01 change by Jakub Jelinek, since this code won't compile
1545         if !LIBC.  Problem reported by Bob Proulx.
1546
1547 2007-01-23  Bruno Haible  <bruno@clisp.org>
1548
1549         * lib/striconveh.c: Include c-strcaseeq.h.
1550         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1551         * modules/striconveh (Depends-on): Add c-strcaseeq.
1552
1553 2007-01-23  Bruno Haible  <bruno@clisp.org>
1554
1555         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1556
1557         * modules/c-strcaseeq: New file.
1558         * lib/c-strcaseeq.h: New file.
1559
1560         * modules/streq: New file.
1561         * lib/streq.h: New file.
1562
1563 2007-01-23  Bruno Haible  <bruno@clisp.org>
1564
1565         * modules/striconveha-tests: New file.
1566         * tests/test-striconveha.c: New file.
1567
1568         * lib/striconveha.h: Include <stdbool.h>.
1569         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1570         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1571         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1572         (mem_iconveha): New function.
1573         (str_iconveha_notranslit): Renamed from str_iconveha.
1574         (str_iconveha): New function.
1575         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1576         c-strcase.
1577
1578 2007-01-23  Bruno Haible  <bruno@clisp.org>
1579
1580         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1581         encodings without forgiving before trying any encoding with handler.
1582         (str_iconveha): Try all encodings without forgiving before trying any
1583         encoding with handler.
1584
1585 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1586
1587         Import the following changes from libc.
1588
1589         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1590
1591         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1592
1593         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1594
1595         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1596         normal_bracket label.
1597
1598         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1599
1600         [BZ #361]
1601         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1602         to normal_bracket after fetching the next character.
1603
1604 2007-01-22  Bruno Haible  <bruno@clisp.org>
1605
1606         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1607         argument.
1608         * lib/striconveh.c (iconv_carefully_1): New function.
1609         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1610         argument.
1611         (str_cd_iconveh): Update.
1612         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1613         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1614         * tests/test-striconveh.c (MAGIC): New macro.
1615         (new_offsets): New function.
1616         (main): Test call with and without offsets.
1617
1618 2007-01-22  Bruno Haible  <bruno@clisp.org>
1619
1620         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1621         * modules/sys_select (Makefile.am): Likewise.
1622         * modules/sys_socket (Makefile.am): Likewise.
1623         * modules/sys_time (Makefile.am): Likewise.
1624
1625 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1626
1627         * modules/gettimeofday (License): Change from GPL to LGPL, since
1628         gettimeofday is a library function.
1629
1630 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1631
1632         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1633
1634 2007-01-21  Bruno Haible  <bruno@clisp.org>
1635
1636         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1637
1638 2007-01-21  Bruno Haible  <bruno@clisp.org>
1639
1640         * modules/striconveha: New file.
1641         * lib/striconveha.h: New file.
1642         * lib/striconveha.c: New file.
1643         * MODULES.html.sh (Internationalization functions): Add striconveha.
1644         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1645         string.
1646         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1647
1648 2007-01-21  Bruno Haible  <bruno@clisp.org>
1649
1650         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1651         * lib/striconveh.c (str_iconveh): Likewise.
1652
1653 2007-01-21  Bruno Haible  <bruno@clisp.org>
1654
1655         * lib/striconveh.h (mem_iconveh): New declaration.
1656         * lib/striconveh.c (mem_iconveh): New function.
1657         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1658
1659 2007-01-21  Bruno Haible  <bruno@clisp.org>
1660
1661         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1662
1663         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1664         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1665         original result buffer.
1666         (str_cd_iconveh): Update.
1667         * tests/test-striconveh.c (main): Update.
1668
1669         * lib/striconv.h (mem_cd_iconv): Change specification.
1670         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1671         result buffer.
1672         (str_cd_iconv): Update.
1673         * tests/test-striconv.c (main): Update.
1674
1675 2007-01-21  Bruno Haible  <bruno@clisp.org>
1676
1677         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1678
1679 2007-01-20  Jim Meyering  <jim@meyering.net>
1680
1681         * lib/userspec.c (parse_with_separator): If a user or group string
1682         starts with "+", skip the corresponding name-to-ID look-up, since
1683         such a look-up must fail: user and group names may not include "+".
1684
1685 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1686
1687         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1688         since we now assume the sys_time module.
1689         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1690         check for sys/time.h; no longer needed.
1691         * modules/poll (Depends-on): Depend on sys_time.
1692
1693 2007-01-18  Bruno Haible  <bruno@clisp.org>
1694
1695         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1696         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1697
1698         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1699         gettimeofday.
1700
1701         * tests/test-gettimeofday.c: Include <time.h>.
1702         (dummy): Remove variable.
1703
1704         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1705         gl_HEADER_SYS_TIME_H.
1706         (gl_HEADER_SYS_TIME_H): New macro.
1707
1708         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1709         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1710         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1711         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1712         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1713         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1714         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1715         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1716         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1717         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1718         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1719
1720         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1721         last change; it caused a compilation error when cross-compiling to
1722         Cygwin.
1723
1724 2007-01-18  Jim Meyering  <jim@meyering.net>
1725
1726         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1727         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1728         than the race-prone "test -d sys || mkdir sys".
1729         (configure.ac): Use AC_PROG_MKDIR_P.
1730         * modules/sys_select: Likewise.
1731         * modules/sys_socket: Likewise.
1732         * modules/sys_time: Likewise.
1733
1734 2007-01-18  Eric Blake  <ebb9@byu.net>
1735
1736         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1737         replace gettimeofday.
1738         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1739         name, to avoid infinite recursion.
1740
1741 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1742
1743         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1744         module sys_time.
1745         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1746         assume timespec.h defines struct timeval.
1747         * lib/settime.c: Likewise.
1748         * lib/utimens.c: Likewise.
1749         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1750         since we now assume the gettimeofday module.
1751         * lib/tempname.c (__gen_tempname): Likewise.
1752         * lib/gettimeofday.h: Remove.
1753         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1754         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1755         Include <time.h>, for 'time()'.
1756         (localtime_buffer_addr): Also use this workaround if
1757         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1758         to simplify the uses.  All uses changed.
1759         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1760         that #undef is inside {}, and 'const' follows type name consistently.
1761         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1762         (gettimeofday): Do not use the maximum possible value for
1763         tv->tv_usec, since that might break usages other than ls.c.
1764         Instead, we'll leave ls.c alone.  This undoes today's patch
1765         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1766         we've never observed the problem but might as well keep the
1767         canary.
1768         * lib/nanosleep.c: Include timespec.h first, for interface check.
1769         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1770         now assume the sys_time module.
1771         * lib/tempname.c: Likewise.
1772         * lib/timespec.h: Likewise.
1773         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1774         needed.
1775         * lib/strftime.c: Likewise.
1776         * lib/timespec.h: Likewise.
1777         * lib/posixtm.c: Include posixtm.h first, for interface check.
1778         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1779         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1780         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1781         * lib/sys_time_.h: New file.
1782         * lib/timespec.h (struct timespec): Use long int, not long.
1783         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1784         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1785         Remove obsolescent call to AC_HEADER_TIME.
1786         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1787         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1788         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1789         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1790         Likewise.
1791         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1792         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1793         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1794         into the sys_time module.  Check for gettimeofday just once.
1795         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1796         for gettimeofday signature to just check the signature.  Merely
1797         compile it, since linking doesn't test signature.  Improve test for
1798         whether gettimeofday.o is actually needed.
1799         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1800         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1801         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1802         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1803         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1804         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1805         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1806         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1807         than worrying about sys/time.h.
1808         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1809         Don't bother worrying about TIME_WITH_SYS_TIME.
1810         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1811         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1812         * m4/sys_time_h.m4: New file.
1813         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1814         Don't include sys/time.h.  Return from main rather than exiting.
1815         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1816         all uses changed.
1817         * modules/gethrxtime (Depends-on): Add sys_time.
1818         * modules/gettime (Depends-on): Likewise.
1819         * modules/gettimeofday (Depends-on): Likewise.
1820         * modules/nanosleep (Depends-on): Likewise.
1821         * modules/settime (Depends-on): Likewise.
1822         * modules/tempname (Depends-on): Likewise.
1823         * modules/utimens (Depends-on): Likewise.
1824         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1825         (Include:) Change back to <sys/time.h>.
1826         (Maintainer:) Add self.
1827         * modules/sys_time: New file.
1828         * modules/tempname (Depends-on): Add gettimeofday.
1829         * tests/test-gettimeofday.c: Include <sys/time.h>
1830         rather than gettimeofday.h.
1831
1832 2007-01-17  Bruno Haible  <bruno@clisp.org>
1833
1834         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1835         the license default to GPL.
1836         (func_create_testdir): Don't complain if a module is LGPL and its
1837         tests module depends on GPLed modules.
1838
1839 2007-01-17  Bruno Haible  <bruno@clisp.org>
1840
1841         * lib/gettimeofday.c (gettimeofday): Add code for the case
1842         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1843         maximum possible value for tv->tv_usec, rather than the minimum one.
1844
1845 2005-10-08  Martin Lambers  <marlam@marlam.de>
1846 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1847 2007-01-16  Bruno Haible  <bruno@clisp.org>
1848
1849         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1850         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1851         gl_FUNC_GETTIMEOFDAY.
1852         (Include): Add gettimeofday.h.
1853         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1854         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1855         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1856         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1857         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1858         * lib/gettimeofday.h: New file.
1859         * lib/gettimeofday.c: Include <sys/timeb.h>.
1860         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1861         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1862         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1863         fall back on time().
1864
1865         * tests/test-gettimeofday.c: New file.
1866         * modules/gettimeofday-tests: New file.
1867
1868 2007-01-16  Eric Blake  <ebb9@byu.net>
1869
1870         * modules/fnmatch (Depends-on): Depend on wchar.
1871         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1872         * m4/fnmatch.m4: Likewise.
1873         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1874         * m4/mbchar.m4: Likewise.
1875         * modules/mbswidth (Depends-on): Depend on wchar.
1876         * lib/mbswidth.c: Assume <wchar.h>.
1877         * m4/mbswidth.m4: Likewise.
1878         * modules/quotearg (Depends-on): Depend on wchar.
1879         * lib/quotearg.c: Assume <wchar.h>.
1880         * m4/quotearg.m4: Likewise.
1881         * modules/regex (Depends-on): Depend on wchar.
1882         * lib/regex_internal.h: Assume <wchar.h>.
1883         * m4/regex.m4: Likewise.
1884         * modules/stdint (Depends-on): Depend on wchar.
1885         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1886         * m4/stdint.m4: Likewise.
1887         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1888         * modules/strftime (Depends-on): Depend on wchar.
1889         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1890         * modules/strtol (Depends-on): Depend on wchar.
1891         * lib/strtol.c: Assume <wchar.h>.
1892         * modules/wcwidth (Depends-on): Depend on wchar.
1893         * lib/wcwidth.h: Assume <wchar.h>.
1894         * m4/wcwidth.m4: Likewise.
1895
1896 2007-01-16  Bruno Haible  <bruno@clisp.org>
1897
1898         * modules/csharpexec-script: New, created from...
1899         * modules/csharpexec: ... this.
1900
1901 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1902
1903         * modules/javaexec-script: New, created from...
1904         * modules/javaexec: ... this.
1905
1906 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1907
1908         * modules/poll (Dependencies): Add sys_select.
1909
1910 2007-01-15  Jim Meyering  <jim@meyering.net>
1911
1912         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1913         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1914         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1915         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1916
1917 2007-01-15  Bruno Haible  <bruno@clisp.org>
1918
1919         * modules/striconveh: New file.
1920         * lib/striconveh.h: New file.
1921         * lib/striconveh.c: New file.
1922         * MODULES.html.sh (Internationalization functions): Add striconveh.
1923
1924         * modules/striconveh-tests: New file.
1925         * tests/test-striconveh.c: New file.
1926
1927 2007-01-15  Bruno Haible  <bruno@clisp.org>
1928
1929         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1930         not from GNU libiconv or GNU libc.
1931
1932 2007-01-15  Bruno Haible  <bruno@clisp.org>
1933
1934         * doc/gnulib-intro.texi (Copyright): Explain the different license
1935         terms for module descriptions, autoconf macros, tests, documentation.
1936
1937 2007-01-14  Bruno Haible  <bruno@clisp.org>
1938
1939         * modules/striconv-tests: New file.
1940         * tests/test-striconv.c: New file.
1941
1942 2007-01-14  Bruno Haible  <bruno@clisp.org>
1943
1944         * modules/iconv-tests: New file.
1945         * tests/test-iconv.c: New file.
1946
1947 2007-01-14  Bruno Haible  <bruno@clisp.org>
1948
1949         * gnulib-tool (func_get_license): For test modules, use the license of
1950         the main module.
1951
1952 2007-01-14  Bruno Haible  <bruno@clisp.org>
1953
1954         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1955         if iconv is found to exist.
1956
1957 2007-01-14  Bruno Haible  <bruno@clisp.org>
1958
1959         * modules/c-ctype-tests: New file.
1960         * tests/test-c-ctype.c: New file.
1961
1962 2007-01-14  Bruno Haible  <bruno@clisp.org>
1963
1964         * modules/binary-io-tests: New file.
1965         * tests/test-binary-io.sh: New file.
1966         * tests/test-binary-io.c: New file.
1967
1968 2007-01-14  Bruno Haible  <bruno@clisp.org>
1969
1970         * modules/array-oset-tests: New file.
1971         * tests/test-array_oset.c: New file.
1972
1973 2007-01-14  Bruno Haible  <bruno@clisp.org>
1974
1975         * modules/array-list-tests: New file.
1976         * tests/test-array_list.c: New file.
1977
1978 2007-01-14  Bruno Haible  <bruno@clisp.org>
1979
1980         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1981         and make.
1982         Reported by Simon Josefsson in
1983         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1984
1985 2007-01-14  Bruno Haible  <bruno@clisp.org>
1986
1987         * modules/allocsa-tests: New file.
1988         * tests/test-allocsa.c: New file.
1989
1990 2007-01-14  Bruno Haible  <bruno@clisp.org>
1991
1992         * modules/fchdir (Depends-on): Add absolute-header.
1993         * modules/unistd (Depends-on): Likewise.
1994
1995 2006-12-30  Bruno Haible  <bruno@clisp.org>
1996
1997         * modules/fchdir: New file.
1998         * modules/unistd (Files): Add lib/unistd_.h.
1999         (Makefile.am): Generate unistd.h from unistd_.h.
2000         * lib/fchdir.c: New file.
2001         * lib/dirent_.h: New file.
2002         * lib/unistd_.h: New file.
2003         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2004         * m4/fchdir.m4: New file.
2005         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2006         (gl_HEADER_UNISTD): Invoke it.
2007         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2008         function.
2009         * lib/backupfile.c (opendir, closedir): Undefine.
2010         * lib/chown.c (open, close): Undefine.
2011         * lib/clean-temp.c (open, close): Undefine.
2012         * lib/copy-file.c (open, close): Undefine.
2013         * lib/execute.c (open, close): Undefine.
2014         * lib/fsusage.c (open, close): Undefine.
2015         * lib/gc-gnulib.c (open, close): Undefine.
2016         * lib/getcwd.c (opendir, closedir): Undefine.
2017         * lib/glob.c (opendir, closedir): Undefine.
2018         * lib/javacomp.c (open, close): Undefine.
2019         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2020         * lib/openat-proc.c (open, close): Undefine.
2021         * lib/pagealign_alloc.c (open, close): Undefine.
2022         * lib/pipe.c (open, close): Undefine.
2023         * lib/progreloc.c (open, close): Undefine.
2024         * lib/savedir.c (opendir, closedir): Undefine.
2025         * lib/utime.c (open, close): Undefine.
2026         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2027
2028 2007-01-10  Bruno Haible  <bruno@clisp.org>
2029
2030         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2031
2032 2007-01-12  Eric Blake  <ebb9@byu.net>
2033
2034         Provide a robust <wchar.h>.  Further simplifications are now
2035         possible in other modules, but not included here.
2036         * modules/wchar: New module.
2037         * m4/wchar.m4: New file.
2038         * lib/wchar_.h: Likewise.
2039         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2040         of the new module.
2041         * MODULES.html.sh (Extended multibyte and wide character utilities):
2042         New section.
2043
2044 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2045
2046         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2047         to a reasonable default for memory allocation.
2048         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2049         file system that reports garbage st_size values for symlinks.
2050         Problem reported by Liyang Hu.
2051
2052 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2053
2054         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2055         Emacs .#* auto-save files).
2056
2057 2007-01-11  Bruno Haible  <bruno@clisp.org>
2058
2059         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2060         directory.
2061
2062 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2063
2064         Use @...@ consistently in lib/wctype_.h.
2065         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2066         on it being set to 1 or 0.
2067         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2068         go back to AC_SUBSTing it.
2069         * modules/wctype (Makefile.am): Undo previous change.
2070
2071 2007-01-10  Eric Blake  <ebb9@byu.net>
2072
2073         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2074         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2075         * modules/wctype (Makefile.am): Likewise.
2076         Reported by Chris McGuire.
2077
2078 2007-01-10  Jim Meyering  <jim@meyering.net>
2079
2080         fts.c: a small readability/maintainability improvement
2081         * lib/fts.c (fts_read): Make this code slightly more readable and
2082         maintainable by hoisting the "sp->fts_cur = p" assignments to
2083         immediately follow the statements that set P.  Derived from
2084         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2085
2086 2007-01-10  Eric Blake  <ebb9@byu.net>
2087
2088         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2089         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2090         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2091         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2092         Reported by Chris McGuire.
2093
2094 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2095
2096         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2097         in sed script.
2098
2099 2007-01-09  Bruno Haible  <bruno@clisp.org>
2100
2101         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2102         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2103         variables.
2104         (func_module): Use them.
2105
2106 2007-01-09  Bruno Haible  <bruno@clisp.org>
2107
2108         * modules/unistr/base: New file.
2109         * lib/unistr.h: New file.
2110
2111         * modules/unistr/u8-to-u16: New file.
2112         * lib/unistr/u8-to-u16.c: New file.
2113
2114         * modules/unistr/u8-to-u32: New file.
2115         * lib/unistr/u8-to-u32.c: New file.
2116
2117         * modules/unistr/u16-to-u8: New file.
2118         * lib/unistr/u16-to-u8.c: New file.
2119
2120         * modules/unistr/u16-to-u32: New file.
2121         * lib/unistr/u16-to-u32.c: New file.
2122
2123         * modules/unistr/u32-to-u8: New file.
2124         * lib/unistr/u32-to-u8.c: New file.
2125
2126         * modules/unistr/u32-to-u16: New file.
2127         * lib/unistr/u32-to-u16.c: New file.
2128
2129         * modules/unistr/u8-check: New file.
2130         * modules/unistr/u16-check: New file.
2131         * modules/unistr/u32-check: New file.
2132         * lib/unistr/u8-check.c: New file.
2133         * lib/unistr/u16-check.c: New file.
2134         * lib/unistr/u32-check.c: New file.
2135
2136         * modules/unistr/u8-chr: New file.
2137         * modules/unistr/u16-chr: New file.
2138         * modules/unistr/u32-chr: New file.
2139         * lib/unistr/u8-chr.c: New file.
2140         * lib/unistr/u16-chr.c: New file.
2141         * lib/unistr/u32-chr.c: New file.
2142
2143         * modules/unistr/u8-cmp: New file.
2144         * modules/unistr/u16-cmp: New file.
2145         * modules/unistr/u32-cmp: New file.
2146         * lib/unistr/u8-cmp.c: New file.
2147         * lib/unistr/u16-cmp.c: New file.
2148         * lib/unistr/u32-cmp.c: New file.
2149
2150         * modules/unistr/u8-cpy: New file.
2151         * modules/unistr/u16-cpy: New file.
2152         * modules/unistr/u32-cpy: New file.
2153         * lib/unistr/u8-cpy.c: New file.
2154         * lib/unistr/u16-cpy.c: New file.
2155         * lib/unistr/u32-cpy.c: New file.
2156         * lib/unistr/u-cpy.h: New file.
2157
2158         * modules/unistr/u8-cpy-alloc: New file.
2159         * modules/unistr/u16-cpy-alloc: New file.
2160         * modules/unistr/u32-cpy-alloc: New file.
2161         * lib/unistr/u8-cpy-alloc.c: New file.
2162         * lib/unistr/u16-cpy-alloc.c: New file.
2163         * lib/unistr/u32-cpy-alloc.c: New file.
2164         * lib/unistr/u-cpy-alloc.h: New file.
2165
2166         * modules/unistr/u8-endswith: New file.
2167         * modules/unistr/u16-endswith: New file.
2168         * modules/unistr/u32-endswith: New file.
2169         * lib/unistr/u8-endswith.c: New file.
2170         * lib/unistr/u16-endswith.c: New file.
2171         * lib/unistr/u32-endswith.c: New file.
2172         * lib/unistr/u-endswith.h: New file.
2173
2174         * modules/unistr/u8-mblen: New file.
2175         * modules/unistr/u16-mblen: New file.
2176         * modules/unistr/u32-mblen: New file.
2177         * lib/unistr/u8-mblen.c: New file.
2178         * lib/unistr/u16-mblen.c: New file.
2179         * lib/unistr/u32-mblen.c: New file.
2180
2181         * modules/unistr/u8-mbtouc: New file.
2182         * modules/unistr/u16-mbtouc: New file.
2183         * modules/unistr/u32-mbtouc: New file.
2184         * lib/unistr/u8-mbtouc.c: New file.
2185         * lib/unistr/u16-mbtouc.c: New file.
2186         * lib/unistr/u32-mbtouc.c: New file.
2187
2188         * modules/unistr/u8-mbtouc-safe: New file.
2189         * modules/unistr/u16-mbtouc-safe: New file.
2190         * modules/unistr/u32-mbtouc-safe: New file.
2191         * lib/unistr/u8-mbtouc-safe.c: New file.
2192         * lib/unistr/u16-mbtouc-safe.c: New file.
2193         * lib/unistr/u32-mbtouc-safe.c: New file.
2194
2195         * modules/unistr/u8-move: New file.
2196         * modules/unistr/u16-move: New file.
2197         * modules/unistr/u32-move: New file.
2198         * lib/unistr/u8-move.c: New file.
2199         * lib/unistr/u16-move.c: New file.
2200         * lib/unistr/u32-move.c: New file.
2201         * lib/unistr/u-move.h: New file.
2202
2203         * modules/unistr/u8-next: New file.
2204         * modules/unistr/u16-next: New file.
2205         * modules/unistr/u32-next: New file.
2206         * lib/unistr/u8-next.c: New file.
2207         * lib/unistr/u16-next.c: New file.
2208         * lib/unistr/u32-next.c: New file.
2209
2210         * modules/unistr/u8-prev: New file.
2211         * modules/unistr/u16-prev: New file.
2212         * modules/unistr/u32-prev: New file.
2213         * lib/unistr/u8-prev.c: New file.
2214         * lib/unistr/u16-prev.c: New file.
2215         * lib/unistr/u32-prev.c: New file.
2216
2217         * modules/unistr/u8-set: New file.
2218         * modules/unistr/u16-set: New file.
2219         * modules/unistr/u32-set: New file.
2220         * lib/unistr/u8-set.c: New file.
2221         * lib/unistr/u16-set.c: New file.
2222         * lib/unistr/u32-set.c: New file.
2223         * lib/unistr/u-set.h: New file.
2224
2225         * modules/unistr/u8-startswith: New file.
2226         * modules/unistr/u16-startswith: New file.
2227         * modules/unistr/u32-startswith: New file.
2228         * lib/unistr/u8-startswith.c: New file.
2229         * lib/unistr/u16-startswith.c: New file.
2230         * lib/unistr/u32-startswith.c: New file.
2231         * lib/unistr/u-startswith.h: New file.
2232
2233         * modules/unistr/u8-stpcpy: New file.
2234         * modules/unistr/u16-stpcpy: New file.
2235         * modules/unistr/u32-stpcpy: New file.
2236         * lib/unistr/u8-stpcpy.c: New file.
2237         * lib/unistr/u16-stpcpy.c: New file.
2238         * lib/unistr/u32-stpcpy.c: New file.
2239         * lib/unistr/u-stpcpy.h: New file.
2240
2241         * modules/unistr/u8-stpncpy: New file.
2242         * modules/unistr/u16-stpncpy: New file.
2243         * modules/unistr/u32-stpncpy: New file.
2244         * lib/unistr/u8-stpncpy.c: New file.
2245         * lib/unistr/u16-stpncpy.c: New file.
2246         * lib/unistr/u32-stpncpy.c: New file.
2247         * lib/unistr/u-stpncpy.h: New file.
2248
2249         * modules/unistr/u8-strcat: New file.
2250         * modules/unistr/u16-strcat: New file.
2251         * modules/unistr/u32-strcat: New file.
2252         * lib/unistr/u8-strcat.c: New file.
2253         * lib/unistr/u16-strcat.c: New file.
2254         * lib/unistr/u32-strcat.c: New file.
2255         * lib/unistr/u-strcat.h: New file.
2256
2257         * modules/unistr/u8-strchr: New file.
2258         * modules/unistr/u16-strchr: New file.
2259         * modules/unistr/u32-strchr: New file.
2260         * lib/unistr/u8-strchr.c: New file.
2261         * lib/unistr/u16-strchr.c: New file.
2262         * lib/unistr/u32-strchr.c: New file.
2263
2264         * modules/unistr/u8-strcmp: New file.
2265         * modules/unistr/u16-strcmp: New file.
2266         * modules/unistr/u32-strcmp: New file.
2267         * lib/unistr/u8-strcmp.c: New file.
2268         * lib/unistr/u16-strcmp.c: New file.
2269         * lib/unistr/u32-strcmp.c: New file.
2270
2271         * modules/unistr/u8-strcpy: New file.
2272         * modules/unistr/u16-strcpy: New file.
2273         * modules/unistr/u32-strcpy: New file.
2274         * lib/unistr/u8-strcpy.c: New file.
2275         * lib/unistr/u16-strcpy.c: New file.
2276         * lib/unistr/u32-strcpy.c: New file.
2277         * lib/unistr/u-strcpy.h: New file.
2278
2279         * modules/unistr/u8-strcspn: New file.
2280         * modules/unistr/u16-strcspn: New file.
2281         * modules/unistr/u32-strcspn: New file.
2282         * lib/unistr/u8-strcspn.c: New file.
2283         * lib/unistr/u16-strcspn.c: New file.
2284         * lib/unistr/u32-strcspn.c: New file.
2285         * lib/unistr/u-strcspn.h: New file.
2286
2287         * modules/unistr/u8-strdup: New file.
2288         * modules/unistr/u16-strdup: New file.
2289         * modules/unistr/u32-strdup: New file.
2290         * lib/unistr/u8-strdup.c: New file.
2291         * lib/unistr/u16-strdup.c: New file.
2292         * lib/unistr/u32-strdup.c: New file.
2293         * lib/unistr/u-strdup.h: New file.
2294
2295         * modules/unistr/u8-strlen: New file.
2296         * modules/unistr/u16-strlen: New file.
2297         * modules/unistr/u32-strlen: New file.
2298         * lib/unistr/u8-strlen.c: New file.
2299         * lib/unistr/u16-strlen.c: New file.
2300         * lib/unistr/u32-strlen.c: New file.
2301         * lib/unistr/u-strlen.h: New file.
2302
2303         * modules/unistr/u8-strmblen: New file.
2304         * modules/unistr/u16-strmblen: New file.
2305         * modules/unistr/u32-strmblen: New file.
2306         * lib/unistr/u8-strmblen.c: New file.
2307         * lib/unistr/u16-strmblen.c: New file.
2308         * lib/unistr/u32-strmblen.c: New file.
2309
2310         * modules/unistr/u8-strmbtouc: New file.
2311         * modules/unistr/u16-strmbtouc: New file.
2312         * modules/unistr/u32-strmbtouc: New file.
2313         * lib/unistr/u8-strmbtouc.c: New file.
2314         * lib/unistr/u16-strmbtouc.c: New file.
2315         * lib/unistr/u32-strmbtouc.c: New file.
2316
2317         * modules/unistr/u8-strncat: New file.
2318         * modules/unistr/u16-strncat: New file.
2319         * modules/unistr/u32-strncat: New file.
2320         * lib/unistr/u8-strncat.c: New file.
2321         * lib/unistr/u16-strncat.c: New file.
2322         * lib/unistr/u32-strncat.c: New file.
2323         * lib/unistr/u-strncat.h: New file.
2324
2325         * modules/unistr/u8-strncmp: New file.
2326         * modules/unistr/u16-strncmp: New file.
2327         * modules/unistr/u32-strncmp: New file.
2328         * lib/unistr/u8-strncmp.c: New file.
2329         * lib/unistr/u16-strncmp.c: New file.
2330         * lib/unistr/u32-strncmp.c: New file.
2331
2332         * modules/unistr/u8-strncpy: New file.
2333         * modules/unistr/u16-strncpy: New file.
2334         * modules/unistr/u32-strncpy: New file.
2335         * lib/unistr/u8-strncpy.c: New file.
2336         * lib/unistr/u16-strncpy.c: New file.
2337         * lib/unistr/u32-strncpy.c: New file.
2338         * lib/unistr/u-strncpy.h: New file.
2339
2340         * modules/unistr/u8-strnlen: New file.
2341         * modules/unistr/u16-strnlen: New file.
2342         * modules/unistr/u32-strnlen: New file.
2343         * lib/unistr/u8-strnlen.c: New file.
2344         * lib/unistr/u16-strnlen.c: New file.
2345         * lib/unistr/u32-strnlen.c: New file.
2346         * lib/unistr/u-strnlen.h: New file.
2347
2348         * modules/unistr/u8-strpbrk: New file.
2349         * modules/unistr/u16-strpbrk: New file.
2350         * modules/unistr/u32-strpbrk: New file.
2351         * lib/unistr/u8-strpbrk.c: New file.
2352         * lib/unistr/u16-strpbrk.c: New file.
2353         * lib/unistr/u32-strpbrk.c: New file.
2354         * lib/unistr/u-strpbrk.h: New file.
2355
2356         * modules/unistr/u8-strrchr: New file.
2357         * modules/unistr/u16-strrchr: New file.
2358         * modules/unistr/u32-strrchr: New file.
2359         * lib/unistr/u8-strrchr.c: New file.
2360         * lib/unistr/u16-strrchr.c: New file.
2361         * lib/unistr/u32-strrchr.c: New file.
2362
2363         * modules/unistr/u8-strspn: New file.
2364         * modules/unistr/u16-strspn: New file.
2365         * modules/unistr/u32-strspn: New file.
2366         * lib/unistr/u8-strspn.c: New file.
2367         * lib/unistr/u16-strspn.c: New file.
2368         * lib/unistr/u32-strspn.c: New file.
2369         * lib/unistr/u-strspn.h: New file.
2370
2371         * modules/unistr/u8-strstr: New file.
2372         * modules/unistr/u16-strstr: New file.
2373         * modules/unistr/u32-strstr: New file.
2374         * lib/unistr/u8-strstr.c: New file.
2375         * lib/unistr/u16-strstr.c: New file.
2376         * lib/unistr/u32-strstr.c: New file.
2377         * lib/unistr/u-strstr.h: New file.
2378
2379         * modules/unistr/u8-strtok: New file.
2380         * modules/unistr/u16-strtok: New file.
2381         * modules/unistr/u32-strtok: New file.
2382         * lib/unistr/u8-strtok.c: New file.
2383         * lib/unistr/u16-strtok.c: New file.
2384         * lib/unistr/u32-strtok.c: New file.
2385         * lib/unistr/u-strtok.h: New file.
2386
2387         * modules/unistr/u8-uctomb: New file.
2388         * modules/unistr/u16-uctomb: New file.
2389         * modules/unistr/u32-uctomb: New file.
2390         * lib/unistr/u8-uctomb.c: New file.
2391         * lib/unistr/u16-uctomb.c: New file.
2392         * lib/unistr/u32-uctomb.c: New file.
2393
2394         * MODULES.html.sh (Unicode string functions): Add the new modules.
2395
2396 2007-01-08  Bruno Haible  <bruno@clisp.org>
2397
2398         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2399         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2400         subdirectories.
2401
2402 2007-01-08  Karl Berry  <karl@gnu.org>
2403
2404         * doc/error.texi: mention that main() fns must set program_name
2405         when progname is used.
2406
2407 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2408
2409         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2410         WCTYPE_H is empty, for the benefit of builds from non-distclean
2411         directories.  Problem reported by Eric Blake in
2412         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2413
2414 2007-01-08  Bruno Haible  <bruno@clisp.org>
2415
2416         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2417         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2418         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2419         PROVIDE_CANONICALIZE_FILENAME_MODE.
2420         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2421
2422 2007-01-08  Bruno Haible  <bruno@clisp.org>
2423
2424         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2425         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2426         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2427         * lib/fts.c: Likewise.
2428         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2429
2430 2006-12-25  Bruno Haible  <bruno@clisp.org>
2431
2432         * modules/utf8-ucs4-safe: New file.
2433         * lib/utf8-ucs4-safe.h: New file.
2434         * lib/unistr/utf8-ucs4-safe.c: New file.
2435
2436         * modules/utf16-ucs4-safe: New file.
2437         * lib/utf16-ucs4-safe.h: New file.
2438         * lib/unistr/utf16-ucs4-safe.c: New file.
2439
2440         * MODULES.html.sh (Unicode string functions): Add the new modules.
2441
2442 2007-01-08  Bruno Haible  <bruno@clisp.org>
2443
2444         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2445         (Depends-on): Add unitypes.
2446         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2447         (u8_mbtouc_aux): Move out to separate file.
2448         (u8_mbtouc): Use ucs4_t, uint8_t types.
2449         * lib/unistr/utf8-ucs4.c: New file.
2450
2451         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2452         (Depends-on): Add unitypes.
2453         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2454         (u16_mbtouc_aux): Move out to separate file.
2455         (u16_mbtouc): Use ucs4_t, uint16_t types.
2456         * lib/unistr/utf16-ucs4.c: New file.
2457
2458         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2459         (Depends-on): Add unitypes.
2460         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2461         (u8_uctomb_aux): Move out to separate file.
2462         (u8_uctomb): Use ucs4_t, uint8_t types.
2463         * lib/unistr/ucs4-utf8.c: New file.
2464
2465         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2466         (Depends-on): Add unitypes.
2467         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2468         (u16_uctomb_aux): Move out to separate file.
2469         (u16_uctomb): Use ucs4_t, uint16_t types.
2470         * lib/unistr/ucs4-utf16.c: New file.
2471
2472 2006-12-25  Bruno Haible  <bruno@clisp.org>
2473
2474         * modules/unitypes: New file.
2475         * lib/unitypes.h: New file.
2476         * MODULES.html.sh (func_all_modules): New section "Unicode string
2477         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2478         this section. Add unitypes.
2479
2480 2007-01-08  Bruno Haible  <bruno@clisp.org>
2481
2482         Avoid variable names that conflict with those from libtool.
2483         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2484         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2485         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2486         library_names_spec to acl_library_names_spec, hardcode_* to
2487         acl_hardcode_*.
2488         Reported by Ralf Wildenhues.
2489
2490 2007-01-08  Bruno Haible  <bruno@clisp.org>
2491
2492         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2493         definition.
2494         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2495         definition.
2496         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2497         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2498         definition.
2499         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2500         definition.
2501         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2502         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2503         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2504         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2505         definition.
2506         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2507         definition.
2508         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2509         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2510         GC_USE_<algorithm>.
2511         * lib/gc-libgcrypt.c: Likewise.
2512         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2513         * modules/gc-arctwo (configure.ac): Likewise.
2514         * modules/gc-des (configure.ac): Likewise.
2515         * modules/gc-hmac-md5 (configure.ac): Likewise.
2516         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2517         * modules/gc-md2 (configure.ac): Likewise.
2518         * modules/gc-md4 (configure.ac): Likewise.
2519         * modules/gc-md5 (configure.ac): Likewise.
2520         * modules/gc-random (configure.ac): Likewise.
2521         * modules/gc-rijndael (configure.ac): Likewise.
2522         * modules/gc-sha1 (configure.ac): Likewise.
2523
2524 2007-01-08  Bruno Haible  <bruno@clisp.org>
2525
2526         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2527         macro definition.
2528         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2529         definition.
2530         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2531         definition.
2532         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2533         * modules/fcntl-safer (configure.ac): Likewise.
2534         * modules/fopen-safer (configure.ac): Likewise.
2535         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2536         GNULIB_FWRITEERROR macro definition.
2537
2538 2007-01-08  Bruno Haible  <bruno@clisp.org>
2539
2540         * m4/gnulib-common.m4: New file.
2541         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2542         (func_get_filelist): Add m4/gnulib-common.m4.
2543
2544 2007-01-08  Bruno Haible  <bruno@clisp.org>
2545
2546         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2547         command.
2548
2549 2007-01-08  Jim Meyering  <jim@meyering.net>
2550
2551         Use a more robust test for a "can't happen" condition.
2552         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2553         narrowed the st_size value.  Presuming the "can't happen" condition
2554         is true, that narrowing could conceivably convert an invalid st_size
2555         value into a valid one.  Instead, use a change based on Matthew
2556         Woehlke's original patch.
2557
2558         Slight readability improvement: use an assert-like macro
2559         in place of literal "abort ()" uses.
2560         * lib/fts.c (fts_assert): Define.
2561         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2562         Use this macro instead of a bare 'abort'.
2563
2564 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2565
2566         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2567         simply work around them.
2568         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2569         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2570         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2571         Don't bother to define as macros, since the standard doesn't require it.
2572         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2573         longer worry about IRIX 5.3.
2574         (HAVE_WCTYPE_CTMP_BUG): Remove.
2575
2576 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2577
2578         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2579         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2580         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2581         Problems reported by Georg Schwarz for IRIX 5.3.
2582
2583         * gnulib-tool (autoconf_minversion): Take the maximum version number
2584         found, not the minimum.  Problem reported by James Youngman.
2585
2586 2007-01-03  Karl Berry  <karl@gnu.org>
2587
2588         * doc/error.texi: new file, explaining interaction with progname.
2589         * doc/gnulib.texi: include it.  Update copyright.
2590
2591 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2592
2593         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2594         AC_CANONICAL_HOST, to improve autobuild outputs.
2595
2596 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2597             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2598
2599         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2600         sockets, server sockets, and other file descriptors.  Count errors
2601         to compute the return value.  Reorder the code a bit to be easier
2602         to follow.  Don't set event bits that were not requested (except
2603         POLLERR and POLLHUP).
2604
2605 2007-01-01  Bruno Haible  <bruno@clisp.org>
2606
2607         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2608
2609 2007-01-03  Jim Meyering  <jim@meyering.net>
2610
2611         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2612
2613 2007-01-02  Bruno Haible  <bruno@clisp.org>
2614
2615         * modules/settime (Include): Require timespec.h.
2616         * modules/nanosleep (Include): Likewise.
2617
2618 2007-01-01  Bruno Haible  <bruno@clisp.org>
2619
2620         * gnulib-tool (func_emit_copyright_notice): Bump year.
2621         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2622
2623 2007-01-01  Bruno Haible  <bruno@clisp.org>
2624
2625         Improve support for OpenBSD.
2626         * build-aux/config.rpath (libname_spec): Export.
2627         (library_names_spec): New variable. Export.
2628         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2629         library_names_spec from the config.rpath output. Locate shared library
2630         through the name pattern in library_names_spec.
2631
2632 2007-01-01  Eric Blake  <ebb9@byu.net>
2633
2634         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2635
2636 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2637
2638         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2639         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2640         assume the C locale, and avoid an "eval" that could cause trouble.
2641         Problem with SORT reported by Bob Proulx.
2642
2643         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2644         Define.  Trivial patch from Henning Nielsen Lund, originally
2645         sent to bug-grep@gnu.org today.
2646
2647 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2648
2649         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2650         struct stat.  Problem reported by Henning Nielsen Lund.
2651         * lib/acl.c: Include acl.h first, to check interface.  Don't
2652         bother to include sys/types.h and sys/stat.h again.
2653
2654 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2655
2656         Import the following change from libc; problem reported by
2657         Sven Verdoolaege.
2658
2659         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2660
2661         [BZ #1373]
2662         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2663
2664 2006-12-28  Jim Meyering  <jim@meyering.net>
2665
2666         * build-aux/announce-gen: Do not assume that the package
2667         builds any of tar.gz, tar.bz2, and .xdelta files.
2668         Suggestion from Simon Josefsson.
2669
2670 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2671
2672         * modules/announce-gen: New file.
2673
2674 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2675
2676         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2677         handles its gotchas now.
2678         * lib/mbswidth.c: Likewise.
2679         * lib/wcwidth.h: Likewise.
2680         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2681         and iswcntrl; the wctype module does this stuff now.
2682         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2683         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2684         * modules/mbchar (Depends-on): Add wctype.
2685         * modules/mbswidth (Depends-on): Likewise.
2686         * modules/wcwidth (Depends-on): Likewise.
2687
2688 2006-12-27  Eric Blake  <ebb9@byu.net>
2689
2690         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2691         module uses more than what <wctype.h> is required to provide.
2692
2693 2006-12-26  Eric Blake  <ebb9@byu.net>
2694
2695         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2696
2697 2006-12-26  Eric Blake  <ebb9@byu.net>
2698
2699         * modules/absolute-header: New module.
2700         * modules/fcntl (Depends-on): Depend on it.
2701         * modules/inttypes (Depends-on): Likewise.
2702         * modules/stdint (Depends-on): Likewise.
2703         * modules/sys_stat (Depends-on): Likewise.
2704         * modules/wctype (Depends-on): Likewise.
2705         * MODULES.html.sh (Support for building libraries and
2706         executables): Document it.
2707
2708 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2709
2710         * gnulib-tool (SED): Remove, undoing previous change.
2711         The problem was that it broke coreutils on Solaris, because
2712         "sed --posix" leaked into a makefile.
2713         (sed): New alias, if 'alias' and GNU sed.
2714
2715 2006-12-24  Jim Meyering  <jim@meyering.net>
2716
2717         Work around an fchownat bug in glibc-2.4:
2718         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2719         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2720         in spite of the -P option.
2721         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2722         New macros.
2723         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2724         * modules/openat (Files): Add lib/fchownat.c.
2725         * lib/openat.c (fchownat): Don't define here.  Move to...
2726         * lib/fchownat.c: ...this new file.
2727
2728 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2729
2730         Fix bug reported by Bruno Haible in
2731         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2732         where quotearg.c didn't compile on Mac OS X 10.2 because it
2733         lacks <wchar.h> and wint_t.
2734         * lib/wctype_.h (__wctype_wint_t): New type.
2735         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2736         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2737         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2738         Arg is now of type __wctype_wint_t, not wint_t.
2739         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2740         substitute HAVE_WINT_T.
2741         * modules/wctype (Files): Add m4/wint_t.m4.
2742         (wctype.h): Substitute HAVE_WINT_T.
2743
2744 2006-12-23  Bruno Haible  <bruno@clisp.org>
2745
2746         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2747
2748 2006-12-23  Bruno Haible  <bruno@clisp.org>
2749
2750         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2751         S_ISLNK.
2752         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2753         mingw.
2754
2755 2006-12-22  Bruno Haible  <bruno@clisp.org>
2756
2757         * lib/copy-file.c: Include acl.h.
2758         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2759         Close the file descriptors only after being done with copy_acl.
2760         * modules/copy-file (Depends-on): Add acl.
2761
2762 2006-12-22  Bruno Haible  <bruno@clisp.org>
2763
2764         * gnulib-tool (SED): New variable.
2765         Use $SED instead of sed everywhere.
2766
2767 2006-12-22  Bruno Haible  <bruno@clisp.org>
2768
2769         * modules/no-c++: New file.
2770         * m4/no-c++.m4: New file.
2771         * MODULES.html.sh (Support for building libraries and executables):
2772         Add no-c++.
2773
2774 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2775
2776         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2777         Include <limits.h>, and use its INT_MAX to rewrite the
2778         j loop so that it does not overflow 'int'.  Problem reported by
2779         Ralf Wildenhues in
2780         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2781         Play it safe by shifting left by 1 rather than multiplying by 2,
2782         as GCC is less likely to optimize this away when the value
2783         is signed (when it assumes overflow leads to undefined behavior).
2784         Also, don't assume time_t uses two's complement.
2785
2786 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2787
2788         * MODULES.html.sh: New module wctype.
2789         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2790         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2791         <wctype.h>, since the new wctype module should fix this.
2792         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2793         the wctype module should arrange for it.
2794         * lib/regex_internal.h: Likewise.
2795         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2796         since the wctype module should handle this now.
2797         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2798         * modules/fnmatch (Depends-on): Add wctype.
2799         * modules/quotearg (Depends-on): Likewise.
2800         * modules/regex (Depends-on): Likewise.
2801
2802 2006-12-19  Bruno Haible  <bruno@clisp.org>
2803
2804         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2805         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2806
2807 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2808
2809         * modules/savewd (Depends-on): Fix dependency on fcntl.
2810
2811 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2812
2813         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2814         conforms to C99, rather than relying on the user's environment
2815         setting of STDINT_H.
2816
2817 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2818         and Eric Blake  <ebb9@byu.net>
2819
2820         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2821         This is more consistent with the other defines here.
2822         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2823         Port to z/OS.  Problem reported by Paul Gilmartin.
2824         Change local vars to use gl_ prefix rather than ac_.
2825         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2826         with other defines.
2827         * modules/double-slash-root: New module.
2828         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2829         (Depends-on): Add double-slash-root.
2830         * MODULES.html.sh (File system functions): Mention new module.
2831
2832 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2833
2834         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2835         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2836         This is for the benefit of gzip, which doesn't do i18n.
2837
2838 2006-12-12  Jim Meyering  <jim@meyering.net>
2839
2840         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2841         Reported by Andreas Schwab <schwab@suse.de>.
2842
2843 2006-12-12  Bruno Haible  <bruno@clisp.org>
2844
2845         Merge these changes.
2846         2006-09-05  Bruno Haible  <bruno@clisp.org>
2847         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2848         iconv_alloc succeeded.
2849         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2850         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2851         test for " && dest " at the end - dest is always != NULL there. Call
2852         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2853         with 2xNULL arguments, also to flush the state storage. Handle the
2854         IRIX iconv behaviour. Realloc the final result, to throw away unused
2855         memory.
2856
2857 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2858
2859         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2860         and fchmodat unconditionally, since glibc 2.4 has them.
2861         Problem reported by Arkadiusz Miskiewicz.
2862
2863 2006-12-10  Bruno Haible  <bruno@clisp.org>
2864
2865         * gnulib-tool (func_import): Show the include files only for those
2866         modules that are copied and specified.
2867         Reported by Karl Berry.
2868
2869 2006-12-08  Jim Meyering  <jim@meyering.net>
2870
2871         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2872         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2873
2874         * build-aux/announce-gen: Add two new options, both optional:
2875         --bootstrap-tools=TOOL_LIST
2876               a comma-separated list of tools, e.g.,
2877               autoconf,automake,bison,gnulib
2878         --gnulib-snapshot-date=DATE
2879               if gnulib is in the bootstrap tool list,
2880               then report this as the snapshot date.
2881               If not specified, use the current date/time.
2882               If you specify a date here, be sure it's UTC.
2883
2884 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2885
2886         * tests/test-argp-2.sh: Fix test to match actual output.
2887         (func_compare): Fix sed script to be portable.
2888
2889 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2890
2891         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2892         workaround for this case.  It is not autoconfigured now; offhand
2893         it's hard to see how to autoconfigure it.
2894
2895 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2896
2897         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2898         a directory that is about to be chowned.  Such a directory's
2899         initial file permissions should permit the owner only and this
2900         should not be changed until after the chown, since the group and
2901         other bits would be incorrect if they granted permission before
2902         the chown.
2903
2904         Fix porting problem for iswctype reported by Georg Schwarz in:
2905         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2906         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2907         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2908         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2909         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2910
2911 2006-12-03  Jim Meyering  <jim@meyering.net>
2912
2913         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2914         p->fts_statp may not yet be defined.
2915         (fts_read): Instead, set it in the caller, once p->fts_statp is
2916         sure to be defined, and corresponds to a top-level directory.
2917         This bug made du -x fail.  Here's the coreutils test case:
2918         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2919         Reported by Mike Frysinger.
2920
2921 2006-12-01  Jim Meyering  <jim@meyering.net>
2922
2923         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2924         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2925         Reported by Simon Josefsson.
2926
2927 2006-11-30  Jim Meyering  <jim@meyering.net>
2928
2929         * m4/warning.m4: Use the all-permissive copyright notice
2930         recommended by RMS (rather than LGPL).
2931         * m4/vararrays.m4: Likewise.
2932         * m4/flexmember.m4: Likewise.
2933
2934 2006-11-29  Bruno Haible  <bruno@clisp.org>
2935
2936         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2937         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2938         using +=.
2939         Reported by Simon Josefsson <simon@josefsson.org>.
2940
2941 2006-11-28  James Youngman <jay@gnu.org>
2942
2943         * README: Advise users that they might find the bug-gnulib@gnu.org
2944         and autotools-announce@gnu.org mailing lists useful.
2945
2946 2006-11-28  Bruno Haible  <bruno@clisp.org>
2947
2948         * m4/ptrdiff_max.m4: Remove file.
2949
2950 2006-11-21  Bruno Haible  <bruno@clisp.org>
2951
2952         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2953         _AC_COMPUTE_INT.
2954         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2955         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2956         _AC_COMPUTE_INT.
2957         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2958         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2959         _AC_COMPUTE_INT.
2960         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2961
2962 2006-11-28  Jim Meyering  <jim@meyering.net>
2963
2964         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2965         warning from "gcc -Wshadow" about shadowing the builtin.
2966
2967 2006-11-27  Bruno Haible  <bruno@clisp.org>
2968
2969         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2970         _AC_COMPUTE_INT.
2971         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2972
2973 2006-11-27  Bruno Haible  <bruno@clisp.org>
2974             Paul Eggert  <eggert@cs.ucla.edu>
2975
2976         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2977
2978 2006-11-26  Bruno Haible  <bruno@clisp.org>
2979
2980         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2981         noinst_LTLIBRARIES.
2982
2983 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2984             Bruno Haible  <bruno@clisp.org>
2985
2986         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2987         if compiling with "gcc -ansi".
2988
2989 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2990
2991         Fix some incompatibilities with gcc -ansi -pedantic.
2992         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2993         if compiling pedantically with GCC, unless it's C99 or later.
2994         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2995         it mishandles gcc -ansi -pedantic as well.
2996         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2997         if gcc -pedantic.
2998         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2999         initializers for struct if -pedantic, unless it's C99 or later.
3000
3001 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3002
3003         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3004         Don't close an fd more than once. Identical atimes indicate
3005         success, not failure.
3006
3007 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3008
3009         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3010
3011 2006-11-23  Jim Meyering  <jim@meyering.net>
3012
3013         * build-aux/announce-gen: New file.  From coreutils.
3014
3015 2006-11-22  Jim Meyering  <jim@meyering.net>
3016
3017         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3018         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3019         (fts_read): Use a temporary to narrow the overused st_size member
3020         before using it in a switch statement.  Reported by Matthew Woehlke.
3021
3022         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3023         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3024
3025 2006-11-20  Bruno Haible  <bruno@clisp.org>
3026
3027         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3028         changequote instead of pairs of brackets.
3029         Reported by Andreas Schwab <schwab@suse.de>.
3030
3031 2006-11-21  Jim Meyering  <jim@meyering.net>
3032
3033         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3034         so as to remain compatible with older compilers.
3035         Patch from Michael Deutschmann.
3036
3037 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3038
3039         * MODULES.html.sh (File system functions): Add openat.
3040
3041         * lib/openat.h (rpl_fstatat): New macro, if
3042         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3043         (fstatat): Define to rpl_fstatat under the same conditions,
3044         unless COMPILING_FSTATAT.
3045         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3046         seems to have the bug.
3047         * lib/fstatat.c: New file.
3048         * modules/openat (Files): Add it.
3049
3050 2006-11-20  Bruno Haible  <bruno@clisp.org>
3051
3052         * Makefile: New file.
3053
3054 2006-11-20  Jim Meyering  <jim@meyering.net>
3055
3056         The beginnings of syntax-related checks for gnulib.
3057         * lib/Makefile: New file.
3058         * lib/t-idcache: New script.  Ensure that the two halves of
3059         idcache.c stay in sync.
3060
3061         * lib/idcache.c: Adjust comments in user- and group- portions to
3062         be more accurate, and to be consistent with one another.
3063
3064 2006-11-20  Jim Meyering  <jim@meyering.net>
3065
3066         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3067         continue using the flexible array member (thus, this module performs
3068         half as many malloc calls), with the addition that...
3069         (getgroup, getuser): Consistently record a non-match via an empty
3070         "name" string, and map an empty string match to a NULL return value.
3071         * modules/idcache (Depends-on): Re-add flexmember.
3072
3073         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3074         (getuidbyname, getgroup, getgidbyname): Likewise.
3075
3076         Use cleaner syntax: NULL rather than 0.
3077         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3078
3079 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3080
3081         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3082         It mishandled the case where the group was missing.
3083         Problem reported by Greg Schafer.
3084         * modules/idcache: Likewise.
3085
3086 2006-11-18  Jim Meyering  <jim@meyering.net>
3087
3088         * check-module (%exempt_header): Add exception for some
3089         conditionally-included headers.
3090
3091         * modules/i-ring (Depends-on): Add verify.
3092         (License): Change to LGPL.
3093
3094 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3095
3096         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3097         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3098         and inttostr.h.  Use snprintf rather than uinttostr, so that
3099         LGPLed code doesn't depend on GPLed.
3100
3101 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3102
3103         * modules/inline (License): Change from GPL to LGPL.
3104
3105 2006-11-17  Jim Meyering  <jim@meyering.net>
3106
3107         * modules/d-type (License): Switch to LGPL.
3108
3109 2006-11-15  Bruno Haible  <bruno@clisp.org>
3110
3111         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3112
3113 2006-11-15  Eric Blake  <ebb9@byu.net>
3114
3115         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3116         the module dependency.
3117
3118 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3119             Bruno Haible  <bruno@clisp.org>
3120
3121         * gnulib-tool (func_create_testdir): Add license consistency check.
3122
3123 2006-11-15  Eric Blake  <ebb9@byu.net>
3124
3125         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3126         random "(cached)" in configure output.
3127
3128 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3129
3130         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3131         test for conforming inttypes.h is both announced and cached.
3132
3133         * MODULES.html.sh (seen_modules, seen_files): New variables.
3134         (func_module): Rewrite to use a few less gnulib-tool and sed
3135         invocations.  Avoid a couple of quadratic algorithms for ...
3136         (missed_modules, missed_files): ... these, with ...
3137         (func_append, func_tmpdir): ... these new functions, from
3138         gnulib-tool.  Analogously, install traps for cleanup.
3139
3140         * tests/test-gc.c (main): Remove unused variables.
3141         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3142
3143 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3144
3145         * modules/inttostr (License): Change to LGPL.
3146
3147 2006-11-14  Eric Blake  <ebb9@byu.net>
3148
3149         * modules/tempname (License): Change to LGPL.
3150
3151 2006-11-14  Eric Blake  <ebb9@byu.net>
3152
3153         * doc/functions.texi (Function Portability): *printf functions on
3154         Cygwin now understand all POSIX size specifiers.
3155
3156 2006-11-14  Bruno Haible  <bruno@clisp.org>
3157
3158         * modules/c-ctype (License): Change to LGPL.
3159
3160 2006-11-12  Bruno Haible  <bruno@clisp.org>
3161
3162         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3163         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3164         for GNOME libraries, for which the include files are installed in
3165         subdirectories of $prefix/include.
3166
3167 2006-11-12  Bruno Haible  <bruno@clisp.org>
3168
3169         * m4/lib-link.m4: Require at least autoconf-2.54.
3170         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3171         name to underscores for the --with option.
3172
3173 2006-11-13  Bruno Haible  <bruno@clisp.org>
3174
3175         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3176         the tests directory.
3177         Reported by Ralf Wildenhues.
3178
3179 2006-11-13  Bruno Haible  <bruno@clisp.org>
3180
3181         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3182         (func_emit_initmacro_end): Undo the override here.
3183         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3184         Works around the famous automake error in coreutils.
3185
3186 2006-11-13  Eric Blake  <ebb9@byu.net>
3187
3188         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3189         element, not its node.
3190
3191 2006-11-12  Bruno Haible  <bruno@clisp.org>
3192
3193         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3194         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3195
3196 2006-11-12  Bruno Haible  <bruno@clisp.org>
3197
3198         * gnulib-tool: New option --local-symlink.
3199         (func_usage): Document it.
3200         (lsymbolic): New variable.
3201         (func_import, func_create_testdir): If --symlink was not specified,
3202         test whether --local-symlink was specified and the file comes from
3203         the local_gnulib_dir.
3204
3205 2006-11-12  Bruno Haible  <bruno@clisp.org>
3206
3207         * gnulib-tool (func_ln): New function.
3208         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3209
3210 2006-11-12  Bruno Haible  <bruno@clisp.org>
3211
3212         Finish support for source files in subdirectories.
3213         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3214         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3215         AUTOMAKE_OPTIONS.
3216         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3217
3218 2006-11-12  Bruno Haible  <bruno@clisp.org>
3219
3220         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3221         EXTRA_lib_SOURCES augmentation.
3222         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3223
3224 2006-11-12  Jim Meyering  <jim@meyering.net>
3225
3226         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3227         file descriptors.  This also averts a failure on systems with
3228         native openat support when a traversed directory lacks "x" access.
3229         * lib/fts_.h: Include "i-ring.h"
3230         (struct FTS) [fts_fd_ring]: New member.
3231         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3232         (FCHDIR): Add parentheses.
3233         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3234         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3235         When descending, rather than simply closing the previous
3236         fts_cwd_fd value, push that file descriptor onto the ring.
3237         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3238         (fts_open): Initialize the new fd_ring member.
3239         (fts_close): Clear the ring.
3240         (fts_safe_changedir): When possible, use our new fd_ring to skip
3241         the diropen and fstat and dev/ino comparison that would normally
3242         accompany a virtual `chdir ("..")'.
3243
3244         * modules/fts (Depends-on): Add i-ring.
3245         * modules/i-ring: New module.
3246         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3247         * m4/i-ring.m4: New file.
3248
3249 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3250
3251         * gnulib-tool (func_create_testdir): Fix replacement of
3252         `build-aux' in configure.ac.  Run autotools in gltests
3253         subdirectory.
3254         (func_create_testdir, func_create_megatestdir, test): There is
3255         no need for '--force' in most autotool invocations in a new
3256         tree.  Actually fail the whole test if any of the tools, or the
3257         configure or make stages fail.
3258
3259         Sync from Automake.
3260         * build-aux/gnupload: Revert last change.  Add pointer to upload
3261         instructions of the GNU Maintenance Instructions.
3262         Suggestion by Karl Berry.
3263
3264 2006-11-10  Jim Meyering  <jim@meyering.net>
3265
3266         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3267
3268 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3269
3270         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3271         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3272         (bind_textdomain_codeset) [! ENABLE_NLS]:
3273         Evaluate all the arguments.  That way, callers get compatible behavior
3274         if the arguments have side effects.  Also, it avoids some GCC
3275         diagnostics in some cases; Joel E. Denny reported problems when Bison
3276         was configured with --enable-gcc-warnigs.
3277
3278 2006-11-10  Jim Meyering  <jim@meyering.net>
3279
3280         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3281         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3282         account.
3283
3284 2006-11-10  Jim Meyering  <jim@meyering.net>
3285
3286         * modules/inline: New file/module.
3287         * modules/xalloc (Files): Remove m4/inline.m4.
3288         (Depends-on): Add inline, instead.
3289         * modules/oset: Likewise.
3290         * modules/list: Likewise.
3291
3292 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3293
3294         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3295         Problem reported by Matthew Woehlke.
3296
3297 2006-11-09  Bruno Haible  <bruno@clisp.org>
3298
3299         * lib/tempname.c (gen_tempname): Remove variant that invokes
3300         __gen_tempname.
3301         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3302         __gen_tempname.
3303
3304 2006-11-08  Bruno Haible  <bruno@clisp.org>
3305
3306         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3307         to 'yes' instead of 'cross-compiling'.
3308
3309 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3310
3311         * lib/quotearg.h (quotearg_free): New decl.
3312         * lib/quotearg.c (quotearg_free): New function.
3313         (slot0, nslots, slotvec0, slotvec):
3314         Now file-scope so that quotearg_free can get at them.
3315
3316 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3317
3318         Sync from Automake.
3319         * build-aux/gnupload: Add missing 'gnu' to example URL.
3320         Report by Karl Berry.
3321
3322 2006-11-08  Bruno Haible  <bruno@clisp.org>
3323
3324         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3325         Suggested by Paul Eggert.
3326
3327 2006-11-08  Jim Meyering  <jim@meyering.net>
3328
3329         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3330         It's already included if !_LIBC.
3331         (fts_safe_changedir): Add a comment.
3332
3333 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3334
3335         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3336         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3337         Matthew Woehlke.
3338
3339         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3340         definitions up, to avoid colliding with change below.
3341         (static_inline) [HAVE_INLINE]: New macro.
3342         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3343         Provide extern decls when !HAVE_INLINE.  Do not define unless
3344         static_inline is defined, either by us or by xmalloc.c.  Use
3345         static_inline rather than static inline.
3346         (XCALLOC): Optimize sizeof(T) = 1 case.
3347         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3348
3349 2006-11-07  Bruno Haible  <bruno@clisp.org>
3350
3351         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3352         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3353         AC_C_INLINE.
3354         * modules/xalloc (Files): Add m4/inline.m4.
3355
3356 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3357
3358         * README: Fix typo.
3359         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3360         (Miscellanous Notes): ...from this.
3361
3362 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3363
3364         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3365         Mention that offsetof should be used instead of sizeof.
3366         From Bruno Haible.
3367
3368 2006-11-07  Bruno Haible  <bruno@clisp.org>
3369
3370         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3371
3372 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3373
3374         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3375         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3376         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3377         (gl_tree_add_before, gl_tree_add_after):
3378         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3379         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3380         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3381         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3382         (gl_linked_add_after, gl_linked_add_at): Likewise.
3383         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3384         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3385         (gl_tree_add_before, gl_tree_add_after): Likewise.
3386         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3387         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3388         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3389
3390 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3391
3392         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3393
3394 2006-11-06  Bruno Haible  <bruno@clisp.org>
3395
3396         * m4/inline.m4: New file.
3397         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3398         * modules/list (Files): Add m4/inline.m4.
3399         * modules/oset (Files): Likewise.
3400
3401 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3402
3403         * lib/idcache.c: Include <stddef.h>, for offsetof.
3404         (struct userid.name): Change from char * to a flexible array member.
3405         All uses changed.
3406         * modules/idcache (Depends-on): Add flexmember.
3407
3408         * MODULES.html.sh (Core language properties): New module flexmember.
3409         * modules/flexmember, m4/flexmember.m4: New files.
3410
3411         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3412         inline functions that are identical with the old xnmalloc_inline,
3413         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3414         that we can avoid some unnecessary integer multiplications and
3415         divisions in the common case where the element size is known at
3416         compile time.
3417         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3418         needed.
3419         (xnboundedmalloc): Remove.
3420         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3421         arguments, for consistency with rest of this header.
3422         (xcharalloc): Rewrite using XNMALLOC.
3423         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3424         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3425         versions have been moved to lib/xalloc.h and renamed to be the
3426         non-*_inline versions.
3427         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3428         and xnrealloc functions, since those functions are now inline and
3429         now call us.
3430         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3431         renaming described above.
3432         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3433         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3434         captures the dependency in AC_C_INLINE.
3435
3436         New module canonicalize-lgpl, proposed by Charles Wilson in
3437         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3438         with a few small changes afterwards.
3439         * MODULES.html.sh (File system functions): New module
3440         canonicalize-lgpl.
3441         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3442         and canonicalize_file_name.
3443         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3444         * modules/canonicalize-lgpl: New files.
3445
3446 2006-11-05  Bruno Haible  <bruno@clisp.org>
3447
3448         * gnulib-tool (func_import, func_create_testdir): Create directories
3449         also for files in subdirectories of lib/.
3450
3451 2006-11-05  Bruno Haible  <bruno@clisp.org>
3452
3453         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3454         ANSI C compliant.
3455
3456 2006-11-03  Bruno Haible  <bruno@clisp.org>
3457
3458         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3459         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3460         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3461         (xnboundedmalloc): New inline function.
3462         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3463         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3464         xmalloc.
3465         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3466         xmalloc.
3467         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3468         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3469         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3470         xmalloc.
3471         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3472         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3473         xmalloc.
3474         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3475         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3476         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3477         xmalloc.
3478         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3479         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3480         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3481         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3482         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3483         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3484         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3485
3486 2006-11-03  Bruno Haible  <bruno@clisp.org>
3487
3488         * lib/c-ctype.h [C++]: Define functions without name mangling.
3489         * lib/fwriteerror.h [C++]: Likewise.
3490         * lib/gcd.h [C++]: Likewise.
3491         * lib/linebreak.h [C++]: Likewise.
3492
3493 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3494
3495         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3496         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3497         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3498         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3499         Check for functions and headers just once.
3500         Check for declaration of canonicalize_file_name.
3501         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3502
3503 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3504
3505         * gnulib-tool (func_import): Fix typo in actioncmd.
3506
3507 2006-11-02  Bruno Haible  <bruno@clisp.org>
3508
3509         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3510         newline sequence in the Makefile.am snippet as a space, like "make"
3511         does.
3512         Reported by Roger Persson <perrog@gmail.com>.
3513
3514 2006-11-01  Bruno Haible  <bruno@clisp.org>
3515
3516         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3517         already declared in <string.h>.
3518         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3519
3520 2006-11-01  Bruno Haible  <bruno@clisp.org>
3521
3522         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3523         * lib/strcase.h: Include <string.h>.
3524         (strcasecmp): Define to rpl_strcasecmp here.
3525
3526 2006-11-01  Bruno Haible  <bruno@clisp.org>
3527
3528         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3529
3530 2006-11-01  Eric Blake  <ebb9@byu.net>
3531
3532         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3533
3534         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3535
3536 2006-10-29  Bruno Haible  <bruno@clisp.org>
3537
3538         Make it compile in C++ mode.
3539         * lib/full-write.c (full_rw): Add a cast.
3540
3541 2006-11-01  Bruno Haible  <bruno@clisp.org>
3542
3543         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3544         be POSIX compliant.
3545         Reported by Roger Persson <perrog@gmail.com>.
3546
3547 2006-11-01  Eric Blake  <ebb9@byu.net>
3548
3549         * lib/getopt_.h: Fix comments.
3550
3551 2006-10-31  Eric Blake  <ebb9@byu.net>
3552
3553         * modules/tmpdir (Depends-on): Add sys_stat.
3554         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3555         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3556         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3557         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3558         tempname.
3559
3560 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3561
3562         Avoid some C++ diagnostics reported by Bruno Haible.
3563         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3564         xmalloc.
3565         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3566         (struct slotvec): Move to top level.
3567         (quotearg_n_options): Rewrite to avoid xmalloc.
3568         * lib/xalloc.h (xcharalloc): New function.
3569         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3570         [defined __cplusplus]: Add function template that provides result
3571         type propagation.  This part of the change is from Bruno Haible.
3572
3573 2006-10-29  Bruno Haible  <bruno@clisp.org>
3574
3575         Make it compile in C++ mode.
3576         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3577         * lib/strnlen1.c (strnlen1): Cast memchr result.
3578         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3579         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3580         (create_temp_dir): Rename local variable 'template'.
3581         (compile_csharp_using_sscli): Add cast.
3582         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3583         * lib/findprog.c (find_in_path): Likewise.
3584         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3585         * lib/wait-process.c (register_slave_subprocess): Likewise.
3586
3587 2006-10-22  Bruno Haible  <bruno@clisp.org>
3588
3589         * modules/tsearch: New file.
3590         * lib/tsearch.h: New file.
3591         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3592         * m4/tsearch.m4: New file.
3593         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3594
3595 2006-10-29  Eric Blake  <ebb9@byu.net>
3596
3597         * lib/arcfour.c: Assume config.h.
3598         * lib/arctwo.c: Likewise.
3599         * lib/base64.c: Likewise.
3600         * lib/check-version.c: Likewise.
3601         * lib/crc.c: Likewise.
3602         * lib/des.c: Likewise.
3603         * lib/gc-gnulib.c: Likewise.
3604         * lib/gc-libgcrypt.c: Likewise.
3605         * lib/gc-pbkdf2-sha1.c: Likewise.
3606         * lib/getaddrinfo.c: Likewise.
3607         * lib/getdelim.c: Likewise.
3608         * lib/getline.c: Likewise.
3609         * lib/hmac-md5.c: Likewise.
3610         * lib/hmac-sha1.c: Likewise.
3611         * lib/iconvme.c: Likewise.
3612         * lib/md2.c: Likewise.
3613         * lib/md4.c: Likewise.
3614         * lib/memxor.c: Likewise.
3615         * lib/read-file.c: Likewise.
3616         * lib/readline.c: Likewise.
3617         * lib/rijndael-alg-fst.c: Likewise.
3618         * lib/rijndael-api-fst.c: Likewise.
3619         * lib/xgetdomainname.c: Likewise.
3620
3621 2006-10-28  Eric Blake  <ebb9@byu.net>
3622
3623         * lib/xstrndup.c: Assume config.h.
3624
3625 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3626
3627         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3628         stat-macros.h is now for our own macros, whereas stat_h is for
3629         macros in the <sys/stat.h> name space.
3630         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3631         (STAT_MACROS_H): Remove.
3632         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3633         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3634         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3635         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3636         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3637         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3638         Move these macros to ...
3639         * lib/stat_.h: here.  Don't include stat-macros.h.
3640         * lib/canonicalize.c: Don't include stat-macros.h.
3641         * lib/chown.c: Likewise.
3642         * lib/euidaccess.c: Likewise.
3643         * lib/file-type.c: Likewise.
3644         * lib/filemode.c: Likewise.
3645         * lib/glob.c: Likewise.
3646         * lib/isapipe.c: Likewise.
3647         * lib/lchown.c: Likewise.
3648         * lib/lstat.c: Likewise.
3649         * lib/mkdir-p.c: Likewise.
3650         * lib/rmdir.c: Likewise.
3651         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3652         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3653         unless mkdir isn't declared, to speed up 'configure'.
3654         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3655         would define all the S_* symbols.
3656         * modules/canonicalize (Depends-on):
3657         Depend on sys_stat, not stat-macros.
3658         * modules/chown: Likewise.
3659         * modules/euidaccess: Likewise.
3660         * modules/filemode: Likewise.
3661         * modules/file-type: Likewise.
3662         * modules/glob: Likewise.
3663         * modules/isapipe: Likewise.
3664         * modules/lchown: Likewise.
3665         * modules/lstat: Likewise.
3666         * modules/mkancesdirs: Likewise.
3667         * modules/rmdir: Likewise.
3668         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3669         * modules/modechange: Likewise.
3670         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3671         (configure.ac): Remove gl_STAT_MACROS.
3672         * modules/sys_stat (Depends-on): Remove stat-macros.
3673
3674 2006-10-27  Bruno Haible  <bruno@clisp.org>
3675
3676         * m4/signed.m4: Remove file.
3677         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3678         invocation.
3679         * modules/vasnprintf (Files): Remove m4/signed.m4.
3680
3681 2006-10-27  Bruno Haible  <bruno@clisp.org>
3682
3683         Update to GNU gettext 0.16.
3684         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3685         m4/inttypes-h.m4, m4/signed.m4.
3686         * m4/gettext.m4: Update to GNU gettext 0.16.
3687         * m4/intl.m4: New file, from GNU gettext.
3688         * m4/intldir.m4: New file, from GNU gettext.
3689         * config/srclist.txt: Update
3690
3691 2006-10-27  Eric Blake  <ebb9@byu.net>
3692
3693         * MODULES.html.sh: Document tempname.
3694         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3695         dependencies.
3696         (Files): Move lib/tempname.c...
3697         * modules/tempname: ...to this new module.
3698         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3699         (gl_PREREQ_TEMPNAME): Move...
3700         * m4/tempname.m4: ...to this new file.
3701         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3702         * modules/sys_stat (Depends-on): Add stat-macros.
3703         * lib/stat_.h (includes): Pick up stat macros.
3704         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3705         if stat macros are broken.
3706         * lib/tempname.c (includes): No need to include "stat-macros.h".
3707         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3708         (direxists, __path_search) [!_LIBC]: Don't compile these in
3709         gnulib; the tmpdir module covers that.
3710         * lib/tempname.h: New file.
3711
3712 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3713
3714         * COPYING: Explain how gnulib-tool converts licence headers.
3715         Almost all wording by Eric Blake.
3716
3717 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3718
3719         * lib/mbchar.h (is_basic_table): Make read-only.
3720         * lib/mbchar.c (is_basic_table): Likewise.
3721         Reported by John Darrington.
3722
3723 2006-10-25  Bruno Haible  <bruno@clisp.org>
3724
3725         * lib/progname.h (set_program_name): Undefine before defining.
3726
3727 2006-10-25  Bruno Haible  <bruno@clisp.org>
3728
3729         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3730         false for non-gcc C++ compilers.
3731         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3732
3733 2006-10-24  Bruno Haible  <bruno@clisp.org>
3734
3735         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3736         iconv implementations like Irix iconv.
3737
3738 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3739
3740         * modules/vararrays: New file.
3741         * m4/vararrays.m4: New file, taken from diffutils.
3742         * MODULES.html.sh: New module vararrays.
3743
3744 2006-10-24  Karl Berry  <karl@gnu.org>
3745
3746         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3747         Don't call GNU Unix.
3748
3749 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3750
3751         * users.txt: Add Libtool.
3752
3753         Sync from Libtool:
3754
3755         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3756
3757         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3758         to gnulib's policy of including config.h unconditionally.
3759
3760 2006-10-24  Bruno Haible  <bruno@clisp.org>
3761
3762         * modules/wcwidth (Files): Add m4/wint_t.m4.
3763         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3764         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3765
3766 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3767
3768         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3769         to pacify GCC with some -W flags enabled.  Problem reported by
3770         Bruno Haible.
3771
3772 2006-10-24  Jim Meyering  <jim@meyering.net>
3773
3774         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3775         Reported by Karl Berry.
3776
3777 2006-10-23  Bruno Haible  <bruno@clisp.org>
3778
3779         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3780
3781 2006-10-24  Bruno Haible  <bruno@clisp.org>
3782
3783         * lib/gl_list.h: Use C comment style, not C++ comment style.
3784
3785 2006-10-23  Eric Blake  <ebb9@byu.net>
3786
3787         * lib/getaddrinfo.c (includes): Add missing include.
3788
3789 2006-10-23  Bruno Haible  <bruno@clisp.org>
3790             Paul Eggert  <eggert@cs.ucla.edu>
3791
3792         Ability to rename obstack_free.
3793         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3794         obstack_free.
3795         (obstack_free): Invoke the __obstack_free macro.
3796         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3797
3798 2006-10-23  Bruno Haible  <bruno@clisp.org>
3799             Paul Eggert  <eggert@cs.ucla.edu>
3800
3801         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3802         __argc, __argv from the declaration. (They are defined as macros on
3803         mingw.)
3804
3805 2006-10-22  Bruno Haible  <bruno@clisp.org>
3806
3807         * doc/gnulib-intro.texi: New file.
3808         * doc/gnulib.texi: Include it.
3809
3810 2006-10-21  Bruno Haible  <bruno@clisp.org>
3811
3812         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3813         "Introduction", "Miscellanous Notes", "Particular Modules".
3814
3815 2006-10-21  Bruno Haible  <bruno@clisp.org>
3816
3817         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3818         Change mostlyclean-local rule to avoid sh syntax error from bash
3819         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3820
3821 2006-10-23  Jim Meyering  <jim@meyering.net>
3822
3823         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3824         in place of snprintf.
3825
3826         * modules/inttostr (Files): Add lib/uinttostr.c.
3827         * lib/uinttostr.c (inttostr): New file/function.
3828         * lib/inttostr.h (uinttostr): Declare.
3829         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3830         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3831         Add uinttostr.
3832         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3833
3834 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3835
3836         * lib/canonicalize.c (ELOOP): Define if not already defined.
3837         Problem reported by Bruno Haible in
3838         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3839
3840 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3841
3842         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3843         Problem reported by Perry Smith and Ville Laurikari.
3844
3845         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3846         uses.
3847
3848 2006-10-19  Bruno Haible  <bruno@clisp.org>
3849
3850         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3851         for mingw.
3852
3853 2006-10-19  Bruno Haible  <bruno@clisp.org>
3854
3855         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3856         Needed for mingw.
3857
3858 2006-10-19  Bruno Haible  <bruno@clisp.org>
3859
3860         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3861
3862 2006-10-19  Bruno Haible  <bruno@clisp.org>
3863
3864         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3865         it.
3866
3867 2006-10-19  Bruno Haible  <bruno@clisp.org>
3868
3869         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3870         invocation.
3871
3872 2006-10-19  Bruno Haible  <bruno@clisp.org>
3873
3874         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3875         mountlist by default.
3876
3877 2006-10-16  Bruno Haible  <bruno@clisp.org>
3878
3879         * lib/c-strstr.c: Include c-strstr.h.
3880
3881 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3882
3883         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3884         in a slash.
3885
3886 2006-10-18  Bruno Haible  <bruno@clisp.org>
3887
3888         * lib/lock.h [C++]: Wrap definitions in extern "C".
3889
3890 2006-10-18  Bruno Haible  <bruno@clisp.org>
3891
3892         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3893         gl_LIBOBJS list.
3894
3895 2006-10-18  Bruno Haible  <bruno@clisp.org>
3896
3897         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3898
3899 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3900
3901         * lib/xstrtol.h: Include gettext.h.
3902         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3903         Problem reported by Eric Blake.
3904         * modules/xstrtol (Depends-on): Add gettext-h.
3905
3906 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3907
3908         * lib/strftime.c (advance): New macro.
3909         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3910         incomplete type, so you can't add 0 to it.  Problem and patch
3911         reported by Eelco Dolstra for dietlibc.
3912
3913 2006-10-18  Jim Meyering  <jim@meyering.net>
3914
3915         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3916         type for a local, and rename it: s/up/user_proc/.
3917
3918 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3919
3920         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3921         READ_UTMP_USER_PROCESS.
3922         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3923
3924 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3925
3926         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3927         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3928
3929 2006-10-17  Eric Blake  <ebb9@byu.net>
3930
3931         * lib/sigprocmask.c (sigprocmask): Fix typo.
3932
3933         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3934
3935         * modules/clean-temp (Makefile.am): Don't add to make output...
3936         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3937         config.h.
3938
3939 2006-10-17  Bruno Haible  <bruno@clisp.org>
3940
3941         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3942         differently if DEFAULT_TEXT_DOMAIN is set.
3943
3944 2006-10-16  Bruno Haible  <bruno@clisp.org>
3945
3946         * lib/clean-temp.c: Include fwriteerror.h.
3947
3948 2006-10-16  Bruno Haible  <bruno@clisp.org>
3949
3950         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3951
3952 2006-10-16  Bruno Haible  <bruno@clisp.org>
3953
3954         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3955         * lib/sigprocmask.h: Include <sys/types.h>.
3956         (sigset_t): Use the system's definition if present.
3957
3958 2006-10-17  Eric Blake  <ebb9@byu.net>
3959
3960         * lib/xvasprintf.c (includes): Assume config.h.
3961         * lib/xasprintf.c (includes): Likewise.
3962
3963 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3964
3965         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3966         at least as wide as intmax_t.
3967
3968 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3969
3970         (Imported from Automake.)
3971         * build-aux/gnupload: Update to version 1.1 of directive file.
3972
3973 2006-10-16  Eric Blake  <ebb9@byu.net>
3974
3975         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3976         match Automake 1.10a.
3977
3978 2006-10-14  Bruno Haible  <bruno@clisp.org>
3979
3980         * modules/sigprocmask: New file.
3981         * lib/sigprocmask.h: New file.
3982         * lib/sigprocmask.c: New file.
3983         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3984         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3985         request sigprocmask.o.
3986         (gl_PREREQ_SIGPROCMASK): New macro.
3987         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3988         (Depends-on): Add sigprocmask.
3989         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3990         gt_SIGNALBLOCKING. Test for 'raise' only once.
3991         * lib/fatal-signal.c: Include sigprocmask.h.
3992         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3993         unblock_fatal_signals): Define always.
3994         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3995         sigprocmask.
3996
3997 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3998
3999         Sync from Automake.
4000         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4001         which incorrectly sets the mode of an existing destination
4002         directory.  In some cases the unpatched install-sh could do the
4003         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4004         system.  We hope this is rare in practice, but it's clearly worth
4005         fixing.  Problem reported by Alex Unleashed in
4006         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4007         Also, don't bother to check for -m bugs unless we're using -m;
4008         suggested by Stepan Kasal.
4009
4010 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4011
4012         Sync from Automake.
4013         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4014         `-c' flag, so they appear at the same position as in %FASTDEP%
4015         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4016         which ignores unknown options only after the first non-option.
4017         Bug report against M4 by Nelson H. F. Beebe.
4018
4019 2006-10-13  Jim Meyering  <jim@meyering.net>
4020
4021         Fix a bug in yesterday's change.
4022         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4023         p->fts_statp->st_dev would be used uninitialized.
4024         Ensures that we always call fts_stat on the very first entry.
4025         Miklos Szeredi reported that find -xdev stopped working.
4026
4027 2006-10-12  Bruno Haible  <bruno@clisp.org>
4028
4029         * gnulib-tool (func_get_automake_snippet): Append an automatically
4030         computed EXTRA_DIST augmentation.
4031         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4032         * modules/alloca-opt (Makefile.am): Likewise.
4033         * modules/allocsa (Makefile.am): Likewise.
4034         * modules/arcfour (Makefile.am): Likewise.
4035         * modules/arctwo (Makefile.am): Likewise.
4036         * modules/argmatch (Makefile.am): Likewise.
4037         * modules/argz (Makefile.am): Likewise.
4038         * modules/atexit (Makefile.am): Likewise.
4039         * modules/backupfile (Makefile.am): Likewise.
4040         * modules/byteswap (Makefile.am): Likewise.
4041         * modules/c-strtod (Makefile.am): Likewise.
4042         * modules/c-strtold (Makefile.am): Likewise.
4043         * modules/calloc (Makefile.am): Likewise.
4044         * modules/canon-host (Makefile.am): Likewise.
4045         * modules/canonicalize (Makefile.am): Likewise.
4046         * modules/chdir-long (Makefile.am): Likewise.
4047         * modules/chdir-safer (Makefile.am): Likewise.
4048         * modules/check-version (Makefile.am): Likewise.
4049         * modules/chown (Makefile.am): Likewise.
4050         * modules/cloexec (Makefile.am): Likewise.
4051         * modules/close-stream (Makefile.am): Likewise.
4052         * modules/closeout (Makefile.am): Likewise.
4053         * modules/crc (Makefile.am): Likewise.
4054         * modules/csharpexec (Makefile.am): Likewise.
4055         * modules/cycle-check (Makefile.am): Likewise.
4056         * modules/des (Makefile.am): Likewise.
4057         * modules/dev-ino (Makefile.am): Likewise.
4058         * modules/dirfd (Makefile.am): Likewise.
4059         * modules/dirname (Makefile.am): Likewise.
4060         * modules/dup2 (Makefile.am): Likewise.
4061         * modules/eealloc (Makefile.am): Likewise.
4062         * modules/error (Makefile.am): Likewise.
4063         * modules/euidaccess (Makefile.am): Likewise.
4064         * modules/exclude (Makefile.am): Likewise.
4065         * modules/exitfail (Makefile.am): Likewise.
4066         * modules/fcntl-safer (Makefile.am): Likewise.
4067         * modules/fcntl (Makefile.am): Likewise.
4068         * modules/file-type (Makefile.am): Likewise.
4069         * modules/fileblocks (Makefile.am): Likewise.
4070         * modules/filemode (Makefile.am): Likewise.
4071         * modules/filenamecat (Makefile.am): Likewise.
4072         * modules/fnmatch (Makefile.am): Likewise.
4073         * modules/fopen-safer (Makefile.am): Likewise.
4074         * modules/fpending (Makefile.am): Likewise.
4075         * modules/fprintftime (Makefile.am): Likewise.
4076         * modules/free (Makefile.am): Likewise.
4077         * modules/fsusage (Makefile.am): Likewise.
4078         * modules/ftruncate (Makefile.am): Likewise.
4079         * modules/fts (Makefile.am): Likewise.
4080         * modules/gc-arcfour (Makefile.am): Likewise.
4081         * modules/gc-des (Makefile.am): Likewise.
4082         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4083         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4084         * modules/gc-md4 (Makefile.am): Likewise.
4085         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4086         * modules/gc-sha1 (Makefile.am): Likewise.
4087         * modules/gc (Makefile.am): Likewise.
4088         * modules/getaddrinfo (Makefile.am): Likewise.
4089         * modules/getcwd (Makefile.am): Likewise.
4090         * modules/getdelim (Makefile.am): Likewise.
4091         * modules/getdomainname (Makefile.am): Likewise.
4092         * modules/getgroups (Makefile.am): Likewise.
4093         * modules/gethostname (Makefile.am): Likewise.
4094         * modules/gethrxtime (Makefile.am): Likewise.
4095         * modules/getline (Makefile.am): Likewise.
4096         * modules/getloadavg (Makefile.am): Likewise.
4097         * modules/getlogin_r (Makefile.am): Likewise.
4098         * modules/getndelim2 (Makefile.am): Likewise.
4099         * modules/getopt (Makefile.am): Likewise.
4100         * modules/getpagesize (Makefile.am): Likewise.
4101         * modules/getpass-gnu (Makefile.am): Likewise.
4102         * modules/getpass (Makefile.am): Likewise.
4103         * modules/getsubopt (Makefile.am): Likewise.
4104         * modules/gettime (Makefile.am): Likewise.
4105         * modules/gettimeofday (Makefile.am): Likewise.
4106         * modules/getugroups (Makefile.am): Likewise.
4107         * modules/getusershell (Makefile.am): Likewise.
4108         * modules/glob (Makefile.am): Likewise.
4109         * modules/group-member (Makefile.am): Likewise.
4110         * modules/hard-locale (Makefile.am): Likewise.
4111         * modules/hash (Makefile.am): Likewise.
4112         * modules/hmac-md5 (Makefile.am): Likewise.
4113         * modules/hmac-sha1 (Makefile.am): Likewise.
4114         * modules/human (Makefile.am): Likewise.
4115         * modules/idcache (Makefile.am): Likewise.
4116         * modules/imaxabs (Makefile.am): Likewise.
4117         * modules/imaxdiv (Makefile.am): Likewise.
4118         * modules/inet_ntop (Makefile.am): Likewise.
4119         * modules/inet_pton (Makefile.am): Likewise.
4120         * modules/intprops (Makefile.am): Likewise.
4121         * modules/inttostr (Makefile.am): Likewise.
4122         * modules/inttypes (Makefile.am): Likewise.
4123         * modules/isapipe (Makefile.am): Likewise.
4124         * modules/javaversion (Makefile.am): Likewise.
4125         * modules/lchmod (Makefile.am): Likewise.
4126         * modules/lchown (Makefile.am): Likewise.
4127         * modules/localcharset (Makefile.am): Likewise.
4128         * modules/long-options (Makefile.am): Likewise.
4129         * modules/lstat (Makefile.am): Likewise.
4130         * modules/malloc (Makefile.am): Likewise.
4131         * modules/mathl (Makefile.am): Likewise.
4132         * modules/mbchar (Makefile.am): Likewise.
4133         * modules/md2 (Makefile.am): Likewise.
4134         * modules/md4 (Makefile.am): Likewise.
4135         * modules/md5 (Makefile.am): Likewise.
4136         * modules/memcasecmp (Makefile.am): Likewise.
4137         * modules/memchr (Makefile.am): Likewise.
4138         * modules/memcmp (Makefile.am): Likewise.
4139         * modules/memcoll (Makefile.am): Likewise.
4140         * modules/memcpy (Makefile.am): Likewise.
4141         * modules/memmem (Makefile.am): Likewise.
4142         * modules/memmove (Makefile.am): Likewise.
4143         * modules/mempcpy (Makefile.am): Likewise.
4144         * modules/memrchr (Makefile.am): Likewise.
4145         * modules/memset (Makefile.am): Likewise.
4146         * modules/memxor (Makefile.am): Likewise.
4147         * modules/mkancesdirs (Makefile.am): Likewise.
4148         * modules/mkdir-p (Makefile.am): Likewise.
4149         * modules/mkdir (Makefile.am): Likewise.
4150         * modules/mkdtemp (Makefile.am): Likewise.
4151         * modules/mkstemp (Makefile.am): Likewise.
4152         * modules/mktime (Makefile.am): Likewise.
4153         * modules/modechange (Makefile.am): Likewise.
4154         * modules/mountlist (Makefile.am): Likewise.
4155         * modules/nanosleep (Makefile.am): Likewise.
4156         * modules/obstack (Makefile.am): Likewise.
4157         * modules/openat (Makefile.am): Likewise.
4158         * modules/pagealign_alloc (Makefile.am): Likewise.
4159         * modules/pathmax (Makefile.am): Likewise.
4160         * modules/physmem (Makefile.am): Likewise.
4161         * modules/poll (Makefile.am): Likewise.
4162         * modules/posixtm (Makefile.am): Likewise.
4163         * modules/posixver (Makefile.am): Likewise.
4164         * modules/putenv (Makefile.am): Likewise.
4165         * modules/quote (Makefile.am): Likewise.
4166         * modules/quotearg (Makefile.am): Likewise.
4167         * modules/raise (Makefile.am): Likewise.
4168         * modules/read-file (Makefile.am): Likewise.
4169         * modules/readline (Makefile.am): Likewise.
4170         * modules/readlink (Makefile.am): Likewise.
4171         * modules/readtokens (Makefile.am): Likewise.
4172         * modules/readutmp (Makefile.am): Likewise.
4173         * modules/realloc (Makefile.am): Likewise.
4174         * modules/regex (Makefile.am): Likewise.
4175         * modules/rename-dest-slash (Makefile.am): Likewise.
4176         * modules/rename (Makefile.am): Likewise.
4177         * modules/rijndael (Makefile.am): Likewise.
4178         * modules/rmdir (Makefile.am): Likewise.
4179         * modules/rpmatch (Makefile.am): Likewise.
4180         * modules/safe-read (Makefile.am): Likewise.
4181         * modules/safe-write (Makefile.am): Likewise.
4182         * modules/same-inode (Makefile.am): Likewise.
4183         * modules/same (Makefile.am): Likewise.
4184         * modules/save-cwd (Makefile.am): Likewise.
4185         * modules/savedir (Makefile.am): Likewise.
4186         * modules/setenv (Makefile.am): Likewise.
4187         * modules/settime (Makefile.am): Likewise.
4188         * modules/sha1 (Makefile.am): Likewise.
4189         * modules/sig2str (Makefile.am): Likewise.
4190         * modules/snprintf (Makefile.am): Likewise.
4191         * modules/stat-macros (Makefile.am): Likewise.
4192         * modules/stat-time (Makefile.am): Likewise.
4193         * modules/stdbool (Makefile.am): Likewise.
4194         * modules/stdint (Makefile.am): Likewise.
4195         * modules/stdlib-safer (Makefile.am): Likewise.
4196         * modules/stpcpy (Makefile.am): Likewise.
4197         * modules/stpncpy (Makefile.am): Likewise.
4198         * modules/strcase (Makefile.am): Likewise.
4199         * modules/strcasestr (Makefile.am): Likewise.
4200         * modules/strchrnul (Makefile.am): Likewise.
4201         * modules/strcspn (Makefile.am): Likewise.
4202         * modules/strdup (Makefile.am): Likewise.
4203         * modules/strerror (Makefile.am): Likewise.
4204         * modules/strftime (Makefile.am): Likewise.
4205         * modules/strndup (Makefile.am): Likewise.
4206         * modules/strnlen (Makefile.am): Likewise.
4207         * modules/strpbrk (Makefile.am): Likewise.
4208         * modules/strsep (Makefile.am): Likewise.
4209         * modules/strstr (Makefile.am): Likewise.
4210         * modules/strtod (Makefile.am): Likewise.
4211         * modules/strtoimax (Makefile.am): Likewise.
4212         * modules/strtok_r (Makefile.am): Likewise.
4213         * modules/strtol (Makefile.am): Likewise.
4214         * modules/strtoll (Makefile.am): Likewise.
4215         * modules/strtoul (Makefile.am): Likewise.
4216         * modules/strtoull (Makefile.am): Likewise.
4217         * modules/strtoumax (Makefile.am): Likewise.
4218         * modules/strverscmp (Makefile.am): Likewise.
4219         * modules/sys_socket (Makefile.am): Likewise.
4220         * modules/sys_stat (Makefile.am): Likewise.
4221         * modules/sysexits (Makefile.am): Likewise.
4222         * modules/time_r (Makefile.am): Likewise.
4223         * modules/timegm (Makefile.am): Likewise.
4224         * modules/timespec (Makefile.am): Likewise.
4225         * modules/tmpfile-safer (Makefile.am): Likewise.
4226         * modules/trim (Makefile.am): Likewise.
4227         * modules/unistd-safer (Makefile.am): Likewise.
4228         * modules/unlinkdir (Makefile.am): Likewise.
4229         * modules/unlocked-io (Makefile.am): Likewise.
4230         * modules/userspec (Makefile.am): Likewise.
4231         * modules/utime (Makefile.am): Likewise.
4232         * modules/utimecmp (Makefile.am): Likewise.
4233         * modules/utimens (Makefile.am): Likewise.
4234         * modules/vasnprintf (Makefile.am): Likewise.
4235         * modules/vasprintf (Makefile.am): Likewise.
4236         * modules/vsnprintf (Makefile.am): Likewise.
4237         * modules/xalloc (Makefile.am): Likewise.
4238         * modules/xgetcwd (Makefile.am): Likewise.
4239         * modules/xnanosleep (Makefile.am): Likewise.
4240         * modules/xreadlink (Makefile.am): Likewise.
4241         * modules/xstrtod (Makefile.am): Likewise.
4242         * modules/xstrtol (Makefile.am): Likewise.
4243         * modules/xstrtold (Makefile.am): Likewise.
4244         * modules/yesno (Makefile.am): Likewise.
4245         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4246
4247 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4248
4249         * modules/error (Makefile.am): Distribute files through
4250         EXTRA_DIST, not lib_SOURCES.
4251
4252 2006-10-12  Eric Blake  <ebb9@byu.net>
4253
4254         * modules/error (Makefile.am): Distribute files in /lib.
4255         * modules/obstack (Makefile.am): Likewise.
4256
4257 2006-10-12  Bruno Haible  <bruno@clisp.org>
4258
4259         * modules/acl (Makefile.am): Distribute all files in lib/ through
4260         EXTRA_DIST.
4261         * modules/arcfour (Makefile.am): Likewise.
4262         * modules/arctwo (Makefile.am): Likewise.
4263         * modules/argmatch (Makefile.am): Likewise.
4264         * modules/argz (Makefile.am): Likewise.
4265         * modules/atexit (Makefile.am): Likewise.
4266         * modules/backupfile (Makefile.am): Likewise.
4267         * modules/c-strtod (Makefile.am): Likewise.
4268         * modules/c-strtold (Makefile.am): Likewise.
4269         * modules/calloc (Makefile.am): Likewise.
4270         * modules/canon-host (Makefile.am): Likewise.
4271         * modules/canonicalize (Makefile.am): Likewise.
4272         * modules/chdir-long (Makefile.am): Likewise.
4273         * modules/chdir-safer (Makefile.am): Likewise.
4274         * modules/check-version (Makefile.am): Likewise.
4275         * modules/chown (Makefile.am): Likewise.
4276         * modules/cloexec (Makefile.am): Likewise.
4277         * modules/close-stream (Makefile.am): Likewise.
4278         * modules/closeout (Makefile.am): Likewise.
4279         * modules/crc (Makefile.am): Likewise.
4280         * modules/cycle-check (Makefile.am): Likewise.
4281         * modules/des (Makefile.am): Likewise.
4282         * modules/dirfd (Makefile.am): Likewise.
4283         * modules/dirname (Makefile.am): Likewise.
4284         * modules/dup2 (Makefile.am): Likewise.
4285         * modules/euidaccess (Makefile.am): Likewise.
4286         * modules/exclude (Makefile.am): Likewise.
4287         * modules/exitfail (Makefile.am): Likewise.
4288         * modules/fcntl-safer (Makefile.am): Likewise.
4289         * modules/file-type (Makefile.am): Likewise.
4290         * modules/fileblocks (Makefile.am): Likewise.
4291         * modules/filemode (Makefile.am): Likewise.
4292         * modules/filenamecat (Makefile.am): Likewise.
4293         * modules/fnmatch (Makefile.am): Likewise.
4294         * modules/fopen-safer (Makefile.am): Likewise.
4295         * modules/fpending (Makefile.am): Likewise.
4296         * modules/fprintftime (Makefile.am): Likewise.
4297         * modules/free (Makefile.am): Likewise.
4298         * modules/fsusage (Makefile.am): Likewise.
4299         * modules/ftruncate (Makefile.am): Likewise.
4300         * modules/fts (Makefile.am): Likewise.
4301         * modules/gc (Makefile.am): Likewise.
4302         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4303         * modules/getaddrinfo (Makefile.am): Likewise.
4304         * modules/getcwd (Makefile.am): Likewise.
4305         * modules/getdelim (Makefile.am): Likewise.
4306         * modules/getdomainname (Makefile.am): Likewise.
4307         * modules/getgroups (Makefile.am): Likewise.
4308         * modules/gethostname (Makefile.am): Likewise.
4309         * modules/gethrxtime (Makefile.am): Likewise.
4310         * modules/getline (Makefile.am): Likewise.
4311         * modules/getloadavg (Makefile.am): Likewise.
4312         * modules/getlogin_r (Makefile.am): Likewise.
4313         * modules/getopt (Makefile.am): Likewise.
4314         * modules/getpass (Makefile.am): Likewise.
4315         * modules/getpass-gnu (Makefile.am): Likewise.
4316         * modules/getsubopt (Makefile.am): Likewise.
4317         * modules/gettime (Makefile.am): Likewise.
4318         * modules/gettimeofday (Makefile.am): Likewise.
4319         * modules/getugroups (Makefile.am): Likewise.
4320         * modules/getusershell (Makefile.am): Likewise.
4321         * modules/glob (Makefile.am): Likewise.
4322         * modules/group-member (Makefile.am): Likewise.
4323         * modules/hard-locale (Makefile.am): Likewise.
4324         * modules/hash (Makefile.am): Likewise.
4325         * modules/hmac-md5 (Makefile.am): Likewise.
4326         * modules/hmac-sha1 (Makefile.am): Likewise.
4327         * modules/human (Makefile.am): Likewise.
4328         * modules/idcache (Makefile.am): Likewise.
4329         * modules/imaxabs (Makefile.am): Likewise.
4330         * modules/imaxdiv (Makefile.am): Likewise.
4331         * modules/inet_ntop (Makefile.am): Likewise.
4332         * modules/inet_pton (Makefile.am): Likewise.
4333         * modules/inttostr (Makefile.am): Likewise.
4334         * modules/isapipe (Makefile.am): Likewise.
4335         * modules/lchown (Makefile.am): Likewise.
4336         * modules/long-options (Makefile.am): Likewise.
4337         * modules/lstat (Makefile.am): Likewise.
4338         * modules/malloc (Makefile.am): Likewise.
4339         * modules/mathl (Makefile.am): Likewise.
4340         * modules/mbchar (Makefile.am): Likewise.
4341         * modules/md2 (Makefile.am): Likewise.
4342         * modules/md4 (Makefile.am): Likewise.
4343         * modules/md5 (Makefile.am): Likewise.
4344         * modules/memcasecmp (Makefile.am): Likewise.
4345         * modules/memchr (Makefile.am): Likewise.
4346         * modules/memcmp (Makefile.am): Likewise.
4347         * modules/memcoll (Makefile.am): Likewise.
4348         * modules/memcpy (Makefile.am): Likewise.
4349         * modules/memmem (Makefile.am): Likewise.
4350         * modules/memmove (Makefile.am): Likewise.
4351         * modules/mempcpy (Makefile.am): Likewise.
4352         * modules/memrchr (Makefile.am): Likewise.
4353         * modules/memset (Makefile.am): Likewise.
4354         * modules/memxor (Makefile.am): Likewise.
4355         * modules/mkancesdirs (Makefile.am): Likewise.
4356         * modules/mkdir (Makefile.am): Likewise.
4357         * modules/mkdir-p (Makefile.am): Likewise.
4358         * modules/mkdtemp (Makefile.am): Likewise.
4359         * modules/mkstemp (Makefile.am): Likewise.
4360         * modules/mktime (Makefile.am): Likewise.
4361         * modules/modechange (Makefile.am): Likewise.
4362         * modules/mountlist (Makefile.am): Likewise.
4363         * modules/nanosleep (Makefile.am): Likewise.
4364         * modules/openat (Makefile.am): Likewise.
4365         * modules/pagealign_alloc (Makefile.am): Likewise.
4366         * modules/physmem (Makefile.am): Likewise.
4367         * modules/poll (Makefile.am): Likewise.
4368         * modules/posixtm (Makefile.am): Likewise.
4369         * modules/posixver (Makefile.am): Likewise.
4370         * modules/putenv (Makefile.am): Likewise.
4371         * modules/quote (Makefile.am): Likewise.
4372         * modules/quotearg (Makefile.am): Likewise.
4373         * modules/raise (Makefile.am): Likewise.
4374         * modules/read-file (Makefile.am): Likewise.
4375         * modules/readline (Makefile.am): Likewise.
4376         * modules/readlink (Makefile.am): Likewise.
4377         * modules/readtokens (Makefile.am): Likewise.
4378         * modules/readutmp (Makefile.am): Likewise.
4379         * modules/realloc (Makefile.am): Likewise.
4380         * modules/regex (Makefile.am): Likewise.
4381         * modules/rename (Makefile.am): Likewise.
4382         * modules/rename-dest-slash (Makefile.am): Likewise.
4383         * modules/rijndael (Makefile.am): Likewise.
4384         * modules/rmdir (Makefile.am): Likewise.
4385         * modules/rpmatch (Makefile.am): Likewise.
4386         * modules/safe-read (Makefile.am): Likewise.
4387         * modules/safe-write (Makefile.am): Likewise.
4388         * modules/same (Makefile.am): Likewise.
4389         * modules/save-cwd (Makefile.am): Likewise.
4390         * modules/savedir (Makefile.am): Likewise.
4391         * modules/setenv (Makefile.am): Likewise.
4392         * modules/settime (Makefile.am): Likewise.
4393         * modules/sha1 (Makefile.am): Likewise.
4394         * modules/sig2str (Makefile.am): Likewise.
4395         * modules/snprintf (Makefile.am): Likewise.
4396         * modules/stdlib-safer (Makefile.am): Likewise.
4397         * modules/stpcpy (Makefile.am): Likewise.
4398         * modules/stpncpy (Makefile.am): Likewise.
4399         * modules/strcase (Makefile.am): Likewise.
4400         * modules/strcasestr (Makefile.am): Likewise.
4401         * modules/strchrnul (Makefile.am): Likewise.
4402         * modules/strcspn (Makefile.am): Likewise.
4403         * modules/strdup (Makefile.am): Likewise.
4404         * modules/strerror (Makefile.am): Likewise.
4405         * modules/strftime (Makefile.am): Likewise.
4406         * modules/strndup (Makefile.am): Likewise.
4407         * modules/strnlen (Makefile.am): Likewise.
4408         * modules/strpbrk (Makefile.am): Likewise.
4409         * modules/strsep (Makefile.am): Likewise.
4410         * modules/strstr (Makefile.am): Likewise.
4411         * modules/strtod (Makefile.am): Likewise.
4412         * modules/strtoimax (Makefile.am): Likewise.
4413         * modules/strtok_r (Makefile.am): Likewise.
4414         * modules/strtol (Makefile.am): Likewise.
4415         * modules/strtoll (Makefile.am): Likewise.
4416         * modules/strtoul (Makefile.am): Likewise.
4417         * modules/strtoull (Makefile.am): Likewise.
4418         * modules/strtoumax (Makefile.am): Likewise.
4419         * modules/strverscmp (Makefile.am): Likewise.
4420         * modules/time_r (Makefile.am): Likewise.
4421         * modules/timegm (Makefile.am): Likewise.
4422         * modules/tmpfile-safer (Makefile.am): Likewise.
4423         * modules/unistd-safer (Makefile.am): Likewise.
4424         * modules/unlinkdir (Makefile.am): Likewise.
4425         * modules/userspec (Makefile.am): Likewise.
4426         * modules/utime (Makefile.am): Likewise.
4427         * modules/utimecmp (Makefile.am): Likewise.
4428         * modules/utimens (Makefile.am): Likewise.
4429         * modules/vasnprintf (Makefile.am): Likewise.
4430         * modules/vasprintf (Makefile.am): Likewise.
4431         * modules/vsnprintf (Makefile.am): Likewise.
4432         * modules/xalloc (Makefile.am): Likewise.
4433         * modules/xgetcwd (Makefile.am): Likewise.
4434         * modules/xnanosleep (Makefile.am): Likewise.
4435         * modules/xreadlink (Makefile.am): Likewise.
4436         * modules/xstrtod (Makefile.am): Likewise.
4437         * modules/xstrtol (Makefile.am): Likewise.
4438         * modules/xstrtold (Makefile.am): Likewise.
4439         * modules/yesno (Makefile.am): Likewise.
4440
4441 2006-10-12  Jim Meyering  <jim@meyering.net>
4442
4443         * m4/getloadavg.m4: Revert the change below.
4444
4445         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4446         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4447         fail with a symlink, which is what coreutils' ./bootstrap now
4448         creates by default.
4449
4450 2006-10-12  Bruno Haible  <bruno@clisp.org>
4451
4452         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4453         mingw.
4454         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4455         MSVC and mingw explicitly.
4456
4457 2006-10-11  Simon Josefsson  <jas@extundo.com>
4458             Bruno Haible  <bruno@clisp.org>
4459
4460         Add support for multiple gnulib-tool invocations in the scope of a
4461         single configure.ac file.
4462         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4463         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4464         with the same contents as the _LIBADD variable.
4465         (func_emit_initmacro_start, func_emit_initmacro_end,
4466         func_emit_initmacro_done): New functions.
4467         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4468         gl_LIBOBJS and gl_LTLIBOBJS.
4469
4470 2006-10-11  Bruno Haible  <bruno@clisp.org>
4471
4472         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4473         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4474         autoreconf. Instead, invoke autopoint explicitly but move back the
4475         *.m4 files from gnulib.
4476
4477 2006-10-11  Bruno Haible  <bruno@clisp.org>
4478
4479         * gnulib-tool (func_usage): Make module names after --create-testdir
4480         optional.
4481         (func_create_testdir): If no module was specified, use nearly all
4482         modules.
4483
4484 2006-10-12  Jim Meyering  <jim@meyering.net>
4485
4486         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4487         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4488         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4489         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4490         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4491         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4492         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4493         (fts_set_stat_required): New function.
4494         (fts_open): Defer the calls to fts_stat, if possible or requested.
4495         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4496         into fts_stat itself.
4497         (fts_read): Perform any required (deferred) fts_stat call.
4498         (fts_build): Likewise, for the directory we're about to open and read.
4499         In the readdir loop, carefully decide whether each entry will require
4500         an eventual call to fts_stat, using dirent.d_type info if available.
4501         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4502         a command line argument into this function.  Update all callers.
4503         Map a return value of FTS_DOT to FTS_D for a command line argument.
4504         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4505         Thanks to Miklos Szeredi for his tenacity and for the initial
4506         bug report about "find" failing on a FUSE-based file system.
4507
4508         * lib/fts.c (fts_open): Use consistent indentation.
4509
4510 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4511
4512         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4513         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4514         reported by Jim Meyering.  All uses of cache variables renamed
4515         to match Autoconf's.
4516         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4517         the other one.
4518
4519         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4520         Fix misspelling in diagnostic.
4521
4522 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4523
4524         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4525         defined.  Problem reported by Matthew Woehlke.
4526
4527         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4528         Add support for Tandem NonStop R series.
4529         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4530         Use new macro.
4531
4532         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4533         (has_trailing_slash): Omit size arg; all callers changed.
4534         Omit 'inline', since it doesn't help performance and we'd
4535         need to configure it.
4536         Don't count //, ///, etc. as having a trailing slash.
4537         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4538         (rpl_rename_dest_slash): On failure, use rename's errno rather
4539         than (in some cases) an incorrect or junk errno.
4540         Simplify code by removing need to compute length; this does
4541         cause it to make two passes instead of one over the file name,
4542         but it's worth it.
4543
4544         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4545         change, since Autoconf's version may no longer be appropriate now
4546         that we are using CVS Autoconf's version.  Add support for Tandem.
4547
4548 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4549             Bruno Haible  <bruno@clisp.org>
4550
4551         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4552         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4553         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4554         gl_AC_TYPE_LONG_LONG.
4555
4556         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4557         instead of HAVE_LONG_LONG.
4558         * lib/printf-args.c (printf_fetchargs): Likewise.
4559         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4560         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4561         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4562         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4563         gl_AC_TYPE_LONG_LONG.
4564
4565 2006-10-11  Bruno Haible  <bruno@clisp.org>
4566
4567         * m4/longlong.m4: Add comments.
4568         * m4/ulonglong.m4: Likewise.
4569
4570 2006-10-10  Bruno Haible  <bruno@clisp.org>
4571
4572         Make it possible to #define stpcpy, strdup to aliases.
4573         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4574         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4575
4576 2006-10-10  Bruno Haible  <bruno@clisp.org>
4577
4578         Make it possible to #define gcd to an alias.
4579         * lib/gcd.c: Include config.h.
4580
4581 2006-10-10  Bruno Haible  <bruno@clisp.org>
4582
4583         Make it possible to #define c_isascii to an alias.
4584         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4585         defined. Undefine the macros before defining them, to avoid gcc
4586         warnings.
4587         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4588         define NO_C_CTYPE_MACROS early.
4589
4590 2006-10-10  Bruno Haible  <bruno@clisp.org>
4591
4592         Make it possible to #define set_program_name to an alias.
4593         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4594         ENABLE_RELOCATABLE early.
4595
4596 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4597
4598         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4599         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4600         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4601         More generally, don't assume that 64-bit signed int is available
4602         if unsigned int is, and vice versa.
4603         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4604         unsigned symbols, not on their signed counterparts.
4605         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4606         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4607         (UINT64_C, UINTMAX_C):
4608         Likewise.
4609         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4610         unsigned counterparts.
4611         (Have_long_long, Unsigned): New macros.
4612         (Int): Renamed from INT.
4613         (strtoimax): Use the new macros.
4614         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4615         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4616         * modules/inttypes (inttypes.h): Substitute
4617         HAVE_UNSIGNED_LONG_LONG_INT.
4618         * modules/stdint (stdint.h): Likewise.
4619         (Files): Add m4/ulonglong.m4.
4620
4621 2006-10-10  Bruno Haible  <bruno@clisp.org>
4622
4623         Fix a gcc -Wshadow warning.
4624         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4625         to 'bucket'.
4626         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4627         gl_linked_indexof_from_to): Likewise.
4628         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4629         Likewise.
4630         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4631         Likewise.
4632         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4633         Reported by Eric Blake.
4634
4635 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4636
4637         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4638         for NetBSD.  Problem reported by Bruno Haible.
4639
4640 2006-10-09  Jim Meyering  <jim@meyering.net>
4641
4642         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4643         Patch from Bruno Haible.
4644
4645 2006-10-09  Jim Meyering  <jim@meyering.net>
4646
4647         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4648         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4649         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4650
4651 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4652
4653         Don't include <config.h> twice; this doesn't work in some cases,
4654         e.g., when config.h has "#define intmax_t long long int" and
4655         we include <config.h>, <inttypes.h>, <config.h> in that order.
4656         Problem reported by Matthew Woehlke in:
4657         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4658         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4659         * lib/fts-cycle.c: Don't include config.h.
4660         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4661         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4662         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4663         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4664         inttypes.h.
4665         * lib/xstrtoumax.c: Likewise.
4666         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4667         __strtol and the like, so that this module is more like its siblings.
4668         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4669         Remove; no longer needed now that we assume gnulib inttypes.h.
4670
4671 2006-10-08  Bruno Haible  <bruno@clisp.org>
4672
4673         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4674         option.
4675
4676 2006-10-07  Jim Meyering  <jim@meyering.net>
4677
4678         * modules/inttypes (inttypes.h): Revert what seems to have been
4679         an inadvertent part of today's change: use "|", not "/" in the
4680         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4681
4682 2006-10-07  Bruno Haible  <bruno@clisp.org>
4683
4684         * modules/sublist: New file.
4685
4686 2006-10-07  Bruno Haible  <bruno@clisp.org>
4687
4688         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4689         * modules/argz (argz.h): Likewise.
4690         * modules/arpa_inet (arpa/inet.h): Likewise.
4691         * modules/byteswap (byteswap.h): Likewise.
4692         * modules/configmake (configmake.h): Likewise.
4693         * modules/fcntl (fcntl.h): Likewise.
4694         * modules/fnmatch (fnmatch.h): Likewise.
4695         * modules/getopt (getopt.h): Likewise.
4696         * modules/glob (glob.h): Likewise.
4697         * modules/inttypes (inttypes.h): Likewise.
4698         * modules/netinet_in (netinet/in.h): Likewise.
4699         * modules/poll (poll.h): Likewise.
4700         * modules/stdbool (stdbool.h): Likewise.
4701         * modules/stdint (stdint.h): Likewise.
4702         * modules/sys_select (sys/select.h): Likewise.
4703         * modules/sys_socket (sys/socket.h): Likewise.
4704         * modules/sys_stat (sys/stat.h): Likewise.
4705         * modules/sysexits (sysexits.h): Likewise.
4706         * modules/unistd (unistd.h): Likewise.
4707         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4708         Add a "DO NOT EDIT" comment to the generated file.
4709         (func_import): Likewise for gnulib-comp.m4.
4710
4711 2006-10-07  Bruno Haible  <bruno@clisp.org>
4712
4713         * lib/gl_sublist.h: New file.
4714         * lib/gl_sublist.c: New file.
4715
4716 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4717
4718         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4719         name (relative to the original working directory) and the file
4720         name component (relative to the temporary working directory).  All
4721         callers changed.
4722         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4723         * lib/mkdir-p.c (make_dir_parents): Likewise.
4724         * lib/mkdir-p.h (make_dir_parents): Likewise.
4725
4726 2006-10-06  Eric Blake  <ebb9@byu.net>
4727
4728         Define several macros for use by the clean-temp module.
4729         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4730         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4731         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4732
4733         * lib/clean-temp.h (close_stream_temp): New declaration.
4734         * lib/clean-temp.c (includes): Pull in headers according to what
4735         other modules are in use.
4736         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4737
4738 2006-10-06  Bruno Haible  <bruno@clisp.org>
4739
4740         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4741         instead of fopen, fwriteerror.
4742
4743 2006-10-06  Bruno Haible  <bruno@clisp.org>
4744
4745         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4746         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4747         int.
4748         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4749         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4750         Return an error indicator.
4751         Suggested by Eric Blake.
4752
4753 2006-10-06  Bruno Haible  <bruno@clisp.org>
4754
4755         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4756         Reported by Eric Blake.
4757
4758 2006-10-06  Bruno Haible  <bruno@clisp.org>
4759
4760         * modules/closeout (Description): Mention stderr too.
4761
4762 2006-10-06  Bruno Haible  <bruno@clisp.org>
4763         and Paul Eggert  <eggert@cs.ucla.edu>
4764
4765         * lib/closeout.c (close_stdout): Also close stderr.
4766         * lib/closeout.h: Update comment.
4767
4768 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4769
4770         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4771         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4772         * lib/dirchownmod.c: Include lchown.h.
4773         * lib/lchown.c: Don't include files that lchown.h now includes.
4774         Don't declare chown, since lchown.h now does that.
4775         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4776         (lchown): Define to rpl_chown if lchown is declared but
4777         does not exist.  Declare using a prototype if lchown is not
4778         declared.  Add a copyright notice.
4779         * lib/mkstemp.h: Include <unistd.h>.
4780         * lib/openat.c: Include lchown.h.
4781
4782         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4783         we now test for that separately.
4784         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4785         rather than O_NOFOLLOW, when testing whether it's possible to
4786         avoid a race condition reliably.
4787         * lib/savewd.c (savewd_chdir): Likewise.
4788
4789         Remove macros that are no longer needed now that stdint.h is
4790         reliable.
4791         * lib/fsusage.c (UINTMAX_MAX): Remove.
4792         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4793         * lib/utimecmp.c (SIZE_MAX): Remove.
4794
4795         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4796
4797         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4798         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4799         O_NOATIME works.
4800
4801 2006-10-05  Bruno Haible  <bruno@clisp.org>
4802
4803         * lib/gl_list.h (gl_sortedlist_search_from_to,
4804         gl_sortedlist_indexof_from_to): New declarations.
4805         (gl_list_implementation): New fields sortedlist_search_from_to,
4806         sortedlist_indexof_from_to.
4807         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4808         inline functions.
4809         * lib/gl_list.c (gl_sortedlist_search_from_to,
4810         gl_sortedlist_indexof_from_to): New functions.
4811         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4812         function.
4813         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4814         (gl_array_sortedlist_search_from_to): New function.
4815         (gl_array_list_implementation): Update.
4816         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4817         function.
4818         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4819         (gl_carray_sortedlist_search_from_to): New function.
4820         (gl_carray_list_implementation): Update.
4821         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4822         gl_linked_sortedlist_indexof_from_to): New functions.
4823         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4824         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4825         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4826         gl_tree_sortedlist_indexof_from_to): New functions.
4827         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4828         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4829         Update.
4830         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4831         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4832         Update.
4833
4834 2006-10-05  Bruno Haible  <bruno@clisp.org>
4835
4836         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4837         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4838         (struct gl_list_implementation): Add fields search_from_to,
4839         indexof_from_to. Remove fields search, indexof.
4840         (gl_list_search): Use the search_from_to method.
4841         (gl_list_search_from, gl_list_search_from_to): New functions.
4842         (gl_list_indexof): Use the indexof_from_to method.
4843         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4844         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4845         (gl_list_search_from, gl_list_search_from_to): New functions.
4846         (gl_list_indexof): Use the indexof_from_to method.
4847         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4848         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4849         gl_array_indexof. Add start_index, end_index arguments.
4850         (gl_array_search_from_to): Renamed from gl_array_search. Add
4851         start_index, end_index arguments.
4852         (gl_array_remove, gl_array_list_implementation): Update.
4853         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4854         gl_carray_indexof. Add start_index, end_index arguments.
4855         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4856         start_index, end_index arguments.
4857         (gl_carray_remove, gl_carray_list_implementation): Update.
4858         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4859         gl_linked_search. Add start_index, end_index arguments.
4860         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4861         start_index, end_index arguments.
4862         (gl_linked_remove): Update.
4863         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4864         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4865         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4866         field to 'size_t'.
4867         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4868         gl_tree_search. Add start_index, end_index arguments.
4869         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4870         start_index, end_index arguments.
4871         (gl_tree_remove): Update.
4872         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4873         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4874         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4875         function.
4876         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4877         gl_tree_search. Add start_index, end_index arguments.
4878         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4879         start_index, end_index arguments.
4880         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4881         Update.
4882         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4883
4884 2006-10-05  Bruno Haible  <bruno@clisp.org>
4885
4886         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4887
4888         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4889         fwriteerror_temp): New declarations.
4890         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4891         (descriptors): New variable.
4892         (cleanup): First, close the descriptors.
4893         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4894         fclose_temp, fwriteerror_temp): New functions.
4895
4896 2006-10-04  Jim Meyering  <jim@meyering.net>
4897
4898         * lib/fts.c (fts_open): Tiny comment change.
4899
4900 2006-10-04  Bruno Haible  <bruno@clisp.org>
4901
4902         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4903         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4904         gl_LOCK_BODY.
4905         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4906         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4907         gl_LOCK_EARLY_BODY.
4908         (gl_LOCK): Require gl_LOCK_BODY.
4909
4910 2006-10-04  Bruno Haible  <bruno@clisp.org>
4911
4912         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4913         (gl_oset_search_atleast): New declaration.
4914         (struct gl_oset_implementation): Add field 'search_atleast'.
4915         (gl_oset_search_atleast): New inline function.
4916         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4917         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4918         (gl_array_oset_implementation): Update.
4919         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4920         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4921         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4922
4923 2006-10-04  Bruno Haible  <bruno@clisp.org>
4924
4925         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4926
4927 2006-10-03  Bruno Haible  <bruno@clisp.org>
4928
4929         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4930         from gl_avltreehash_list_implementation.
4931
4932 2006-10-03  Bruno Haible  <bruno@clisp.org>
4933
4934         * lib/gl_oset.c (gl_oset_add): Fix return type.
4935
4936 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4937
4938         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4939
4940 2006-10-02  Eric Blake  <ebb9@byu.net>
4941
4942         * modules/strnlen (Depends-on): Add extensions.
4943
4944 2006-10-02  Eric Blake  <ebb9@byu.net>
4945
4946         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4947         definition in 2.60+.
4948
4949 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4950
4951         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4952         checks.
4953
4954 2006-10-02  Bruno Haible  <bruno@clisp.org>
4955
4956         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4957         to the AUTOMAKE_OPTIONS.
4958         Reported by Jim Meyering.
4959
4960 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4961
4962         Work around bug in Solaris 10 /proc file system:
4963         /proc/self/fd/NNN/.. isn't the parent directory of
4964         the directory whose file descriptor is NNN.  This needs to
4965         be worked around at run time, not compile time, since a
4966         program might be built on Solaris 8, where things work, and
4967         run on Solaris 10.
4968         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4969         to use the following interface instead:
4970         (OPENAT_BUFFER_SIZE): New macro.
4971         (openat_proc_name): New function.
4972         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4973         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4974         Likewise.
4975         * lib/openat-proc.c: New file.
4976         * modules/openat (Files): Add lib/openat-proc.c.
4977         (Depends-on): Add same-inode, stdbool.
4978         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4979
4980 2006-09-29  Bruno Haible  <bruno@clisp.org>
4981
4982         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4983         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4984         argument. Set stdout_closed before testing for ferror, not after.
4985         (fwriteerror, fwriteerror_no_ebadf): New functions.
4986
4987 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4988
4989         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4990
4991 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4992
4993         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4994         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4995
4996 2006-09-28  Jim Meyering  <jim@meyering.net>
4997
4998         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4999         Include <unistd.h>.
5000
5001 2006-09-28  Bruno Haible  <bruno@clisp.org>
5002
5003         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5004         * modules/linkedhash-list (Depends-on): Likewise.
5005         * modules/rbtreehash-list (Depends-on): Likewise.
5006
5007 2006-09-28  Bruno Haible  <bruno@clisp.org>
5008
5009         * lib/strndup.h: Simplify the redefinition of strndup.
5010         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5011         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5012
5013 2006-09-28  Bruno Haible  <bruno@clisp.org>
5014
5015         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5016         * lib/gl_linkedhash_list.c: Likewise.
5017         * lib/gl_rbtreehash_list.c: Likewise.
5018
5019 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5020
5021         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5022         getaddrinfo.
5023
5024         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5025         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5026         it causes <stdio_ext.h> to cause a compile-time error.
5027         Problem reported by Nelson H. F. Beebe.
5028         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5029         of HAVE_DECL___PENDING.
5030
5031         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5032         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5033         declaration.
5034
5035 2006-09-27  Jim Meyering  <jim@meyering.net>
5036
5037         This file could end up with a definition for a function
5038         named __strndup, rather than rpl_strndup on a system with
5039         incomplete weak_alias support.
5040         * lib/strndup.c (strndup): Rename from __strndup.
5041         Remove #defines that used to map __strndup to strndup.
5042         Don't use K&R prototypes.
5043         Remove LIBC-related code, since this file is not sync'd with glibc.
5044         * lib/strndup.h: Revamp, accordingly.
5045         * m4/strndup.m4: Modernize.
5046
5047 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5048
5049         * modules/savewd (Depends-on): Add 'raise'.
5050         * lib/savewd.c: Include <signal.h>, for 'raise'.
5051
5052 2006-09-26  Jim Meyering  <jim@meyering.net>
5053
5054         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5055         when we detect Darwin 8.7.0's acl_get_file bug.
5056         Rearrange to perform the new (below) run-test while $LIBS
5057         contains any acl-related library.  Set USE_ACL at the end.
5058         (gl_ACL_GET_FILE): New function.
5059
5060 2006-09-26  Eric Blake  <ebb9@byu.net>
5061
5062         * lib/verror.c: Include <config.h> unconditionally.
5063
5064 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5065
5066         * modules/clock-time (Maintainer): Add self.
5067         * modules/getlogin_r (Depends-on): Add extensions.
5068
5069 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5070
5071         * modules/clock-time: New module.
5072         * modules/nanosleep (Depends-on): Add clock-time.
5073         * modules/gethrxtime (Depends-on): Likewise.
5074         * modules/gettime (Depends-on): Likewise.
5075         * modules/settime (Depends-on): Likewise.
5076
5077         * modules/fts-lgpl: Depend on openat.
5078         * modules/mkancesdirs: Depend on savewd.
5079         * modules/mkdir-p: Likewise.
5080
5081 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5082
5083         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5084
5085         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5086         `gl_have_arbitrary_file_name_length_limit' to
5087         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5088         actually works between configure runs.
5089
5090 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5091             Bruno Haible  <bruno@clisp.org>
5092
5093         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5094
5095 2006-09-25  Jim Meyering  <jim@meyering.net>
5096
5097         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5098         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5099
5100 2006-09-25  Eric Blake  <ebb9@byu.net>
5101
5102         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5103         exec's in 2006-09-18 patch when shuffling fds.
5104
5105 2006-09-25  Bruno Haible  <bruno@clisp.org>
5106
5107         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5108         Reported by Jim Meyering.
5109
5110 2006-09-24  Jim Meyering  <jim@meyering.net>
5111
5112         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5113         compare a pointer against a literal "0".  That caused failures with
5114         at least HP-UX's hpcc.
5115
5116 2006-09-22  Simon Josefsson  <jas@extundo.com>
5117
5118         * modules/gc-sha1:
5119         * modules/gc-md4:
5120         * modules/gc-hmac-sha1:
5121         * modules/gc-hmac-md5:
5122         * modules/gc-des:
5123         * modules/gc-arcfour: Distribute more files.
5124
5125 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5126
5127         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5128         (gl_linked_iterator_from_to): Initialize struct completely.
5129         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5130         (gl_tree_iterator_from_to): Likewise
5131         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5132         * lib/gl_array_list.c [lint] (gl_array_iterator)
5133         (gl_array_iterator_from_to): Likewise.
5134         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5135         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5136         (gl_carray_iterator_from_to): Likewise.
5137
5138         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5139         * lib/md4.c (md4_process_block): Remove unused variable.
5140         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5141         parentheses for clarity.
5142
5143 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5144
5145         * modules/bison-i18n (Depends-on): Add gettext.
5146
5147 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5148
5149         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5150         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5151         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5152         also add missing comma that caused broken test.
5153         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5154         stdlib.h, for `abort'.
5155         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5156         variables.
5157         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5158         include unistd.h if present, for `rmdir'.
5159         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5160         variables.
5161         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5162         in the process include standard headers for prototypes.
5163         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5164         gets declared on GNU/Linux.
5165         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5166         unistd.h, for `rmdir'.
5167         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5168
5169         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5170         always true.
5171         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5172
5173         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5174
5175 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5176
5177         * gnulib-tool (func_version): Create output all at once.  This
5178         may help avoid triggering unnecessary SIGPIPEs, and at any
5179         rate it doesn't hurt.
5180
5181 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5182             Bruno Haible  <bruno@clisp.org>
5183
5184         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5185         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5186         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5187
5188         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5189         (gl_FUNC_VASPRINTF): Invoke it.
5190
5191 2006-09-22  Bruno Haible  <bruno@clisp.org>
5192
5193         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5194         getloadavg.c as first argument.
5195
5196 2006-09-22  Bruno Haible  <bruno@clisp.org>
5197
5198         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5199         at the beginning of the gl_INIT macro.
5200         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5201         gl_GETLOADAVG.
5202
5203 2006-09-22  Bruno Haible  <bruno@clisp.org>
5204
5205         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5206         module.
5207         Suggested by Ralf Wildenhues.
5208
5209 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5210
5211         Import this patch from libc:
5212
5213         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5214
5215         * lib/regex_internal.c (re_string_reconstruct): Handle
5216         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5217         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5218         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5219         re_string_context_at.
5220
5221         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5222         now requires it.
5223         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5224         gl_REGEX now does it for us.
5225         (gl_REGEX): Add test taken from
5226         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5227
5228         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5229         Check that large offsets work.  Modernize Autoconf usages.
5230         Prefer "yes" to mean a good thing rather than a bad.
5231         Don't put "#define mkstemp" in config.h, as this might interfere
5232         with standard system headers that "#define mkstemp mkstemp64".
5233
5234         * modules/mkstemp (Depends-on): Add extensions, so that
5235         mkstemp is visible on some platforms.
5236         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5237         (Include): Change to "mkstemp.h" from <stdlib.h>.
5238         (Files): Add mkstemp.h.
5239
5240         * lib/mkstemp.h: New file, since some standard headers
5241         #define mkstemp.
5242         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5243         Include "mkstemp.h".
5244         Make the _LIBC code resemble glibc original more,
5245         e.g., use K&R style.
5246         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5247         (mkstemp): Remove, since mkstemp.h does this for us.
5248         * lib/stdlib--.h: Include mkstemp.h.
5249
5250         Import this patch from libc:
5251
5252         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5253
5254         * lib/tempname.c (__gen_tempname): Change attempts_min
5255         into a macro.  Use preprocessor to decide how to initialize
5256         attempts [Coverity CID 67].
5257
5258 2006-09-20  Bruno Haible  <bruno@clisp.org>
5259
5260         * lib/mkdtemp.c: Import from libc.
5261         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5262                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5263                 attempts_min into a macro.  Use preprocessor to decide how to
5264                 initialize attempts [Coverity CID 67].
5265         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5266                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5267                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5268
5269 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5270
5271         * gnulib-tool (func_exit): New function, to allow to pass the
5272         exit status portably through the trap.  Use everywhere.
5273         (--help, --version): Signal a write error.
5274         (trap): catch SIGPIPE, for write errors.
5275         Exit at the end of the trap, with the correct exit status.
5276
5277 2006-09-19  Karl Berry  <karl@gnu.org>
5278
5279         * doc/gnulib.texi: note about the license texinfo files.
5280
5281 2006-09-19  Eric Blake  <ebb9@byu.net>
5282
5283         * gnulib-tool: Avoid space-tab.
5284
5285 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5286
5287         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5288         that prevented coreutils 6.1 from building.  Problem reported
5289         by Petter Reinholdtsen.
5290
5291 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5292
5293         * gnulib-tool (avoidlist): Fix typo that broke options like
5294         --avoid=lock that are used by coreutils bootstrap.
5295
5296 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5297
5298         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5299         more systematically.
5300
5301 2006-09-18  Jim Meyering  <jim@meyering.net>
5302
5303         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5304
5305 2006-09-18  Bruno Haible  <bruno@clisp.org>
5306
5307         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5308
5309 2006-09-18  Bruno Haible  <bruno@clisp.org>
5310
5311         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5312         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5313         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5314         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5315         * m4/gettext.m4: Require autoconf >= 2.52.
5316         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5317         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5318         of gl_cv_header_inttypes_h.
5319
5320 2006-09-18  Bruno Haible  <bruno@clisp.org>
5321
5322         * lib/javaversion.c: Include configmake.h.
5323
5324 2006-09-18  Bruno Haible  <bruno@clisp.org>
5325
5326         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5327         avoid that the while loops be executed in a subshell.
5328
5329 2006-09-18  Bruno Haible  <bruno@clisp.org>
5330
5331         * MODULES.html.sh (func_module): Break long lines.
5332         Suggested by Bruce Korb <bkorb@gnu.org>.
5333
5334 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5335
5336         Speed up by a factor of 1.12.
5337         * gnulib-tool (nl): New variable.
5338         (func_import): Rewrite include directive extraction to only read each
5339         directive once.
5340
5341 2006-09-17  Bruno Haible  <bruno@clisp.org>
5342
5343         * modules/javaversion (Makefile.am): Remove DEFS setting.
5344         (Depends-on): Add configmake, for PKGDATADIR definition.
5345
5346 2006-09-17  Bruno Haible  <bruno@clisp.org>
5347
5348         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5349
5350 2006-09-17  Bruno Haible  <bruno@clisp.org>
5351
5352         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5353         (func_modules_transitive_closure, func_modules_add_dummy,
5354         func_modules_to_filelist, func_import, func_create_testdir,
5355         func_create_megatestdir, ...): Use it wherever possible.
5356         Suggested by Ralf Wildenhues.
5357
5358 2006-09-16  Karl Berry  <karl@gnu.org>
5359
5360         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5361         to avoid sectioning errors.
5362         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5363         [ifinfo]: blank line after @center-ed titles.
5364         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5365         Spell FSF address consistently with others.
5366         (These changes approved by rms.)
5367
5368 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5369
5370         Speed up by a factor of 1.61.
5371         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5372         already checked module names again.
5373
5374 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5375
5376         Speed up by a factor of 1.13.
5377         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5378         for new_files, and the input to func_add_or_update.
5379
5380 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5381
5382         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5383         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5384
5385 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5386
5387         * modules/mkancesdirs (Depends-on): Add fcntl.
5388         * modules/savewd: New file.
5389         * MODULES.html.sh (File system functions): Add savewd.
5390
5391         * modules/configmake (Makefile.am): Add support for the
5392         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5393
5394 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5395
5396         * m4/savewd.m4: New file.
5397
5398 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5399
5400         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5401         (dirchownmod): New arg FD.  All callers changed.
5402         Use FD rather than opening the directory ourself, as opening is
5403         now the caller's responsibility.
5404         * lib/dirchownmod.h: Likewise.
5405         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5406         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5407         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5408         (test_dir): Remove.
5409         (mkancesdirs): Return length of prefix of FILE that has already
5410         been made, or -2 if there is a child doing the work.  Redo
5411         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5412         ".", and treat ".." specially since it might stray back into
5413         already-created areas.  Use a subprocess if necessary.  New arg
5414         WD; all users changed.  MAKE_DIR function should now return 1
5415         if it creates a directory that is not readable.  Return -2 if
5416         a child process is spun off.
5417         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5418         Adjust signature to match code.
5419         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5420         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5421         all users changed.
5422         * lib/savewd.c, lib/savewd.h: New files.
5423
5424 2006-09-15  Jim Meyering  <jim@meyering.net>
5425
5426         * modules/rename-dest-slash: New module.
5427         * MODULES.html.sh (posix_compat): Add it here.
5428
5429         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5430
5431 2006-09-15  Jim Meyering  <jim@meyering.net>
5432
5433         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5434         file.
5435
5436         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5437
5438 2006-09-15  Jim Meyering  <jim@meyering.net>
5439
5440         * lib/rename-dest-slash.c (has_trailing_slash): Use
5441         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5442         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5443         test before testing whether SRC is a directory.
5444         Suggestions from Bruno Haible.
5445
5446         Avoid a warning about an unused variable.
5447         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5448         into the #ifdef block where it's used.
5449
5450         * lib/rename-dest-slash.c: New file.
5451
5452 2006-09-14  Bruno Haible  <bruno@clisp.org>
5453
5454         * lib/allocsa.c: Include <config.h> unconditionally.
5455         * lib/asnprintf.c: Likewise.
5456         * lib/asprintf.c: Likewise.
5457         * lib/c-strcasecmp.c: Likewise.
5458         * lib/c-strcasestr.c: Likewise.
5459         * lib/c-strncasecmp.c: Likewise.
5460         * lib/c-strstr.c: Likewise.
5461         * lib/classpath.c: Likewise.
5462         * lib/clean-temp.c: Likewise.
5463         * lib/concatpath.c: Likewise.
5464         * lib/copy-file.c: Likewise.
5465         * lib/csharpcomp.c: Likewise.
5466         * lib/csharpexec.c: Likewise.
5467         * lib/execute.c: Likewise.
5468         * lib/fatal-signal.c: Likewise.
5469         * lib/findprog.c: Likewise.
5470         * lib/fwriteerror.c: Likewise.
5471         * lib/gl_array_list.c: Likewise.
5472         * lib/gl_array_oset.c: Likewise.
5473         * lib/gl_avltree_list.c: Likewise.
5474         * lib/gl_avltree_oset.c: Likewise.
5475         * lib/gl_avltreehash_list.c: Likewise.
5476         * lib/gl_carray_list.c: Likewise.
5477         * lib/gl_linked_list.c: Likewise.
5478         * lib/gl_linkedhash_list.c: Likewise.
5479         * lib/gl_list.c: Likewise.
5480         * lib/gl_oset.c: Likewise.
5481         * lib/gl_rbtree_list.c: Likewise.
5482         * lib/gl_rbtree_oset.c: Likewise.
5483         * lib/gl_rbtreehash_list.c: Likewise.
5484         * lib/imaxabs.c: Likewise.
5485         * lib/imaxdiv.c: Likewise.
5486         * lib/javacomp.c: Likewise.
5487         * lib/javaexec.c: Likewise.
5488         * lib/javaversion.c: Likewise.
5489         * lib/linebreak.c: Likewise.
5490         * lib/localcharset.c: Likewise.
5491         * lib/lock.c: Likewise.
5492         * lib/mbchar.c: Likewise.
5493         * lib/mbswidth.c: Likewise.
5494         * lib/mkdtemp.c: Likewise.
5495         * lib/pipe.c: Likewise.
5496         * lib/printf-args.c: Likewise.
5497         * lib/printf-parse.c: Likewise.
5498         * lib/progname.c: Likewise.
5499         * lib/progreloc.c: Likewise.
5500         * lib/readlink.c: Likewise.
5501         * lib/sh-quote.c: Likewise.
5502         * lib/stpcpy.c: Likewise.
5503         * lib/stpncpy.c: Likewise.
5504         * lib/strcasecmp.c: Likewise.
5505         * lib/strcasestr.c: Likewise.
5506         * lib/strcspn.c: Likewise.
5507         * lib/striconv.c: Likewise.
5508         * lib/strncasecmp.c: Likewise.
5509         * lib/strnlen1.c: Likewise.
5510         * lib/strstr.c: Likewise.
5511         * lib/strtok_r.c: Likewise.
5512         * lib/tls.c: Likewise.
5513         * lib/tmpdir.c: Likewise.
5514         * lib/unicodeio.c: Likewise.
5515         * lib/unsetenv.c: Likewise.
5516         * lib/vasnprintf.c: Likewise.
5517         * lib/vasprintf.c: Likewise.
5518         * lib/wait-process.c: Likewise.
5519         * lib/xallocsa.c: Likewise.
5520         * lib/xsetenv.c: Likewise.
5521         * lib/xstriconv.c: Likewise.
5522
5523 2006-09-13  Simon Josefsson  <jas@extundo.com>
5524
5525         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5526         that internally, suggested by Ralf Wildenhues
5527         <Ralf.Wildenhues@gmx.de>.
5528
5529 2006-09-13  Simon Josefsson  <jas@extundo.com>
5530
5531         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5532         @LIBOBJS@.
5533         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5534
5535 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5536
5537         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5538         longer worry about uses that don't define HAVE_CONFIG_H.
5539         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5540         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5541         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5542         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5543         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5544         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5545         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5546         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5547         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5548         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5549         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5550         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5551         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5552         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5553         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5554         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5555         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5556         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5557         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5558         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5559         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5560         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5561         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5562         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5563         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5564         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5565         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5566         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5567         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5568         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5569         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5570         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5571         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5572         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5573         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5574         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5575         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5576         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5577         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5578         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5579         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5580         Likewise.
5581
5582 2006-09-13  Eric Blake  <ebb9@byu.net>
5583
5584         * lib/getopt.c: Fix typo in last commit.
5585
5586 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5587
5588         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5589         dgettext.
5590
5591 2006-09-12  Jim Meyering  <jim@meyering.net>
5592
5593         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5594         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5595         Reported by Nelson H. F. Beebe.
5596
5597 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5598
5599         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5600         program_invocation_name and program_invocation_short_name are
5601         initialized.
5602         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5603         and program_invocation_short_name to argp.h, so they are visible
5604         to user programs.
5605         * lib/argp.h: Likewise
5606
5607 2006-09-10  Bruno Haible  <bruno@clisp.org>
5608
5609         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5610         m4/inttypes_h.m4, m4/uintmax_t.m4.
5611
5612 2006-09-10  Bruno Haible  <bruno@clisp.org>
5613
5614         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5615         gl_AC_TYPE_UINTMAX_T.
5616
5617 2006-09-10  Bruno Haible  <bruno@clisp.org>
5618
5619         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5620
5621 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5622
5623         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5624         convention.  Text proposed by Bruno Haible.
5625         (struct argp_option): Document the use of N_() wrappers.
5626
5627         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5628         '\v', and translate the two parts separately, instead of feeding
5629         the whole string to gettext.  This allows to exclude
5630         '\v' from the strings visible to the translator by writing doc
5631         strings as N_("..") "\v" N_("..").
5632
5633 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5634
5635         * config/srclist.txt: Undo latest change; the bug was fixed.
5636
5637 2006-09-09  Bruno Haible  <bruno@clisp.org>
5638
5639         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5640         assignments if building a library without libtool.
5641         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5642         in func_emit_lib_Makefile_am.
5643         (func_import): When building a static library libfoo.a, arrange to
5644         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5645         (func_create_testdir): Likewise.
5646         * modules/gc (configure.ac, Makefile.am): If building statically,
5647         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5648         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5649         * modules/striconv (configure.ac, Makefile.am): Likewise.
5650         Based on a suggestion by Ralf Wildenhues.
5651
5652 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5653
5654         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5655         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5656         Also:
5657
5658         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5659         Add year_2050_test to catch glibc bug 2821
5660         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5661
5662         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5663         Prefer #ifdef to #if.
5664
5665         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5666         Return from 'main' instead of calling 'exit'.
5667
5668 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5669
5670         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5671         returned the maximum time_t value rather than (time_t) -1.
5672         Problem originally reported by William Bardwell
5673         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5674
5675         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5676         Moved to here ...
5677         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5678         ... from here.
5679
5680 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5681
5682         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5683         2821 is fixed.
5684
5685 2006-09-08  Jim Meyering  <jim@meyering.net>
5686
5687         Don't make generated files read-only.  That would bother too many
5688         people.  However, do retain the ability to work when targets are
5689         read-only: remove the destination and temporary files before writing
5690         them (when generated via sed or echo), or by using the -f option for
5691         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5692         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5693         * modules/byteswap, modules/configmake, modules/fcntl:
5694         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5695         * modules/localcharset, modules/netinet_in, modules/poll:
5696         * modules/stdbool, modules/stdint, modules/sys_select:
5697         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5698
5699 2006-09-08  Jim Meyering  <jim@meyering.net>
5700
5701         Avoid new build failure on FreeBSD 6.0.
5702         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5703         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5704         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5705
5706 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5707
5708         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5709
5710 2006-09-07  Jim Meyering  <jim@meyering.net>
5711
5712         Fix global typo in last change: use chmod u-w, not chmod u-x.
5713         Spotted by Paul Eggert and Bruce Korb.
5714         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5715         * modules/byteswap, modules/configmake, modules/fcntl:
5716         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5717         * modules/localcharset, modules/netinet_in, modules/poll:
5718         * modules/stdbool, modules/stdint, modules/sys_select:
5719         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5720
5721 2006-09-06  Jim Meyering  <jim@meyering.net>
5722
5723         Make generated files be read-only.
5724         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5725         Ensure that each generated file is now read-only.
5726         * modules/argz: Likewise.
5727         * modules/arpa_inet: Likewise.
5728         * modules/byteswap: Likewise.
5729         * modules/configmake: Likewise.
5730         * modules/fcntl: Likewise.
5731         * modules/fnmatch: Likewise.
5732         * modules/getopt: Likewise.
5733         * modules/glob: Likewise.
5734         * modules/inttypes: Likewise.
5735         * modules/netinet_in: Likewise.
5736         * modules/poll: Likewise.
5737         * modules/stdbool: Likewise.
5738         * modules/stdint: Likewise.
5739         * modules/sys_select: Likewise.
5740         * modules/sys_socket: Likewise.
5741         * modules/sys_stat: Likewise.
5742         * modules/sysexits: Likewise.
5743         * modules/localcharset: Same as above, but continue using temporary
5744         file named "t-$@" (why different?) rather than the "$@-t" used
5745         everywhere else.
5746
5747         * modules/sysexits (Makefile.am): Replace literal occurrences
5748         of "sysexit.h" more readable, and more consistent, "$@".
5749
5750 2006-09-06  Bruno Haible  <bruno@clisp.org>
5751
5752         * modules/striconv: New file.
5753         * modules/xstriconv: New file.
5754         * MODULES.html.sh (Internationalization functions): Add striconv,
5755         xstriconv.
5756
5757 2006-09-06  Bruno Haible  <bruno@clisp.org>
5758
5759         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5760         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5761         not using libtool correctly.
5762
5763 2006-09-06  Bruno Haible  <bruno@clisp.org>
5764
5765         * lib/striconv.h: New file.
5766         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5767         iconvstring.c.
5768         * lib/xstriconv.h: New file.
5769         * lib/xstriconv.c: New file.
5770
5771 2006-09-06  Bruno Haible  <bruno@clisp.org>
5772
5773         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5774         lib_..._LDFLAGS.
5775
5776 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5777
5778         * lib/argz_.h: Sync from Libtool.
5779
5780         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5781                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5782
5783         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5784
5785 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5786
5787         * modules/trim: New file.
5788
5789 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5790
5791         * lib/trim.h: New file.
5792         * lib/trim.c: New file.
5793
5794 2006-09-05  Bruno Haible  <bruno@clisp.org>
5795
5796         * MODULES.html.sh (String handling): Add trim.
5797
5798 2006-09-04  Karl Berry  <karl@gnu.org>
5799
5800         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5801         until next release.
5802
5803 2006-09-03  Bruno Haible  <bruno@clisp.org>
5804
5805         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5806         correctly.
5807
5808 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5809
5810         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5811         not gl_GETLOADAVG.  Omit unneeded semicolons.
5812         Problems reported by Ralf Wildenhues in
5813         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5814         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5815         at the end, which is the usual gnulib style.
5816
5817         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5818         of doing all the work ourselves.
5819         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5820         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5821
5822 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5823
5824         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5825         Problem reported by Ralf Wildenhues in
5826         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5827
5828         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5829         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5830
5831 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5832
5833         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5834         yesterday's patch by changing test -n to test -z.
5835
5836 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5837
5838         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5839         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5840         the former is now obsolescent.
5841
5842         * modules/chdir-long (Depends-on): Add fcntl.
5843
5844 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5845
5846         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5847         obsolescent, and programs should use gnulib instead.
5848         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5849         but with prefixes changed.
5850
5851 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5852
5853         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5854         or stdbool.h, because they might not exist while configuring.
5855
5856         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5857         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5858         does that for us.
5859         (O_DIRECTORY): Remove.
5860
5861 2006-08-31  Eric Blake  <ebb9@byu.net>
5862
5863         * gnulib-tool: Don't let emacs change spaces to TAB.
5864
5865 2006-08-31  Bruno Haible  <bruno@clisp.org>
5866
5867         * gnulib-tool: When calling func_import more than once, do it in a
5868         subshell.
5869         Reported by Eric Blake <ebb9@byu.net>.
5870
5871 2006-08-31  Bruno Haible  <bruno@clisp.org>
5872
5873         * gnulib-tool (nl): Remove variable.
5874         (sed_transform_lib_file): Use more robust test for config-h module.
5875         (func_import): Fix typo in 2006-08-25 patch.
5876
5877 2006-08-31  Bruno Haible  <bruno@clisp.org>
5878
5879         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5880         specified, augment Makefile.am variables instead of assigning them.
5881
5882 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5883
5884         Work around a bug in both the Linux and SunOS 64-bit kernels:
5885         nanosleep mishandles sleeps for longer than 2**31 seconds.
5886         Problem reported by Frank v Waveren in
5887         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5888         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5889         Check for nanosleep bug.
5890         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5891
5892 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5893
5894         Work around a bug in both the Linux and SunOS 64-bit kernels:
5895         nanosleep mishandles sleeps for longer than 2**31 seconds.
5896         Problem reported by Frank v Waveren in
5897         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5898         * lib/nanosleep.c (BILLION): New constant.
5899         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5900         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5901         implementation.
5902
5903 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5904
5905         * modules/nanosleep (Depends-on): Add gettime.
5906
5907 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5908         and Simon Josefsson  <jas@extundo.com>
5909         and Oskar Liljeblad  <oskar@osk.mine.nu>
5910
5911         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5912         * gnulib-tool (func_import): New license type 'unmodifiable license
5913         text'.
5914         * modules/fdl: Use it.  Longer description.
5915         * module/gpl, module/lgpl: New files.
5916
5917 2006-08-30  Jim Meyering  <jim@meyering.net>
5918
5919         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5920         shadowing the parameter.
5921
5922 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5923
5924         Sync from Libtool:
5925
5926         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5927
5928         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5929         sharing with gnulib.  Report by Eric Blake.
5930
5931 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5932
5933         * modules/isapipe: New file.
5934         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5935
5936 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5937
5938         * modules/configmake (Makefile.am): Add a comment, and omit
5939         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5940         by Bruno Haible.
5941
5942 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5943
5944         * m4/isapipe.m4: New file.
5945
5946 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5947
5948         * lib/isapipe.c, lib/isapipe.h: New files.
5949
5950 2006-08-29  Jim Meyering  <jim@meyering.net>
5951
5952         * modules/configmake (Makefile.am): Make configmake.h depend on
5953         Makefile.  Otherwise, a stale configmake.h could hang around.
5954
5955 2006-08-29  Eric Blake  <ebb9@byu.net>
5956
5957         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5958         resolution of upstream bug 3044.
5959
5960 2006-08-29  Bruno Haible  <bruno@clisp.org>
5961
5962         * modules/localcharset (Depends-on): Add configmake.
5963         (Makefile.am): Remove setting of LIBDIR through DEFS.
5964
5965 2006-08-29  Bruno Haible  <bruno@clisp.org>
5966
5967         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5968         defined.
5969
5970 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5971
5972         * modules/fcntl: New file.
5973         * modules/chdir-safer (Depends-on): Add fcntl.
5974         * modules/fts: Likewise.
5975         * modules/mkdir-p: Likewise.
5976
5977         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5978         This undoes the most recent change, since we're now addressing the
5979         problem in a different way.
5980
5981         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5982         into output, since the output might be called Makefile.am even
5983         if $makefile_name is something different.
5984         (func_import): Use $makefile_am rather than
5985         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5986         empty.
5987
5988         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5989
5990 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5991
5992         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5993         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5994         recent change to stdint.m4, since we're now addressing the problem in a
5995         different way.
5996
5997 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5998
5999         * m4/fcntl_h.m4: New file.
6000
6001 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6002
6003         * lib/fcntl_.h: New file.
6004         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6005         the fcntl module.
6006         * lib/dirchownmod.c: Likewise.
6007         * lib/fts.c: Likewise.
6008
6009         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6010         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6011         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6012         just before including <inttypes.h>, to avoid circular inclusion.
6013
6014 2006-08-28  Jim Meyering  <jim@meyering.net>
6015
6016         * doc/visibility.texi: Actually read and correct the grammar of the
6017         sentence affected by yesterday's change.
6018
6019 2006-08-28  Eric Blake  <ebb9@byu.net>
6020
6021         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6022         needs wrapper.
6023
6024 2006-08-28  Eric Blake  <ebb9@byu.net>
6025
6026         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6027
6028 2006-08-28  Eric Blake  <ebb9@byu.net>
6029
6030         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6031
6032 2006-08-28  Bruno Haible  <bruno@clisp.org>
6033
6034         * modules/c-strstr: New file, from GNU gettext.
6035         * MODULES.html.sh (String handling): Add c-strstr.
6036
6037 2006-08-28  Bruno Haible  <bruno@clisp.org>
6038
6039         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6040         macros.
6041         Reported by Eric Blake.
6042
6043 2006-08-28  Bruno Haible  <bruno@clisp.org>
6044
6045         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6046         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6047         * lib/vasprintf.c: Include errno.h, limits.h.
6048         (EOVERFLOW): New fallback definition.
6049         (vasprintf): Test here whether the string length is > INT_MAX.
6050         * lib/vsnprintf.c: Include errno.h, limits.h.
6051         (EOVERFLOW): New fallback definition.
6052         (vsnprintf): Fix bug when generated string was too long for the buffer.
6053         Test here whether the string length is > INT_MAX.
6054
6055 2006-08-28  Bruno Haible  <bruno@clisp.org>
6056
6057         * lib/inttypes_.h (SCNX*): Remove definitions.
6058         Reported by Eric Blake.
6059
6060 2006-08-28  Bruno Haible  <bruno@clisp.org>
6061
6062         * lib/c-strstr.h: New file, from GNU gettext.
6063         * lib/c-strstr.c: New file, from GNU gettext.
6064
6065 2006-08-28  Bruno Haible  <bruno@clisp.org>
6066
6067         * gnulib-tool: Reorder some statements.
6068
6069 2006-08-28  Bruno Haible  <bruno@clisp.org>
6070
6071         * gnulib-tool: New option --makefile-name.
6072         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6073         $makefile_name.
6074         (func_import): Write $makefile_name to the cache file, and read it from
6075         there unless explicitly specified. Use $makefile_name as file name
6076         instead of Makefile.am. Adjust the recommendations accordingly.
6077
6078 2006-08-28  Bruno Haible  <bruno@clisp.org>
6079
6080         * gnulib-tool (func_verify_module): Check against misapplying patch.
6081
6082 2006-08-28  Bruno Haible  <bruno@clisp.org>
6083
6084         * gnulib-tool (func_relativize, func_relconcat): New functions.
6085         Give an error if --local-dir is given with --update.
6086         Remove trailing slashes from $local_gnulib_dir.
6087         (func_import): Store the relativized $local_gnulib_dir in
6088         gnulib-cache.m4, and read it from there if not specified explicitly.
6089
6090 2006-08-28  Bruno Haible  <bruno@clisp.org>
6091
6092         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6093         is the current directory. Respect also $local_gnulib_dir.
6094
6095 2006-08-28  Bruno Haible  <bruno@clisp.org>
6096             Simon Josefsson  <jas@extundo.com>
6097
6098         BeOS portability.
6099         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6100
6101 2006-08-27  Jim Meyering  <jim@meyering.net>
6102
6103         * doc/visibility.texi: Remove duplicate word: "pointer".
6104
6105 2006-08-26  Bruno Haible  <bruno@clisp.org>
6106
6107         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6108         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6109         (Makefile.am): Create inttypes.h from inttypes_.h.
6110         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6111
6112         * modules/imaxabs: New file.
6113
6114         * modules/imaxdiv: New file.
6115
6116 2006-08-26  Bruno Haible  <bruno@clisp.org>
6117
6118         * m4/inttypes.m4: New file.
6119         * m4/_inttypes_h.m4: Remove file.
6120         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6121         PRI_MACROS_BROKEN.
6122         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6123
6124         * m4/imaxabs.m4: New file.
6125
6126         * m4/imaxdiv.m4: New file.
6127
6128 2006-08-26  Bruno Haible  <bruno@clisp.org>
6129
6130         * lib/inttypes_.h: New file.
6131         * lib/inttypes.h: Remove file.
6132         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6133
6134         * lib/imaxabs.c: New file.
6135
6136         * lib/imaxdiv.c: New file.
6137
6138 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6139
6140         New config-h module, so that "make" output needn't be cluttered
6141         by -DHAVE_CONFIG_H.
6142         * MODULES.html.sh (Support for building libraries and executables):
6143         Add config-h.
6144         * modules/config-h: New file.
6145         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6146         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6147         the config-h module is used.
6148
6149         New configmake module, so that "make" output needn't be cluttered
6150         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6151         * MODULES.html.sh (Support for building libraries and executables):
6152         Add configmake.
6153         * modules/configmake: New file.
6154
6155 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6156
6157         * m4/config-h.m4: New file.
6158
6159 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6160
6161         * config/srclist.txt: Add elisp-comp.
6162
6163 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6164
6165         * MODULES.html.sh (Support for building libraries and executables):
6166         Add elisp-comp.
6167         * build-aux/elisp-comp: New file.
6168         * modules/elisp-comp: New file.
6169
6170 2006-08-24  Bruno Haible  <bruno@clisp.org>
6171
6172         * gnulib-tool (func_create_testdir): Use non-default values of
6173         sourcebase and m4base.
6174
6175 2006-08-24  Bruno Haible  <bruno@clisp.org>
6176
6177         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6178         HTML structure.
6179
6180 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6181
6182         * modules/openat (Depends-on): Add lchown.
6183
6184 2006-08-23  Bruno Haible  <bruno@clisp.org>
6185
6186         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6187         of gl_LOCK_EARLY instead of gl_LOCK.
6188
6189 2006-08-23  Bruno Haible  <bruno@clisp.org>
6190
6191         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6192         on OSF/1 to no.
6193         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6194
6195 2006-08-23  Bruno Haible  <bruno@clisp.org>
6196
6197         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6198         as unusable.
6199
6200         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6201         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6202         (gl_LOCK): New macro.
6203
6204 2006-08-22  Simon Josefsson  <jas@extundo.com>
6205
6206         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6207         to md5 module.
6208
6209 2006-08-22  Simon Josefsson  <jas@extundo.com>
6210
6211         * MODULES.html.sh: Add "Support for maintaining and release
6212         projects".
6213
6214         * build-aux/gnupload: New file, from coreutils.
6215
6216 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6217
6218         Avoid the need for AC_LIBSOURCES in m4 macros.
6219         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6220         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6221         * modules/check-version (EXTRA_DIST): Add check-version.h.
6222         * modules/crc (EXTRA_DIST): Add crc.h.
6223         * modules/des (EXTRA_DIST): Add des.h.
6224         * modules/gc (EXTRA_DIST): Add gc.h.
6225         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6226         * modules/getline (EXTRA_DIST): Add getline.h.
6227         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6228         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6229         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6230         * modules/md2 (EXTRA_DIST): Add md2.h.
6231         * modules/md4 (EXTRA_DIST): Add md4.h.
6232         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6233         * modules/read-file (EXTRA_DIST): Add read-file.h.
6234         * modules/readline (EXTRA_DIST): Add readline.h.
6235         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6236         rijndael-api-fst.h.
6237
6238 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6239
6240         * m4/rijndael.m4 (gl_ARCFOUR):
6241         * m4/arctwo.m4 (gl_ARCTWO):
6242         * m4/check-version.m4 (gl_CHECK_VERSION):
6243         * m4/crc.m4 (gl_CRC):
6244         * m4/des.m4 (gl_DES):
6245         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6246         * m4/gc.m4 (gl_GC):
6247         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6248         * m4/getline.m4 (gl_FUNC_GETLINE):
6249         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6250         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6251         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6252         * m4/md2.m4 (gl_MD2):
6253         * m4/md4.m4 (gl_MD4):
6254         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6255         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6256         * m4/readline.m4 (gl_FUNC_READLINE):
6257         * m4/rijndael.m4 (gl_RIJNDAEL):
6258         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6259         to get the necessary .h files and whatnot.
6260
6261 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6262
6263         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6264         gnulib rather than the other way around.
6265         * config/srclistvars.sh (COREUTILS): Remove.
6266
6267 2006-08-22  Jim Meyering  <jim@meyering.net>
6268
6269         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6270
6271         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6272
6273 2006-08-22  Eric Blake  <ebb9@byu.net>
6274
6275         * modules/regexprops-generic: New file.
6276         * MODULES.html.sh (Support for building documentation): List it.
6277
6278 2006-08-22  Eric Blake  <ebb9@byu.net>
6279
6280         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6281         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6282         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6283         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6284
6285 2006-08-22  Bruno Haible  <bruno@clisp.org>
6286
6287         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6288         and lib_LTLIBRARIES like the other lib_* variables.
6289
6290 2006-08-22  Bruno Haible  <bruno@clisp.org>
6291
6292         * build-aux/x-to-1.in: New file, from GNU gettext.
6293
6294 2006-08-22  Bruno Haible  <bruno@clisp.org>
6295
6296         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6297         <utmpx.h> exists.
6298
6299 2006-08-22  Bruno Haible  <bruno@clisp.org>
6300
6301         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6302         <utmpx.h> exists.
6303
6304 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6305
6306         BeOS portability.
6307         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6308         exist.
6309         Problem reported by Bruno Haible.
6310
6311 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6312
6313         Avoid the need for AC_LIBSOURCES in m4 macros.
6314         * modules/acl (EXTRA_DIST): Add acl.h.
6315         * modules/argmatch (Files): Add m4/argmatch.m4.
6316         (configure.ac): Add gl_ARGMATCH.
6317         (EXTRA_DIST): Renamed from lib_SOURCES, for
6318         consistency with the other modules.  Remove argmatch.c.
6319         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6320         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6321         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6322         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6323         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6324         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6325         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6326         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6327         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6328         * modules/closeout (EXTRA_DIST): Add closeout.h.
6329         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6330         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6331         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6332         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6333         dirname.h; remove basename.c and stripslash.c.
6334         * modules/exclude (EXTRA_DIST): Add exclude.h.
6335         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6336         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6337         * modules/file-type (EXTRA_DIST): Add file-type.h.
6338         * modules/filemode (EXTRA_DIST): Add filemode.h.
6339         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6340         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6341         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6342         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6343         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6344         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6345         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6346         * modules/getdate (EXTRA_DIST): Add getdate.c.
6347         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6348         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6349         * modules/getpass (EXTRA_DIST): Add getpass.h.
6350         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6351         * modules/group-member (EXTRA_DIST): Add group-member.h.
6352         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6353         * modules/hash (EXTRA_DIST): Add hash.h.
6354         * modules/human (EXTRA_DIST): Add human.h.
6355         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6356         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6357         * modules/lchown (EXTRA_DIST): Add lchown.h.
6358         * modules/long-options (EXTRA_DIST): Add long-options.h.
6359         * modules/lstat (EXTRA_DIST): Add lstat.h.
6360         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6361         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6362         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6363         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6364         * modules/memxor (EXTRA_DIST): Add memxor.h.
6365         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6366         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6367         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6368         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6369         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6370         * modules/physmem (EXTRA_DIST): Add physmem.h.
6371         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6372         * modules/posixver (EXTRA_DIST): Add posixver.h.
6373         * modules/quote (EXTRA_DIST): Add quote.h.
6374         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6375         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6376         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6377         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6378         regex_internal.h regexec.c.
6379         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6380         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6381         * modules/same (EXTRA_DIST): Add same.h.
6382         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6383         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6384         * modules/savedir (EXTRA_DIST): Add savedir.h.
6385         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6386         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6387         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6388         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6389         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6390         * modules/strdup (EXTRA_DIST): Add strdup.h.
6391         * modules/strftime (EXTRA_DIST): Add strftime.h.
6392         * modules/strndup (EXTRA_DIST): Add strndup.h.
6393         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6394         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6395         * modules/time_r (EXTRA_DIST): Add time_r.h.
6396         * modules/timespec (EXTRA_DIST): Add timespec.h.
6397         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6398         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6399         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6400         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6401         * modules/userspec (EXTRA_DIST): Add userspec.h.
6402         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6403         * modules/utimens (EXTRA_DIST): Add utimens.h.
6404         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6405         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6406         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6407         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6408         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6409         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6410         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6411         * modules/yesno (EXTRA_DIST): Add yesno.h.
6412
6413 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6414
6415         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6416
6417         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6418         * m4/dev-ino.m4, same-inode.m4: Remove.
6419
6420         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6421         * m4/acl.m4 (AC_FUNC_ACL):
6422         * m4/backupfile.m4 (gl_BACKUPFILE):
6423         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6424         * m4/canon-host.m4 (gl_CANON_HOST):
6425         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6426         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6427         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6428         * m4/cloexec.m4 (gl_CLOEXEC):
6429         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6430         * m4/closeout.m4 (gl_CLOSEOUT):
6431         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6432         * m4/dirname.m4 (gl_DIRNAME):
6433         * m4/exclude.m4 (gl_EXCLUDE):
6434         * m4/exitfail.m4 (gl_EXITFAIL):
6435         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6436         * m4/file-type.m4 (gl_FILE_TYPE):
6437         * m4/filemode.m4 (gl_FILEMODE):
6438         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6439         * m4/fpending.m4 (gl_FUNC_FPENDING):
6440         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6441         * m4/fts.m4 (gl_FUNC_FTS):
6442         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6443         * m4/getdate.m4 (gl_GETDATE):
6444         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6445         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6446         * m4/getpass.m4 (gl_FUNC_GETPASS):
6447         * m4/gettime.m4 (gl_GETTIME):
6448         * m4/getugroups.m4 (gl_GETUGROUPS):
6449         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6450         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6451         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6452         * m4/hash.m4 (gl_HASH):
6453         * m4/idcache.m4 (gl_IDCACHE):
6454         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6455         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6456         * m4/long-options.m4 (gl_LONG_OPTIONS):
6457         * m4/lstat.m4 (gl_FUNC_LSTAT):
6458         * m4/md5.m4 (gl_MD5):
6459         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6460         * m4/memcoll.m4 (gl_MEMCOLL):
6461         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6462         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6463         * m4/memxor.m4 (gl_MEMXOR):
6464         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6465         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6466         * m4/modechange.m4 (gl_MODECHANGE):
6467         * m4/mountlist.m4 (gl_MOUNTLIST):
6468         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6469         * m4/openat.m4 (gl_FUNC_OPENAT):
6470         * m4/pathmax.m4 (gl_PATHMAX):
6471         * m4/physmem.m4 (gl_PHYSMEM):
6472         * m4/posixtm.m4 (gl_POSIXTM):
6473         * m4/posixver.m4 (gl_POSIXVER):
6474         * m4/quote.m4 (gl_QUOTE):
6475         * m4/quotearg.m4 (gl_QUOTEARG):
6476         * m4/readtokens.m4 (gl_READTOKENS):
6477         * m4/readutmp.m4 (gl_READUTMP):
6478         * m4/regex.m4 (gl_REGEX):
6479         * m4/safe-read.m4 (gl_SAFE_READ):
6480         * m4/safe-write.m4 (gl_SAFE_WRITE):
6481         * m4/same.m4 (gl_SAME):
6482         * m4/save-cwd.m4 (gl_SAVE_CWD):
6483         * m4/savedir.m4 (gl_SAVEDIR):
6484         * m4/settime.m4 (gl_SETTIME):
6485         * m4/sha1.m4 (gl_SHA1):
6486         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6487         * m4/stat-macros.m4 (gl_STAT_MACROS):
6488         * m4/stat-time.m4 (gl_STAT_TIME):
6489         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6490         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6491         * m4/strdup.m4 (gl_FUNC_STRDUP):
6492         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6493         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6494         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6495         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6496         * m4/time_r.m4 (gl_TIME_R):
6497         * m4/timespec.m4 (gl_TIMESPEC):
6498         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6499         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6500         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6501         * m4/userspec.m4 (gl_USERSPEC):
6502         * m4/utimecmp.m4 (gl_UTIMECMP):
6503         * m4/utimens.m4 (gl_UTIMENS):
6504         * m4/xalloc.m4 (gl_XALLOC):
6505         * m4/xgetcwd.m4 (gl_XGETCWD):
6506         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6507         * m4/xreadlink.m4 (gl_XREADLINK):
6508         * m4/xstrtod.m4 (gl_XSTRTOD):
6509         * m4/yesno.m4 (gl_YESNO):
6510         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6511         to get the necessary .h files and whatnot.
6512
6513 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6514             Bruno Haible  <bruno@clisp.org>
6515
6516         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6517         /bin/sh understanding of '!' conditional negation.
6518
6519 2006-08-21  Jim Meyering  <jim@meyering.net>
6520
6521         * modules/openat (Depends-on): Really alphabetize.
6522
6523         * modules/acl (Depends-on): Add error and quote.
6524
6525         * check-module (find_included_lib_files): Add at-func.c to the
6526         ok-to-include-more-than-once white list.
6527
6528         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6529
6530 2006-08-21  Bruno Haible  <bruno@clisp.org>
6531
6532         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6533         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6534         Reported by Martin Lambers <marlam@marlam.de>.
6535
6536 2006-08-21  Bruno Haible  <bruno@clisp.org>
6537
6538         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6539         specify an installation location, don't emit a noinst_LIBRARIES or
6540         noinst_LTLIBRARIES assignment.
6541
6542 2006-08-21  Bruno Haible  <bruno@clisp.org>
6543
6544         BeOS portability.
6545         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6546         BeOS has mbrtowc() but no <wctype.h>.
6547
6548 2006-08-21  Bruno Haible  <bruno@clisp.org>
6549
6550         BeOS portability.
6551         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6552         exist.
6553
6554 2006-08-21  Bruno Haible  <bruno@clisp.org>
6555
6556         BeOS portability.
6557         * lib/mbchar.h: Include <wctype.h> only if it exists.
6558
6559 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6560
6561         Remove files that are no longer needed by their respective modules.
6562         * m4/obstack.m4: Remove.
6563         * m4/strerror_r.m4: Remove.
6564         * m4/uint32_t.m4: Remove.
6565         * m4/uintptr_t.m4: Remove.
6566         * m4/ullong_max.m4: Remove.
6567         * m4/xstrtoimax.m4: Remove.
6568         * m4/xstrtoumax.m4: Remove.
6569
6570         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6571         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6572         dependencies now capture this.
6573
6574         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6575         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6576         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6577         * m4/human.m4 (gl_HUMAN): Likewise.
6578         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6579         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6580
6581         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6582
6583         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6584         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6585         stdint.
6586         * m4/human.m4 (gl_HUMAN): Likewise.
6587         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6588         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6589         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6590         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6591         * m4/xstrtol (gl_XSTRTOL): Likewise.
6592
6593         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6594         AC_TYPE_LONG_LONG_INT.
6595         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6596         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6597         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6598         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6599
6600         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6601         on stdbool.
6602
6603         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6604         (gl_PREREQ_XSTRTOUL): Remove.
6605
6606         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6607
6608         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6609         mode.
6610
6611 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6612
6613         Add and change modules to make it easier for coreutils to use
6614         gnulib-tool.
6615         * modules/backupfile (Files): Remove m4/d-ino.m4.
6616         (Depends-on): Add d-ino.
6617         * modules/cycle-check (Depends-on): Add stdint.
6618         (lib_SOURCES): Add cycle-check.h.
6619         * modules/d-ino: New module.
6620         * modules/d-type: New module.
6621         * modules/error (Files): Remove m4/strerror_r.m4.
6622         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6623         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6624         m4/inttypes_h.m4, m4/uintmax_t.m4.
6625         (Depends-on): Add stdint.
6626         (lib_SOURCES): Add fsusage.h.
6627         * modules/getcwd (Files): Remove d-ino.m4.
6628         (Depends-on): Add d-ino.
6629         * modules/getndelim2 (Depends-on): Add stdint.
6630         * modules/glob (Files): Remove m4/d-type.m4.
6631         (Depends-on): Add d-type.
6632         * modules/host-os: New module.
6633         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6634         m4/inttypes_h.m4, m4/uintmax_t.m4.
6635         * Depends-on: Add stdint.
6636         (lib_SOURCES): Add human.h.
6637         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6638         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6639         m4/uintmax_t.m4, m4/ulonglong.m4.
6640         (Depends-on): Add stdint.
6641         (EXTRA_DIST): Add inttostr.h.
6642         * modules/lchmod: New module.
6643         * modules/link-follow: New module.
6644         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6645         (Depends-on): Add lchmod.
6646         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6647         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6648         (Depends-on): Add stdint.
6649         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6650         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6651         (Depends-on): Add stdint.
6652         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6653         * modules/perl: New module.
6654         * modules/regex (Depends-on): Add stdint.
6655         * modules/rmdir-errno: New module.
6656         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6657         m4/intmax_t.m4.
6658         (Depends-on): Add stdint.
6659         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6660         m4/uintmax_t.m4.
6661         (Depends-on): Add stdint.
6662         * modules/unlink-busy: New module.
6663         * modules/utimecmp (Depends-on): Add stdint.
6664         * modules/uptime: New module.
6665         * modules/winsz-ioctl: New module.
6666         * modules/winsz-termios: New module.
6667         * modules/xnanosleep (Depends-on): Add nanosleep.
6668         * modules/ullong_max: Remove.
6669         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6670         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6671         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6672         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6673         (Depends-on): Add inttypes.
6674         (lib_SOURCES): Add xstrtol.h.
6675         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6676         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6677         * MODULES.html.sh: Move 'assert' into the assert section.
6678         Move 'dummy' into the linking section.
6679         Remove ullong_max.
6680         Add section for compatibility checks for POSIX:2001 functions,
6681         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6682         winsz-ioctl, and winsz-termios into it.
6683         Add lchmod.
6684         Add top-level Misc section and put host-os, perl, and uptime
6685         into it.
6686
6687 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6688
6689         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6690         now assume the stdint module.  Do not include inttypes.h.
6691         * lib/fsusage.h: Likewise.
6692         * lib/getndelim2.c: Likewise.
6693         * lib/human.h: Likewise.
6694         * lib/inttostr.h: Likewise.
6695         * lib/obstack.c: Likewise.
6696         * lib/regex_internal.h: Likewise.
6697         * lib/tempname.c: Likewise.
6698         * lib/utimecmp.c: Likewise.
6699         * lib/xstrtol.h: Likewise.
6700
6701         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6702
6703         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6704         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6705         * lib/xtime.h: Likewise.
6706
6707 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6708
6709         * modules/openat (Files): Add lib/fchmodat.c.
6710         Fixes problem reported by Jay Youngman.
6711
6712 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6713
6714         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6715         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6716
6717 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6718             Bruno Haible  <bruno@clisp.org>
6719
6720         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6721         and is a script that invokes bison. Tighten the code. Add comments.
6722
6723 2006-08-18  Jim Meyering  <jim@meyering.net>
6724
6725         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6726         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6727         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6728         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6729
6730 2006-08-18  Bruno Haible  <bruno@clisp.org>
6731
6732         * modules/bison-i18n: New file.
6733         * MODULES.html.sh (Internationalization functions): Add it.
6734
6735 2006-08-18  Bruno Haible  <bruno@clisp.org>
6736
6737         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6738         sys/statvfs.h. When getmntinfo was found, check its declaration and
6739         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6740
6741 2006-08-18  Bruno Haible  <bruno@clisp.org>
6742
6743         * m4/bison-i18n.m4: New file, from bison.
6744
6745 2006-08-18  Bruno Haible  <bruno@clisp.org>
6746
6747         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6748         (ME_DUMMY): Treat "kernfs" as a dummy.
6749         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6750
6751 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6752
6753         Update from coreutils.
6754
6755         2006-08-15  Jim Meyering  <jim@meyering.net>
6756
6757         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6758
6759         2006-01-17  Jim Meyering  <jim@meyering.net>
6760
6761         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6762
6763         2006-01-11  Jim Meyering  <jim@meyering.net>
6764
6765         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6766         Check for the lchmod function.
6767
6768 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6769
6770         Update from coreutils.
6771
6772         * lib/__fpending.h: Add copyright notice.
6773         * lib/fprintftime.h: Likewise.
6774         * lib/savedir.c: Use (C) in copyright notice.
6775         * lib/savedir.h: Likewise.
6776
6777         2006-08-15  Jim Meyering  <jim@meyering.net>
6778
6779         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6780         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6781         in support of the EXPECTED_ERRNO macro.
6782         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6783         definitions.  Instead, define the appropriate symbols and include
6784         "at-func.c".
6785         * lib/mkdirat.c (mkdirat): Likewise.
6786         * lib/fchmodat.c (fchmodat): Likewise.
6787         (ENOSYS): Remove definition.
6788         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6789         it.  Don't include "unistd--.h" -- it wasn't ever used.
6790
6791         2006-01-17  Jim Meyering  <jim@meyering.net>
6792
6793         Rewrite fts.c not to change the current working directory,
6794         by using openat, fstatat, fdopendir, etc..
6795
6796         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6797         (HAVE_OPENAT_SUPPORT): Define.
6798         [_LIBC] (fchdir): Don't undef or define; no longer used.
6799         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6800         Now, this `function' always succeeds, and consumes its file descriptor
6801         parameter -- so callers must not close such FDs.  Update callers.
6802         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6803         (diropen): Add parameter, SP.  Adjust all callers.
6804         Implement using diropen_fd, rather than open.
6805         (fts_open): Initialize new member, fts_cwd_fd.
6806         Remove fts_rft-setting code.
6807         (fts_close): Close fts_cwd_fd, if necessary.
6808         (__opendir2): Define in terms of opendir or opendirat,
6809         depending on whether the FST_NOCHDIR flag is set.
6810         (fts_build): Since fts_safe_changedir consumes its FD, and since
6811         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6812         and close the dup'd file descriptor upon failure.
6813         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6814         (fts_safe_changedir): Tweak semantics to reflect that this function
6815         now calls cwd_advance_fd and hence consumes its FD argument.
6816         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6817         [struct FTS] (fts_rft): Remove now-unused member.
6818         [struct FTS] (fts_cycle.state): Improve comment.
6819
6820         * lib/openat.c (openat_needs_fchdir): New function.
6821         * lib/openat.h (openat_needs_fchdir): Declare it.
6822
6823 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6824
6825         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6826         Problem and fix reported by Pádraig Brady in
6827         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6828
6829 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6830
6831         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6832
6833 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6834
6835         * lib/memcoll.c (memcoll): Optimize for the common case where the
6836         arguments are bytewise equal.
6837
6838 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6839
6840         * doc/regexprops-generic.texi: Add a copyright notice.
6841
6842 2006-08-15  Bruno Haible  <bruno@clisp.org>
6843
6844         * modules/tmpdir (License): Change to LGPL.
6845
6846 2006-08-15  Bruno Haible  <bruno@clisp.org>
6847
6848         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6849         module.
6850
6851 2006-08-14  Simon Josefsson  <jas@extundo.com>
6852
6853         * config/srclist.txt: Add gnupload.
6854
6855 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6856
6857         Change copyright notice from LGPL 2 to GPL 2, since that's the
6858         standard form used in the gnulib repository.
6859         * tests/test-lock.c: Likewise.
6860         * tests/test-stdint.c: Likewise.
6861         * tests/test-tls.c: Likewise.
6862
6863         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6864         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6865         Add copyright notice.
6866
6867         * check-module: Add copyright notice.  Output a copyright
6868         notice if "--version" is specified.
6869         * modules/COPYING: New file.
6870         * tests/test-getaddrinfo.c: Add copyright notice.
6871         * tests/test-verify.c: Likewise.
6872
6873 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6874
6875         Change copyright notice from LGPL 2 to GPL 2, since that's the
6876         standard form used in the gnulib repository.
6877         * lib/lock.c: LGPL -> GPL.
6878         * lib/lock.h: Likewise.
6879         * lib/strnlen1.c: Likewise.
6880         * lib/strnlen1.h: Likewise.
6881         * lib/tls.c: Likewise.
6882         * lib/tls.h: Likewise.
6883         * lib/tmpdir.c: Likewise.
6884
6885         * lib/TODO: Remove; this belongs only in coreutils.
6886
6887 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6888
6889         Add copyright notices to long-enough files that lack them, since
6890         otherwise the files aren't clearly free.  Use the same notice that
6891         getdate.texi already uses.
6892         * doc/alloca-opt.texi: Add copyright notice.
6893         * doc/alloca.texi: Likewise.
6894         * doc/ctime.texi: Likewise.
6895         * doc/functions.texi: Likewise.
6896         * doc/gcd.texi: Likewise.
6897         * doc/gnulib-tool.texi: Likewise.
6898         * doc/inet_ntoa.texi: Likewise.
6899         * doc/visibility.texi: Likewise.
6900
6901         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6902         * doc/quote.texi: Add copyright notice.
6903
6904         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6905         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6906         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6907         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6908         is now obsolete, and give a pointer to the Sun list.
6909         Add copyright notice.
6910
6911 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6912
6913         * config/srclistvars.sh: Add copyright notice.
6914
6915 2006-08-14  Eric Blake  <ebb9@byu.net>
6916
6917         Import the following change from libc:
6918
6919         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6920
6921         Upstream bug 2997.
6922         * lib/misc/error.c: Add space between program name and message if file
6923         name is missing.
6924
6925 2006-08-12  Karl Berry  <karl@gnu.org>
6926
6927         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6928         remove, these originate in gnulib now.
6929
6930 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6931
6932         * doc/Makefile (standards.info standards.html standards.dvi):
6933         Also depend on make-stds.texi.
6934
6935 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6936
6937         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6938         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6939
6940         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6941         in wchar_t.  Problem reported by Eric Blake.
6942
6943         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6944         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6945         Also, help the compiler to keep LEN in a register.
6946
6947 2006-08-11  Eric Blake  <ebb9@byu.net>
6948
6949         * users.txt: Sort.  Add tar.
6950
6951 2006-08-11  Bruno Haible  <bruno@clisp.org>
6952
6953         * users.txt: New file.
6954
6955 2006-08-11  Bruno Haible  <bruno@clisp.org>
6956
6957         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6958         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6959
6960 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6961
6962         * modules/snprintf (Depends-on): Remove minmax.
6963         (Maintainer): Add self and Bruno.
6964
6965 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6966
6967         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6968         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6969         (EOVERFLOW): Define if the system does not.
6970         Do not include "minmax.h"; it wasn't used.
6971         (snprintf): Don't assume size_t promotes to an unsigned type.
6972         Fix bug when generated string was too long for the buffer: the
6973         buffer's contents are supposed to be the initial prefix of the
6974         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6975         exceeds INT_MAX; do the check ourselves.
6976
6977         Import the following changes from libc:
6978
6979         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6980
6981         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6982         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6983         set wc to the byte which couldn't be converted.
6984         (re_string_reconstruct): Don't clear valid_raw_len before calling
6985         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6986         tip_context using re_string_context_at.
6987
6988         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6989
6990         * lib/posix/regex.h: g++ still cannot handled [restrict].
6991
6992         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6993
6994         * lib/posix/regex.h: Remove special handling for VMS.
6995
6996 2006-08-10  Jim Meyering  <jim@meyering.net>
6997
6998         * modules/same-inode: New module.
6999         * modules/dev-ino: New module.
7000         * modules/cycle-check: Depend on these modules, rather than simply
7001         including their .h files.
7002         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7003         required via m4/cycle-check.m4.
7004         * modules/same: Depend on new same-inode module, rather than
7005         including same-inode.h.
7006         * modules/chdir-safer: New file.
7007
7008         * modules/chown (Depends-on): Add stat-macros.
7009
7010 2006-08-10  Jim Meyering  <jim@meyering.net>
7011
7012         * m4/cycle-check.m4: New file.
7013         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7014         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7015
7016 2006-08-10  Eric Blake  <ebb9@byu.net>
7017
7018         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7019         in from original proposal.
7020
7021 2006-08-10  Eric Blake  <ebb9@byu.net>
7022         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7023
7024         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7025         namespace.
7026
7027 2006-08-10  Bruno Haible  <bruno@clisp.org>
7028
7029         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7030         as well.
7031
7032 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7033
7034         Sync from coreutils.
7035
7036         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7037
7038         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7039         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7040
7041 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7042
7043         * modules/restrict: Remove; no longer needed now that we assume
7044         Autoconf 2.59 or later.
7045         * MODULES.html.sh: Remove 'restrict'.
7046         * modules/argp (Depends-on): Remove 'restrict'.
7047         * modules/base64 (Depends-on): Likewise.
7048         * modules/gc (Depends-on): Likewise.
7049         * modules/getaddrinfo (Depends-on): Likewise.
7050         * modules/glob (Depends-on): Likewise.
7051         * modules/inet_ntop (Depends-on): Likewise.
7052         * modules/inet_pton (Depends-on): Likewise.
7053         * modules/memxor (Depends-on): Likewise.
7054         * modules/regex (Depends-on): Likewise.
7055         * modules/strtok_r (Depends-on): Likewise.
7056         * modules/time_r (Depends-on): Likewise.
7057
7058 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7059
7060         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7061         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7062         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7063         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7064         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7065         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7066         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7067         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7068
7069         Merge from coreutils.
7070         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7071         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7072         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7073         * m4/time_r.m4 (gl_TIME_R): Likewise.
7074
7075 2006-08-09  Karl Berry  <karl@gnu.org>
7076
7077         * config/srclist.txt: no more gettext-tools, per Bruno.
7078
7079 2006-08-08  Eric Blake  <ebb9@byu.net>
7080
7081         * modules/verror: New module.
7082         * MODULES.html.sh: Document it.
7083
7084 2006-08-08  Eric Blake  <ebb9@byu.net>
7085
7086         * lib/verror.h, lib/verror.c: New files.
7087
7088 2006-08-08  Eric Blake  <ebb9@byu.net>
7089
7090         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7091         verror_at_line output complies with GNU Coding Standards even when
7092         file is NULL.
7093
7094 2006-08-07  Bruno Haible  <bruno@clisp.org>
7095
7096         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7097         versions of AIX.
7098         Reported by Ralf Wildenhues.
7099
7100 2006-08-07  Bruno Haible  <bruno@clisp.org>
7101
7102         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7103         in an AC_DEFUN. Needed so that the autoconf snippets can use
7104         AC_REQUIRE.
7105
7106 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7107
7108         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7109         Initialize pkgdata_DATA.
7110         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7111         overriding it.
7112
7113 2006-08-06  Eric Blake  <ebb9@byu.net>
7114
7115         * lib/error.h: Fold in some upstream changes from glibc.
7116         * lib/error.c: Likewise.
7117
7118 2006-08-04  Bruno Haible  <bruno@clisp.org>
7119
7120         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7121         Make the mostlyclean-local rule depend on mostlyclean-generic.
7122         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7123
7124 2006-07-31  Bruno Haible  <bruno@clisp.org>
7125
7126         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7127         <stdlib.h>, <string.h>.
7128
7129 2006-07-30  Bruno Haible  <bruno@clisp.org>
7130
7131         * modules/readlink (License): Change to LGPL.
7132
7133 2006-07-30  Bruno Haible  <bruno@clisp.org>
7134
7135         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7136         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7137         set PKGDATADIR to point to it.
7138
7139 2006-07-30  Bruno Haible  <bruno@clisp.org>
7140
7141         * modules/csharpexec (configure.ac): Comment out macro invocation.
7142         * modules/javaexec (configure.ac): Likewise.
7143         * modules/javacomp-script (configure.ac): Likewise.
7144
7145         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7146
7147 2006-07-30  Bruno Haible  <bruno@clisp.org>
7148
7149         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7150         linked-list.
7151
7152 2006-07-30  Bruno Haible  <bruno@clisp.org>
7153
7154         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7155
7156 2006-07-30  Bruno Haible  <bruno@clisp.org>
7157
7158         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7159         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7160         get removed.
7161
7162 2006-07-29  Bruno Haible  <bruno@clisp.org>
7163
7164         Make it possible for gnulib-tool to work with locally modified or
7165         augmented gnulib repositories.
7166         * gnulib-tool (func_usage): Document --local-dir option.
7167         (local_gnulib_dir): New variable.
7168         Handle --local-dir option.
7169         (func_lookup_file): New function.
7170         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7171         (func_get_description, func_get_filelist, func_get_description,
7172         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7173         func_get_automake_snippet, func_get_include_directive,
7174         func_get_license, func_get_maintainer): Use func_lookup_file.
7175         (func_import, func_create_testdir): Use func_lookup_file.
7176
7177 2006-07-29  Bruno Haible  <bruno@clisp.org>
7178
7179         * modules/setenv (Depends-on): Add unistd.
7180
7181 2006-07-29  Bruno Haible  <bruno@clisp.org>
7182
7183         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7184
7185 2006-07-29  Bruno Haible  <bruno@clisp.org>
7186
7187         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7188
7189 2006-07-29  Bruno Haible  <bruno@clisp.org>
7190
7191         * gnulib-tool (import, update): If there is no Makefile.am, look at
7192         aclocal.m4, instead of bailing out.
7193
7194 2006-07-29  Bruno Haible  <bruno@clisp.org>
7195
7196         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7197         Categorize the options by when they are useful.
7198
7199 2006-07-29  Bruno Haible  <bruno@clisp.org>
7200
7201         * gnulib-tool (func_usage): Document option --no-libtool.
7202         Handle option --no-libtool.
7203         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7204         for changed semantics of $libtool variable.
7205         (func_import): Likewise. If libtool is not used, show this through
7206         an option --no-libtool.
7207         (func_create_testdir): Update.
7208
7209 2006-07-29  Bruno Haible  <bruno@clisp.org>
7210
7211         * gnulib-tool (func_import): Extend error message about missing
7212         --doc-base.
7213
7214 2006-07-29  Bruno Haible  <bruno@clisp.org>
7215
7216         * gnulib-tool (func_import): Don't create the $docbase directory if
7217         there is no file to store there.
7218
7219 2006-07-29  Bruno Haible  <bruno@clisp.org>
7220
7221         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7222         relevant, look for configure.ac there, not in the current directory.
7223         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7224
7225 2006-07-29  Bruno Haible  <bruno@clisp.org>
7226
7227         * gnulib-tool (SORT): New variable.
7228         (func_usage): Undocument --assume-autoconf option.
7229         Remove --assume-autoconf option handling.
7230         (autoconf_minversion): Determine from the contents of configure.ac.
7231         (func_import): Remove autoconf_minversion handling.
7232         Suggested by Eric Blake.
7233
7234 2006-07-29  Bruno Haible  <bruno@clisp.org>
7235
7236         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7237
7238 2006-07-29  Bruno Haible  <bruno@clisp.org>
7239
7240         * config/srclist.txt (*setenv.[ch]): Remove rules.
7241
7242 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7243
7244         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7245
7246 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7247
7248         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7249         arpa/inet.h.
7250
7251 2006-07-28  Simon Josefsson  <jas@extundo.com>
7252
7253         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7254         * modules/inet_pton (Depends-on): Likewise.
7255
7256 2006-07-28  Simon Josefsson  <jas@extundo.com>
7257
7258         * m4/netinet_in_h.m4: New file.
7259
7260 2006-07-28  Simon Josefsson  <jas@extundo.com>
7261
7262         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7263         #include's.
7264
7265 2006-07-28  Simon Josefsson  <jas@extundo.com>
7266
7267         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7268         #include's.
7269
7270 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7271
7272         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7273         setgid on directories only if they set these bits.
7274         * lib/modechange.h: Remove obsolete comment about masks.
7275
7276 2006-07-28  Eric Blake  <ebb9@byu.net>
7277
7278         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7279         macro expansion.
7280
7281 2006-07-28  Bruno Haible  <bruno@clisp.org>
7282
7283         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7284
7285 2006-07-28  Bruno Haible  <bruno@clisp.org>
7286
7287         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7288
7289 2006-07-28  Bruno Haible  <bruno@clisp.org>
7290
7291         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7292         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7293         Define fallbacks.
7294         Avoids link error on FreeBSD 4.x.
7295         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7296
7297         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7298         encoding.
7299         * lib/mbswidth.c (iswcntrl): Likewise.
7300
7301 2006-07-27  Bruno Haible  <bruno@clisp.org>
7302
7303         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7304         test.
7305
7306 2006-07-27  Bruno Haible  <bruno@clisp.org>
7307
7308         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7309         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7310         defined.
7311
7312 2006-07-26  Eric Blake  <ebb9@byu.net>
7313
7314         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7315
7316 2006-07-26  Eric Blake  <ebb9@byu.net>
7317
7318         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7319         like mingw that lack mkstemp.
7320         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7321         avoid compilation warning on mingw.
7322
7323 2006-07-26  Bruno Haible  <bruno@clisp.org>
7324
7325         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7326         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7327         INT_FAST*_MIN, INTPTR_MIN.
7328
7329 2006-07-25  Bruno Haible  <bruno@clisp.org>
7330
7331         * modules/version-etc (Depends-on): Add stdarg.
7332
7333 2006-07-25  Bruno Haible  <bruno@clisp.org>
7334
7335         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7336         complex commands.
7337
7338 2006-07-25  Bruno Haible  <bruno@clisp.org>
7339
7340         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7341         defined in <stdarg.h> or config.h.
7342
7343 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7344
7345         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7346         (gl_STDIO_SAFER): Remove.
7347
7348 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7349
7350         * MODULES.html.sh (File stream based Input/Output):
7351         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7352         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7353         * modules/fopen-safer, modules/tmpfile-safer: New files.
7354         * modules/stdio-safer: Remove.
7355
7356 2006-07-24  Bruno Haible  <bruno@clisp.org>
7357
7358         * modules/tmpdir: New file.
7359         * MODULES.html.sh (File system functions): Add it.
7360
7361 2006-07-24  Bruno Haible  <bruno@clisp.org>
7362
7363         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7364         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7365
7366 2006-07-24  Bruno Haible  <bruno@clisp.org>
7367
7368         * modules/clean-temp: New file.
7369
7370 2006-07-24  Bruno Haible  <bruno@clisp.org>
7371
7372         * m4/tmpdir.m4: New file, from GNU gettext.
7373
7374 2006-07-24  Bruno Haible  <bruno@clisp.org>
7375
7376         * lib/tmpdir.h: New file, from GNU gettext.
7377         * lib/tmpdir.c: New file, from GNU gettext.
7378
7379 2006-07-24  Bruno Haible  <bruno@clisp.org>
7380
7381         * lib/clean-temp.h: New file, from GNU gettext.
7382         * lib/clean-temp.c: New file, from GNU gettext.
7383
7384 2006-07-23  Eric Blake  <ebb9@byu.net>
7385
7386         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7387         (Depends-on): Add binary-io.
7388
7389 2006-07-23  Eric Blake  <ebb9@byu.net>
7390
7391         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7392
7393 2006-07-23  Eric Blake  <ebb9@byu.net>
7394
7395         * lib/tmpfile-safer.c: New file.
7396         * lib/stdio-safer.h (fopen_safer): Add prototype.
7397         * lib/stdio--.h (tmpfile): Make safer.
7398
7399 2006-07-23  Bruno Haible  <bruno@clisp.org>
7400
7401         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7402         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7403         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7404         gl_linked_remove_at): Use it.
7405
7406 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7407         and Simon Josefsson <jas@extundo.com>
7408
7409         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7410
7411         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7412
7413 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7414
7415         * modules/close-stream: New file.
7416         * modules/closeout (Description): Make it clear that it exits
7417         with a diagnostic on error.
7418         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7419         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7420
7421 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7422
7423         * m4/close-stream.m4: New file.
7424
7425 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7426
7427         * lib/close-stream.c, lib/close-stream.h: New files.
7428
7429 2006-07-22  Bruno Haible  <bruno@clisp.org>
7430
7431         Merge from GNU gettext 0.15.
7432
7433         2006-05-01  Bruno Haible  <bruno@clisp.org>
7434
7435                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7436
7437         2006-07-22  Bruno Haible  <bruno@clisp.org>
7438
7439                 * modules/javaversion: New file.
7440                 * MODULES.html.sh (Java): Add javaversion.
7441
7442         2006-03-12  Bruno Haible  <bruno@clisp.org>
7443
7444                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7445
7446         2005-12-04  Bruno Haible  <bruno@clisp.org>
7447
7448                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7449                 (untested).
7450
7451         2006-06-21  Bruno Haible  <bruno@clisp.org>
7452
7453                 Avoid warnings from recent versions of mcs.
7454                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7455                 -o, -L, -r any more. Use options documented since mcs-1.0
7456                 instead. Similarly for -g.
7457
7458         2005-12-04  Bruno Haible  <bruno@clisp.org>
7459
7460                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7461                 .resources, not .resource.
7462
7463         2005-07-09  Bruno Haible  <bruno@clisp.org>
7464
7465                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7466                 add a .dll suffix.
7467                 Reported by Mark Junker <mjscod@gmx.de>.
7468
7469         2006-07-22  Bruno Haible  <bruno@clisp.org>
7470
7471                 * modules/gettext: Upgrade to gettext-0.15.
7472                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7473                 m4/visibility.m4.
7474                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7475
7476 2006-07-22  Bruno Haible  <bruno@clisp.org>
7477
7478         Merge from GNU gettext 0.15.
7479
7480         2006-03-25  Bruno Haible  <bruno@clisp.org>
7481
7482                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7483
7484         2006-07-21  Bruno Haible  <bruno@clisp.org>
7485
7486                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7487                 "1.1".
7488
7489         2006-05-09  Bruno Haible  <bruno@clisp.org>
7490
7491                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7492                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7493                 for the conftestver execution.
7494
7495         2006-05-01  Bruno Haible  <bruno@clisp.org>
7496
7497                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7498                 optional target-version argument. Verify that the compiler
7499                 groks source of the specified source-version, or add -source
7500                 option as necessary. Verify that the compiler produces
7501                 bytecode in the specified target-version, or add -target and
7502                 -source options as necessary. Make the result of the test
7503                 available as variable CONF_JAVAC. Also log error output in
7504                 config.log.
7505
7506         2006-03-11  Bruno Haible  <bruno@clisp.org>
7507
7508                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7509
7510         2006-05-09  Bruno Haible  <bruno@clisp.org>
7511
7512                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7513                 CLASSPATH_SEPARATOR to a semicolon.
7514
7515         2006-03-12  Bruno Haible  <bruno@clisp.org>
7516
7517                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7518                 available as variable CONF_JAVA, for subsequent autoconf
7519                 tests. Also log error output in config.log.
7520
7521         2006-07-19  Bruno Haible  <bruno@clisp.org>
7522
7523                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7524                 that getline works on glibc2 systems. Needed to avoid trouble
7525                 in relocatable.c.
7526                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7527
7528         2005-12-04  Bruno Haible  <bruno@clisp.org>
7529
7530                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7531                 launcher (untested).
7532
7533         2005-12-04  Bruno Haible  <bruno@clisp.org>
7534
7535                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7536
7537         2006-07-22  Bruno Haible  <bruno@clisp.org>
7538
7539                 * gettext.m4: Update from GNU gettext-0.15.
7540                 * nls.m4: Likewise.
7541                 * po.m4: Likewise.
7542                 * inttypes-pri.m4: Likewise.
7543                 * inttypes-h.m4: Renamed from inttypes.m4.
7544                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7545
7546 2006-07-22  Bruno Haible  <bruno@clisp.org>
7547
7548         Merge from GNU gettext 0.15.
7549
7550         2005-07-05  Bruno Haible  <bruno@clisp.org>
7551
7552                 * printf-args.c (printf_fetchargs): Work around broken
7553                 definition of wint_t on mingw.
7554
7555         2005-02-12  Bruno Haible  <bruno@clisp.org>
7556
7557                 * xallocsa.h: Add extern "C" for C++.
7558
7559         2006-05-17  Bruno Haible  <bruno@clisp.org>
7560
7561                 Cygwin portability.
7562                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7563
7564         2006-04-30  Bruno Haible  <bruno@clisp.org>
7565
7566                 * progreloc.c: Include <mach-o/dyld.h> if available.
7567                 (find_executable): Use _NSGetExecutablePath when possible.
7568
7569         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7570
7571                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7572                 function.
7573
7574         2005-12-29  Bruno Haible  <bruno@clisp.org>
7575
7576                 * progreloc.c (set_program_name_and_installdir): Fix
7577                 compilation error.
7578
7579         2005-12-04  Bruno Haible  <bruno@clisp.org>
7580
7581                 Cygwin portability.
7582                 * progreloc.c: Include <windows.h> also on Cygwin.
7583                 (find_executable): Add support for Cygwin.
7584                 (set_program_name_and_installdir): Handle also platforms with
7585                 nonempty EXEEXT.
7586
7587         2006-07-11  Bruno Haible  <bruno@clisp.org>
7588
7589                 * javacomp.c: Fix a comment.
7590                 Reported by Jim Meyering.
7591
7592         2006-04-30  Bruno Haible  <bruno@clisp.org>
7593
7594                 * javacomp.h (compile_java_class): Add source_version,
7595                 target_version arguments.
7596                 * javacomp.c: Rewritten to choose only a compiler that
7597                 respects the specified source_version and target_version.
7598
7599         2006-06-27  Bruno Haible  <bruno@clisp.org>
7600
7601                 Assume correct S_ISDIR macro.
7602                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7603
7604         2006-07-22  Bruno Haible  <bruno@clisp.org>
7605
7606                 * javaversion.h: New file, from GNU gettext.
7607                 * javaversion.c: New file, from GNU gettext.
7608                 * javaversion.java: New file, from GNU gettext.
7609                 * javaversion.class: New file, from GNU gettext.
7610
7611         2006-05-17  Bruno Haible  <bruno@clisp.org>
7612
7613                 Cygwin portability.
7614                 * javaexec.c (execute_java_class): Test for jview program
7615                 also on Cygwin.
7616
7617         2006-04-09  Bruno Haible  <bruno@clisp.org>
7618
7619                 * fatal-signal.c: Don't include string.h.
7620                 (at_fatal_signal): Use a copying loop instead of memcpy.
7621
7622         2005-12-04  Bruno Haible  <bruno@clisp.org>
7623
7624                 * csharpexec.c: Add support for 'clix' launcher (untested).
7625                 (execute_csharp_using_sscli): New function.
7626                 (execute_csharp_program): Call it.
7627
7628         2006-06-21  Bruno Haible  <bruno@clisp.org>
7629
7630                 Avoid warnings from recent versions of mcs.
7631                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7632                 -o, -L, -r any more. Use options documented since mcs-1.0
7633                 instead. Similarly for -g.
7634
7635         2005-07-09  Bruno Haible  <bruno@clisp.org>
7636
7637                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7638                 add a .dll suffix.
7639                 Reported by Mark Junker <mjscod@gmx.de>.
7640
7641         2006-06-17  Bruno Haible  <bruno@clisp.org>
7642
7643                 * config.charset: Update for NetBSD 3.0.
7644
7645         2006-05-17  Bruno Haible  <bruno@clisp.org>
7646
7647                 Cygwin portability.
7648                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7649
7650         2006-05-16  Bruno Haible  <bruno@clisp.org>
7651
7652                 * localcharset.c [CYGWIN]: Include <windows.h>.
7653                 (get_charset_aliases): For Cygwin, return the same CPxxx
7654                 aliases list as under WIN32.
7655                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7656                 the environment variables. Fall back to GetACP().
7657
7658         2006-04-05  Bruno Haible  <bruno@clisp.org>
7659
7660                 * config.charset: Update Juan Manuel Guerrero's address.
7661
7662         2005-02-12  Bruno Haible  <bruno@clisp.org>
7663
7664                 * allocsa.h: Add extern "C" for C++.
7665
7666         2005-02-10  Bruno Haible  <bruno@clisp.org>
7667
7668                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7669                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7670
7671         2006-07-22  Bruno Haible  <bruno@clisp.org>
7672
7673                 * gettext.h: Update to GNU gettext-0.15.
7674
7675 2006-07-22  Bruno Haible  <bruno@clisp.org>
7676
7677         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7678         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7679         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7680
7681 2006-07-21  Eric Blake  <ebb9@byu.net>
7682
7683         * modules/stdlib-safer: New file.
7684         * MODULES.html.sh (File stream based Input/Output): Add
7685         stdlib-safer.
7686
7687 2006-07-21  Eric Blake  <ebb9@byu.net>
7688
7689         * lib/stdlib-safer.h: New file from coreutils, required by
7690         stdlib--.h.
7691
7692 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7693
7694         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7695
7696 2006-07-20  Bruno Haible  <bruno@clisp.org>
7697
7698         * gnulib-tool: Recognize new option --assume-autoconf.
7699         (autoconf_minversion): New variable.
7700         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7701
7702 2006-07-20  Bruno Haible  <bruno@clisp.org>
7703
7704         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7705
7706 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7707
7708         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7709         Reindent and repaginate.
7710
7711 2006-07-19  Derek Price  <derek@ximbiot.com>
7712
7713         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7714         Correct grammar.
7715
7716 2006-07-17  Bruno Haible  <bruno@clisp.org>
7717
7718         * modules/list: New file.
7719         * modules/array-list: New file.
7720         * modules/carray-list, modules/carray-list-tests: New files.
7721         * modules/linked-list, modules/linked-list-tests: New files.
7722         * modules/avltree-list, modules/avltree-list-tests: New files.
7723         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7724         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7725         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7726         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7727         * modules/oset: New file.
7728         * modules/array-oset: New file.
7729         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7730         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7731         * tests/test-carray_list.c: New file.
7732         * tests/test-linked_list.c: New file.
7733         * tests/test-avltree_list.c: New file.
7734         * tests/test-rbtree_list.c: New file.
7735         * tests/test-linkedhash_list.c: New file.
7736         * tests/test-avltreehash_list.c: New file.
7737         * tests/test-rbtreehash_list.c: New file.
7738         * tests/test-avltree_oset.c: New file.
7739         * tests/test-rbtree_oset.c: New file.
7740         * MODULES.html.sh (Container data structures): New section.
7741
7742 2006-07-17  Bruno Haible  <bruno@clisp.org>
7743
7744         * m4/gl_list.m4: New file.
7745
7746 2006-07-17  Bruno Haible  <bruno@clisp.org>
7747
7748         * lib/gl_list.h: New file.
7749         * lib/gl_list.c: New file.
7750         * lib/gl_array_list.h: New file.
7751         * lib/gl_array_list.c: New file.
7752         * lib/gl_carray_list.h: New file.
7753         * lib/gl_carray_list.c: New file.
7754         * lib/gl_linked_list.h: New file.
7755         * lib/gl_linked_list.c: New file.
7756         * lib/gl_anylinked_list1.h: New file.
7757         * lib/gl_anylinked_list2.h: New file.
7758         * lib/gl_avltree_list.h: New file.
7759         * lib/gl_avltree_list.c: New file.
7760         * lib/gl_anyavltree_list1.h: New file.
7761         * lib/gl_anyavltree_list2.h: New file.
7762         * lib/gl_rbtree_list.h: New file.
7763         * lib/gl_rbtree_list.c: New file.
7764         * lib/gl_anyrbtree_list1.h: New file.
7765         * lib/gl_anyrbtree_list2.h: New file.
7766         * lib/gl_anytree_list1.h: New file.
7767         * lib/gl_anytree_list2.h: New file.
7768         * lib/gl_linkedhash_list.h: New file.
7769         * lib/gl_linkedhash_list.c: New file.
7770         * lib/gl_anyhash_list1.h: New file.
7771         * lib/gl_anyhash_list2.h: New file.
7772         * lib/gl_avltreehash_list.h: New file.
7773         * lib/gl_avltreehash_list.c: New file.
7774         * lib/gl_rbtreehash_list.h: New file.
7775         * lib/gl_rbtreehash_list.c: New file.
7776         * lib/gl_anytreehash_list1.h: New file.
7777         * lib/gl_anytreehash_list2.h: New file.
7778
7779         * lib/gl_oset.h: New file.
7780         * lib/gl_oset.c: New file.
7781         * lib/gl_array_oset.h: New file.
7782         * lib/gl_array_oset.c: New file.
7783         * lib/gl_avltree_oset.h: New file.
7784         * lib/gl_avltree_oset.c: New file.
7785         * lib/gl_rbtree_oset.h: New file.
7786         * lib/gl_rbtree_oset.c: New file.
7787         * lib/gl_anytree_oset.h: New file.
7788
7789 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7790
7791         * m4/mkancesdirs.m4: New file.
7792         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7793         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7794         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7795         it.
7796
7797 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7798
7799         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7800         * lib/mkancesdirs.h: New files.
7801         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7802         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7803         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7804         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7805         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7806         callers changed.  Revamp internals significantly, by not
7807         attempting to create directories that are temporarily more
7808         permissive than the final results.  Do not attempt to use
7809         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7810         This removes some race conditions, fixes some bugs, and simplifies
7811         things.  Use new dirchownmod function to do owner and mode changes.
7812         * lib/mkdir-p.h: Likewise.
7813         * lib/modechange.c (octal_to_mode): New function.
7814         (struct mode_change): New member mentioned.
7815         (make_node_op_equals): New arg mentioned.  All callers changed.
7816         (mode_compile): Keep track of which mode bits the user has explicitly
7817         mentioned.
7818         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7819         New arg PMODE_BITS, to keep track of which mode bits the user
7820         mentioned; it treats S_ISUID and S_ISGID speciall.
7821         All callers changed.
7822         * lib/modechange.h: Likewise.
7823
7824 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7825
7826         * MODULES.html.sh: Add mkancestors.
7827         * modules/mkancesdirs: New module.
7828         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7829         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7830         The chdir-safer and afs files are now orphans; I'll remove them
7831         unless someone speaks up.
7832         Add lib/dirchownmod.c, lib/dirchownmod.h.
7833         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7834         Add lchown, mkancesdirs.
7835         (Maintainer): Add self.
7836
7837 2006-07-15  Karl Berry  <karl@gnu.org>
7838
7839         * gnulib-tool: help message wording/arrangement.
7840
7841 2006-07-14  Simon Josefsson  <jas@extundo.com>
7842
7843         * doc/gnulib.texi (Libtool and Windows): New section.
7844
7845 2006-07-12  Simon Josefsson  <jas@extundo.com>
7846
7847         * modules/gendocs (License): Fix license, approved by Karl.
7848
7849 2006-07-12  Eric Blake  <ebb9@byu.net>
7850
7851         * MODULES.html.sh: Add gendocs.
7852
7853 2006-07-11  Eric Blake  <ebb9@byu.net>
7854
7855         * modules/fdl: New module, to install doc/fdl.texi.
7856         * MODULES.html.sh: Add new section for documentation modules.
7857         * gnulib-tool: Avoid space-tab.
7858         (--doc-base): New option, to manage files from doc.
7859
7860 2006-07-11  Eric Blake  <ebb9@byu.net>
7861
7862         * m4/absolute-header.m4: Fix comments to match recent change.
7863
7864 2006-07-11  Eric Blake  <ebb9@byu.net>
7865
7866         * gnulib-tool: List --doc-base before --tests-base.
7867
7868 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7869
7870         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7871
7872 2006-07-11  Bruno Haible  <bruno@clisp.org>
7873
7874         * README: Mention where to put documentation.
7875
7876 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7877
7878         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7879
7880 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7881
7882         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7883         to stdint.m4.
7884
7885 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7886
7887         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7888         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7889         "no/such/file/stdint.h" when there is no such file, so that
7890         the resulting C code can be parsed by dodgy compilers.
7891         Problems reported by Bob Proulx.
7892
7893 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7894
7895         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7896         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7897         macros into the GNU _D_EXACT_NAMLEN.
7898         * lib/savedir.c:  Likewise.
7899         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7900
7901 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7902         and Paul Eggert  <eggert@cs.ucla.edu>
7903
7904         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7905         * m4/savedir.m4:
7906         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7907         macros into the GNU _D_EXACT_NAMLEN.
7908
7909 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7910
7911         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7912         around the absolute name, to work around a problem with the HP-UX
7913         11.23 native C compiler, reported by Bob Proulx.
7914
7915 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7916
7917         * doc/maintain.texi, make-stds.texi: Sync from
7918         <http://savannah.gnu.org/projects/gnustandards>.
7919
7920 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7921
7922         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7923
7924 2006-07-09  Jim Meyering  <jim@meyering.net>
7925
7926         * m4/glob.m4: Remove a doubled word in a comment.
7927
7928 2006-07-09  Jim Meyering  <jim@meyering.net>
7929
7930         * lib/argp-pv.c: Remove a doubled word in a comment.
7931         * lib/check-version.c (check_version): Likewise.
7932         * lib/javacomp.c (compile_java_class): Likewise.
7933
7934 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7935
7936         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7937         for the benefit of people using Autoconf 2.60.  If you want to
7938         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7939         (or m4/onceonly.m4, if pre-2.57) manually.
7940
7941 2006-07-08  Jim Meyering  <jim@meyering.net>
7942
7943         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7944         comment.
7945         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7946         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7947         comment.
7948
7949 2006-07-08  Jim Meyering  <jim@meyering.net>
7950
7951         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7952
7953 2006-07-07  Simon Josefsson  <jas@extundo.com>
7954
7955         * tests/test-crc.c: Change expected crc value, the test vector
7956         were probably computed using the old broken crc.c?
7957
7958 2006-07-06  Simon Josefsson  <jas@extundo.com>
7959
7960         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7961         now the canonical place for the M4 file).
7962
7963         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7964         from the sys_socket dependency now.
7965
7966         * modules/inet_pton (Files): Ditto.
7967
7968         * modules/inet_ntop (Files): Ditto.
7969
7970 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7971
7972         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7973         not gl_PREREQ_GETUSERSHELL.
7974
7975 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7976
7977         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7978         with only one argument, for Autoconf 2.60.
7979         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7980         expand to nothing, so add a shell command to avoid syntax error.
7981         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7982
7983 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7984
7985         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7986
7987 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7988
7989         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7990         no longer needed.  Check for isblank decl.
7991         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7992         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7993         of existence.
7994
7995 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7996
7997         * lib/getloadavg.c: Use __VMS, not VMS.
7998         * lib/getopt.c: Likewise.
7999         * lib/getpagesize.h: Likewise.
8000         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8001         and probably does not work.
8002
8003 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8004
8005         * lib/.cppi-disable: Add wcwidth.
8006         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8007         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8008         (ISGRAPH): Remove.  All uses changed to isgraph.
8009         (FOLD) [!defined _LIBC]: Remove special case.
8010         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8011         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8012         HAVE_ISBLANK.
8013         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8014         case.
8015
8016 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8017
8018         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8019         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8020         brackets.  Other minor changes to suppress some compiler
8021         warnings.
8022
8023 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8024         and Paul Eggert  <eggert@cs.ucla.edu>
8025
8026         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8027         of invoking obsolescent AC_HEADER_DIRENT macro.
8028         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8029         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8030         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8031         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8032         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8033         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8034         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8035         * m4/readdir.m4: Remove; no longer needed.
8036
8037 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8038         and Paul Eggert  <eggert@cs.ucla.edu>
8039
8040         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8041         Don't worry about this obsolete case any more.
8042         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8043         directories.
8044         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8045         worry about this obsolete case any more.
8046         * lib/fts.c: Likewise.
8047         * lib/getcwd.c: Likewise.
8048         * lib/glob.h: Likewise.
8049         * lib/savedir.c: Likewise.
8050
8051 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8052
8053         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8054         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8055         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8056         needed.
8057         All uses removed.
8058         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8059         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8060         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8061         needed.
8062         * m4/getdate.m4 (gl_GETDATE): Likewise.
8063         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8064         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8065         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8066         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8067         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8068         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8069         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8070         needed.
8071
8072 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8073
8074         * lib/memcasecmp.c: Include <limits.h>.
8075         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8076         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8077         Don't assume isdigit succeeds only on '0' through '9'.
8078
8079 2006-07-05  Eric Blake  <ebb9@byu.net>
8080
8081         * modules/getaddrinfo (Depends-on): Add snprintf.
8082
8083 2006-07-05  Eric Blake  <ebb9@byu.net>
8084
8085         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8086         to avoid 'header present but could not be compiled' on cygwin.
8087
8088 2006-07-05  Eric Blake  <ebb9@byu.net>
8089
8090         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8091         missing from netdb.h.
8092         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8093
8094 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8095
8096         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8097         no longer needed.
8098         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8099         * m4/getdate.m4 (gl_GETDATE): Likewise.
8100         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8101         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8102         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8103         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8104         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8105
8106 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8107
8108         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8109         All uses of is_space replaced by isspace.
8110         * lib/exit.h: Don't talk about STDC_HEADERS.
8111         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8112         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8113         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8114         replaced by isprint etc.
8115         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8116         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8117         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8118         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8119         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8120         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8121
8122 2006-07-05  Bruno Haible  <bruno@clisp.org>
8123
8124         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8125         the function exists, before testing against AIX.
8126         Reported by Martin Lambers <marlam@marlam.de>.
8127
8128 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8129
8130         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8131         From Mark D. Baushke.
8132
8133 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8134
8135         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8136         to the absolute name, not just one, to bypass Sun C 5.8's
8137         "warning: #include of /usr/include/... may be non-portable".
8138
8139 2006-07-04  Eric Blake  <ebb9@byu.net>
8140
8141         * modules/dirname-tests: New test module.
8142         * tests/test-dirname.c: New file, replacing dirname.c
8143         TEST_DIRNAME section that was recently deleted.
8144
8145 2006-07-04  Bruno Haible  <bruno@clisp.org>
8146
8147         Assume ANSI C header files and <ctype.h> functions.
8148         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8149         (mbsnwidth): Use isprint, iscntrl instead.
8150
8151 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8152
8153         Merge from coreutils.
8154         * MODULES.html.sh: Add xstrtold.
8155         * modules/xstrtold: New file.
8156         * modules/cycle-check (Files): Add lib/same-inode.h.
8157         * modules/dirname (Files): Add m4/double-slash-root.m4.
8158         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8159         * modules/mkdir-p (Files): Add lib/same-inode.h.
8160         * modules/same (Files): Add lib/same-inode.h.
8161
8162 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8163
8164         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8165         This is to keep the terminology clean; POSIX talks about
8166         "absolute pathnames", not "full pathnames", but the GNU
8167         Coding Standards say to use "path" for something else;
8168         so use "absolute" to keep both sides happy.
8169         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8170         Set gl_absolute_header, not gl_full_header_path.
8171         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8172         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8173         All uses changed.
8174
8175         Merge from coreutils.
8176
8177         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8178
8179         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8180         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8181         want to require the building of c-strtod.o.
8182         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8183         needs -lm directly.
8184         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8185
8186         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8187
8188         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8189         --as-needed option if available.  Problem reported by Albert Chin in
8190         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8191         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8192         cc merely issues a bunch of annoying warnings for --as-needed
8193         (this problem was reported by Bob Proulx).  Also, try linking with
8194         -lm to detect a bug in binutils 2.16 (this problem was reported
8195         by Ralf Wildenhues).
8196
8197         2006-06-18  Jim Meyering  <jim@meyering.net>
8198
8199         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8200         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8201         macro.
8202         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8203         also check for glibc-2.4's abort-inducing bug.
8204
8205         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8206         Low-probability clean-up should be to use rmdir to get rid of
8207         the just-created directory, not unlink.
8208
8209         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8210         configure fail, and request a bug report to inform us about it.
8211         Add a comment that, barring reports to the contrary, in 2007 we'll
8212         assume ftruncate is universally available.
8213
8214         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8215
8216         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8217
8218         2006-03-12  Jim Meyering  <jim@meyering.net>
8219
8220         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8221         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8222         * m4/same.m4 (gl_SAME): Likewise.
8223         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8224
8225         2006-03-11  Eric Blake  <ebb9@byu.net>
8226
8227         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8228         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8229         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8230         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8231
8232 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8233
8234         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8235         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8236         reported by Mark D. Baushke, one in
8237         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8238
8239         Merge from coreutils.
8240
8241         * lib/.cppi-disable: Add stdint_.h.
8242         * lib/.cvsignore: Add stdint.h.
8243
8244         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8245
8246         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8247         both double and long double versions.
8248         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8249         * lib/xstrtold.c: New file.
8250         * lib/xstrtod.h (xstrtold): New decl.
8251
8252         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8253
8254         * lib/filemode.c (setst): Remove.
8255         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8256         (arguably) clearer, and the generated code is a bit smaller on my
8257         Debian GNU/Linux stable x86 host.
8258
8259         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8260
8261         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8262         Assume that filemode.h includes sys/types.h and sys/stat.h.
8263         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8264         (ftypelet): Reorder to put common cases first, for efficiency.
8265         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8266         to do 'M'.
8267         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8268         of 10, for compatibility with FreeBSD.  All callers changed.
8269         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8270         types that can't be deduced solely from st_mode.  First arg is now a
8271         const pointer.
8272         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8273         (strmode): Renamed from mode_string.
8274         (filemodestring): New decl.
8275         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8276         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8277         needed.
8278         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8279
8280         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8281
8282         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8283         fsusage.h now does that.  Include fsusage.h first, to test interface.
8284         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8285         at most one method (the old code could have generated decls that
8286         didn't conform to C89, not that this was ever exercised).
8287         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8288
8289         2006-03-19  Jim Meyering  <jim@meyering.net>
8290
8291         Work even in a chroot where d_ino values for entries in "/"
8292         don't match the stat.st_ino values for the same names.
8293         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8294         number, iterate through all entries again, using lstat instead.
8295         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8296         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8297
8298         * lib/getcwd.c (__getcwd): Clarify a comment.
8299         Use memcpy in place of a call to strcpy.
8300
8301         2006-03-12  Jim Meyering  <jim@meyering.net>
8302
8303         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8304         matches that of the current directory (which we're about to chdir ".."
8305         out of), then save the dev-ino of the parent, instead.
8306
8307         * lib/same-inode.h (SAME_INODE): New file/macro.
8308         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8309         Include "same-inode.h", instead.
8310         * lib/same.c: Likewise.
8311         * lib/cycle-check.h: Include "same-inode.h".
8312         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8313         * lib/cycle-check.c (SAME_INODE): Remove definition.
8314         * lib/root-dev-ino.h: Include "same-inode.h".
8315
8316         2006-03-11  Eric Blake  <ebb9@byu.net>
8317
8318         * lib/same.c (same_name): s/base_name/last_component/
8319         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8320         * lib/filenamecat.c (file_name_concat): Likewise.
8321
8322         2006-03-11  Eric Blake  <ebb9@byu.net>,
8323                     Paul Eggert  <eggert@cs.ucla.edu>
8324
8325         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8326         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8327         drive prefix.
8328         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8329         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8330         (last_component): New method.
8331         * lib/dirname.c (dir_len): Determine when drive letters need a
8332         subsequent slash.  Preserve // when it is special.
8333         (dir_name): Don't append dot when drive letter is absolute.
8334         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8335         * lib/basename.c (base_name): New semantics - malloc the result.
8336         Preserve // when it is special.  Preserve relative files that look
8337         like drive letters.
8338         (base_len): Preserve // when it is special.
8339         (last_component): New method, similar to old base_name semantics.
8340         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8341         base_name.  Strip redundant slashes from ///.
8342
8343 2006-07-03  Jim Meyering  <jim@meyering.net>
8344
8345         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8346         macro is used before the first cycle_check call.
8347
8348 2006-07-03  Eric Blake  <ebb9@byu.net>
8349
8350         * modules/dirname (Depends-on): Add xstrndup.
8351
8352 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8353
8354         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8355         test cases, so that config.log is a bit easier to follow.
8356
8357 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8358
8359         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8360         both are 64 bits, since this seems to be the tradition, and this
8361         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8362         we ever run into a host that prefers long long to long in this
8363         case, we'll need another configure-time test.  Problem reported by
8364         Jim Meyering.
8365
8366 2006-07-02  Eric Blake  <ebb9@byu.net>
8367
8368         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8369
8370 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8371
8372         * modules/inttypes (Depends-on): No longer depends on stdint.
8373         * modules/stdint (Description): Say more about assumptions.
8374         Say that the fast types might differ.  Say macros are used.
8375         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8376         (Makefile.am): Revise list of substituted symbols to match
8377         new stdint.m4.
8378         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8379         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8380         * tests/test-stdint.c (verify_same_types)
8381         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8382         the code conforms to C99/C89.
8383         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8384         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8385
8386 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8387
8388         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8389         but fix a bug, by requiring at least 64 bits.
8390         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8391         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8392         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8393         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8394
8395         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8396         changes.  Make 2.59 a prerequisite.  Check and substitute for
8397         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8398         inttypes.h.  Do not use special include files; just use the
8399         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8400         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8401         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8402         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8403         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8404         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8405         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8406         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8407         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8408         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8409         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8410         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8411         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8412         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8413         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8414         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8415         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8416         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8417         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8418         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8419         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8420         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8421         not check for things that C99 does not require, e.g., int8_t.  If
8422         a test isn't needed unless <stdint.h> isn't working, and is
8423         unlikely to be needed for any other reason, then don't do it
8424         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8425         size_t, since we assume C89 freestanding at least.  Do not check
8426         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8427         the right thing even if the types are not defined.  Instead use:
8428         (gl_STDINT_TYPE_PROPERTIES): New macro.
8429         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8430         testing whether <sys/types.h> clashes, as Autoconf does this for
8431         us now.  All uses removed.
8432         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8433         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8434         (gl_CHECK_TYPE_SAME):
8435         Remove; no longer needed.
8436         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8437         exists, since we'll return 0 anyway in that case.
8438         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8439
8440 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8441
8442         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8443         possible collision with system files.
8444         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8445         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8446         WCHAR_MIN and WCHAR_MAX in this case.
8447         (<stddef.h>): Do not include; no longer needed.
8448         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8449         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8450         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8451         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8452         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8453         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8454         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8455         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8456         !defined(__c99))]: Include in this case too, since it's harmless
8457         now.
8458         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8459         dangerous to do so.
8460         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8461         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8462         (_STDINT_MIN, _STDINT_MAX): New macros.
8463         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8464         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8465         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8466         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8467         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8468         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8469         macros, not typedefs; this simplifies things quite a bit.
8470         Use long int for all types narrower than int64_t.
8471         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8472         Define in terms of long long int or int64_t or long int,
8473         not int64_t or int32_t.  This saves some compile-time testing.
8474         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8475         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8476         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8477         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8478         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8479         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8480         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8481         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8482         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8483         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8484         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8485         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8486         undef any previous version and define our own version, for
8487         simplicity and consistency with the new macros for types.
8488         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8489         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8490         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8491         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8492         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8493         @WINT_T_SUFFIX@ to keep things simple here.
8494         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8495         Simplify by assuming typical 8/16/32/64 host, since we're
8496         already doing that elsewhere anyway.
8497         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8498         and assume long long int is 64 bits if available.  This
8499         speeds up 'configure'.
8500
8501 2006-07-01  Eric Blake  <ebb9@byu.net>
8502
8503         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8504         Reported by Andreas Buening.
8505
8506 2006-07-01  Eric Blake  <ebb9@byu.net>
8507
8508         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8509
8510 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8511
8512         * lib/getaddrinfo.c: fixed typo
8513
8514 2006-06-29  Jim Meyering  <jim@meyering.net>
8515
8516         * modules/strftime (Maintainer): Add my name, since with the
8517         FPRINTFTIME changes strftime.c has forked from glibc.
8518
8519 2006-06-29  Eric Blake  <ebb9@byu.net>
8520
8521         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8522
8523 2006-06-29  Eric Blake  <ebb9@byu.net>
8524
8525         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8526
8527 2006-06-29  Eric Blake  <ebb9@byu.net>
8528
8529         * lib/stat_.h: New file.
8530
8531 2006-06-29  Eric Blake  <ebb9@byu.net>
8532
8533         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8534         unused static function.
8535
8536 2006-06-29  Eric Blake  <ebb9@byu.net>
8537
8538         * doc/functions.texi (Function Portability): Document missing lstat
8539         on mingw.
8540
8541 2006-06-29  Eric Blake  <ebb9@byu.net>
8542
8543         * MODULES.html.sh: Add sys_stat.
8544         * modules/sys_stat: New module.
8545         * modules/mkstemp (Depends-on): Add sys_stat.
8546
8547 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8548
8549         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8550
8551 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8552
8553         * m4/c-bs-a.m4: Removed.
8554
8555 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8556
8557         * lib/strftime.c: Assume strftime() exists.
8558
8559 2006-06-29  Derek Price  <derek@ximbiot.com>
8560
8561         * modules/c-bs-a: Removed - \a is C89.
8562         * MODULES.html.sh: Remove c-bs-a.
8563
8564 2006-06-29  Bruno Haible  <bruno@clisp.org>
8565
8566         * modules/wcwidth (License): Change to LGPL.
8567
8568 2006-06-28  Simon Josefsson  <jas@extundo.com>
8569
8570         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8571         on _WIN32.
8572
8573         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8574         getnameinfo.
8575
8576 2006-06-28  Simon Josefsson  <jas@extundo.com>
8577
8578         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8579
8580 2006-06-28  Simon Josefsson  <jas@extundo.com>
8581
8582         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8583         functions there.  It will succeed on Windows XP, but on Windows
8584         2000 and (presumably) earlier, it will fail, and use the internal
8585         re-implementation.
8586         (use_win32_p): New function.
8587         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8588         Support AI_NUMERICSERV to disable getservbyname.
8589         (getnameinfo): New function, only supports
8590         NI_NUMERICHOST|NI_NUMERICSERV for now.
8591
8592         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8593         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8594         getnameinfo.
8595
8596 2006-06-28  Eric Blake  <ebb9@byu.net>
8597
8598         * modules/wcwidth: New file.
8599         * modules/mbchar (Depends-on): Add wcwidth.
8600         * modules/mbswidth (Depends-on): Add wcwidth.
8601         * MODULES.html.sh: Add wcwidth.
8602
8603 2006-06-28  Eric Blake  <ebb9@byu.net>
8604
8605         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8606         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8607
8608 2006-06-28  Eric Blake  <ebb9@byu.net>
8609
8610         * lib/xvasprintf.h: Fix comments.
8611
8612 2006-06-28  Eric Blake  <ebb9@byu.net>
8613
8614         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8615         * lib/mbswidth.c (wcwidth): Move from here...
8616         * lib/wcwidth.h: ...to this new file.
8617
8618 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8619
8620         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8621
8622         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8623         it's obsolete.
8624         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8625
8626 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8627
8628         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8629         Autoconf 2.60 says this stuff was obsolete.
8630
8631 2006-06-28  Bruno Haible  <bruno@clisp.org>
8632
8633         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8634
8635 2006-06-28  Bruno Haible  <bruno@clisp.org>
8636
8637         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8638         gt_TYPE_WCHAR_T.
8639
8640 2006-06-28  Bruno Haible  <bruno@clisp.org>
8641
8642         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8643         declaration for wcwidth.
8644         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8645
8646 2006-06-28  Bruno Haible  <bruno@clisp.org>
8647
8648         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8649         (mkdir): Define using _mkdir.
8650
8651 2006-06-28  Bruno Haible  <bruno@clisp.org>
8652
8653         * lib/getaddrinfo.h: Fix POSIX URL.
8654         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8655         _WIN32.
8656         (use_win32_p): Make static.
8657         (getaddrinfo): Reject service name if it is empty or does not consist
8658         solely of decimal digits, or if its value is > 65535.
8659         (getnameinfo): Remove useless casts.
8660
8661 2006-06-27  Simon Josefsson  <jas@extundo.com>
8662
8663         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8664         Eggert and Martin Lambers.
8665
8666 2006-06-27  Simon Josefsson  <jas@extundo.com>
8667
8668         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8669         Eggert and Martin Lambers.
8670
8671 2006-06-27  Bruno Haible  <bruno@clisp.org>
8672
8673         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8674         result to 0, not to empty.
8675         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8676
8677 2006-06-27  Bruno Haible  <bruno@clisp.org>
8678
8679         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8680
8681 2006-06-26  Simon Josefsson  <jas@extundo.com>
8682
8683         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8684         present.
8685
8686 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8687
8688         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8689         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8690         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8691
8692 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8693
8694         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8695
8696 2006-06-26  Bruno Haible  <bruno@clisp.org>
8697
8698         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8699
8700 2006-06-26  Bruno Haible  <bruno@clisp.org>
8701
8702         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8703
8704 2006-06-26  Bruno Haible  <bruno@clisp.org>
8705
8706         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8707         SGI C compiler in pre-C99 mode.
8708         Suggested by Mark D. Baushke and Larry Jones.
8709
8710 2006-06-26  Bruno Haible  <bruno@clisp.org>
8711
8712         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8713         WCHAR_MAX.
8714         Reported by Mark D. Baushke and Larry Jones.
8715
8716 2006-06-26  Bruno Haible  <bruno@clisp.org>
8717
8718         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8719         in pre-C99 mode.
8720         Suggested by Mark D. Baushke and Larry Jones.
8721
8722 2006-06-23  Simon Josefsson  <jas@extundo.com>
8723             Bruno Haible  <bruno@clisp.org>
8724
8725         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8726         Emit mostlyclean-local rule.
8727         (func_emit_tests_Makefile_am): Likewise.
8728         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8729
8730 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8731
8732         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8733
8734 2006-06-23  Bruno Haible  <bruno@clisp.org>
8735
8736         * tests/test-stdint.c: Update to match ISO C 99 Technical
8737         Corrigendum 1.
8738
8739 2006-06-23  Bruno Haible  <bruno@clisp.org>
8740
8741         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8742
8743 2006-06-23  Bruno Haible  <bruno@clisp.org>
8744
8745         * lib/stdint_.h: Treat IRIX like OpenBSD.
8746
8747 2006-06-23  Bruno Haible  <bruno@clisp.org>
8748
8749         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8750         ISO C 99 Technical Corrigendum 1.
8751
8752 2006-06-22  Simon Josefsson  <jas@extundo.com>
8753
8754         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8755         MinGW.
8756
8757 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8758
8759         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8760         needed.  Some compiler complained about some of them.  Problem reported
8761         by Larry Jones in
8762         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8763
8764 2006-06-21  Simon Josefsson  <jas@extundo.com>
8765
8766         * tests/test-getaddrinfo.c: New file.
8767
8768         * modules/getaddrinfo-tests: New file.
8769
8770         * MODULES.html.sh: Add inet_pton.
8771
8772         * modules/inet_pton: New file.
8773
8774 2006-06-21  Simon Josefsson  <jas@extundo.com>
8775
8776         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8777         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8778         of using the (limited) gnulib implementation on Windows XP.
8779
8780         * m4/inet_pton.m4: New file.
8781
8782 2006-06-21  Simon Josefsson  <jas@extundo.com>
8783
8784         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8785         variable.
8786
8787         * lib/socket_.h: Don't define WINVER.
8788
8789         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8790         slightly modified to work in gnulib.
8791
8792 2006-06-21  Simon Josefsson  <jas@extundo.com>
8793
8794         * doc/gnulib.texi (Windows sockets): Add.
8795
8796 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8797
8798         * lib/read-file.c (fread_file): Start with buffer allocation of
8799         0 bytes rather than 1 byte; this simplifies the code.
8800         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8801         code to free buffer and save/restore errno.
8802         (internal_read_file): Remove unused local.
8803
8804 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8805
8806         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8807         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8808         Problem reported by Denis Excoffier in
8809         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8810
8811 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8812
8813         * modules/sys_socket, modules/socklen: Include sys/types since
8814         FreeBSD 4.x's sys/socket.h needs it.
8815
8816 2006-06-19  Simon Josefsson  <jas@extundo.com>
8817
8818         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8819
8820 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8821
8822         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8823
8824 2006-06-19  Bruno Haible  <bruno@clisp.org>
8825
8826         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8827         and FULL_PATH_INTTYPES_H in angle brackets.
8828         Reported by Mark D. Baushke <mdb@gnu.org>.
8829
8830 2006-06-17  Eric Blake  <ebb9@byu.net>
8831
8832         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8833         errno.
8834
8835 2006-06-17  Bruno Haible  <bruno@clisp.org>
8836
8837         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8838         <sys/inttypes.h>.
8839
8840 2006-06-17  Bruno Haible  <bruno@clisp.org>
8841
8842         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8843         whether errno is declared. Assume <errno.h> declares errno.
8844
8845 2006-06-17  Bruno Haible  <bruno@clisp.org>
8846
8847         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8848
8849 2006-06-17  Bruno Haible  <bruno@clisp.org>
8850
8851         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8852         problem on Solaris 2.5.1.
8853
8854 2006-06-16  Eric Blake  <ebb9@byu.net>
8855
8856         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8857         * lib/unicodeio.c [!defined errno]: Likewise.
8858         * lib/strtol.c [!defined errno]: Likewise.
8859         * lib/strtod.c [!defined errno]: Likewise.
8860
8861 2006-06-15  Eric Blake  <ebb9@byu.net>
8862
8863         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8864
8865 2006-06-15  Eric Blake  <ebb9@byu.net>
8866
8867         * config/srclist.txt (ssize_t.m4): Lose sync.
8868
8869 2006-06-15  Bruno Haible  <bruno@clisp.org>
8870
8871         * modules/stdint (Files): Include m4/full-header-path.m4,
8872         m4/size_max.m4, m4/wchar_t.m4.
8873         (Makefile.am): Many more substitutions.
8874         * modules/stdint-tests: New file.
8875         * tests/test-stdint.c: New file.
8876
8877 2006-06-15  Bruno Haible  <bruno@clisp.org>
8878
8879         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8880         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8881         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8882         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8883         gl_CHECK_TYPE_SAME): New macros.
8884
8885 2006-06-15  Bruno Haible  <bruno@clisp.org>
8886
8887         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8888
8889 2006-06-15  Bruno Haible  <bruno@clisp.org>
8890
8891         * lib/stdint_.h: Rewritten to be fully auto-configured.
8892         Fixes bug on HP-UX/IA64.
8893
8894 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8895
8896         * lib/getdate.y (__attribute__): Don't define if already defined.
8897         Problem reported by Larry Jones.
8898         * lib/utimens.c (__attribute__): Likewise.
8899
8900 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8901
8902         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8903         reported by Andreas Schwab.
8904
8905 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8906             Bruno Haible  <bruno@clisp.org>
8907
8908         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8909         check for the declaration of strnlen and a run test that exposes the
8910         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8911         rpl_strndup.
8912
8913 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8914             Bruno Haible  <bruno@clisp.org>
8915
8916         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8917
8918 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8919
8920         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8921         compile test, for Tru64 4.0D.
8922
8923 2006-05-28  Karl Berry  <karl@gnu.org>
8924
8925         * config/srclist.txt (printf-args.c): lose sync.
8926
8927 2006-05-26  Martin Lambers  <marlam@marlam.de>
8928
8929         * lib/getpass.c: Updates the test for the native W32 API, and adds
8930         missing includes, thus fixing compilation warnings.
8931
8932 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8933
8934         * lib/exclude.c (exclude_fnmatch): New function.
8935         (excluded_file_name): Call exclude_fnmatch.
8936         * lib/exclude.h (excluded_file_name): New prototype
8937
8938 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8939
8940         * lib/tempname.c (small_open, large_open): New macros.
8941         (__open, __open64) [!_LIBC]: Remove.
8942         (__gen_tempname): Use small_open and large_open instead of __open
8943         and __open64.  This fixes a portability bug on HP-UX 11.11i
8944         reported by Simon Wing-Tang in
8945         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8946
8947 2006-05-24  Bruno Haible  <bruno@clisp.org>
8948
8949         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8950         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8951         Reported by Thorsten Maerz <torte@netztorte.de> via
8952         Aaron Stone <aaron@serendipity.cx>.
8953
8954 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8955
8956         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8957         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8958         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8959         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8960         not really conditional on the cache.
8961         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8962
8963 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8964
8965         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8966         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8967         (my_usleep): Don't mishandle maximum value.
8968
8969 2006-05-19  Jim Meyering  <jim@meyering.net>
8970
8971         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8972
8973 2006-05-17  Bruno Haible  <bruno@clisp.org>
8974
8975         Cygwin portability.
8976         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8977
8978 2006-05-17  Bruno Haible  <bruno@clisp.org>
8979
8980         * lib/stdint_.h: Fix recognition of Cygwin.
8981
8982 2006-05-15  Bruno Haible  <bruno@clisp.org>
8983
8984         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8985         on libtool patch by Ralf Wildenhues.
8986
8987 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8988
8989         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8990         test for C99 conformance; (bool) 0.5 is an integer constant
8991         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8992         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8993
8994 2006-05-11  Simon Josefsson  <jas@extundo.com>
8995
8996         * m4/xvasprintf.m4: Fix obvious typo.
8997
8998 2006-05-11  Jim Meyering  <jim@meyering.net>
8999
9000         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9001         James Lemley.
9002
9003 2006-05-10  Simon Josefsson  <jas@extundo.com>
9004
9005         * lib/md4.c: Typo fix, update copyright years.
9006         (K1, K2): Don't use L because it turn computations into 64-bit on
9007         64-bit platforms.
9008
9009 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9010
9011         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9012         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9013         unwanted sign propagation, e.g., on hosts with 64-bit int.
9014         There still are some problems with reeelly weird theoretical hosts
9015         (e.g., 33-bit int) but it's not worth worrying about now.
9016         * lib/sha1.c (rol): Likewise.
9017         (K1, K2, K3, K4): Remove unnecessary L suffix.
9018
9019 2006-05-10  Bruno Haible  <bruno@clisp.org>
9020
9021         * lib/des.c: Cast to avoid warnings.
9022
9023 2006-05-09  Bruno Haible  <bruno@clisp.org>
9024
9025         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9026         (Depends-on): Depend also on xsize, stdarg.
9027         (configure.ac): Add gl_XVASPRINTF.
9028
9029 2006-05-09  Bruno Haible  <bruno@clisp.org>
9030
9031         * m4/xvasprintf.m4: New file.
9032
9033 2006-05-09  Bruno Haible  <bruno@clisp.org>
9034
9035         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9036         (EOVERFLOW): Define fallback value.
9037         (xstrcat): New function.
9038         (xvasprintf): Recognize the special case of a string concatenation.
9039
9040 2006-05-08  Eric Blake  <ebb9@byu.net>
9041
9042         * gnulib-tool (func_version): Base copyright year on CVS date.
9043         (func_emit_copyright_notice): New function.
9044         (func_emit_lib_Makefile_am): Use it.
9045         (func_emit_tests_Makefile_am): Likewise.
9046         (func_import): Likewise.
9047
9048 2006-05-08  Bruno Haible  <bruno@clisp.org>
9049
9050         * modules/stdarg: New file.
9051         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9052
9053 2006-05-08  Bruno Haible  <bruno@clisp.org>
9054
9055         * m4/stdarg.m4: New file, from GNU gettext.
9056
9057 2006-05-08  Bruno Haible  <bruno@clisp.org>
9058
9059         * config/srclist.txt (build-aux/config.rpath): different from latest
9060         release.
9061
9062 2006-05-08  Bruno Haible  <bruno@clisp.org>
9063
9064         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9065
9066 2006-05-05  Jim Meyering  <jim@meyering.net>
9067
9068         * m4/warning.m4: New file, derived from bison's file by the same name.
9069
9070 2006-05-03  Bruno Haible  <bruno@clisp.org>
9071
9072         * lib/stdint_.h: Shorter URL.
9073         * lib/inttypes.h: Likewise.
9074
9075 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9076
9077         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9078
9079 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9080
9081         * lib/verify.h: Document the internals better.  Most of this change
9082         was written by Bruno Haible.
9083
9084 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9085
9086         * doc/verify.texi: New file, partly based on a proposal by
9087         Bruno Haible.
9088
9089 2006-05-02  Bruno Haible  <bruno@clisp.org>
9090
9091         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9092         test from here...
9093         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9094
9095 2006-04-29  Bruno Haible  <bruno@clisp.org>
9096
9097         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9098         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9099
9100 2006-04-29  Bruno Haible  <bruno@clisp.org>
9101
9102         * gnulib-tool: Make --update option actually work.
9103
9104 2006-04-29  Bruno Haible  <bruno@clisp.org>
9105
9106         * doc/gcd.texi: New file.
9107         * doc/gnulib.texi: Include it.
9108
9109 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9110
9111         * lib/getdate.y (get_date): When adding relative date, start with the
9112         initial time, not with the result of the first mktime call.
9113
9114 2006-04-25  Bruno Haible  <bruno@clisp.org>
9115
9116         * gnulib-tool (func_import): Output the include directives in three
9117         blocks, sorted separately.
9118         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9119
9120 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9121
9122         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9123         to define main with arguments, for C++.  Reported by Eric Blake.
9124         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9125         Prefer 'int main ()' to 'int main (void)', for C++.
9126         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9127         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9128         for 'main', for C99 and C++.
9129
9130 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9131
9132         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9133         Don't assume that exit status -1 is valid.
9134         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9135         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9136         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9137         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9138         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9139         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9140         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9141         functions can be used without declaring them, or that you can
9142         exit with status -1.
9143         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9144
9145 2006-04-24  Karl Berry  <karl@gnu.org>
9146
9147         * config/srclist.txt (longdouble.m4): sync lost.
9148
9149 2006-04-24  Eric Blake  <ebb9@byu.net>
9150
9151         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9152
9153 2006-04-24  Bruno Haible  <bruno@clisp.org>
9154
9155         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9156         poll() implementation in AIX.
9157         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9158
9159 2006-04-24  Bruno Haible  <bruno@clisp.org>
9160
9161         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9162         assigned exactly once.
9163
9164 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9165             Bruno Haible  <bruno@clisp.org>
9166
9167         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9168         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9169         for AM_CPPFLAGS.
9170
9171 2006-04-23  Bruno Haible  <bruno@clisp.org>
9172
9173         * modules/copy-file: Depend on unistd.
9174         * modules/execute: Likewise.
9175         * modules/fatal-signal: Likewise.
9176         * modules/findprog: Likewise.
9177         * modules/mkdtemp : Likewise.
9178         * modules/pipe: Likewise.
9179         * modules/wait-process: Likewise.
9180
9181 2006-04-23  Bruno Haible  <bruno@clisp.org>
9182
9183         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9184         condition was already detected.
9185         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9186
9187 2006-04-23  Bruno Haible  <bruno@clisp.org>
9188
9189         * lib/copy-file.c: Include <unistd.h> unconditionally.
9190         * lib/execute.c: Likewise.
9191         * lib/fatal-signal.c: Likewise.
9192         * lib/findprog.c: Likewise.
9193         * lib/mkdtemp.c: Likewise.
9194         * lib/pipe.h: Likewise.
9195         * lib/pipe.c: Likewise.
9196         * lib/wait-process.h: Likewise.
9197
9198 2006-04-23  Bruno Haible  <bruno@clisp.org>
9199
9200         * gnulib-tool (func_usage): Fix --import description. Document
9201         --update.
9202         (func_import): Create temporary file in a temporary directory, if
9203         --dry-run is specified. Silence errors from 'grep' when there are no
9204         m4 files in $m4dir.
9205         (func_create_testdir): Silence errors from 'grep' when there are no
9206         m4 files in $m4dir.
9207         Reported by Karl Berry <karl@freefriends.org>.
9208
9209 2006-04-20  Bruno Haible  <bruno@clisp.org>
9210
9211         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9212         one argument, so that the code will be portable to Autoconf 2.60.
9213         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9214         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9215         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9216
9217 2006-04-19  Derek Price  <derek@ximbiot.com>
9218             Eric Blake  <ebb9@byu.net>
9219
9220         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9221         rather than "/full/path.h".  Update comment to match.  Shorten &
9222         generalize m4_translit call via AS_TR_CPP.
9223
9224 2006-04-19  Derek Price  <derek@ximbiot.com>
9225             Eric Blake  <ebb9@byu.net>
9226
9227         * lib/inttypes.h: Correct grammar in comment.
9228
9229 2006-04-18  Derek Price  <derek@ximbiot.com>
9230             Paul Eggert  <eggert@cs.ucla.edu>
9231
9232         * modules/inttypes: New file.
9233         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9234
9235 2006-04-18  Derek Price  <derek@ximbiot.com>
9236             Paul Eggert  <eggert@cs.ucla.edu>
9237
9238         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9239         New files.
9240
9241 2006-04-18  Derek Price  <derek@ximbiot.com>
9242             Paul Eggert  <eggert@cs.ucla.edu>
9243
9244         * lib/inttypes.h: New file.
9245         * lib/strtoimax.c: Assume <inttypes.h>.
9246
9247 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9248
9249         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9250         isn't mounted.  Problem reported by Kir Kolyshkin.
9251
9252 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9253
9254         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9255         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9256         Derek R. Price.
9257         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9258         implementation.
9259
9260 2006-04-12  Eric Blake  <ebb9@byu.net>
9261
9262         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9263         is now done automatically by the corresponding Autoconf macro.
9264
9265 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9266
9267         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9268         time_r.h.
9269
9270 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9271
9272         Merge regex changes from libc, removing some of our
9273         POSIX-conformance changes that were rejected and redoing them in a
9274         less-intrusive way.
9275
9276         * lib/regcomp.c (re_compile_internal, init_dfa):
9277         Length arg is now size_t, not Idx.  All uses changed.
9278         (peek_token): Forward decl now says internal_function.
9279         (__re_error_msgid, __re_error_msgid_idx):
9280         Now static rather than extern with attribute_hidden.
9281         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9282         For some reason libc prefers K&R style defns for external functions.
9283         (regerror) [!defined _LIBC]: Likewise.
9284         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9285         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9286         (build_range_exp, build_collating_symbol):
9287         Use K&R-style defn.
9288         (re_compile_fastmap): Use '\0' to memset, not 0.
9289         (utf8_sb_map): Make the calculations more obvious.
9290         (init_dfa, parse_bracket_exp, build_charclass_op):
9291         Call calloc and cast result, as glibc does.
9292         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9293         (build_range_exp, build_collating_symbol):
9294         Now internal functions.
9295
9296         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9297
9298         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9299         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9300         Don't depend on VMS; depend on __VMS instead, for POSIX
9301         namespace cleanness.
9302         (regoff_t): Define to ssize_t, not long int.
9303
9304         Remove the REG_ macros named below.  Instead, make the old names
9305         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9306         __USE_GNU_REGEX.
9307         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9308         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9309         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9310         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9311         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9312         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9313         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9314         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9315         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9316         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9317         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9318         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9319         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9320         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9321         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9322         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9323         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9324         (REG_NREGS):
9325         Remove.  All uses replaced by the old RE_* names.
9326         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9327         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9328         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9329         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9330         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9331         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9332         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9333         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9334         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9335         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9336         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9337         Don't bother having these macros be independent of each others'
9338         values, since they no longer exist in the POSIX name space.
9339
9340         Rename the following member names back to their old names,
9341         unless !__USE_GNU_REGEX.  All uses changed back.
9342         (buffer): Renamed from re_buffer.
9343         (allocated): Renamed from re_allocated.
9344         (used): Renamed from re_used.
9345         (syntax): Renamed from re_syntax.
9346         (fastmap): Renamed from re_fastmap.
9347         (translate): Renamed from re_translate.
9348         (can_be_null): Renamed from re_can_be_null.
9349         (regs_allocated): Renamed from re_regs_allocated.
9350         (fastmap_accurate): Renamed from re_fastmap_accurate.
9351         (no_sub): Renamed from re_no_sub.
9352         (not_bol): Renamed from re_not_bol.
9353         (not_eol): Renamed from re_not_eol.
9354         (newline_anchor): Renamed from re_newline_anchor.
9355         (num_regs): Renamed from rm_num_regs.
9356         (start): Renamed from rm_start.
9357         (end): Renamed from rm_end.
9358
9359         (free_state): Move up a bit.
9360
9361         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9362         #define to be empty.
9363         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9364         when that is what is intended.
9365         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9366         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9367         (MAX): New macro.
9368         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9369         All uses changed back to re_malloc, etc.  It's now the caller's
9370         responsibility to check for overflow; all callers changed.
9371         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9372         (re_x2nrealloc): Remove.
9373         (free_state): Remove decl.
9374
9375         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9376         (re_set_registers, re_exec):
9377         Use K&R-style defn.
9378
9379         2006-01-31  Roland McGrath  <roland@redhat.com>
9380
9381         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9382         Reported by Mike Frysinger <vapier@gentoo.org>.
9383
9384         2006-01-15  Andreas Jaeger  <aj@suse.de>
9385
9386         [BZ #1950]
9387         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9388         build_wcs_upper_buffer change.
9389         (build_wcs_upper_buffer): Change return type.
9390
9391         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9392
9393         * lib/regex_internal.h: Include <stdint.h> if available.
9394
9395         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9396
9397         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9398
9399         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9400
9401         * lib/regcomp.c: Adjust for changed secondary hash function.
9402
9403         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9404
9405         * lib/regex.h: Pretty printing.
9406         Clean up namespace a bit.
9407
9408         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9409
9410         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9411         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9412
9413         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9414                     Ulrich Drepper  <drepper@redhat.com>
9415
9416         [BZ #1302]
9417         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9418         changed.
9419         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9420
9421         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9422
9423         [BZ #281]
9424         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9425         * lib/regcomp.c: Remove unnecessary uses of
9426         unsigned RE_TRANSLATE_TYPE.
9427         * lib/regex_internal.h: Likewise.
9428         * lib/regex_internal.c: Likewise.
9429         * lib/regexec.c: Likewise.
9430         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9431
9432         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9433
9434         * lib/regexec.c (find_recover_state): Remove unnecessary
9435         initialization.
9436         (transit_state_bkref): Make DFA a const pointer.
9437         (get_subexp): Likewise.
9438         (check_arrival): Likewise.
9439         (update_cur_sifted_state): Likewise.
9440         (re_search_internal): Likewise.
9441         (prune_impossible_nodes): Likewise.
9442         (acquire_init_state_context): Likewise.
9443         (proceed_next_node): Likewise.
9444         (set_regs): Likewise.
9445         (free_fail_stack_return): Likewise.
9446         (check_arrival_expand_ecl): Mark DFA parameter as const.
9447         (check_arrival_expand_ecl_sub): Likewise.
9448         (check_subexp_limits): Likewise.
9449         (sub_epsilon_src_nodes):  Likewise.
9450         (add_epsilon_src_nodes):  Likewise.
9451         (merge_state_array): Likewise.
9452         (update_regs): Likewise.
9453         (build_trtable): Likewise.
9454         (sift_states_backward): Mark MCTX parameter as const.
9455         (build_sifted_states): Likewise.
9456         (update_cur_sifted_state): Likewise.
9457         (sift_states_mkref): Likewise.
9458         (check_arrival_expand_ecl): Mark eclosure as const.
9459         (check_dst_limits_calc_pos_1): Likewise.
9460         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9461         pointer.
9462
9463         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9464
9465         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9466         (transit_state_sb): Likewise.
9467         (transit_state_mb): Likewise.
9468         (sift_states_iter_mb): Likewise.
9469         (check_arrival_add_next_nodes): Likewise.
9470         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9471         [_LIBC] (re_search_2_stub): Use mempcpy.
9472
9473         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9474         mbrtowc for very simple UTF-8 case.
9475
9476         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9477         a pointer-to-const.
9478         (re_acquire_state_context): Likewise.
9479         * lib/regex_internal.h: Adjust prototypes.
9480
9481         * lib/regex.c: Prevent using C++ compilers.
9482
9483         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9484         (re_acquire_state_context): Likewise.
9485
9486 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9487
9488         * modules/regex (Depends-on): Add ssize_t.
9489
9490 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9491
9492         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9493         translation table.
9494
9495 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9496
9497         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9498
9499 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9500             Bruno Haible  <bruno@clisp.org>
9501
9502         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9503         <sys/types.h> and <inttypes.h>.
9504
9505 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9506
9507         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9508         `__error_t_defined', so argp.h will not typedef the former.
9509
9510 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9511
9512         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9513         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9514         glibc names.  Even if glibc is changed to conform to POSIX, the
9515         traditional names will be available anyway, since regex depends on
9516         the extensions module.  Also, fix a longstanding typo in the
9517         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9518         reported by Emanuele Giaquinta.  Also, change sense of cached
9519         variable, so that the message makes sense.
9520
9521 2006-03-24  Simon Josefsson  <jas@extundo.com>
9522
9523         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9524         including some doc fixes.
9525         (base64_encode_alloc): Fix +1 bug on allocation failures.
9526
9527 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9528
9529         * lib/base64.c (base64_encode): Do not read past end of array with
9530         unsanitized input on systems with CHAR_BIT > 8.
9531
9532 2006-03-24  Eric Blake  <ebb9@byu.net>
9533
9534         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9535
9536 2006-03-22  Karl Berry  <karl@gnu.org>
9537
9538         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9539         * config/srclistvars.sh (COREUTILS): new var.
9540
9541 2006-03-17  Jim Meyering  <jim@meyering.net>
9542
9543         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9544         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9545
9546 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9547
9548         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9549         no longer needs it.  Instead, check that regoff_t is as least
9550         as wide as ptrdiff_t.
9551
9552         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9553         so that our regex.h stays compatible with the installed regex.
9554         This is helpful for installers who configure --without-included-regex.
9555         Problem reported by Emanuele Giaquinta.
9556
9557 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9558
9559         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9560         Typedef to long int, not to off_, as POSIX will likely change
9561         in that direction.
9562
9563 2006-03-15  Eric Blake  <ebb9@byu.net>
9564
9565         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9566
9567 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9568
9569         * lib/argp-help.c (validate_uparams): Fix typo
9570         * lib/argp-parse.c (argp_default_options): Consistently begin help
9571         messages with a lowercase letter.
9572
9573 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9574
9575         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9576         overrun buffers and shouldn't be used (much as gets shouldn't be
9577         used).
9578         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9579
9580 2006-03-08  Simon Josefsson  <jas@extundo.com>
9581
9582         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9583         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9584
9585 2006-03-08  Simon Josefsson  <jas@extundo.com>
9586
9587         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9588         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9589
9590 2006-03-08  Simon Josefsson  <jas@extundo.com>
9591
9592         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9593         signal that configure disabled the device.
9594
9595 2006-03-08  Simon Josefsson  <jas@extundo.com>
9596
9597         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9598         languages.
9599
9600 2006-03-07  Simon Josefsson  <jas@extundo.com>
9601
9602         * modules/getopt (Depends-on): Add unistd.
9603
9604         * modules/unistd: New file.
9605
9606 2006-03-07  Simon Josefsson  <jas@extundo.com>
9607
9608         * modules/gc-random: New file.
9609
9610 2006-03-07  Simon Josefsson  <jas@extundo.com>
9611
9612         * m4/unistd_h.m4: New file.
9613
9614 2006-03-07  Simon Josefsson  <jas@extundo.com>
9615
9616         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9617         test to be side-effect free by storing the result in the cache
9618         variable gl_cv_lib_readline, and moving the assignment of
9619         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9620         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9621
9622 2006-03-07  Simon Josefsson  <jas@extundo.com>
9623
9624         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9625         error on missing devices (the functions will return an error).
9626
9627         * m4/gc.m4: Move random stuff to gc-random.m4
9628
9629 2006-03-07  Simon Josefsson  <jas@extundo.com>
9630
9631         * lib/unistd_.h: New file.
9632
9633 2006-03-07  Simon Josefsson  <jas@extundo.com>
9634
9635         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9636
9637 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9638
9639         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9640         Problem reported by Juan Manuel Guerrero.
9641
9642 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9643
9644         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9645         the unistd module.
9646         * lib/getlogin_r.c: Likewise.
9647         * lib/getlogin_r.h: Likewise.
9648         * lib/glob.c: Likewise.
9649         * lib/pagealign_alloc.c: Likewise.
9650         * lib/unistd_.h: Remove; no longer needed.
9651
9652 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9653
9654         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9655         Add unistd.
9656         * modules/c-stack (Depends-on): Add unistd.
9657         * modules/getlogin_r: Likewise.
9658         * modules/glob: Likewise.
9659         * modules/pagealign_alloc: Likewise.
9660         * modules/unistd (Files): Remove lib/unistd_.h.
9661         (EXTRA_DIST): Remove.
9662         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9663         need unistd_.h.
9664         (MOSTLYCLEANFILES): Remove unistd.h-t.
9665
9666 2006-03-03  Simon Josefsson  <jas@extundo.com>
9667
9668         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9669
9670 2006-03-03  Simon Josefsson  <jas@extundo.com>
9671
9672         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9673         libidn and bison.
9674
9675 2006-03-03  Simon Josefsson  <jas@extundo.com>
9676
9677         * build-aux/maint.mk: Add indent target.
9678
9679 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9680
9681         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9682         our replacement poll.h in any case, to avoid a differing
9683         declaration from a system header.  Seen on AIX.
9684
9685 2006-03-01  Simon Josefsson  <jas@extundo.com>
9686
9687         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9688         <kasal@ucw.cz>.
9689
9690 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9691
9692         * modules/gettime (Depends-on): Add extensions module.
9693         * modules/nanosleep (Depends-on): Likewise.
9694         * modules/settime (Depends-on): Likewise.
9695
9696 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9697
9698         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9699         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9700         pedantically.
9701         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9702         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9703
9704         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9705         not "==".  Reported by Ralf Wildenhues.
9706
9707 2006-03-01  Karl Berry  <karl@gnu.org>
9708
9709         * doc/Copyright/request-*: new files, synced from gnuorg.
9710
9711 2006-03-01  Karl Berry  <karl@gnu.org>
9712
9713         * config/srclist.txt (Copyright/*): new entries.
9714
9715 2006-02-28  Simon Josefsson  <jas@extundo.com>
9716
9717         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9718
9719 2006-02-27  Simon Josefsson  <jas@extundo.com>
9720
9721         * lib/base64.h: Indent #define's.  From Jim Meyering
9722         <jim@meyering.net>.
9723
9724 2006-02-27  Jim Meyering  <jim@meyering.net>
9725
9726         Revert the change of 2006-02-24, so these files can continue
9727         to be sync'd from gettext.
9728         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9729         of `config.h'.
9730
9731 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9732
9733         * modules/intprops: New file.
9734         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9735         Add intprops.
9736         * modules/getloadavg (Files): Remove lib/intprops.h.
9737         (Depends-on): Add intprops.
9738         * modules/human: Likewise.
9739         * modules/inttostr: Likewise.
9740         * modules/openat: Likewise.
9741         * modules/sig2str: Likewise.
9742         * modules/userspec: Likewise.
9743         * modules/utimecmp: Likewise.
9744         * modules/xnanosleep: Likewise.
9745         * modules/xstrtol: Likewise.
9746
9747 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9748
9749         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9750         * modules/lock-tests (TESTS): Use $(EXEEXT).
9751         * modules/tls-tests: Likewise.
9752         * modules/argp-tests: Likewise.
9753         (check_PROGRAMS): New var, replacing...
9754         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9755
9756 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9757
9758         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9759         `config.h'.
9760
9761 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9762
9763         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9764
9765 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9766
9767         Sync from coreutils.
9768         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9769         gl_CHDIR_SAFER.
9770
9771 2006-02-22  Jim Meyering  <jim@meyering.net>
9772
9773         Sync from coreutils.
9774         * m4/chdir-safer.m4: New file.
9775
9776 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9777
9778         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9779         AT_FDCWD exceeds INT_MAX.
9780         * lib/openat.h (AT_FDCWD): Likewise.
9781
9782 2006-02-17  Eric Blake  <address@hidden>
9783
9784         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9785
9786 2006-02-16  Simon Josefsson  <jas@extundo.com>
9787
9788         * modules/getaddrinfo (Depends-on): Add sys_socket.
9789
9790 2006-02-15  Simon Josefsson  <jas@extundo.com>
9791
9792         * build-aux/maint.mk: Add dsyntax-check rule.
9793
9794 2006-02-15  Eric Blake  <ebb9@byu.net>
9795
9796         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9797         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9798         'present but cannot compile' warnings on cygwin.
9799         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9800         use ws2tcpip.h if sys/socket.h works.
9801         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9802         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9803
9804 2006-02-14  Simon Josefsson  <jas@extundo.com>
9805
9806         * modules/maintainer-makefile (Files): Rename.
9807
9808         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9809         and (the local) Makefile.cfg to maint-cfg.mk.
9810
9811         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9812         to the latter.
9813
9814         * modules/maintainer-makefile: New module.
9815
9816         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9817         severaly stripped to make it possible to build it up from scratch
9818         with reliable tests.
9819
9820         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9821         fixes to permit overriding the default actions when configure and
9822         makefile are not available.
9823
9824 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9825
9826         Sync from coreutils.
9827         * modules/lstat (Depends-on): Don't depend on xalloc.
9828         (License): Change from GPL to LGPL, since this is now simply a
9829         replacement for a libc function.
9830
9831 2006-02-14  Jim Meyering  <jim@meyering.net>
9832
9833         Sync from coreutils.
9834
9835         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9836         failure on deficient systems, and simplify gnulib lgpl dependencies.
9837         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9838         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9839
9840         * lib/xalloc-die.c: Remove unused definition of N_.
9841
9842 2006-02-14  Jim Meyering  <jim@meyering.net>
9843
9844         Sync from coreutils.
9845         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9846         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9847         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9848         double-quote uses of that variable, to accommodate the rare case in
9849         which getmntent is available in none of the libraries checked.  This
9850         happens at least on FreeBSD 5.0.
9851
9852 2006-02-13  Simon Josefsson  <jas@extundo.com>
9853
9854         * gnulib-tool (Usage): Fix --import, from
9855         karl@freefriends.org (Karl Berry).
9856
9857 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9858
9859         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9860
9861 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9862
9863         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9864         "autoupdate" on 2005-12-12.
9865
9866 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9867
9868         * modules/closeout (Depends-on): Remove atexit.
9869
9870 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9871
9872         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9873         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9874
9875 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9876
9877         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9878         __EXTENSIONS__ if this causes compilation to fail.  Problem
9879         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9880         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9881
9882 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9883
9884         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9885         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9886         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9887         All uses changed.
9888
9889 2006-01-26  Simon Josefsson  <jas@extundo.com>
9890
9891         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9892         prototype is visible on mingw32.
9893
9894         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9895         for mingw32.
9896
9897         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9898         mingw32).
9899
9900 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9901
9902         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9903         attempt to open for write; this always fails, at least on POSIX
9904         hosts.  This reinstates the 2006-01-09 change, which was
9905         inadvertently removed.
9906
9907 2006-01-26  Bruno Haible  <bruno@clisp.org>
9908
9909         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9910         Reported by Paul Eggert.
9911
9912 2006-01-26  Bruno Haible  <bruno@clisp.org>
9913             Paul Eggert  <eggert@cs.ucla.edu>
9914
9915         * lib/stdbool_.h (_Bool)
9916         [(! (defined __cplusplus || defined __BEOS__)
9917           && !defined __GNUC__
9918           && !(defined __HP_cc || defined __xlc__
9919                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9920                || defined __sgi))]:
9921         #define to signed char in these cases too; this simplifies
9922         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9923         etc., separately) and makes it more conservative.
9924
9925 2006-01-25  Simon Josefsson  <jas@extundo.com>
9926
9927         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9928         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9929         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9930
9931 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9932
9933         * lib/argp-namefrob.h: Bugfix. Remove stray #
9934
9935 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9936
9937         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9938         so that we test the test.
9939         Check for yet another HP-UX cc bug involving *bool |= bool.
9940
9941 2006-01-25  Karl Berry  <karl@gnu.org>
9942
9943         * config/srclist.txt (vasnprintf.c): sync lost.
9944
9945 2006-01-25  Jim Meyering  <jim@meyering.net>
9946
9947         Sync from the stable (b5) branch of coreutils:
9948
9949         * lib/fts.c (fts_children): Don't let close() clobber errno from
9950         failed fchdir().
9951
9952         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9953         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9954         a dangling symlink.  That can also happen at least for ELOOP.
9955         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9956         FYI, this bug predates the inclusion of fts.c in coreutils.
9957
9958         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9959         in their own block, so pre-c99 compilers don't object.
9960
9961         Avoid the double-free (first in fts_read, second in fts_close) that
9962         would occur when an `active' directory is made inaccessible (e.g.,
9963         via chmod a-x) during a traversal.
9964         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9965         before returning.  Reproduce this failure by
9966         mkdir -p a/b; cd a; chmod a-x . b
9967         Reported by Stavros Passas.
9968
9969 2006-01-25  Jim Meyering  <jim@meyering.net>
9970
9971         * lib/fileblocks.c: Remove more useless parentheses.
9972         * lib/readutmp.h: Likewise.
9973
9974 2006-01-25  Bruno Haible  <bruno@clisp.org>
9975
9976         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9977         warnings.
9978         Reported by Paul Eggert.
9979
9980 2006-01-25  Bruno Haible  <bruno@clisp.org>
9981
9982         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9983         rid of a trap command. For Solaris sh.
9984         Reported by Mark D. Baushke <mdb@gnu.org>.
9985
9986 2006-01-24  Simon Josefsson  <jas@extundo.com>
9987
9988         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9989         Bruno.
9990
9991 2006-01-24  Karl Berry  <karl@gnu.org>
9992
9993         * config/srclist.txt (argp-namefrob.h): sync lost.
9994
9995 2006-01-24  Jim Meyering  <jim@meyering.net>
9996
9997         * modules/openat (Files): Add lib/intprops.h.
9998         From Mark D. Baushke.
9999
10000 2006-01-24  Jim Meyering  <jim@meyering.net>
10001
10002         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10003         Reported by Mark D. Baushke.
10004
10005 2006-01-24  Jim Meyering  <jim@meyering.net>
10006
10007         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10008
10009 2006-01-24  Bruno Haible  <bruno@clisp.org>
10010
10011         * modules/strnlen (Maintainer): Change from glibc to all.
10012
10013 2006-01-24  Bruno Haible  <bruno@clisp.org>
10014
10015         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10016         Patch by Paul Eggert.
10017
10018 2006-01-24  Bruno Haible  <bruno@clisp.org>
10019
10020         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10021         already has it.
10022         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10023         2005-11-26.
10024
10025         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10026         'signed char' to avoid problems with the built-in _Bool type.
10027         Reported by Paul Eggert on 2005-11-26.
10028
10029 2006-01-24  Bruno Haible  <bruno@clisp.org>
10030
10031         * gnulib-tool (func_import): Avoid constructing complicated sed
10032         expressions inside backquote.
10033         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10034
10035 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10036
10037         These changes imported from libc.
10038         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10039         test and two separate function calls.
10040         * lib/strndup.c (__strndup): Add libc_hidden_def.
10041
10042 2006-01-23  Simon Josefsson  <jas@extundo.com>
10043
10044         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10045         Remove the test_*_SOURCES variable: automake infers it by default.
10046         * modules/tls-tests: Likewise.
10047
10048 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10049
10050         Work around porting bugs reported by Dieter in
10051         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10052         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10053         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10054         Include "getopt.h" first, to check interface.
10055         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10056         !HAVE_DECL_GETENV.
10057         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10058         (__strndup): Revert to K&R-style function dfns, the glibc style.
10059         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10060         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10061         Include strnlen.h first, to get prototype properly.
10062         (strnlen): Renamed from __strnlen.
10063         Remove weak alias.
10064
10065 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10066
10067         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10068
10069 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10070
10071         * config/srclist.txt: Adjust to reflect glibc reorganization.
10072         This affects only comments.
10073
10074 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10075
10076          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10077          Reported by Bruce Korb <bkorb@gnu.org>.
10078
10079 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10080
10081         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10082         to pacify gcc -Wswitch-default.
10083
10084 2006-01-22  Bruno Haible  <bruno@clisp.org>
10085
10086         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10087         temporary buffer for sprintf, take into account the precision also
10088         for 'd', 'i', 'u', 'o', 'x', 'X'.
10089
10090 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10091
10092         * modules/argp-tests: New module
10093         * tests/test-argp.c: New file
10094         * tests/test-argp-2.sh: New file
10095
10096 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10097
10098         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10099         (__argp_base_name): Removed
10100         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10101         typo.
10102         (__argp_base_name): Provide macro definition or extern declaration
10103         depending on the configuration
10104
10105 2006-01-20  Simon Josefsson  <jas@extundo.com>
10106
10107         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10108
10109 2006-01-20  Simon Josefsson  <jas@extundo.com>
10110
10111         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10112
10113 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10114
10115         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10116         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10117         Suggested by Bruno Haible.
10118
10119 2006-01-20  Karl Berry  <karl@gnu.org>
10120
10121         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10122         until changes propagate, I guess.
10123
10124 2006-01-19  Simon Josefsson  <jas@extundo.com>
10125
10126         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10127
10128 2006-01-19  Simon Josefsson  <jas@extundo.com>
10129
10130         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10131
10132 2006-01-19  Simon Josefsson  <jas@extundo.com>
10133
10134         * gnulib-tool: Set check_PROGRAMS.
10135
10136         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10137         modules/des-tests, modules/gc-arcfour-tests,
10138         modules/gc-arctwo-tests, modules/gc-des-tests,
10139         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10140         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10141         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10142         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10143         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10144         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10145         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10146         test_*_SOURCES.
10147
10148 2006-01-18  Simon Josefsson  <jas@extundo.com>
10149
10150         * modules/socklen (Depends-on): Depend on sys_socket.
10151
10152 2006-01-18  Simon Josefsson  <jas@extundo.com>
10153
10154         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10155         modules/des-tests, modules/gc-arcfour-tests,
10156         modules/gc-arctwo-tests, modules/gc-des-tests,
10157         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10158         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10159         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10160         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10161         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10162         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10163         $(EXEEXT) to automake TESTS variable, for mingw32.
10164
10165 2006-01-17  Simon Josefsson  <jas@extundo.com>
10166
10167         * modules/socklen (Include): Need sys/socket.h.
10168
10169 2006-01-17  Bruno Haible  <bruno@clisp.org>
10170
10171         * modules/ssize_t (Include): Add <sys/types.h>.
10172
10173 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10174
10175         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10176         it's not portable and it doesn't work with cross-compiles.
10177         Problem reported by Bruno Haible.  Fix missing-$ typo in
10178         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10179         -zignore from being used with Sun's C compiler.
10180
10181 2006-01-12  Simon Josefsson  <jas@extundo.com>
10182
10183         * lib/base64.c: Fix warning, reported by Bruno Haible
10184         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10185
10186 2006-01-12  Bruno Haible  <bruno@clisp.org>
10187
10188         * modules/ldd: New file.
10189         * build-aux/ldd.sh.in: New file.
10190         * MODULES.html.sh (Support for building libraries and executables): Add
10191         ldd.
10192
10193 2006-01-12  Bruno Haible  <bruno@clisp.org>
10194
10195         * m4/ldd.m4: New file.
10196
10197 2006-01-12  Bruno Haible  <bruno@clisp.org>
10198
10199         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10200         endless loop while replacing $auxdir with build-aux.
10201
10202 2006-01-11  Simon Josefsson  <jas@extundo.com>
10203
10204         * lib/stdint_.h (SIZE_MAX): Add missing (.
10205
10206 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10207
10208         Sync from coreutils.
10209         * lib/md5.c: Fix commentary typos.
10210         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10211         * lib/md5.h (__attribute__): Remove; unused.
10212         * lib/sha1.c: Fix commentary to match md5 better.
10213         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10214         so that we don't need to worry about alignment.  All uses changed.
10215         This merges the 2005-10-28 md5 change into sha1.
10216
10217 2006-01-11  Jim Meyering  <jim@meyering.net>
10218
10219         Sync from coreutils.
10220         * lib/md5.c (OP): Fix spacing.
10221
10222 2006-01-11  Bruno Haible  <bruno@clisp.org>
10223
10224         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10225         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10226         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10227
10228 2006-01-11  Bruno Haible  <bruno@clisp.org>
10229
10230         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10231         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10232         the "early" section as well.
10233
10234 2006-01-11  Bruno Haible  <bruno@clisp.org>
10235
10236         Avoid "ar: no archive members specified" error on MacOS X.
10237         * gnulib-tool (func_modules_add_dummy): New function.
10238         (func_import, func_create_testdir): Invoke it.
10239
10240 2006-01-11  Bruno Haible  <bruno@clisp.org>
10241
10242         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10243         with $auxdir in AC_CONFIG_FILES statements.
10244
10245 2006-01-11  Bruno Haible  <bruno@clisp.org>
10246
10247         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10248         Initialize also noinst_HEADERS to empty.
10249
10250 2006-01-11  Bruno Haible  <bruno@clisp.org>
10251
10252         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10253         variables.
10254         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10255         autoreconf.
10256
10257 2006-01-11  Bruno Haible  <bruno@clisp.org>
10258
10259         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10260         overridable by the user.
10261         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10262
10263 2006-01-10  Simon Josefsson  <jas@extundo.com>
10264
10265         * modules/sys_socket: New file.
10266
10267 2006-01-10  Simon Josefsson  <jas@extundo.com>
10268
10269         * m4/sys_socket_h.m4: New file.
10270
10271 2006-01-10  Simon Josefsson  <jas@extundo.com>
10272
10273         * lib/socket_.h: New file.
10274
10275 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10276
10277         * modules/readutmp (Maintainer): Add myself.
10278
10279 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10280
10281         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10282         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10283         People who are still concerned with buggy memcmp implementations
10284         can invoke gl_FUNC_MEMCMP themselves.
10285
10286 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10287
10288         * lib/regex_internal.h (BITSET_WORD_BITS):
10289         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10290         preprocessor mishandles large unsigned values as if they were signed.
10291         Problem reported by Claudio Fontana in
10292         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10293
10294 2006-01-10  Jim Meyering  <jim@meyering.net>
10295
10296         Avoid the double-free (first in fts_read, second in fts_close) that
10297         would occur when an `active' directory is made inaccessible (e.g.,
10298         via chmod a-x) during a traversal.
10299         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10300         before returning.  Reproduce this failure by
10301         mkdir -p a/b; cd a; chmod a-x . b
10302         Reported by Stavros Passas.
10303
10304         Sync from coreutils.
10305         * lib/sha1.c: Tweak grammar in a comment.
10306
10307 2006-01-10  Jim Meyering  <jim@meyering.net>
10308
10309         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10310         Patch by Joerg Sonnenberger.
10311
10312 2006-01-10  Bruno Haible  <bruno@clisp.org>
10313
10314         * modules/readutmp: Depend on module free.
10315         * modules/strtok_r: Depend on module restrict.
10316
10317 2006-01-10  Bruno Haible  <bruno@clisp.org>
10318
10319         * modules/gettext (configure.ac): Add an invocation of
10320         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10321
10322 2006-01-10  Bruno Haible  <bruno@clisp.org>
10323
10324         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10325         Reported by Werner Lemberg <wl@gnu.org>.
10326
10327 2006-01-10  Bruno Haible  <bruno@clisp.org>
10328
10329         * lib/localcharset.c: Update from GNU gettext.
10330
10331 2006-01-10  Bruno Haible  <bruno@clisp.org>
10332
10333         * lib/argp.h (__const): Remove macro. Use const instead.
10334         * lib/argp-fmtstream.h (__const): Likewise.
10335         * lib/glob_.h (__const): Remove macro.
10336         * lib/glob-libc.h: Use const instead of __const.
10337
10338 2006-01-10  Bruno Haible  <bruno@clisp.org>
10339
10340         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10341         variable.
10342         Needed to avoid an automake error regarding the 'gettext' module.
10343
10344 2006-01-09  Simon Josefsson  <jas@extundo.com>
10345
10346         * modules/inet_ntop (Depends-on): Add restrict.
10347
10348 2006-01-09  Simon Josefsson  <jas@extundo.com>
10349
10350         * modules/gc-rijndael-tests (License): Put under LGPL.
10351
10352         * modules/gc-des-tests (License): Likewise.
10353
10354         * modules/gc-arcfour-tests (License): Likewise.
10355
10356         * modules/gc-arctwo-tests (License): Likewise.
10357
10358         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10359
10360         * modules/gc-hmac-sha1-tests (Files): Likewise.
10361
10362         * modules/gc-hmac-md5-tests (License): Likewise.
10363
10364         * modules/gc-sha1-tests (License): Likewise.
10365
10366         * modules/gc-md5-tests (License): Likewise.
10367
10368         * modules/gc-md4-tests (License): Likewise.
10369
10370         * modules/gc-md2-tests (License): Likewise.
10371
10372         * modules/gc-tests (License): Likewise.
10373
10374         * modules/des-tests (License): Likewise.
10375
10376         * modules/md4-tests (License): Likewise.
10377
10378         * modules/md2-tests (License): Likewise.
10379
10380 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10381
10382         Sync from coreutils:
10383
10384         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10385         * modules/lib-ignore: New file.
10386         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10387         chdir-safer.m4, lchmod.m4.
10388         * modules/openat: Add mkdirat.c, openat-priv.h.
10389
10390 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10391
10392         Sync from coreutils.
10393         * m4/lib-ignore.m4: New file.
10394         * m4/lchmod.m4: New file.
10395
10396 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10397
10398         Sync from coreutils.
10399         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10400         for write access: POSIX says that must fail.
10401         * lib/fts.c (diropen): Likewise.
10402         * lib/save-cwd.c (save_cwd): Likewise.
10403         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10404         well, for minor improvements on hosts that lack O_DIRECTORY.
10405         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10406         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10407         Fall back on chown if open failed with EACCES.
10408
10409         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10410         Report an error at compile-time if only a 1-second nominal clock
10411         resolution is found.
10412
10413         * lib/lchmod.h: New file.
10414         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10415         (make_dir_parents): Use lchown rather than chown, and
10416         lchmod rather than chmod.
10417
10418         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10419         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10420         "proc" reported by n0dalus.
10421
10422         * lib/mountlist.c: Include <limits.h>.
10423         (dev_from_mount_options)
10424         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10425         New function.  It no longer assumes "dev=" has the System V meaning
10426         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10427         (read_file_system_list)
10428         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10429         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10430         dev= in that case.
10431
10432         * lib/posixtm.h (PDS_PRE_2000): New macro.
10433         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10434         allow_century.  All usages changed.  Reject dates outside the range
10435         1969-1999 if PDS_PRE_2000 is used.
10436
10437 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10438
10439         Sync from coreutils.
10440         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10441         (Time of day items): Mention the possibility of leap seconds.
10442         Problem reported by Dr. David Alan Gilbert.
10443
10444 2006-01-09  Jim Meyering  <jim@meyering.net>
10445
10446         Sync from coreutils.
10447
10448         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10449
10450         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10451
10452         * lib/modechange.c (mode_compile): Reject an invalid mode string
10453         that starts with an octal digit.  From Andreas Gruenbacher.
10454
10455         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10456         and dup to open_safer and dup_safer, respectively.
10457         (openat_permissive): Fix typo in comment.
10458
10459         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10460         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10461         (_): Remove; no longer needed.
10462         (openat): Renamed from rpl_openat; no need for rpl_openat
10463         since openat.h renames openat for us.
10464         Replace most of the body with a call to openat_permissive,
10465         to avoid duplicate code.
10466         Port to (probably hypothetical) environments were mode_t is
10467         wider than int.
10468         (openat_permissive): Require mode arg, so that we can check
10469         types better.  Put it just after flags.  Change cwd failure
10470         indicator from pointer-to-bool to pointer-to-errno-value.
10471         All callers changed.
10472         Invoke openat_save_fail and/or openat_restore_fail if
10473         cwd_errno is null, so that openat can call us.
10474         (openat_permissive, fdopendir, fstatat, unlinkat):
10475         Simplify errno handling to avoid some duplicate code,
10476         as it's OK to set errno on success.
10477         * lib/openat.h: Revamp code so that function macros depend on
10478         __OPENAT_PREFIX only, not also on AT_FDCWD.
10479         (openat_ro): Remove.  Caller changed to use openat_permissive.
10480         (openat_permissive): Now a macro, if not a function.
10481         (openat_restore_fail, openat_save_fail): Now always functions,
10482         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10483
10484         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10485         and openat.c.
10486         * lib/mkdirat.c: Include openat-priv.h.
10487         Remove definitions of macros defined therein.
10488         * lib/openat.c: Likewise.
10489
10490         * lib/mkdirat.c (mkdirat): New file and function.
10491         * lib/openat.h (mkdirat): Declare.
10492
10493         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10494
10495         * lib/openat.h (openat_permissive): Declare.
10496         (openat_ro): Define.
10497
10498         * lib/openat.c (EXPECTED_ERRNO): New macro.
10499         (openat_permissive): New function -- used in remove.c rewrite.
10500         (all functions): Set errno just before returning, only if there
10501         was an actual failure.
10502         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10503
10504         Emulate openat-family functions using Linux's procfs, if possible.
10505         Idea and some code based on Ulrich Drepper's glibc changes.
10506
10507         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10508         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10509         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10510         before falling back on save_cwd and restore_cwd.
10511         (fdopendir, fstatat, unlinkat): Likewise.
10512
10513         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10514         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10515
10516         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10517         as second argument to va_arg.  Otherwise, some versions of gcc
10518         warn that `if this code is reached, the program will abort'.
10519
10520 2006-01-09  Jim Meyering  <jim@meyering.net>
10521
10522         Sync from coreutils.
10523         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10524         Require openat-priv.h.
10525
10526 2006-01-09  Bruno Haible  <bruno@clisp.org>
10527
10528         * modules/strnlen (Include): Use strnlen.h.
10529
10530 2006-01-09  Bruno Haible  <bruno@clisp.org>
10531
10532         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10533
10534 2006-01-09  Bruno Haible  <bruno@clisp.org>
10535
10536         * lib/sysexit_.h (EX_OK): New macro.
10537         Suggested by Martin Lambers <marlam@marlam.de>.
10538
10539 2006-01-09  Bruno Haible  <bruno@clisp.org>
10540
10541         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10542         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10543
10544 2006-01-09  Bruno Haible  <bruno@clisp.org>
10545
10546         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10547         numbers.
10548
10549 2006-01-09  Bruno Haible  <bruno@clisp.org>
10550
10551         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10552         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10553         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10554         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10555
10556 2006-01-09  Bruno Haible  <bruno@clisp.org>
10557
10558         * build-aux/javacomp.sh.in: New file, moved from lib/.
10559         * modules/javacomp-script (Files): Update.
10560         (configure.ac): Add AC_CONFIG_FILES invocation.
10561         (EXTRA_DIST): Remove variable.
10562
10563         * build-aux/javaexec.sh.in: New file, moved from lib/.
10564         * modules/javaexec (Files): Update.
10565         (configure.ac): Add AC_CONFIG_FILES invocation.
10566         (EXTRA_DIST): Remove javaexec.sh.in.
10567
10568         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10569         * modules/csharpcomp-script (Files): Update.
10570         (configure.ac): Add AC_CONFIG_FILES invocation.
10571         (EXTRA_DIST): Remove variable.
10572
10573         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10574         * modules/csharpexec (Files): Update.
10575         (configure.ac): Add AC_CONFIG_FILES invocation.
10576         (EXTRA_DIST): Remove csharpexec.sh.in.
10577
10578 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10579
10580         Sync from coreutils.
10581
10582         Add POSIX ACL support
10583         * lib/acl.h (copy_acl, set_acl): Add declarations.
10584         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10585         systems other than Linux.
10586         (chmod_or_fchmod): New function: use fchmod when possible,
10587         and chmod otherwise.
10588         (file_has_acl): Add a POSIX ACL implementation, with a
10589         Linux-specific subcase.
10590         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10591         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10592         acls are unsupported.
10593         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10594         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10595         are unsupported.
10596
10597 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10598
10599         Sync from coreutils.
10600         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10601
10602 2006-01-07  Bruno Haible  <bruno@clisp.org>
10603
10604         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10605         gl_EARLY.
10606
10607 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10608
10609         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10610         Problem reported for Mingw by Mark Junker.
10611
10612 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10613
10614         * README: Gnulib normally doesn't generate a tarball.
10615
10616 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10617
10618         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10619         long int, not int, for nanosecond counts, so that people who are
10620         used to POSIX struct timespec won't be surprised.  Reported by Jim
10621         Meyering.
10622
10623 2005-12-28  Bruno Haible  <bruno@clisp.org>
10624
10625         * build-aux/config.rpath: Update from GNU gettext.
10626
10627 2005-12-16  Jim Meyering  <jim@meyering.net>
10628
10629         * modules/fprintftime: New module.
10630         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10631
10632 2005-12-16  Jim Meyering  <jim@meyering.net>
10633
10634         * m4/fprintftime.m4: New file.
10635
10636 2005-12-16  Jim Meyering  <jim@meyering.net>
10637
10638         * lib/fprintftime.c, lib/fprintftime.h: New files.
10639
10640 2005-12-15  Simon Josefsson  <jas@extundo.com>
10641
10642         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10643         new m4/socklen.m4.
10644
10645 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10646
10647         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10648         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10649
10650 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10651
10652         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10653         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10654         struct uparams is valid. Fall back to the default values if it is
10655         not.
10656
10657 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10658
10659         * modules/argp (Files): Add argp-pin.c
10660         (Depends-on): dirname
10661         (lib_SOURCES): Add argp-pin.c
10662
10663 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10664
10665         * m4/argp.m4:  Check if program_invocation_name and
10666         program_invocation_short_name are declared and define appropriate
10667         macros if they are not.
10668
10669 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10670
10671         * lib/argp-help.c (__argp_base_name): New function
10672         (__argp_short_program_name): Rewrite using __argp_base_name
10673         * lib/argp-namefrob.h: Define program_invocation_name and
10674         program_invocation_short_name if requested
10675         (__argp_base_name): Add prototype
10676         * lib/argp-parse.c (argp_def): Use gettext wrappers
10677         (argp_default_parser): Use __argp_base_name
10678         * lib/argp-pin.c: New file. Defines program_invocation_name and
10679         program_invocation_short_name on systems that lack them.
10680
10681 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10682
10683         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10684         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10685         porting problem reported by Georg Schwarz in
10686         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10687
10688 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10689
10690         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10691         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10692         porting problem reported by Georg Schwarz in
10693         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10694
10695 2005-12-05  Bruno Haible  <bruno@clisp.org>
10696
10697         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10698         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10699         Reported by Mark Junker <mjscod@gmx.de>.
10700
10701 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10702
10703         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10704         Use implementation from Albert Chin, with some
10705         comments/corrections by Stepan Kasal and myself.
10706
10707 2005-12-02  Bruno Haible  <bruno@clisp.org>
10708
10709         * gnulib-tool (func_import): Accept GPLed build tool modules when
10710         --lgpl is given.
10711         * modules/csharpcomp-script: New file.
10712         * modules/csharpcomp: Depend on it.
10713         * modules/javacomp-script: New file.
10714         * modules/javacomp: Depend on it.
10715         Suggested by Simon Josefsson.
10716
10717 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10718
10719         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10720         statement, to work around an HP-UX 10.20 compiler bug reported by
10721         Peter O'Gorman.
10722
10723 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10724
10725         * modules/savedir (Depends-on): Add openat.
10726
10727 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10728
10729         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10730         (uintmax_t) [defined uintmax_t]: Do not declare.
10731         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10732         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10733         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10734         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10735         sake of portability to weird hosts that C allows (though we don't
10736         know of any practical examples).
10737
10738         * lib/savedir.h (fdsavedir): New decl.
10739         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10740         contains most of the former guts of savedir.
10741         (savedir): Use savedirstream.
10742         Include "openat.h".
10743
10744 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10745
10746         * modules/obstack (Files): Add m4/ulonglong.m4.
10747         Problem reported by Davide Angelocola.
10748
10749 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10750
10751         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10752         coreutils no longer futzes with rounding modes.
10753
10754 2005-11-14  Jim Meyering  <jim@meyering.net>
10755
10756         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10757         replacement of mkstemp.
10758
10759 2005-11-10  Simon Josefsson  <jas@extundo.com>
10760
10761         * lib/readline.c: Remove EOL.
10762
10763 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10764
10765         * modules/gethrxtime (Depends-on): Add gettime.
10766
10767 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10768
10769         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10770         or gettimeofday; no longer needed.
10771
10772 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10773
10774         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10775         time business.
10776         (gethrxtime) [! (HAVE_NANOUPTIME
10777         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10778         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10779         our own approximation.
10780
10781 2005-11-08  Eric Blake  <ebb9@byu.net>
10782
10783         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10784
10785 2005-11-08  Eric Blake  <ebb9@byu.net>
10786
10787         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10788
10789 2005-11-04  Bruno Haible  <bruno@clisp.org>
10790
10791         * gnulib-tool: Implement --update mode.
10792
10793 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10794
10795         Fix porting problem reported by Theodoros V. Kalamatianos.
10796         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10797         Don't assume that futimes failing means we must fail.
10798
10799 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10800
10801         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10802         variables to suggest the intended function of the PATH_MAX check.
10803
10804 2005-10-30  Kean Johnston  <jkj@sco.com>
10805
10806         Trivial changes to support SCO systems.
10807         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10808         as PATH_MAX.
10809         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10810         where __ptr is null when no I/O is pending.
10811
10812 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10813
10814         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10815         leave errno alone.  Problem reported by Dmitry V. Levin.
10816
10817 2005-10-28  Simon Josefsson  <jas@extundo.com>
10818
10819         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10820         Test more.
10821
10822         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10823
10824         * modules/md2, modules/md2-tests: New files.
10825
10826 2005-10-28  Simon Josefsson  <jas@extundo.com>
10827
10828         * m4/inet_ntop.m4: More tests.
10829
10830         * m4/gc-md2.m4, md2.m4: New file.
10831
10832 2005-10-28  Simon Josefsson  <jas@extundo.com>
10833
10834         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10835         "restrict" keywords, as per POSIX.  Protect the function
10836         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10837         Don't use K&R prototypes.  Check the sprintf return values.
10838         Re-define EAFNOSUPPORT if not present.  Indent.
10839
10840         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10841         suggested by Bruno Haible <bruno@clisp.org>.
10842
10843         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10844
10845         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10846
10847         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10848         libgcrypt).
10849
10850         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10851
10852         * lib/md2.h, lib/md2.c: New files.
10853
10854 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10855
10856         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10857         errno alone.  Problem reported by Frederic Jolliton.
10858
10859 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10860
10861         * modules/verify (License): Change from GPL to LGPL.  This is a
10862         tiny module and there are apparently near-equivalents that are
10863         under the BSD license.
10864
10865 2005-10-24  Simon Josefsson  <jas@extundo.com>
10866
10867         * modules/sha1: Relicense to LGPL.
10868
10869 2005-10-24  Simon Josefsson  <jas@extundo.com>
10870
10871         * lib/md4.h: Shrink buffer size, now that we changed the type.
10872
10873 2005-10-23  Simon Josefsson  <jas@extundo.com>
10874
10875         * gnulib-tool (func_import): Fix --tests-base.
10876
10877 2005-10-22  Simon Josefsson  <jas@extundo.com>
10878
10879         * modules/arcfour (Depends-on): Need stdint.
10880
10881 2005-10-22  Simon Josefsson  <jas@extundo.com>
10882
10883         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10884         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10885
10886 2005-10-22  Simon Josefsson  <jas@extundo.com>
10887
10888         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10889         suggested by Bruno Haible <bruno@clisp.org>.
10890
10891 2005-10-22  Simon Josefsson  <jas@extundo.com>
10892
10893         * lib/crc.h: Include stddef.h, for size_t.
10894
10895 2005-10-22  Simon Josefsson  <jas@extundo.com>
10896
10897         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10898         arcfour_context struct (simplify test vector testing in GNU
10899         Shishi).
10900
10901 2005-10-21  Simon Josefsson  <jas@extundo.com>
10902
10903         * modules/des, modules/des-tests: New files.
10904
10905         * modules/gc-des, modules/gc-des-tests: New files.
10906
10907         * tests/test-des.c, tests/test-gc-des.c: New file.
10908
10909 2005-10-21  Simon Josefsson  <jas@extundo.com>
10910
10911         * modules/arctwo, modules/arctwo-tests: New files.
10912
10913         * tests/test-arctwo.c: New file.
10914
10915         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10916
10917         * tests/test-gc-arctwo.c: New file.
10918
10919 2005-10-21  Simon Josefsson  <jas@extundo.com>
10920
10921         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10922         Bruno Haible <bruno@clisp.org>.
10923
10924         * m4/gc-des.m4: New file.
10925
10926 2005-10-21  Simon Josefsson  <jas@extundo.com>
10927
10928         * m4/arctwo.m4: New file.
10929
10930         * m4/gc-arctwo.m4: New file.
10931
10932 2005-10-21  Simon Josefsson  <jas@extundo.com>
10933
10934         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10935         block.
10936
10937 2005-10-21  Simon Josefsson  <jas@extundo.com>
10938
10939         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10940         <bruno@clisp.org>.
10941
10942         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10943
10944         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10945         Bruno Haible <bruno@clisp.org>.
10946
10947         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10948         <bruno@clisp.org>.
10949
10950 2005-10-21  Simon Josefsson  <jas@extundo.com>
10951
10952         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10953
10954 2005-10-21  Simon Josefsson  <jas@extundo.com>
10955
10956         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10957
10958 2005-10-21  Simon Josefsson  <jas@extundo.com>
10959
10960         * lib/des.h, lib/des.c: New files.
10961
10962         * lib/gc-gnulib.c: Support DES.c
10963
10964 2005-10-21  Simon Josefsson  <jas@extundo.com>
10965
10966         * lib/arctwo.h, lib/arctwo.c: New files.
10967
10968         * lib/gc-gnulib.c: Support ARCTWO.
10969
10970 2005-10-21  Simon Josefsson  <jas@extundo.com>
10971
10972         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10973         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10974
10975 2005-10-21  Simon Josefsson  <jas@extundo.com>
10976
10977         * gnulib-tool (func_import, func_create_testdir): Define automake
10978         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10979         Makefile.am snippet),
10980         suggested by Bruno Haible <bruno@clisp.org>.
10981
10982         * modules/gc (Makefile.am): Use it.
10983
10984 2005-10-21  Bruno Haible  <bruno@clisp.org>
10985
10986         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10987         patch.
10988
10989 2005-10-19  Simon Josefsson  <jas@extundo.com>
10990
10991         * tests/test-gc-rijndael.c: New file.
10992
10993         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10994
10995 2005-10-19  Simon Josefsson  <jas@extundo.com>
10996
10997         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10998         interface too.
10999
11000 2005-10-19  Simon Josefsson  <jas@extundo.com>
11001
11002         * tests/test-gc-arcfour.c: New file.
11003
11004         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11005
11006 2005-10-19  Simon Josefsson  <jas@extundo.com>
11007
11008         * modules/gc-md4, modules/gc-md4-tests: New file.
11009
11010         * tests/test-gc-md4.c: New file.
11011
11012 2005-10-19  Simon Josefsson  <jas@extundo.com>
11013
11014         * m4/gc-md4.m4: New file.
11015
11016 2005-10-19  Simon Josefsson  <jas@extundo.com>
11017
11018         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11019         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11020         <kasal@ucw.cz>.
11021
11022 2005-10-19  Simon Josefsson  <jas@extundo.com>
11023
11024         * m4/gc-arcfour.m4: New file.
11025
11026         * m4/gc-rijndael.m4: New file.
11027
11028 2005-10-19  Simon Josefsson  <jas@extundo.com>
11029
11030         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11031
11032 2005-10-19  Simon Josefsson  <jas@extundo.com>
11033
11034         * lib/gc-gnulib.c: Support ARCFOUR.
11035
11036 2005-10-19  Simon Josefsson  <jas@extundo.com>
11037
11038         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11039         support.
11040
11041         * lib/gc.h: Add ECB enum type.
11042
11043         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11044
11045 2005-10-18  Simon Josefsson  <jas@extundo.com>
11046
11047         * tests/test-md5.c: New file.
11048
11049         * modules/md5-tests: New file.
11050
11051 2005-10-18  Simon Josefsson  <jas@extundo.com>
11052
11053         * tests/test-md4.c: New file.
11054
11055         * modules/md4, modules/md4-tests: New files.
11056
11057 2005-10-18  Simon Josefsson  <jas@extundo.com>
11058
11059         * m4/md4.m4: New file.
11060
11061 2005-10-18  Simon Josefsson  <jas@extundo.com>
11062
11063         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11064
11065 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11066
11067         * gnulib-tool (func_create_testdir): Omit the second check whether
11068         BUILT_SOURCES in nonempty.
11069
11070 2005-10-17  Simon Josefsson  <jas@extundo.com>
11071
11072         * tests/test-rijndael.c: New file.
11073
11074 2005-10-17  Simon Josefsson  <jas@extundo.com>
11075
11076         * modules/sha1: Depend on stdint instead of md5.
11077
11078         * modules/md5: Depend on stdint, remove uint32_t.
11079
11080 2005-10-17  Simon Josefsson  <jas@extundo.com>
11081
11082         * modules/gc-sha1-tests: New file.
11083
11084         * tests/test-gc-sha1.c: New file.
11085
11086 2005-10-17  Simon Josefsson  <jas@extundo.com>
11087
11088         * m4/md5.m4: Remove call to uint32_t.m4.
11089
11090 2005-10-17  Simon Josefsson  <jas@extundo.com>
11091
11092         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11093
11094         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11095         md5.h.
11096
11097         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11098
11099         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11100
11101 2005-10-17  Simon Josefsson  <jas@extundo.com>
11102
11103         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11104
11105 2005-10-17  Simon Josefsson  <jas@extundo.com>
11106
11107         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11108
11109 2005-10-17  Simon Josefsson  <jas@extundo.com>
11110
11111         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11112
11113         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11114
11115 2005-10-17  Bruno Haible  <bruno@clisp.org>
11116
11117         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11118         that it can also be used in a test.
11119
11120 2005-10-16  Bruno Haible  <bruno@clisp.org>
11121
11122         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11123         TESTS_ENVIRONMENT, so that individual tests can augment it.
11124
11125         * gnulib-tool (func_create_testdir): Use an intermediate target for
11126         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11127         macros, like $(ALLOCA_H), which cannot be passed through the command
11128         line.
11129
11130 2005-10-15  Simon Josefsson  <jas@extundo.com>
11131
11132         * modules/rijndael-tests: New file.
11133
11134         * modules/rijndael: New file.
11135
11136 2005-10-15  Simon Josefsson  <jas@extundo.com>
11137
11138         * m4/rijndael.m4: New file.
11139
11140 2005-10-15  Simon Josefsson  <jas@extundo.com>
11141
11142         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11143
11144         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11145
11146 2005-10-14  Simon Josefsson  <jas@extundo.com>
11147
11148         * tests/test-arcfour.c: New file.
11149
11150         * modules/arcfour, modules/arcfour-tests: New files.
11151
11152 2005-10-14  Simon Josefsson  <jas@extundo.com>
11153
11154         * m4/arcfour.m4: New file.
11155
11156 2005-10-14  Simon Josefsson  <jas@extundo.com>
11157
11158         * lib/arcfour.h, lib/arcfour.c: New files.
11159
11160 2005-10-14  Roland McGrath  <roland@redhat.com>
11161
11162         Import from libc.  [BZ #1331]
11163         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11164         macro argument.
11165         Reported by Matej Vela <vela@debian.org>.
11166
11167 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11168
11169         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11170         include <wchar.h>; no longer needed.
11171
11172 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11173
11174         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11175
11176 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11177         and  Ulrich Drepper  <drepper@redhat.com>
11178
11179         Import from libc.
11180         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11181         instead of inline stream orientation test and two separate
11182         function calls.  Pay no attention to USE_IN_LIBIO.
11183
11184 2005-10-13  Simon Josefsson  <jas@extundo.com>
11185
11186         * modules/gc-hmac-md5-tests: New file.
11187
11188         * tests/test-gc-hmac-sha1.c: New file.
11189
11190         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11191
11192         * modules/gc-hmac-md5-tests: New file.
11193
11194         * tests/test-gc-md5.c: New file.
11195
11196         * modules/gc-md5-tests: New file.
11197
11198 2005-10-13  Simon Josefsson  <jas@extundo.com>
11199
11200         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11201         Move memory allocation outside of loop.
11202
11203 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11204
11205         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11206         intermediate directory is in a read-only file system.  Problem
11207         reported by Eric Blake.
11208
11209 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11210
11211         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11212
11213 2005-10-12  Simon Josefsson  <jas@extundo.com>
11214
11215         * tests/test-hmac-sha1.c: New file.
11216
11217         * modules/hmac-sha1-tests: New file.
11218
11219         * modules/hmac-sha1: New file.
11220
11221 2005-10-12  Simon Josefsson  <jas@extundo.com>
11222
11223         * modules/gc-sha1: New file.
11224
11225 2005-10-12  Simon Josefsson  <jas@extundo.com>
11226
11227         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11228
11229         * tests/test-gc-pbkdf2-sha1.c: New file.
11230
11231 2005-10-12  Simon Josefsson  <jas@extundo.com>
11232
11233         * modules/gc-md5, modules/gc-hmac-md5: New files.
11234
11235         * modules/gc (Files): Remove md5, memxor and hmac files.
11236
11237 2005-10-12  Simon Josefsson  <jas@extundo.com>
11238
11239         * m4/gc-pbkdf2-sha1.m4: New file.
11240
11241         * m4/gc-hmac-sha1.m4: New file.
11242
11243         * m4/gc-sha1: New file.
11244
11245         * m4/hmac-sha1.m4: New file.
11246
11247 2005-10-12  Simon Josefsson  <jas@extundo.com>
11248
11249         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11250
11251         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11252
11253 2005-10-12  Simon Josefsson  <jas@extundo.com>
11254
11255         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11256         suggested by Bruno Haible <bruno@clisp.org>.
11257
11258 2005-10-12  Simon Josefsson  <jas@extundo.com>
11259
11260         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11261
11262 2005-10-12  Simon Josefsson  <jas@extundo.com>
11263
11264         * lib/gc-pbkdf2-sha1.c: New file.
11265
11266         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11267
11268 2005-10-12  Simon Josefsson  <jas@extundo.com>
11269
11270         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11271
11272         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11273
11274 2005-10-12  Simon Josefsson  <jas@extundo.com>
11275
11276         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11277         GC_USE_HMAC_MD5, respectively.
11278
11279         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11280         (gc_md5): Fix typo.
11281
11282         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11283
11284         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11285
11286         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11287
11288 2005-10-12  Bruno Haible  <bruno@clisp.org>
11289
11290         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11291         Reported by Stepan Kasal <kasal@ucw.cz>.
11292
11293 2005-10-11  Simon Josefsson  <jas@extundo.com>
11294
11295         * tests/test-crc.c: New file.
11296
11297         * modules/crc, modules/crc-tests: New files.
11298
11299 2005-10-11  Simon Josefsson  <jas@extundo.com>
11300
11301         * m4/crc.m4: New file.
11302
11303 2005-10-11  Simon Josefsson  <jas@extundo.com>
11304
11305         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11306
11307         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11308
11309         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11310
11311 2005-10-11  Simon Josefsson  <jas@extundo.com>
11312
11313         * lib/crc.h, lib/crc.c: New files.
11314
11315         * lib/gc.h (gc_hash_buffer): Add doc.
11316
11317 2005-10-11  Bruno Haible  <bruno@clisp.org>
11318
11319         * modules/c-strcasestr: New file.
11320         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11321
11322 2005-10-11  Bruno Haible  <bruno@clisp.org>
11323
11324         * modules/c-strcase: New file.
11325         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11326
11327 2005-10-11  Bruno Haible  <bruno@clisp.org>
11328
11329         * lib/strcasecmp.c: Include limits.h.
11330         (strcasecmp): Avoid integer overflow on exotic platforms.
11331         * lib/strncasecmp.c: Include limits.h.
11332         (strncasecmp): Avoid integer overflow on exotic platforms.
11333         Reported by Paul Eggert.
11334
11335 2005-10-11  Bruno Haible  <bruno@clisp.org>
11336
11337         * lib/c-strcasestr.h: New file, from GNU gettext.
11338         * lib/c-strcasestr.c: New file, from GNU gettext.
11339
11340 2005-10-11  Bruno Haible  <bruno@clisp.org>
11341
11342         * lib/c-strcase.h: New file, from GNU gettext.
11343         * lib/c-strcasecmp.c: New file, from GNU gettext.
11344         * lib/c-strncasecmp.c: New file, from GNU gettext.
11345
11346 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11347
11348         * modules/mempcpy (License): GPL -> LGPL.
11349         * modules/strchrnul (License): Likewise.
11350         * modules/sysexits (License): Likewise.
11351
11352 2005-10-08  Simon Josefsson  <jas@extundo.com>
11353
11354         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11355
11356 2005-10-07  Simon Josefsson  <jas@extundo.com>
11357
11358         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11359
11360 2005-10-06  Simon Josefsson  <jas@extundo.com>
11361
11362         * tests/test-hmac-md5.c: New file.
11363
11364         * modules/hmac-md5-tests: New file.
11365
11366         * modules/hmac-md5: New file.
11367
11368 2005-10-06  Simon Josefsson  <jas@extundo.com>
11369
11370         * m4/hmac-md5.m4: New file.
11371
11372         * m4/memxor.m4: Require gl_C_RESTRICT.
11373
11374 2005-10-06  Simon Josefsson  <jas@extundo.com>
11375
11376         * lib/memxor.c (memxor): Avoid casts and warnings.
11377
11378 2005-10-06  Simon Josefsson  <jas@extundo.com>
11379
11380         * lib/hmac-md5.c: New file.
11381
11382         * lib/hmac.h: New file.
11383
11384 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11385
11386         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11387         promotes to int, not unsigned int, to catch the AIX 5.3
11388         compiler bug.
11389
11390 2005-10-05  Simon Josefsson  <jas@extundo.com>
11391
11392         * modules/memxor: New file.
11393
11394         * modules/iconv (Files): Move config.rpath to havelib, it is used
11395         there.
11396
11397         * modules/havelib (Files): Add config.rpath.
11398
11399 2005-10-05  Simon Josefsson  <jas@extundo.com>
11400
11401         * m4/memxor.m4: New file.
11402
11403 2005-10-05  Simon Josefsson  <jas@extundo.com>
11404
11405         * lib/memxor.c (memxor): Fix compiler error.
11406
11407         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11408         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11409
11410         * lib/memxor.h, lib/memxor.c: New files.
11411
11412         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11413         we assume all systems have it, suggested by Jim Meyering
11414         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11415         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11416         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11417         same reasons.
11418
11419 2005-10-05  Simon Josefsson  <jas@extundo.com>
11420
11421         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11422
11423 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11424
11425         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11426         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11427         needed, since the source code now assumes these .h files.
11428
11429 2005-10-05  Derek Price  <derek@ximbiot.com>
11430
11431         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11432
11433 2005-10-05  Bruno Haible  <bruno@clisp.org>
11434
11435         * modules/stdint (License): Change to LGPL.
11436
11437 2005-10-04  Simon Josefsson  <jas@extundo.com>
11438
11439         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11440         D. Baushke" <mdb@gnu.org>.
11441
11442 2005-10-04  Bruno Haible  <bruno@clisp.org>
11443
11444         * lib/verify.h (verify_true): Provide alternative definition for C++.
11445
11446 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11447
11448         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11449         (SSIZE_MAX): New macro, if not already defined.
11450         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11451         than 2 GiB.
11452
11453 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         Sync from coreutils.
11456         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11457         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11458         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11459         ULLONG_MAX doesn't work with 2.7.2.1.
11460
11461 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11462
11463         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11464         From Ben Pfaff.
11465
11466         * modules/exclude (Depends-on): Depend on verify.
11467         * modules/strtoimax (Depends-on): Likewise.
11468         * modules/utimecmp (Depends-on): Likewise.
11469
11470 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11471
11472         * lib/exclude.c: Include verify.h.
11473         (verify): Remove.  All callers changed to use verify.h's version.
11474         * lib/strtoimax.c: Likewise.
11475         * lib/utimecmp.c: Likewis.e
11476
11477         Sync from coreutils.
11478         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11479         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11480         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11481         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11482         bother returning ENOSYS if settimeofday or stime fails; just let
11483         them return whatever errno they want to return.
11484         * lib/utimens.c: Include unistd.h, for dup2.
11485         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11486         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11487
11488 2005-10-02  Jim Meyering  <jim@meyering.net>
11489
11490         Sync from coreutils.
11491         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11492         from glibc-2.2.5 that fails for read-only files.
11493
11494 2005-10-02  Jim Meyering  <jim@meyering.net>
11495
11496         Sync from coreutils.
11497         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11498         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11499         `#if HAVE_CONFIG_H'.
11500         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11501         Remove AT_FDCWD test.
11502         Do not consume the fd unless successful.
11503         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11504         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11505         block, so that we don't even try to compile it if settimeofday is
11506         available.  This works around a compilation failure on OSF1 V5.1,
11507         due to stime requiring a `long int*' while tv_sec is `int'.
11508
11509 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11510
11511         Sync from coreutils.
11512         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11513         against `yes', rather than just testing for nonempty.
11514
11515 2005-10-01  Simon Josefsson  <jas@extundo.com>
11516
11517         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11518         and Darwin.
11519
11520         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11521         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11522         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11523         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11524         Check if struct addrinfo is declared.
11525
11526 2005-10-01  Simon Josefsson  <jas@extundo.com>
11527
11528         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11529         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11530         AI_* and EAI_* definitions.  Protect function declarations.
11531
11532 2005-10-01  Jim Meyering  <jim@meyering.net>
11533
11534         Sync from coreutils.
11535
11536         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11537         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11538         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11539         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11540         in the inet and nsl libraries.  Required on Solaris 5.7.
11541
11542 2005-10-01  Jim Meyering  <jim@meyering.net>
11543
11544         Sync from coreutils.
11545         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11546         in the inet and nsl libraries.  Required on Solaris 5.7.
11547
11548 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11549
11550         * lib/getdelim.c (getdelim): Remove unused variables.
11551
11552 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11553
11554         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11555         so that the code works even with ancient cpp.  Portability problem
11556         with GCC 2.7.2.1 reported by Thomas M.Ott.
11557
11558 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11559
11560         * modules/regex (Depends-on): Add strcase.
11561
11562         * modules/gethostname (Licence): Change from GPL to LGPL, since
11563         gethostname.c is a trivial implementation of a standard library
11564         function.
11565         * modules/poll (License): Change from GPL to LGPL, since it's
11566         derived from LGPL code.
11567
11568 2005-09-27  Jim Meyering  <jim@meyering.net>
11569
11570         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11571         HAVE_CONFIG_H.
11572
11573         * lib/intprops.h (signed_type_or_expr__): Define.
11574         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11575         for unsigned types.
11576
11577 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11578
11579         * lib/verify.h (verify_expr): Remove, replacing with:
11580         (verify_true): New macro that returns true instead of void.
11581         (verify_type__): Remove.
11582         (verify): Use verify_true rather than verify_type__.
11583
11584 2005-09-26  Bruno Haible  <bruno@clisp.org>
11585
11586         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11587         is necessary.
11588         (lib_SOURCES): Remove mbchar.c.
11589         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11590         (Files): Add m4/mbrtowc.m4.
11591         * modules/mbiter: Likewise.
11592         * modules/mbuiter: Likewise.
11593
11594 2005-09-26  Bruno Haible  <bruno@clisp.org>
11595
11596         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11597         compile mbchar.c if they are not both present.
11598         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11599         * m4/mbiter.m4 (gl_MBITER): Likewise.
11600         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11601         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11602         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11603
11604 2005-09-25  Jim Meyering  <jim@meyering.net>
11605
11606         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11607         also uses socklen_t.
11608
11609 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11610
11611         * lib/utimens.c (ENOSYS): Define if not already defined.
11612         (futimens): Support having a null PATH if the file descriptor
11613         is nonnegative.
11614
11615         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11616         Remove.
11617         (__attribute): Define to empty unless GCC 3.1 or later.
11618         This works around a core dump on OpenBSD 3.4, which has GCC
11619         2.95.3, which dumps core when given __attribute__(()).  It also
11620         simplifies other tests, since we really don't want to bother with
11621         worrying about which ancient version of GCC supported what.
11622         Original problem reported by Yoann Vandoorselaere, with part of
11623         the fix suggested by Derek Price.
11624
11625 2005-09-24  Jim Meyering  <jim@meyering.net>
11626
11627         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11628         so we can once again use a positive bitfield width of 1 -- now we
11629         don't have to explain why we were using a bitfield width of 2.
11630
11631 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11632
11633         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11634         and similarly for the other external symbols.  Problem reported
11635         by James Gallager.
11636
11637         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11638         bug reported by Jim Meyering.
11639
11640         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11641         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11642         not needed, since socklen is a prerequisite module.
11643
11644 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11645
11646         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11647         Problem reported by Eric Blake.
11648         (getaddrinfo): Initialize se so that it's not garbage.
11649         Redo internal storage allocation so that it doesn't make unportable
11650         assumptions about alignment.
11651         Fix a memory leak.
11652
11653         * lib/utimens.c (futimens): Use futimesat if available.
11654         Prefer it to futimes since it doesn't have the futimes bug.
11655
11656         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11657         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11658         Instead, declare a function that returns a pointer to an array,
11659         and use verify_type__ to declare the size of the array.
11660         Problem and germ of a solution reported by Bruno Haible.
11661         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11662         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11663
11664 2005-09-23  Jim Meyering  <jim@meyering.net>
11665
11666         Sync from coreutils.
11667         Correct build failure (socklen_t not defined) on at least
11668         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11669         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11670
11671 2005-09-23  Jim Meyering  <jim@meyering.net>
11672
11673         * modules/getaddrinfo (Depends-on): Add socklen.
11674
11675 2005-09-23  Bruno Haible  <bruno@clisp.org>
11676
11677         * tests/test-verify.c: New file.
11678
11679 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11680
11681         Sync from coreutils.
11682
11683         * modules/argmatch (Depends-on): Add verify.
11684         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11685         unistd-safer.
11686         * modules/save-cwd (Depends-on): Likewise.
11687
11688         * modules/openat (Files): Add lib/openat-die.c.
11689         (Depends-on): Remove error, exitfail.
11690         Add dirname.
11691
11692         * modules/verify: New file.
11693         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11694         with "verify" module.
11695
11696 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11697
11698         Sync from coreutils.
11699
11700         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11701         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11702         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11703         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11704         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11705         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11706         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11707         Don't bother checking for string.h, stdlib.h, unistd.h.
11708         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11709         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11710         module's job.
11711         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11712         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11713
11714         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11715         (gl_GETDATE): Use it.
11716
11717         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11718
11719 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11720
11721         Sync from coreutils.
11722
11723         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11724         stat-time.h.
11725         * lib/argmatch.h: Include verify.h
11726         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11727         (ARGMATCH_ASSERT): Remove; unused.
11728         * lib/canonicalize.c: Assume STDC_HEADERS.
11729         * lib/exclude.c: Include "strcase.h".
11730         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11731         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11732         and stdio-safer.h.
11733         (getusershell): Call fopen, not fopen_safer.
11734         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11735         Do not include unistd-safer.h.
11736         (save_cwd): Don't call fd_safer; no longer needed
11737         now that we include fcntl--.h.
11738
11739         * lib/getdate.y (relative_time): New type.
11740         (RELATIVE_TIME_0): New constant.
11741         (parser_control): Use relative_time instead of doing it ourselves.
11742         (%union): Add new relative_time rel member.
11743         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11744         Now typeless.
11745         (relunit, relunit_snumber): Now of type rel.
11746         (zone, rel, relunit, get_date): Adjust to above changes.
11747
11748         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11749         Do not include unistd-safer.h.
11750         (getloadavg): Don't call fd_safer; no longer needed
11751         now that we include fcntl--.h.
11752
11753         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11754         (make_dir_parents): Treat ENOSYS like EEXIST.
11755
11756         Improve quality of diagnostics on restore_cwd failure.
11757         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11758         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11759         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11760         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11761         each time through the loop.  Do not diagnose restore_cwd failure;
11762         that is the caller's job (and perhaps the caller does not care).
11763
11764         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11765         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11766         If the file already exists but is not a directory, don't bother
11767         to try to make its parents.
11768         Close potential file descriptor leak if we can't chdir("/") (!).
11769         Don't always return true if chdir($PWD) fails; return true only
11770         if the requested action was done successfully (except for the
11771         chdir($PWD)).
11772         Don't log final directory unless we actually made it.
11773         Refactor to avoid duplicate code to fix up permissions.
11774         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11775
11776         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11777         to make it a bit faster and (I hope) clearer.
11778         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11779         Fix bug in formats like %2N.
11780
11781         * lib/verify.h: New file.
11782
11783 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11784
11785         Sync from coreutils.
11786         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11787
11788 2005-09-22  Jim Meyering  <jim@meyering.net>
11789
11790         Sync from coreutils.
11791
11792         * m4/lstat.m4 (gl_FUNC_LSTAT):
11793         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11794         Remove obsolete comment.
11795         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11796         * m4/xstrtod.m4: Likewise.
11797
11798         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11799
11800 2005-09-22  Jim Meyering  <jim@meyering.net>
11801
11802         Sync from coreutils.
11803
11804         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11805
11806         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11807         the .tm_year member, since otherwise gcc-4.0 would now warn about
11808         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11809
11810         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11811         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11812
11813         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11814         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11815         when run in a time zone for which daylight savings time is in effect
11816         for the starting date.
11817
11818         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11819         stop us from restricting permissions of just-created absolute-named
11820         directories.
11821         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11822         to restore initial working directory.
11823         * lib/mkdir-p.c (make_dir_parents): New parameter:
11824         different_working_dir, to tell caller if/when we change the working
11825         directory and are unable to return to the initial one.
11826         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11827         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11828         `return false'.  This fixes a bug introduced on 2004-07-30.
11829
11830         * lib/openat.c (fdopendir): Be sure to close the supplied
11831         file descriptor before returning.  This makes our replacement
11832         implementation a little closer to Solaris's, where fdopendir
11833         ties the file descriptor to the returned DIR* pointer.
11834         * lib/openat.c (unlinkat): New function.
11835         * lib/openat.h (unlinkat): Add prototype.
11836         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11837         (openat_restore_fail): Rename from openat_restore_die.
11838         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11839
11840         Provide an alternative to exiting immediately upon save_cwd or
11841         restore_cwd failure.  Now, an application can arrange e.g.,
11842         to perform a longjump in that case.
11843         * lib/openat.c: Include dirname.h.
11844         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11845         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11846         and openat_restore_die rather than calling error directly.
11847         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11848
11849         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11850         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11851         define.
11852
11853         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11854         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11855                             int utc, int nanoseconds);
11856         Background:
11857         date should not have to allocate a megabyte of virtual memory to
11858         handle a format argument like +%1048575T.  When implemented with
11859         strftime, it must allocate such a buffer, use strftime to fill it
11860         in, print it, then free it.
11861         With fprintftime, it simply prints everything and exits.
11862         With no need for memory allocation, that's one fewer way to fail.
11863         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11864         optional field width, not before, so we accept %9:z, not %:9z.
11865         (my_strftime): Be sure to use L_('x') for literals.
11866
11867         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11868         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11869         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11870         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11871         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11872         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11873         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11874         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11875         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11876         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11877         * lib/xgethostname.c, lib/xreadlink.c:
11878         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11879
11880         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11881         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11882         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11883         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11884         and don't include <sys/file.h>).
11885
11886 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11887
11888         Sync from coreutils.
11889
11890         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11891         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11892         [!LDAV_DONE]: Avoid unused variable warning.
11893
11894 2005-09-21  Bruno Haible  <bruno@clisp.org>
11895
11896         * lib/unicodeio.h (unicode_to_mb): New declaration.
11897
11898 2005-09-20  Derek Price  <derek@ximbiot.com>
11899
11900         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11901         getaddrinfo.h.
11902
11903 2005-09-20  Bruno Haible  <bruno@clisp.org>
11904
11905         * gnulib-tool: Remove trailing slashes from the values specified for
11906         --source-base, --m4-base, --tests-base, --aux-dir.
11907         Suggested by Simon Josefsson <jas@extundo.com>.
11908
11909 2005-09-20  Bruno Haible  <bruno@clisp.org>
11910
11911         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11912         func_modules_to_filelist, func_import, func_create_testdir): Make all
11913         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11914         change when gnulib-tool is invoked in a different locale.
11915
11916 2005-09-19  Simon Josefsson  <jas@extundo.com>
11917
11918         * m4/socklen.m4: Fix typo.
11919
11920 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11921
11922         Use a consistent style for including <config.h>.
11923         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11924         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11925         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11926         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11927         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11928         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11929         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11930         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11931         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11932         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11933         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11934         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11935         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11936         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11937         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11938         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11939         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11940         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11941         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11942         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11943         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11944         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11945         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11946         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11947         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11948         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11949         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11950         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11951         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11952         lib/xstrtoumax.c, lib/yesno.c:
11953         Standardize inclusion of config.h.
11954         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11955         lib/inttostr.h:  Removed inclusion of config.h from header files.
11956         * lib/inttostr.c:  Adjusted in-tree users.
11957         * lib/timespec.h: Remove superfluous warning to include config.h.
11958         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11959         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11960         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11961         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11962         config.h with HAVE_CONFIG_H.
11963
11964 2005-09-19  Jim Meyering  <jim@meyering.net>
11965
11966         * modules/pathmax (License): Change to LGPL.
11967
11968 2005-09-19  Derek Price  <derek@ximbiot.com>
11969
11970         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11971
11972 2005-09-19  Bruno Haible  <bruno@clisp.org>
11973
11974         * gnulib-tool (import): Provide default for --tests-base.
11975
11976 2005-09-19  Bruno Haible  <bruno@clisp.org>
11977
11978         * doc/quote.texi: New file, extracted from gnulib.texi.
11979         * doc/ctime.texi: New file, extracted from gnulib.texi.
11980         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11981         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11982         * doc/gnulib.texi: Include them.
11983
11984 2005-09-18  Bruno Haible  <bruno@clisp.org>
11985
11986         Portability fix.
11987         * gnulib-tool (func_readlink): New function.
11988         (func_ln_if_changed): Use it.
11989
11990 2005-09-18  Bruno Haible  <bruno@clisp.org>
11991
11992         * gnulib-tool: Support --with-tests also with --import.
11993         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11994         (func_import): Use variables $testsbase and $inctests. Emit a
11995         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11996         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11997         SUBDIRS += $testsdir.
11998         (func_create_testdir): Update.
11999
12000 2005-09-18  Bruno Haible  <bruno@clisp.org>
12001
12002         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12003         instead of $dry_run.
12004         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12005         (func_ln_if_changed): Don't handle dry-run here.
12006         (func_import): In dry-run mode, detect more precisely which actions
12007         would be performed, and don't use "...ing" verbs.
12008
12009 2005-09-18  Bruno Haible  <bruno@clisp.org>
12010
12011         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12012         (func_import): Use join on two temporary files instead of three nested
12013         loops, in order to determine which files are new or old.
12014
12015 2005-09-18  Bruno Haible  <bruno@clisp.org>
12016
12017         * gnulib-tool (func_import): Comment out code that spits out the
12018         new files with --dry-run.
12019
12020 2005-09-18  Bruno Haible  <bruno@clisp.org>
12021
12022         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12023
12024 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12025
12026         * lib/stat-time.h: New file.
12027         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12028         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12029         in a different way.
12030         (timespec_cmp): New function.
12031         * lib/utimecmp.c: Include stat-time.h.
12032         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12033         members exist, not on the obsolescent ST_MTIM_NSEC.
12034         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12035
12036 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12037
12038         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12039
12040 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12041
12042         * MODULES.html.sh (File system functions): Add stat-time.
12043         * modules/stat-time: New file.
12044         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12045         is now done in a different way, by the stat-time module.
12046         * modules/utimecmp (Depends-on): Add stat-time.
12047
12048 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12049
12050         * m4/st_mtim.m4: Remove.  Superseded by...
12051         * m4/stat-time.m4: New file.
12052         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12053         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12054
12055 2005-09-15  Derek Price  <derek@ximbiot.com>
12056
12057         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12058
12059 2005-09-15  Derek Price  <derek@ximbiot.com>
12060
12061         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12062         * lib/regex_internal.c: Ditto, using this...
12063         (__GNUC_PREREQ): ...new macro.
12064         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12065         using...
12066         (__GNUC_PREREQ): ...this new macro.
12067
12068         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12069
12070 2005-09-15  Derek Price  <derek@ximbiot.com>
12071             Paul Eggert  <eggert@cs.ucla.edu>
12072
12073         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12074         changes, consolidating in...
12075         * lib/regex_internal.h: ...this file.
12076
12077 2005-09-13  Jim Meyering  <jim@meyering.net>
12078
12079         * lib/canon-host.c: Filter through gnu indent and reword comments
12080         slightly.
12081         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12082
12083 2005-09-13  Derek Price  <derek@ximbiot.com>
12084
12085         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12086         failure.
12087         Reported by Jim Meyering  <jim@meyering.net>.
12088
12089 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12090
12091         * lib/base64.c: Typo.
12092         (base64_encode): Put b64str in initialized data section.
12093
12094 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12095
12096         Merge glibc and coreutils changes into gnulib, plus a few
12097         extra fixes.
12098         * lib/md5.c: Use #error rather than a string.
12099         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12100         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12101         (__attribute__): Define to empty for non recent-GCC.
12102         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12103         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12104         Renamed from their non-__ counterparts, with new macros replacing
12105         them if not _LIBC.  Add __THROW attribute.
12106         (rol): Remove.
12107         (struct md5_ctx): Align buffer if using GCC.
12108         * lib/sha1.h (struct sha1_ctx): Likewise.
12109         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12110         The old name was backwards.
12111         (NOTSWAP): Remove; not used.
12112         (rol): New macro, moved here from md5.h.
12113         (sha1_process_block): Remove a FIXME that doesn't make sense.
12114
12115 2005-09-12  Derek Price  <derek@ximbiot.com>
12116
12117         Return usable errors from canon-host.
12118         * lib/canon-host.h: New file.
12119         * lib/canon-host.c (canon_host): Wrap...
12120         (canon_host_r): ...this new function, which now relies exclusively on
12121         getaddrinfo.
12122         (ch_strerror): New function.
12123         (last_cherror): New global.
12124         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12125         interface.
12126         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12127         void *.
12128         (freeaddrinfo): Free ai->ai_canonname when set.
12129
12130 2005-09-12  Derek Price  <derek@ximbiot.com>
12131
12132         Make canon-host require getaddrinfo.
12133         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12134         AC_LIBSOURCE canon-host.h.  Call...
12135         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12136         gl_GETADDRINFO.
12137         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12138
12139 2005-09-12  Derek Price  <derek@ximbiot.com>
12140
12141         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12142         LGPL.
12143         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12144
12145 2005-09-12  Derek Price  <derek@ximbiot.com>
12146
12147         * lib/gai_strerror.c: Include config.h when available.  Include
12148         getaddrinfo.h before other headers to test interface.
12149         Reported by Larry Jones <lawrence.jones@ugs.com>.
12150
12151 2005-09-12  Derek Price  <derek@ximbiot.com>
12152             Paul Eggert  <eggert@cs.ucla.edu>
12153
12154         * modules/glob (Files): Add glob-libc.h.
12155
12156 2005-09-12  Derek Price  <derek@ximbiot.com>
12157             Paul Eggert  <eggert@cs.ucla.edu>
12158
12159         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12160         glob_.h, glob-libc.h.
12161         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12162
12163 2005-09-12  Derek Price  <derek@ximbiot.com>
12164             Paul Eggert  <eggert@cs.ucla.edu>
12165
12166         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12167         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12168         protecting things that should be done only in gnulib contexts.
12169         * lib/glob_.h: New file, containing only the glob things needed for
12170         gnulib.
12171         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12172         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12173         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12174         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12175         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12176         and to respect the namespace rules better.
12177
12178 2005-09-08  Simon Josefsson  <jas@extundo.com>
12179
12180         * modules/socklen: New file.
12181
12182 2005-09-08  Simon Josefsson  <jas@extundo.com>
12183
12184         * m4/socklen.m4: New file.
12185
12186 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12187
12188         * modules/utimens (Files): Add m4/utimbuf.m4, since
12189         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12190         Reported by Sergey Poznyakoff.
12191
12192 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12193
12194         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12195         definitions, since that's the preferred style in glibc.
12196         Fix a minor spacing issue, and update copyright notice to match
12197         glibc's.
12198
12199 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12200
12201         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12202
12203 2005-09-06  Simon Josefsson  <jas@extundo.com>
12204
12205         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12206         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12207
12208 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12209
12210         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12211         warning.
12212
12213 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12214
12215         * config/srclist.txt: Add glibc bug 1302.
12216
12217 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12218
12219         Change bitset word type from unsigned int to unsigned long int,
12220         as this has better performance on typical 64-bit hosts.
12221         Port bitset code to hosts with unusual word sizes.
12222         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12223         (build_collating_symbol):
12224         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12225         argument is a bitset.  This is merely a style issue, but it makes
12226         it clearer that an entire array is expected.
12227         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12228         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12229         Port to the case where bitset_word is not the same as unsigned int.
12230         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12231         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12232         Likewise.
12233         * lib/regexec.c (check_dst_limits_calc_pos_1,
12234         check_subexp_matching_top):
12235         (build_trtable, group_nodes_into_DFAstates):
12236         Likewise.
12237         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12238         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12239         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12240         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12241         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12242         * lib/regcomp.c (optimize_subexps, lower_subexp):
12243         Work even if bitset_word has holes in its bitwise representation.
12244         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12245         * lib/regexec.c (check_dst_limits_calc_pos_1,
12246         check_subexp_matching_top):
12247         Likewise.
12248         * lib/regex_internal.c (re_string_reconstruct):
12249         Don't assume UCHAR_MAX == 255.
12250         * lib/regex_internal.h (bitset_set_all): Likewise.
12251         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12252         All uses changed.
12253         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12254         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12255         All uses changed.
12256         (BITSET_WORD_MAX): New macro.
12257         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12258         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12259         (bitset_empty, bitset_copy):
12260         Prefer sizeof (bitset) to multiplying it out ourselves.
12261         (bitset_not_merge): Remove; unused.
12262         (bitset_contain): Return bool, not unsigned int with one bit on.
12263         All callers changed.
12264         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12265         alignment than re_node_set; do this by defining a new internal
12266         type struct dests_alloc and using it to allocate memory.
12267
12268 2005-09-05  Bruno Haible  <bruno@clisp.org>
12269
12270         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12271         links.
12272
12273 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12274
12275         * modules/size_max (Makefile.am): Add size_max.h
12276
12277 2005-09-04  Derek Price  <derek@ximbiot.com>
12278
12279         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12280
12281 2005-09-03  Simon Josefsson  <jas@extundo.com>
12282
12283         * gnulib-tool: Fix typo.
12284
12285 2005-09-03  Simon Josefsson  <jas@extundo.com>
12286
12287         * config/srclist.txt: Add glibc bug 1293.
12288
12289 2005-09-03  Derek Price  <derek@ximbiot.com>
12290
12291         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12292         From Larry Jones <lawrence.jones@ugs.com>.
12293
12294 2005-09-02  Simon Josefsson  <jas@extundo.com>
12295
12296         * modules/socklen: New file.
12297
12298 2005-09-02  Simon Josefsson  <jas@extundo.com>
12299
12300         * modules/havelib: New module.
12301
12302         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12303         Use havelib.
12304
12305 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12306
12307         Check for arithmetic overflow when calculating sizes, to prevent
12308         some buffer-overflow issues.  These patches are conservative, in the
12309         sense that when I couldn't determine whether an overflow was possible,
12310         I inserted a run-time check.
12311         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12312         macros.
12313         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12314         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12315         (re_xnrealloc, re_x2nrealloc): New inline functions.
12316         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12317         parse_bracket_exp):
12318         (build_equiv_class, build_charclass): Check for arithmetic overflow
12319         in size expression calculations.
12320         * lib/regex_internal.c (re_string_realloc_buffers):
12321         (build_wcs_upper_buffer, re_node_set_add_intersect):
12322         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12323         (re_dfa_add_node, register_state): Likewise.
12324         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12325         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12326         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12327         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12328
12329 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12330
12331         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12332         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12333
12334 2005-09-02  Bruno Haible  <bruno@clisp.org>
12335
12336         Support for lib vs. lib64 distinction on biarch platforms.
12337         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12338         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12339         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12340
12341 2005-09-02  Bruno Haible  <bruno@clisp.org>
12342
12343         * gnulib-tool (import): In the other first-use case, provide defaults
12344         as well.
12345
12346 2005-09-02  Bruno Haible  <bruno@clisp.org>
12347
12348         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12349         patches not yet found in the latest gettext release.
12350
12351 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12352
12353         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12354         to avoid a collision with bits/local_lim.h in glibc.
12355         All uses changed.  Problem reported by Dmitry V. Levin in
12356         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12357
12358         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12359         bugs in int versus size_t comparisons.
12360         (re_string_context_at): Fix bug where the code assumed that
12361         Idx is signed.
12362
12363         Use bool where appropriate.
12364         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12365         All callers changed.
12366         (calc_eclosure_iter): Likewise, for ROOT arg.
12367         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12368         (build_charclass_op): Likewise, for NON_MATCH arg.
12369         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12370         (re_string_construct_common): Likewise, for ICASE arg.
12371         * lib/regexec.c (re_search_2_stub, re_search_stub):
12372         Likewise, for RET_LEN arg.
12373         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12374         (set_regs): Likewise, for FL_BACKTRACK arg.
12375         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12376         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12377         (calc_eclosure_iter, parse_bracket_exp):
12378         Use bool for internal variables that are booleans.
12379         * lib/regexec.c (re_search_internal, check_matching,
12380         proceed_next_node):
12381         (set_regs, build_sifted_states, sift_states_bkref):
12382         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12383         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12384         (find_collation_sequence_value):
12385         Likewise.
12386         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12387         (re_node_set_compare):
12388         Return bool, not int. All callers changed.
12389         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12390         (build_trtable, check_node_accept): Likewise.
12391         * lib/regex_internal.h: Include stdbool.h.
12392
12393         Fix bugs uncovered when converting to bool.
12394         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12395         failure instead of charging ahead blindly.
12396         * lib/regex_internal.c (register_state): Likewise.
12397         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12398         for freeing internal storage.
12399         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12400         bitset pieces used as boolean, to avoid undefined behavior
12401         on hosts that do int overflow checking.
12402
12403 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12404
12405         * config/srclist.txt: Add glibc bugs 1285-1287.
12406
12407 2005-09-01  Jim Meyering  <jim@meyering.net>
12408
12409         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12410         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12411         Require gl_STAT_MACROS, too.
12412
12413 2005-09-01  Bruno Haible  <bruno@clisp.org>
12414
12415         * gnulib-tool (import): In the first-use case, provide defaults.
12416
12417 2005-09-01  Bruno Haible  <bruno@clisp.org>
12418
12419         * gnulib-tool (func_import): Remove the .tmp files.
12420
12421 2005-09-01  Bruno Haible  <bruno@clisp.org>
12422
12423         * gnulib-tool (func_import): Fix handling of symbolic links.
12424
12425 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12426
12427         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12428         old glibc regex code mishandles strings longer than 2**31 bytes.
12429         This patch fixes this when the regex code is used in gnulib
12430         (i.e., outside glibc).
12431
12432         This patch should not affect the use of the regex code inside
12433         glibc.  No doubt this problem also needs to be handled for glibc
12434         as well, but the result will be an incompatible change to the
12435         glibc ABI, and the old ABI will have to be supported too.  That
12436         can be the the subject for another patch.
12437
12438         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12439         governing whether the rest of this patch is active.  By default,
12440         the macro is disabled and the patch has no effect.
12441         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12442         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12443         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12444         (re_match_2, re_set_registers): Use the new types.
12445         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12446         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12447         New macros.
12448         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12449         (re_string_context_at, bin_tree_t, re_dfastate_t):
12450         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12451         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12452         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12453         (re_string_char_size_at, re_string_wchar_at):
12454         (re_string_elem_size_at):
12455         Use the new types and macros to port to 64-bit hosts.
12456         Use unsigned types for internal values, so that the code
12457         mostly works even for arrays larger than SSIZE_MAX.
12458         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12459         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12460         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12461         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12462         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12463         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12464         (calc_inveclosure, parse_dup_op, build_range_exp):
12465         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12466         (fetch_number, create_token_tree, mark_opt_subexp):
12467         Likewise.
12468         * lib/regex_internal.c (re_string_construct_common,
12469         create_ci_newstate):
12470         (create_cd_newstate, re_string_allocate, re_string_construct):
12471         (re_string_realloc_buffers, build_wcs_upper_buffer):
12472         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12473         (re_string_reconstruct, re_string_peek_byte_case):
12474         (re_string_fetch_byte_case, re_string_context_at):
12475         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12476         (re_node_set_init_copy, re_node_set_add_intersect):
12477         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12478         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12479         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12480         (re_acquire_state, re_acquire_state_context, register_state):
12481         Likewise.
12482         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12483         search_cur_bkref_entry):
12484         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12485         (re_search_internal, re_search_2_stub, re_search_stub)
12486         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12487         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12488         (update_cur_sifted_state, check_dst_limits):
12489         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12490         (check_subexp_limits, sift_states_bkref, merge_state_array):
12491         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12492         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12493         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12494         (expand_bkref_cache, check_node_accept_bytes):
12495         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12496         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12497         (acquire_init_state_context, check_halt_node_context):
12498         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12499         (sift_states_backward, clean_state_log_if_needed):
12500         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12501         (find_recover_state, transit_state_sb, transit_state_mb):
12502         (transit_state_bkref, build_trtable, match_ctx_clean):
12503         Likewise.
12504         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12505         to work around an assumption that REG_MISSING is negative.
12506
12507         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12508         (seek_collating_symbol_entry) [defined _LIBC]:
12509         (lookup_collation_sequence_value) [defined _LIBC]:
12510         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12511         Use prototypes rather than old-style function definitions.
12512         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12513         (transit_state_sb) [0]:
12514         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12515
12516         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12517         rm_eo.
12518
12519         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12520         (optimize_subexps, lower_subexp):
12521         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12522         since the signed shift might overflow.  Use 1u<<31 instead.
12523         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12524         Likewise.
12525         * lib/regexec.c (check_dst_limits_calc_pos_1,
12526         check_subexp_matching_top): Likewise.
12527
12528         * lib/regcomp.c (optimize_subexps, lower_subexp):
12529         Use CHAR_BIT rather than 8, for clarity.
12530         * lib/regexec.c (check_dst_limits_calc_pos_1):
12531         (check_subexp_matching_top): Likewise.
12532         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12533         have to worry about portability issues when shifting it left.
12534         Remove no-longer-needed test for table_size > 0.
12535         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12536         in a word, as the resulting behavior is undefined.
12537         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12538         in one case, a <= should have been an <, and in another case the
12539         whole test was missing.
12540         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12541         the standard name CHAR_BIT.
12542         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12543         this is not true on one's complement and signed-magnitude hosts.
12544
12545         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12546         next_last_offset.
12547         (struct re_dfa_t): Remove unused member states_alloc.
12548         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12549
12550 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12551
12552         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12553         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12554         and large-file glibc and in 32-bit large-file Solaris.
12555
12556 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12557
12558         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12559         lengths fit in regoff_t; this isn't true if regoff_t is the same
12560         width as size_t.
12561         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12562         (= START + RANGE) instead of RANGE.  This avoids overflow
12563         problems when regoff_t is the same width as size_t.
12564         All callers changed.
12565         (re_search_2_stub): Check for overflow when adding the
12566         sizes of the two strings.
12567         (re_search_stub): Check for overflow when adding START
12568         to RANGE; if it occurs, substitute the extreme value.
12569
12570 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12571
12572         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12573
12574 2005-08-31  Jim Meyering  <jim@meyering.net>
12575
12576         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12577         a pointer-to-const.
12578         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12579         (register_state): Likewise.
12580         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12581         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12582         (group_nodes_into_DFAstates): Likewise.
12583
12584 2005-08-31  Jim Meyering  <jim@meyering.net>
12585
12586         * check-module: Add a FIXME comment.
12587
12588 2005-08-31  Eric Blake  <ebb9@byu.net>
12589
12590         * modules/unistd-safer (Files): Add unistd--.h.
12591         * modules/stdio-safer (Files): Add stdio--.h.
12592
12593 2005-08-31  Derek Price  <derek@ximbiot.com>
12594
12595         * lib/getdelim.c (getdelim): Return EOF on EOF.
12596         Reported by Larry Jones <lawrence.jones@ugs.com>.
12597
12598 2005-08-31  Bruno Haible  <bruno@clisp.org>
12599
12600         Avoid unnecessary diffs in the generated lib/Makefile.am.
12601         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12602         the generated files.
12603         (func_import): Don't set cmd.
12604
12605 2005-08-31  Bruno Haible  <bruno@clisp.org>
12606
12607         * lib/strstr.c: Include <stddef.h>, for NULL.
12608         * lib/strcasestr.c: Likewise.
12609         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12610
12611 2005-08-31  Bruno Haible  <bruno@clisp.org>
12612
12613         * gnulib-tool: New option --macro-prefix.
12614         (func_import): Use macro_prefix.
12615         (import): Handle option --macro-prefix.
12616
12617 2005-08-31  Bruno Haible  <bruno@clisp.org>
12618
12619         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12620         Also use new variables cached_lgpl, cached_libtool.
12621
12622 2005-08-31  Bruno Haible  <bruno@clisp.org>
12623
12624         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12625         always instantiating them.
12626
12627 2005-08-31  Bruno Haible  <bruno@clisp.org>
12628
12629         * gnulib-tool (func_import): Read the previous cached settings
12630         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12631         earlier added by gnulib but are now dropped. Warn when a gnulib file
12632         overwrites a non-gnulib file.
12633
12634 2005-08-31  Bruno Haible  <bruno@clisp.org>
12635
12636         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12637         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12638         projects that don't keep autogenerated files in CVS. Put into
12639         actioncmd only the specified modules, not the transitive closure.
12640
12641 2005-08-31  Bruno Haible  <bruno@clisp.org>
12642
12643         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12644         Create directories that shall be filled.
12645         (import): Don't look for gl_* macros in configure.ac. Recurse across
12646         all directories containing a gnulib-cache.m4 files, if meaningful.
12647
12648 2005-08-31  Bruno Haible  <bruno@clisp.org>
12649
12650         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12651         (import): Set seen_libtool when we see gl_LIBTOOL.
12652
12653 2005-08-31  Bruno Haible  <bruno@clisp.org>
12654
12655         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12656         declaration macro definitions from generated gnulib.m4.
12657
12658 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12659
12660         * lib/iconvme.h: Add prototype for iconv_alloc.
12661
12662 2005-08-29  Simon Josefsson  <jas@extundo.com>
12663
12664         * lib/iconvme.c: Fix errno.
12665
12666 2005-08-29  Bruno Haible  <bruno@clisp.org>
12667
12668         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12669         that it works when the directory contains spaces.
12670
12671 2005-08-29  Bruno Haible  <bruno@clisp.org>
12672
12673         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12674
12675 2005-08-29  Bruno Haible  <bruno@clisp.org>
12676
12677         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12678         Emit more advice.
12679
12680 2005-08-29  Bruno Haible  <bruno@clisp.org>
12681         and Stepan Kasal  <kasal@ucw.cz>
12682
12683         * check-module: If more parameters are given, check each of them
12684         separately; add more exceptions, as noted by Jim Meyering.
12685         (check_module): New procedure.
12686         (%exempt_header): Now contains all exceptions.
12687
12688 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12689
12690         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12691
12692 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12693
12694         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12695
12696 2005-08-28  Bruno Haible  <bruno@clisp.org>
12697
12698         * m4/gnulib-tool.m4: New file.
12699
12700 2005-08-27  Jim Meyering  <jim@meyering.net>
12701
12702         * modules/unistd-safer (Files): Add pipe-safer.c.
12703         * modules/fcntl-safer (Files): Add creat-safer.c.
12704
12705 2005-08-27  Jim Meyering  <jim@meyering.net>
12706
12707         * m4/stdlib-safer.m4: New file.  From coreutils.
12708         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12709         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12710         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12711         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12712         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12713
12714 2005-08-27  Jim Meyering  <jim@meyering.net>
12715
12716         * lib/fopen-safer.c: Merge minor changes from coreutils.
12717         * lib/dup-safer.c: Likewise.
12718         * lib/fd-safer.c: Likewise.
12719
12720         Merge from coreutils.
12721         * lib/stdio--.h: New file.
12722         * lib/stdlib--.h: New file.
12723         * lib/mkstemp-safer.c: New file.
12724
12725         GNU tar needs these.
12726         * lib/pipe-safer.c: New file.
12727         * lib/creat-safer.c: New file.
12728         * lib/fcntl--.h (creat): Define to creat_safer.
12729         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12730         * lib/unistd--.h (pipe): Define to pipe_safer.
12731         * lib/unistd-safer.h: Declare pipe_safer.
12732
12733 2005-08-26  Simon Josefsson  <jas@extundo.com>
12734
12735         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12736         Haible <bruno@clisp.org>.
12737
12738 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12739
12740         * lib/regex_internal.h: Remove all references to
12741         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12742         or better.
12743         (bitset_not, bitset_merge, bitset_not_merge):
12744         (bitset_mask, re_string_allocate, re_string_construct):
12745         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12746         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12747         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12748         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12749         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12750         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12751         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12752         (re_acquire_state_context):
12753         Remove unnecessary forward decls.
12754         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12755         Put __attribute at function definition,
12756         now that the function decl has been removed.
12757         * lib/regex_internal.c (re_string_peek_byte_case):
12758         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12759         Likewise.
12760
12761 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12762
12763         * m4/regex.m4: Add AC_PREREQ(2.50).
12764         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12765
12766 2005-08-25  Simon Josefsson  <jas@extundo.com>
12767
12768         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12769         __fsetlocking.
12770
12771 2005-08-25  Simon Josefsson  <jas@extundo.com>
12772
12773         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12774         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12775         GLIBC specific code.
12776
12777 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12778
12779         Make regex safe for g++.  This fixes one real bug (an "err"
12780         that should have been "*err").  g++ problem reported by
12781         Sam Steingold.
12782         * lib/regex_internal.h (re_calloc): New macro, consistent with
12783         re_malloc etc.  All callers of calloc changed to use re_calloc.
12784         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12785         not int.  All callers changed.
12786         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12787         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12788         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12789         (find_recover_state): Change "err" to "*err"; this fixes what
12790         appears to be a real bug.
12791         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12792         versus int.
12793
12794 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12795
12796         * modules/regex (Depends-on): Add malloc, since the code
12797         assumes that !malloc(0) means failure.
12798
12799 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12800
12801         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12802
12803         alloca modernization/simplification for regex.
12804         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12805         needs to be at the start of the file, and can be moved into
12806         regex_internal.h and simplified.
12807         * lib/regex_internal.h: Include <alloca.h>.
12808         (__libc_use_alloca) [!defined _LIBC]: New macro.
12809         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12810         now works outside glibc.
12811
12812 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12813
12814         * config/srclist.txt: Add glibc bugs 1241, 1245.
12815
12816 2005-08-25  Jim Meyering  <jim@meyering.net>
12817
12818         * lib/open-safer.c: Include <config.h>.
12819         Otherwise, we'd lose LARGEFILE support in any file using
12820         e.g. "fcntl--.h"
12821
12822 2005-08-25  Bruno Haible  <bruno@clisp.org>
12823
12824         * m4/minmax.m4: Require autoconf 2.52.
12825         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12826         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12827         alternatives of translit over the alphabet.
12828         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12829
12830 2005-08-24  Simon Josefsson  <jas@extundo.com>
12831
12832         * tests/test-getpass.c: New file.
12833
12834 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12835
12836         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12837         for GNU regex features.
12838
12839 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12840
12841         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12842         * lib/regex.h (regerror): Likewise.
12843
12844         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12845         requires this.  (The code never needed it.)
12846
12847         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12848         All uses of recently-renamed identifiers changed to use the new,
12849         POSIX-compliant names.  The code will build and run just fine
12850         without these changes, but it's better to eat our own dog food
12851         and use the standard-conforming names.
12852
12853         * lib/regex.h: Fix a multitude of POSIX name space violations.
12854         These changes have an effect only for programs that define
12855         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12856         do not change anything for programs compiled in the normal way.
12857         Also, there is no effect on the ABI.
12858
12859         (_REGEX_SOURCE): New macro.
12860         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12861         defined and _GNU_SOURCE is not; this fixes a name space violation.
12862
12863         Rename the following macros to obey POSIX requirements.
12864         The old names are still visible as macros if _REGEX_SOURCE is defined.
12865         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12866         RE_BACKSLASH_ESCAPE_IN_LISTS.
12867         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12868         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12869         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12870         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12871         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12872         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12873         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12874         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12875         (REG_INTERVALS): renamed from RE_INTERVALS.
12876         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12877         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12878         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12879         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12880         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12881         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12882         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12883         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12884         RE_UNMATCHED_RIGHT_PAREN_ORD.
12885         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12886         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12887         (REG_DEBUG): renamed from RE_DEBUG.
12888         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12889         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12890         unusual, since we can't clash with the POSIX REG_ICASE.
12891         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12892         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12893         (REG_NO_SUB): renamed from RE_NO_SUB.
12894         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12895         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12896         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12897         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12898         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12899         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12900         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12901         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12902         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12903         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12904         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12905         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12906         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12907         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12908         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12909         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12910         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12911         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12912         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12913         (REG_FIXED): Renamed from REGS_FIXED.
12914         (REG_NREGS): Renamed from RE_NREGS.
12915
12916         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12917         of other REG_* macros, since POSIX says the user is allowed to
12918         #undef these macros selectively.
12919
12920         (reg_errcode_t): Update comment stating what other tables need
12921         to be consistent.
12922
12923         Rename the following enum values to obey POSIX requirements.
12924         The old names are still visible as macros.
12925         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12926         is not defined, since GNU is supposed to be a superset of POSIX as
12927         much as possible, and since we want reg_errcode_t to be a signed
12928         type for implementation consistency.
12929         (_REG_NOERROR): Renamed from REG_NOERROR.
12930         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12931         (_REG_BADPAT): Renamed from REG_BADPAT.
12932         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12933         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12934         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12935         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12936         (_REG_EBRACK): Renamed from REG_EBRACK.
12937         (_REG_EPAREN): Renamed from REG_EPAREN.
12938         (_REG_EBRACE): Renamed from REG_EBRACE.
12939         (_REG_BADBR): Renamed from REG_BADBR.
12940         (_REG_ERANGE): Renamed from REG_ERANGE.
12941         (_REG_ESPACE): Renamed from REG_ESPACE.
12942         (_REG_BADRPT): Renamed from REG_BADRPT.
12943         (_REG_EEND): Renamed from REG_EEND.
12944         (_REG_ESIZE): Renamed from REG_ESIZE.
12945         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12946         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12947         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12948         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12949         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12950
12951         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12952         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12953         changed.  But support the old name if the new one is not defined
12954         and if _REGEX_SOURCE.
12955
12956         Change the following member names in struct re_pattern_buffer.
12957         The old names are still supported if !_REGEX_SOURCE.
12958         The new names are always supported, regardless of _REGEX_SOURCE.
12959         (re_buffer): Renamed from buffer.
12960         (re_allocated): Renamed from allocated.
12961         (re_used): Renamed from used.
12962         (re_syntax): Renamed from syntax.
12963         (re_fastmap): Renamed from fastmap.
12964         (re_translate): Renamed from translate.
12965         (re_can_be_null): Renamed from can_be_null.
12966         (re_regs_allocated): Renamed from regs_allocated.
12967         (re_fastmap_accurate): Renamed from fastmap_accurate.
12968         (re_no_sub): Renamed from no_sub.
12969         (re_not_bol): Renamed from not_bol.
12970         (re_not_eol): Renamed from not_eol.
12971         (re_newline_anchor): Renamed from newline_anchor.
12972
12973         Change the following member names in struct re_registers.
12974         The old names are still supported if !_REGEX_SOURCE.
12975         The new names are always supported, regardless of _REGEX_SOURCE.
12976         (rm_num_regs): Renamed from num_regs.
12977         (rm_start): Renamed from start.
12978         (rm_end): Renamed from end.
12979
12980         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12981         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12982         Prepend __ to parameter names.
12983
12984         Undo yesterday's changes.
12985
12986 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12987
12988         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12989         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12990         lib/regex.c.
12991
12992 2005-08-24  Jim Meyering  <jim@meyering.net>
12993
12994         Sync from coreutils.
12995         * m4/fcntl-safer.m4: New file.
12996
12997         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12998         and object files for this module.
12999
13000 2005-08-24  Jim Meyering  <jim@meyering.net>
13001
13002         Sync from coreutils.
13003         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13004
13005 2005-08-24  Jim Meyering  <jim@meyering.net>
13006
13007         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13008         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13009
13010 2005-08-24  Jim Meyering  <jim@meyering.net>
13011
13012         * modules/fcntl-safer: New module.
13013         * modules/fts (Depends-on): Add fcntl-safer.
13014         * MODULES.html.sh (File descriptor based Input/Output):
13015         Add fcntl-safer.
13016
13017 2005-08-24  Bruno Haible  <bruno@clisp.org>
13018
13019         Support for unit test modules.
13020         * modules/README: Mention tests modules.
13021         * modules/TEMPLATE-TESTS: New file.
13022         * gnulib-tool: New options --extract-tests-module, --with-tests and
13023         --tests-base (unused for the moment).
13024         (testsbase, inctests): New variables.
13025         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13026         (func_verify_module): Exclude TEMPLATE-TESTS.
13027         (func_verify_nontests_module, func_verify_tests_module): New functions.
13028         (func_get_dependencies): Add implicit dependency for tests modules.
13029         (func_get_tests_module): New function.
13030         (func_modules_transitive_closure): When --with-tests was specified,
13031         include the unit tests as well, unless explicitly avoided.
13032         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13033         (func_emit_tests_Makefile_am): New function.
13034         (func_create_testdir): When --with-tests was specified, emit a
13035         tests/ directory.
13036         * MODULES.html.sh (Future developments): Update.
13037
13038 2005-08-24  Bruno Haible  <bruno@clisp.org>
13039
13040         * modules/tls-tests: New file.
13041         * tests/test-tls.c: New file, from GNU gettext.
13042
13043 2005-08-24  Bruno Haible  <bruno@clisp.org>
13044
13045         * modules/lock-tests: New file.
13046         * tests/test-lock.c: New file, from GNU gettext.
13047
13048 2005-08-24  Bruno Haible  <bruno@clisp.org>
13049
13050         * lib/lock.h: Add multiple inclusion guard.
13051         * lib/tls.h: Add multiple inclusion guard.
13052
13053 2005-08-24  Bruno Haible  <bruno@clisp.org>
13054
13055         * gnulib-tool: Add support for the --aux-dir option to
13056         --create-testdir, --create-megatestdir, --test, --megatest.
13057         (func_create_testdir, func_create_megatestdir): Optionally emit a
13058         AC_CONFIG_AUX_DIR directive.
13059         (create-testdir, create-megatestdir, test, megatest): Provide a
13060         default value for $auxdir.
13061
13062 2005-08-24  Bruno Haible  <bruno@clisp.org>
13063
13064         * gnulib-tool (import): Use compound statement instead of subshell
13065         where possible.
13066
13067 2005-08-24  Bruno Haible  <bruno@clisp.org>
13068
13069         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13070
13071 2005-08-24  Bruno Haible  <bruno@clisp.org>
13072
13073         * gnulib-tool (func_version): Update.
13074
13075 2005-08-24  Bruno Haible  <bruno@clisp.org>
13076
13077         * gnulib-tool (func_import, func_create_testdir,
13078         func_create_megatestdir): Quote all autoconf macro arguments.
13079
13080 2005-08-24  Bruno Haible  <bruno@clisp.org>
13081
13082         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13083         option --force, because --force causes the aclocal.m4 of each
13084         subdirectory to be newer than the corresponding config.h.in.
13085
13086 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13089         All contents moved to gl_REGEX.
13090         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13091         assume that it does.
13092
13093 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13094
13095         * lib/regex.h (REG_NOSYS)
13096         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13097         Define, since POSIX requires it as of 2001.
13098         (_REG_ENOSYS)
13099         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13100         New private symbol, used to keep the enum signed in all cases.
13101         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13102         Youngman in
13103         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13104
13105         * lib/regex_internal.c (re_string_skip_chars, register_state):
13106         (calc_state_hash):
13107         Remove forward decls; no longer needed now that we use prototypes.
13108         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13109         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13110         (clean_state_log_if_needed): Likewise.
13111
13112 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13113
13114         * config/srclist.txt: Add glibc bugs 1231-1233.
13115
13116 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13117
13118         Fix problems reported by Sam Steingold in
13119         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13120         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13121         assumed that reg_errcode_t is a signed type, which is not
13122         necessarily true if _XOPEN_SOURCE is not defined.
13123         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13124         since some compilers warn about it otherwise.
13125
13126 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13127
13128         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13129         (init_word_char, create_initial_state, duplicate_node_closure):
13130         (fetch_token, peek_token_bracket, build_range_exp):
13131         (build_collating_symbol): Remove forward decls; no longer needed
13132         now that we use prototypes.
13133
13134         * lib/regcomp.c:
13135         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13136         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13137         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13138         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13139         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13140         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13141         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13142         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13143         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13144         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13145         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13146         (build_charclass, build_charclass_op, fetch_number, create_tree):
13147         (create_token_tree, mark_opt_subexp, duplicate_tree):
13148         Use prototypes rather than old-style definitions.
13149
13150         * lib/regex_internal.c:
13151         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13152         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13153         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13154         (re_string_reconstruct, re_string_peek_byte_case):
13155         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13156         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13157         (re_node_set_init_copy, re_node_set_add_intersect):
13158         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13159         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13160         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13161         (re_acquire_state, re_acquire_state_context, register_state):
13162         (create_ci_newstate, create_cd_newstate, free_state):
13163         Likewise.
13164         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13165         re_search_2):
13166         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13167         (re_search_internal, prune_impossible_nodes):
13168         (acquire_init_state_context, check_matching, static):
13169         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13170         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13171         (update_regs, sift_states_backward, build_sifted_states):
13172         (clean_state_log_if_needed, merge_state_array):
13173         (update_cur_sifted_state, add_epsilon_src_nodes):
13174         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13175         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13176         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13177         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13178         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13179         (check_arrival, check_arrival_add_next_nodes):
13180         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13181         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13182         (check_node_accept_bytes, check_node_accept, extend_buffers):
13183         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13184         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13185         (sift_ctx_init):
13186         Likewise.
13187
13188         * lib/regex_internal.h:
13189         (re_string_allocate, re_string_construct, re_string_reconstruct):
13190         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13191         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13192         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13193         (re_string_context_at, re_string_peek_byte_case):
13194         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13195         is defined, since we now use prototypes always.
13196
13197         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13198         C89 or better.  All uses removed.
13199
13200 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13201
13202         * config/srclist.txt: Add glibc bugs 1220-1227.
13203
13204 2005-08-20  Jim Meyering  <jim@meyering.net>
13205
13206         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13207         of unused local, dfa.
13208
13209 2005-08-20  Bruno Haible  <bruno@clisp.org>
13210
13211         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13212
13213 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13214
13215         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13216         (re_node_set_insert_last, re_dfa_add_node):
13217         Rename local variables to avoid GCC shadowing warnings.
13218
13219 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13220
13221         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13222         [defined lint]: Suppress bogus uninitialized-variable warnings.
13223
13224         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13225         and let the caller return REG_ESPACE if out of space.  This
13226         removes an uninitialied-variable warning with GCC 4.0.1, and also
13227         avoids taking the address of a local variable.  All callers
13228         changed.
13229
13230 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13231
13232         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13233         $LIBCSRC/posix/regexec.c.
13234         Add glibc bug 1217 for regcomp.c.
13235
13236 2005-08-19  Jim Meyering  <jim@meyering.net>
13237
13238         * lib/regexec.c (proceed_next_node): Redo local variables to
13239         avoid GCC shadowing warnings.
13240
13241 2005-08-18  Bruno Haible  <bruno@clisp.org>
13242
13243         * lib/strstr.c (strstr): Fix return value in multibyte case.
13244         * lib/strcasestr.c (strcasestr): Likewise.
13245
13246 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13247
13248         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13249
13250 2005-08-17  Jim Meyering  <jim@meyering.net>
13251
13252         Make the %s format (seconds since the epoch) work for a negative
13253         number and when used with a zero-padded field width, e.g. %015s.
13254
13255         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13256         label so that it precedes the code to set `digits'.  Otherwise,
13257         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13258         print `00-22'.  Now, it prints `-0022', as it should.
13259
13260 2005-08-17  Bruno Haible  <bruno@clisp.org>
13261
13262         * modules/strstr (Files): Add m4/mbrtowc.m4.
13263         (Depends-on): Add mbuiter.
13264
13265 2005-08-17  Bruno Haible  <bruno@clisp.org>
13266
13267         * modules/strcasestr: New file.
13268         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13269         strcasestr.
13270
13271 2005-08-17  Bruno Haible  <bruno@clisp.org>
13272
13273         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13274
13275 2005-08-17  Bruno Haible  <bruno@clisp.org>
13276
13277         * modules/mbuiter: New file.
13278         * MODULES.html.sh (Extended multibyte and wide character utilities):
13279         Add mbuiter.
13280
13281 2005-08-17  Bruno Haible  <bruno@clisp.org>
13282
13283         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13284         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13285
13286 2005-08-17  Bruno Haible  <bruno@clisp.org>
13287
13288         * m4/strcasestr.m4: New file.
13289
13290 2005-08-17  Bruno Haible  <bruno@clisp.org>
13291
13292         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13293         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13294
13295 2005-08-17  Bruno Haible  <bruno@clisp.org>
13296
13297         * lib/strcasestr.h: New file.
13298         * lib/strcasestr.c: New file.
13299
13300 2005-08-17  Bruno Haible  <bruno@clisp.org>
13301
13302         * lib/strcasecmp.c: Use mbuiter.h.
13303
13304 2005-08-17  Bruno Haible  <bruno@clisp.org>
13305
13306         * lib/mbuiter.h: New file.
13307
13308 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13309
13310         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13311         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13312         and gl_GETOPT are both invoked via different paths (as happens
13313         with GNU tar CVS because it uses both argp and getopt), the former
13314         wins.
13315
13316 2005-08-16  Bruno Haible  <bruno@clisp.org>
13317
13318         * modules/tls: New file.
13319         * MODULES.html.sh (Multithreading): Add tls.
13320
13321 2005-08-16  Bruno Haible  <bruno@clisp.org>
13322
13323         * modules/strnlen1: New file.
13324         * MODULES.html.sh (String handling): Add strnlen1.
13325
13326 2005-08-16  Bruno Haible  <bruno@clisp.org>
13327
13328         * modules/strcase (Files): Add m4/mbrtowc.m4.
13329         (Depends-on): Add strnlen1, mbchar.
13330
13331 2005-08-16  Bruno Haible  <bruno@clisp.org>
13332
13333         * modules/mbiter: New file.
13334         * MODULES.html.sh (Extended multibyte and wide character utilities):
13335         Add mbiter.
13336
13337 2005-08-16  Bruno Haible  <bruno@clisp.org>
13338
13339         * modules/mbfile: New file.
13340         * MODULES.html.sh (Extended multibyte and wide character utilities):
13341         Add mbfile.
13342
13343 2005-08-16  Bruno Haible  <bruno@clisp.org>
13344
13345         * modules/mbchar: New file.
13346         * MODULES.html.sh (Extended multibyte and wide character utilities):
13347         New section.
13348
13349 2005-08-16  Bruno Haible  <bruno@clisp.org>
13350
13351         * m4/tls.m4: New file, from GNU gettext.
13352
13353 2005-08-16  Bruno Haible  <bruno@clisp.org>
13354
13355         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13356         always.
13357         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13358
13359 2005-08-16  Bruno Haible  <bruno@clisp.org>
13360
13361         * m4/mbiter.m4: New file.
13362
13363 2005-08-16  Bruno Haible  <bruno@clisp.org>
13364
13365         * m4/mbfile.m4: New file.
13366
13367 2005-08-16  Bruno Haible  <bruno@clisp.org>
13368
13369         * m4/mbchar.m4: New file.
13370
13371 2005-08-16  Bruno Haible  <bruno@clisp.org>
13372
13373         * lib/tls.h: New file, from GNU gettext.
13374         * lib/tls.c: New file, from GNU gettext.
13375
13376 2005-08-16  Bruno Haible  <bruno@clisp.org>
13377
13378         * lib/strnlen1.h: New file.
13379         * lib/strnlen1.c: New file.
13380
13381 2005-08-16  Bruno Haible  <bruno@clisp.org>
13382
13383         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13384         (mbi_init): Update.
13385         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13386         NUL byte, not after it.
13387
13388 2005-08-16  Bruno Haible  <bruno@clisp.org>
13389
13390         * lib/strcase.h (strcasecmp): Add note in comments.
13391         * lib/strncasecmp.c: Use code from strcasecmp.c.
13392         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13393         (strcasecmp): Work correctly in multibyte locales.
13394
13395 2005-08-16  Bruno Haible  <bruno@clisp.org>
13396
13397         * lib/mbiter.h: New file.
13398
13399 2005-08-16  Bruno Haible  <bruno@clisp.org>
13400
13401         * lib/mbfile.h: New file.
13402
13403 2005-08-16  Bruno Haible  <bruno@clisp.org>
13404
13405         * lib/mbchar.h: New file.
13406         * lib/mbchar.c: New file.
13407
13408 2005-08-16  Bruno Haible  <bruno@clisp.org>
13409
13410         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13411         the valid ones. Makes the comparison operations transitive:
13412         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13413         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13414
13415 2005-08-15  Simon Josefsson  <jas@extundo.com>
13416
13417         * modules/ssize_t (License): Change to 'unlimited'.
13418
13419         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13420
13421 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13422
13423         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13424         Add comments for each pending glibc patch.
13425
13426 2005-08-15  Bruno Haible  <bruno@clisp.org>
13427
13428         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13429         __cplusplus is defined.
13430
13431 2005-08-14  Jim Meyering  <jim@meyering.net>
13432
13433         Sync from coreutils.
13434
13435         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13436         Use the hash-table-based cycle-detection code not just when
13437         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13438         Reported by James Youngman in
13439         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13440         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13441         FTS_TIGHT_CYCLE_CHECK.
13442         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13443         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13444         once again.
13445         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13446         * lib/fts.c (fd_safer): Remove decl.
13447         Include fcntl--.h rather than unistd-safer.h
13448         (fts_safe_changedir): Don't call fd_safer; no longer needed
13449         now that we include fcntl--.h.
13450
13451 2005-08-12  Simon Josefsson  <jas@extundo.com>
13452
13453         * modules/getndelim2: Use ssize_t module.
13454         * modules/getnline: Likewise.
13455         * modules/safe-read: Likewise.
13456         * modules/xreadlink: Likewise.
13457
13458         * modules/ssize_t: New file.
13459
13460 2005-08-12  Simon Josefsson  <jas@extundo.com>
13461
13462         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13463
13464 2005-08-12  Simon Josefsson  <jas@extundo.com>
13465
13466         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13467         ssize_t.
13468
13469 2005-08-12  Simon Josefsson  <jas@extundo.com>
13470
13471         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13472         readline, getdelim and check_version.
13473         (Support for systems lacking ISO C 99: Sizes of integer types):
13474         Add size_max.
13475
13476 2005-08-12  Bruno Haible  <bruno@clisp.org>
13477
13478         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13479
13480 2005-08-11  Simon Josefsson  <jas@extundo.com>
13481
13482         * modules/readline: New file.
13483
13484         * modules/strnlen (Files): Add strnlen.h.
13485
13486 2005-08-11  Simon Josefsson  <jas@extundo.com>
13487
13488         * m4/readline.m4: New file.
13489
13490 2005-08-11  Simon Josefsson  <jas@extundo.com>
13491
13492         * lib/readline.h, readline.c: New file.
13493
13494 2005-08-11  Simon Josefsson  <jas@extundo.com>
13495
13496         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13497         gl_AVOID.
13498
13499 2005-08-11  Bruno Haible  <bruno@clisp.org>
13500
13501         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13502
13503 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13504
13505         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13506
13507 2005-08-10  Simon Josefsson  <jas@extundo.com>
13508
13509         * tests/test-iconvme.c: New file.
13510
13511 2005-08-10  Simon Josefsson  <jas@extundo.com>
13512
13513         * m4/strnlen.m4: New file.
13514
13515         * m4/strndup.m4: Don't check for strnlen declaration, done in
13516         strnlen.m4.
13517
13518 2005-08-10  Simon Josefsson  <jas@extundo.com>
13519
13520         * lib/strndup.c: Use strnlen.h.
13521
13522         * lib/strnlen.h: New file.
13523
13524 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13525
13526         * README: Typos.
13527
13528 2005-08-02  Simon Josefsson  <jas@extundo.com>
13529
13530         * modules/readline: New file.
13531
13532 2005-08-02  Simon Josefsson  <jas@extundo.com>
13533
13534         * modules/getdelim: New file.
13535
13536         * modules/getline: Rewrite, don't use getndelim2.
13537
13538 2005-08-02  Simon Josefsson  <jas@extundo.com>
13539
13540         * m4/getline.m4: Separate out getdelim stuff into separate module.
13541
13542         * m4/getdelim.m4: New file.
13543
13544 2005-08-02  Simon Josefsson  <jas@extundo.com>
13545
13546         * lib/getline.h, getline.c: Rewrite.
13547
13548         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13549
13550 2005-07-31  Bruno Haible  <bruno@clisp.org>
13551
13552         * lib/lock.h (gl_lock_initializer): New macro.
13553         (gl_lock_define_initialized): Use it.
13554         (gl_rwlock_initializer): New macro.
13555         (gl_rwlock_define_initialized): Use it.
13556         (gl_recursive_lock_initializer): New macro.
13557         (gl_recursive_lock_define_initialized): Use it.
13558
13559 2005-07-30  Karl Berry  <karl@gnu.org>
13560
13561         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13562         Report from Ben Pfaff, regarding getopt.
13563
13564 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13565
13566         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13567         normal way.
13568         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13569         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13570         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13571         (gl_GETOPT): Use the new macros.  Most of the implementation
13572         is moved to the new macros.  This is for programs like Emacs
13573         that don't want all the functionality of gl_GETOPT.
13574
13575 2005-07-26  Bruno Haible  <bruno@clisp.org>
13576
13577         * m4/lock.m4: Update from GNU gettext.
13578
13579 2005-07-26  Bruno Haible  <bruno@clisp.org>
13580
13581         * lib/lock.h: Update from GNU gettext.
13582         * lib/lock.c: Update from GNU gettext.
13583
13584 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13585
13586         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13587         obsolescent AC_TRY_RUN.  Include the default includes files, for
13588         'exit'.
13589
13590 2005-07-24  Bruno Haible  <bruno@clisp.org>
13591
13592         * modules/visibility: New file.
13593         * MODULES.html.sh (Misc): Add visibility.
13594
13595 2005-07-24  Bruno Haible  <bruno@clisp.org>
13596
13597         * m4/visibility.m4: New file.
13598
13599 2005-07-24  Bruno Haible  <bruno@clisp.org>
13600
13601         * doc/visibility.texi: New file.
13602
13603 2005-07-22  Bruno Haible  <bruno@clisp.org>
13604
13605         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13606         $(ALLOCA_H), redundant through BUILT_SOURCES.
13607         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13608         redundant through BUILT_SOURCES.
13609         * modules/byteswap (Makefile.am): Remove explicit dependency on
13610         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13611         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13612         $(FNMATCH_H), redundant through BUILT_SOURCES.
13613         * modules/getopt (Makefile.am): Remove explicit dependency on
13614         $(GETOPT_H), redundant through BUILT_SOURCES.
13615         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13616         redundant through BUILT_SOURCES.
13617         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13618         redundant through BUILT_SOURCES.
13619         * modules/stdbool (Makefile.am): Remove explicit dependency on
13620         $(STDBOOL_H), redundant through BUILT_SOURCES.
13621         * modules/stdint (Makefile.am): Remove explicit dependency on
13622         $(STDINT_H), redundant through BUILT_SOURCES.
13623         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13624         Remove explicit dependency on $(SYSEXITS_H).
13625         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13626
13627 2005-07-18  Simon Josefsson  <jas@extundo.com>
13628
13629         * lib/check-version.c (check_version): Accept identical versions too.
13630
13631 2005-07-18  Bruno Haible  <bruno@clisp.org>
13632
13633         * modules/lock: New file.
13634         * MODULES.html.sh (Multithreading): New section.
13635
13636 2005-07-18  Bruno Haible  <bruno@clisp.org>
13637
13638         * m4/lock.m4: New file, from GNU gettext.
13639
13640 2005-07-18  Bruno Haible  <bruno@clisp.org>
13641
13642         * lib/lock.h: New file, from GNU gettext.
13643         * lib/lock.c: New file, from GNU gettext.
13644
13645 2005-07-18  Bruno Haible  <bruno@clisp.org>
13646
13647         * lib/lock.h (gl_once_t): New type.
13648         (gl_once_define, gl_once): New macros.
13649         * lib/lock.c (fresh_once): New variable.
13650         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13651         functions.
13652
13653 2005-07-16  Simon Josefsson  <jas@extundo.com>
13654
13655         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13656         workaround, suggested by Bruno.
13657
13658 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13659
13660         * modules/xalloc (Depends-on): Add xalloc-die.
13661         * modules/xvasprintf (Depends-on): Add xalloc-die.
13662
13663 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13664
13665         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13666         with a minor change.
13667
13668 2005-07-15  Bruno Haible  <bruno@clisp.org>
13669
13670         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13671         When using lib/poll.c, define poll as rpl_poll.
13672
13673 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13674
13675         * modules/argp (Depends-on): Remove unlocked-io.
13676
13677 2005-07-14  Derek Price  <derek@ximbiot.com>
13678
13679         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13680         for glob symlink bug.
13681
13682 2005-07-14  Bruno Haible  <bruno@clisp.org>
13683
13684         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13685         Instead, test for *_unlocked function declarations directly.
13686
13687 2005-07-11  Simon Josefsson  <jas@extundo.com>
13688
13689         * modules/size_max: New file.
13690
13691         * modules/xsize: Depend on size_max module for size_max.m4.
13692
13693 2005-07-11  Simon Josefsson  <jas@extundo.com>
13694
13695         * lib/size_max.h: New file.
13696
13697 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13698
13699         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13700         copyright symbol and the year.
13701         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13702         (version_etc_va): Use parameterized copyright notice.
13703         Reword to conform to the current GNU coding standards.
13704
13705 2005-07-11  Karl Berry  <karl@gnu.org>
13706
13707         * doc/gnulib.texi (Quoting): new node.
13708         (Initial import): more info, from Patrice.
13709
13710 2005-07-11  Bruno Haible  <bruno@clisp.org>
13711
13712         * gnulib-tool (func_usage): Document option --avoid.
13713         (Command line options): Handle --avoid.
13714         (func_acceptable): New function.
13715         (func_modules_transitive_closure): Use it.
13716
13717 2005-07-11  Bruno Haible  <bruno@clisp.org>
13718
13719         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13720         Reported by Jim Meyering.
13721
13722 2005-07-10  Bruno Haible  <bruno@clisp.org>
13723
13724         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13725         Needed when size_t is smaller than 'unsigned int'.
13726         Reported by Paul Eggert.
13727
13728 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13729
13730         * modules/argp (Depends-on): Add unlocked-io
13731
13732 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13733
13734         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13735         block of defines.
13736
13737 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13738
13739         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13740         fix now.
13741
13742 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13743         and Paul Eggert  <eggert@cs.ucla.edu>
13744
13745         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13746         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13747
13748 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13749
13750         * modules/regex (Files): Add lib/regex_internal.c,
13751         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13752         (Depends-on): Add extensions.
13753         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13754
13755 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13756
13757         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13758         pathconf.
13759         * m4/same.m4 (gl_SAME): Likewise.
13760         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13761
13762         * m4/regex.m4: Adjust to new libc regex implementation.
13763         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13764         all the .c and .h parts of (the new) regex.
13765         Quote the m4 stuff better.
13766         Check for RE_ICASE bug of old gnulib.
13767         Check for REG_STARTEND of recent libc.
13768         Rename local variables from jm_* to gl_*.
13769         Quote operand of "test -f".
13770         Say "recent enough" version of libc, not "version 2".
13771         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13772         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13773         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13774         Remove check for btowc, isascii.
13775         Require AM_LANGINFO_CODESET.
13776
13777 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13778
13779         * lib/regex.c, regex.h: Sync from libc.
13780         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13781         * lib/regexec.c:
13782         New files, synced from libc, except that regex_internal.h
13783         currently has a small porting fix.
13784
13785 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13786
13787         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13788         regex_internal.c, regexec.c.
13789         Add regex_internal.h too, but as a comment, since the libc version
13790         is currently broken in gnulib mode.
13791
13792 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13793
13794         Support programs like Emacs that use gnulib but not gettext.
13795         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13796         * modules/gettext-h: New file.
13797         * modules/gettext (Files): Remove lib/gettext.h.
13798         (Depends-on): Add gettext-h.
13799         (Makefile.am): Remove lib_SOURCES.
13800         * modules/argmatch, modules/c-stack, modules/closeout:
13801         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13802         * modules/execute, modules/file-type, modules/getaddrinfo:
13803         * modules/getopt, modules/human, modules/javacomp:
13804         * modules/javaexec, modules/mkdir-p, modules/obstack:
13805         * modules/openat, modules/pagealign_alloc, modules/pipe:
13806         * modules/quotearg, modules/regex, modules/rpmatch:
13807         * modules/unicodeio, modules/userspec, modules/version-etc:
13808         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13809         * modules/xsetenv:
13810         Depend on gettext-h, not gettext.
13811
13812 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13813
13814         * gnulib-tool (func_import): Add support for 'public domain' license.
13815         * modules/alloca, modules/atexit, modules/memmove:
13816         Now public domain, not GPL.
13817         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13818         * modules/realloc, modules/strerror, modules/strtod:
13819         Now LGPL, not GPL.
13820
13821 2005-07-05  Bruno Haible  <bruno@clisp.org>
13822
13823         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13824         autoconf CVS. Needed for mingw.
13825
13826 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13827
13828         Remove the dependency of the strftime module on the tzset module.
13829         * modules/strftime (Depends-on): Remove dependency on tzset.
13830
13831 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13832
13833         Remove the dependency of the strftime module on the tzset module.
13834         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13835         gl_FUNC_TZSET_CLOBBER.
13836
13837 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13838
13839         Remove the dependency of the strftime module on the tzset module.
13840         * lib/strftime.c (my_strftime)
13841         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13842         Copy the input structure, to work around some of the bug with
13843         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13844         Solaris releases, you should also use the tzset module, but we won't
13845         require it as a dependency any more since we don't want LGPLed code
13846         to depend on GPLed code.
13847
13848 2005-07-02  Jim Meyering  <jim@meyering.net>
13849
13850         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13851         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13852         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13853         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13854
13855 2005-07-02  Jim Meyering  <jim@meyering.net>
13856
13857         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13858
13859 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13860
13861         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13862         declares only 'struct timespec;' (!).
13863
13864 2005-07-01  Jim Meyering  <jim@meyering.net>
13865
13866         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13867         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13868         * lib/save-cwd.c, tempname.c:
13869         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13870         and don't include <sys/file.h>).
13871
13872 2005-06-29  Jim Meyering  <jim@meyering.net>
13873
13874         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13875         type name.  Use the variable name instead.
13876         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13877         Likewise.
13878
13879 2005-06-28  Simon Josefsson  <jas@extundo.com>
13880
13881         * modules/check-version (Files): Add check-version.m4.
13882
13883 2005-06-28  Simon Josefsson  <jas@extundo.com>
13884
13885         * m4/check-version.m4: New file, suggested by Jim Meyering
13886         <jim@meyering.net>.
13887
13888 2005-06-28  Simon Josefsson  <jas@extundo.com>
13889
13890         * lib/check-version.h, lib/check-version.c: New files.
13891
13892 2005-06-28  Simon Josefsson  <jas@extundo.com>
13893
13894         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13895         collision with global variable.  Better indentation.  Don't
13896         increment buffer pointer beyond buffer end.  Based on comments
13897         from Paul Eggert <eggert@cs.ucla.edu>.
13898
13899         * lib/base64.h: Indent.
13900
13901 2005-06-28  Simon Josefsson  <jas@extundo.com>
13902
13903         * doc/gnulib.texi (Library version handling): New section.
13904
13905 2005-06-28  Jim Meyering  <jim@meyering.net>
13906
13907         * check-module (find_included_lib_files): Hard-code another
13908         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13909         but modules/fts-lgpl (correctly) does not list those files.
13910
13911         * modules/canonicalize (Files): Add lib/pathmax.h.
13912
13913 2005-06-25  Simon Josefsson  <jas@extundo.com>
13914
13915         * modules/check-version: New file.
13916
13917 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13918
13919         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13920         initializer of struct addrinfo, as an indication that we don't
13921         care how many members the structure has.
13922
13923 2005-06-24  Derek Price  <derek@ximbiot.com>
13924         and Bruno Haible  <bruno@clisp.org>
13925
13926         Remove stat module & update lstat.
13927         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13928         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13929         * m4/stat.m4: Remove this file.
13930
13931 2005-06-24  Derek Price  <derek@ximbiot.com>
13932         and Bruno Haible  <bruno@clisp.org>
13933
13934         Remove stat module & update lstat.
13935         * lib/stat.c: Remove this file...
13936         (slash_aware_lstat): ...moving this content and its support...
13937         * lib/lstat.c (rpl_lstat): ...into here.
13938         * lib/lstat.h: New file.
13939
13940 2005-06-24  Derek Price  <derek@ximbiot.com>
13941         and Bruno Haible  <bruno@clisp.org>
13942
13943         Remove stat module & update lstat.
13944         * config/srclist.txt (libc sources): Remove stat.
13945
13946 2005-06-24  Derek Price  <derek@ximbiot.com>
13947         and Bruno Haible  <bruno@clisp.org>
13948
13949         Remove stat module & update lstat.
13950         * MODULES.html.sh (stat): Remove.
13951         * MODULES.html: Regenerated.
13952         * modules/lstat (Description): Correct function name.
13953         (Files): Add "lstat.h".
13954         (Depends-on): Remove stat, add xalloc, stat-macros.
13955         * modules/stat: Remove this file.
13956         (Include): Add "lstat.h", remove <sys/stat.h>.
13957
13958 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13959
13960         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13961         (ranged_convert): Don't save conversion in a temporary struct.
13962         This causes a warning with GCC 4.0.0, and anyway in the typical
13963         case it's not worth the extra 100 bytes or so of code.
13964         (ranged_convert, __mktime_internal): When calling a function via a
13965         pointer P, use P () rather than (*P) (), as we now assume C89 or
13966         better.
13967
13968 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13969
13970         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13971         "who -r" failed to give output.  Problem reported by Tim Waugh.
13972
13973         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13974         (xcalloc): Use it to avoid needless tests.
13975         Problem reported by Jim Meyering.
13976
13977 2005-06-20  Derek Price  <derek@ximbiot.com>
13978
13979         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13980         unnecessary for Autoconfs > 2.59c.
13981
13982 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13983
13984         * lib/argp.h (__option_is_short): Check upper limit of
13985         __key. Isprint() requires its argument to have the value
13986         of an unsigned char or EOF.
13987
13988 2005-06-16  Jim Meyering  <jim@meyering.net>
13989
13990         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13991         when either N or S is zero.
13992
13993 2005-06-16  Derek Price  <derek@ximbiot.com>
13994
13995         * m4/bison.m4: Declare YACC & YFLAGS precious.
13996
13997 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13998
13999         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14000         multibyte string or pattern, fall back on unibyte matching.
14001         Problem reported by James Youngman.
14002
14003 2005-06-08  Bruno Haible  <bruno@clisp.org>
14004
14005         * modules/csharpcomp: New file.
14006         * MODULES.html.sh (C#): Add csharpcomp.
14007
14008 2005-06-08  Bruno Haible  <bruno@clisp.org>
14009
14010         * m4/csharpcomp.m4: New file, from GNU gettext.
14011
14012 2005-06-08  Bruno Haible  <bruno@clisp.org>
14013
14014         * lib/csharpcomp.h: New file, from GNU gettext.
14015         * lib/csharpcomp.c: New file, from GNU gettext.
14016         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14017
14018 2005-06-08  Bruno Haible  <bruno@clisp.org>
14019
14020         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14021         warning on mingw.
14022
14023 2005-06-07  Derek Price  <derek@ximbiot.com>
14024
14025         Sync from CVS.
14026         * lib/glob_.h: Indent nested #ifdef.
14027
14028 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14029
14030         Sync from coreutils.
14031         Use "file name" when talking about file names, instead of "filename"
14032         or "path", as per the GNU coding standards.
14033         * lib/mkdir-p.c: Renamed from makepath.c.
14034         (make_dir_parents): Renamed from make_path.  All callers changed.
14035         * lib/mkdir-p.h: Likewise.  All includers changed.
14036         * lib/filenamecat.c: Renamed from path-concat.c.
14037         (file_name_concat): Renamed from path_concat.  All callers changed.
14038         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14039         * lib/filenamecat.h: Likewise.  All includers changed.
14040         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14041         in comments or local variable names.
14042         * lib/basename.c: Likewise.
14043         * lib/canonicalize.c, canonicalize.h: Likewise.
14044         * lib/dirname.c, dirname.h: Likewise.
14045         * lib/euidaccess.c: Likewise.
14046         * lib/exclude.c: Likewise
14047         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14048         * lib/fsusage.c, fsuage.h: Likewise.
14049         * lib/fts.c, fts_.h: Likewise.
14050         * lib/getcwd.c: Likewise.
14051         * lib/getloadavg.c: Likewise.
14052         * lib/mkstemp.c: Likewise.
14053         * lib/mountlist.c, mountlist.h: Likewise.
14054         * lib/openat.c, openat.h: Likewise.
14055         * lib/readlink-stub.c: Likewise.
14056         * lib/readutmp.c, readutmp.h: Likewise.
14057         * lib/rename.c: Likewise.
14058         * lib/rmdir.c: Likewise.
14059         * lib/same.c: Likewise.
14060         * lib/savedir.c: Likewise.
14061         * lib/stripslash.c: Likewise.
14062         * lib/tempname.c: Likewise.
14063         * lib/xreadlink.c: Likewise.
14064         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14065         All uses changed.
14066         * lib/exclude.h: Likewise.
14067
14068         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14069         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14070         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14071         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14072         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14073         files have been getting away with it for years (MORE/BSD 4.3
14074         is extinct now).
14075         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14076         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14077
14078         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14079         Define to 256, not 255, as per modern POSIX.
14080
14081 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14082
14083         Sync from coreutils.
14084         Use "file name" when talking about file names, instead of "filename"
14085         or "path", as per the GNU coding standards.
14086         * MODULES.html.sh: mkdir-p renamed from makepath.
14087         filenamecat renamed from path-concat.
14088         * modules/filenamecat: Renamed from modules/path-concat.
14089         (Files): filenamecat.h and filenamecat.c renamed from
14090         path-concat.h and path-concat.c.
14091         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14092         (Include): filenamecat.h, not path-concat.h.
14093         * modules/mkdir-p: Renamed from modules/makepath.
14094         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14095         makepath.c.
14096         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14097         (Include): mkdir-p.h, not makepath.h.
14098
14099 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14100
14101         Sync from coreutils.
14102         * m4/mkdir-p.m4: Renamed from makepath.m4.
14103         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14104         Rename files from makepath.c to mkdir-p.c, and from
14105         makepath.h to mkdir-p.h.
14106         * m4/filenamecat.m4: Renamed from path-concat.m4.
14107         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14108         Rename files from path-concat.c to filenamecat.c,
14109         and from path-concat.h to filenamecat.h.
14110         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14111         "file name" in local variables or comments.
14112         * m4/rename.m4: Likewise.
14113
14114 2005-06-01  Bruno Haible  <bruno@clisp.org>
14115
14116         * modules/csharpexec: New file.
14117         * MODULES.html.sh (C#): New section.
14118
14119 2005-06-01  Bruno Haible  <bruno@clisp.org>
14120
14121         * m4/csharp.m4: New file, from GNU gettext.
14122         * m4/csharpexec.m4: New file, from GNU gettext.
14123
14124 2005-06-01  Bruno Haible  <bruno@clisp.org>
14125
14126         * lib/csharpexec.h: New file, from GNU gettext.
14127         * lib/csharpexec.c: New file, from GNU gettext.
14128         * lib/csharpexec.sh.in: New file, from GNU gettext.
14129
14130 2005-05-31  Derek Price  <derek@ximbiot.com>
14131             Paul Eggert  <eggert@cs.ucla.edu>
14132
14133         Sync from cvs.
14134         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14135
14136 2005-05-31  Derek Price  <derek@ximbiot.com>
14137             Paul Eggert  <eggert@cs.ucla.edu>
14138
14139         Sync from cvs.
14140         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14141
14142 2005-05-29  Derek Price  <derek@ximbiot.com>
14143
14144         * config/srclist.txt (glob_.h, glob.c): Add these files.
14145
14146 2005-05-29  Derek Price  <derek@ximbiot.com>
14147
14148         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14149         * modules/glob: New file.
14150         * modules/getlogin_r: Add link to POSIX spec in description.
14151
14152 2005-05-29  Derek Price  <derek@ximbiot.com>
14153             Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * m4/glob.m4: New file.
14156
14157 2005-05-29  Derek Price  <derek@ximbiot.com>
14158             Paul Eggert  <eggert@cs.ucla.edu>
14159
14160         * lib/glob_.h, lib/glob.c: New files.
14161
14162 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14163
14164         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14165         * modules/fts-lgpl (Depends-on): Remove gettext.
14166
14167 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14168
14169         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14170         and don't require gt_INTTYPES_PRI.
14171
14172 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14173
14174         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14175
14176         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14177         the configuration hassle isn't worth it.
14178         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14179         (LONGEST_MODIFIER, PRIuMAX): Remove.
14180
14181 2005-05-27  Bruno Haible  <bruno@clisp.org>
14182
14183         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14184
14185 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14186
14187         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14188         _POSIX_PTHREAD_SEMANTICS for Solaris.
14189
14190 2005-05-25  Derek Price  <derek@ximbiot.com>
14191
14192         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14193
14194 2005-05-25  Derek Price  <derek@ximbiot.com>
14195             Paul Eggert  <eggert@cs.ucla.edu>
14196
14197         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14198         * lib/getlogin_r.c, getlogin_r.h: New files.
14199
14200 2005-05-25  Bruno Haible  <bruno@clisp.org>
14201             Derek Price  <derek@ximbiot.com>
14202
14203         * lib/getlogin_r.h: Simplify API documentation.
14204
14205 2005-05-23  Derek Price  <derek@ximbiot.com>
14206
14207         * modules/minmax (Files): Add m4/minmax.m4.
14208         (configure.ac): Add gl_MINMAX.
14209
14210 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14211
14212         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14213         so that unistd-safer.h (GPL'ed code) need not be included.
14214
14215 2005-05-22  Bruno Haible  <bruno@clisp.org>
14216
14217         * m4/minmax.m4: New file.
14218         Based on a patch by Derek Price <derek@ximbiot.com>.
14219
14220 2005-05-22  Bruno Haible  <bruno@clisp.org>
14221
14222         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14223         (INT64_MIN): Fix definition.
14224         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14225
14226         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14227         NEED_SIGNED_INT_TYPES.
14228
14229         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14230         HAVE_SYSTEM_INTTYPES.
14231
14232 2005-05-22  Bruno Haible  <bruno@clisp.org>
14233
14234         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14235         Also include <sys/param.h> if it defines MIN, MAX.
14236         Based on a patch by Derek Price <derek@ximbiot.com>.
14237
14238 2005-05-21  Jim Meyering  <jim@meyering.net>
14239
14240         * modules/fts (Files): Add m4/inttypes-pri.m4.
14241         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14242
14243 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14244
14245         New fts module.
14246         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14247         (setup_dir, free_dir): New functions.
14248         (enter_dir, leave_dir): Define trivial
14249         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14250         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14251         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14252         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14253         Move to fts-cycle.c.
14254         (fts_open): Use setup_dir.
14255         (fts_close): Use free_dir.
14256         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14257         This adds a label and some gotos, but the alternatives were messier.
14258         Check for memory allocation failure when entering a dir.
14259         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14260         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14261         (FTS): New member fts_cycle, that is a union that contains the
14262         old active_dir_ht and cycle_state.  All uses changed to mention
14263         fts_cycle.ht and fts_cycle.state.
14264         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14265         fts.c, with the following changes:
14266         (setup_dir, free_dir): New functions.
14267         (enter_dir): Now returns bool.  Return true if successful, false
14268         if memory exhausted.  All callers changed.
14269         Do not bother partly cleaning up on
14270         memory allocation failure; that is free_dir's job.
14271         However, free ad if hash_insert fails, to avoid memory leak.
14272         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14273         fts->fts_options to see which union member to use.
14274
14275 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14276
14277         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14278         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14279
14280 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14281
14282         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14283
14284 2005-05-20  Jim Meyering  <jim@meyering.net>
14285
14286         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14287         Now a macro, to pacify GCC.
14288
14289 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14290
14291         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14292         of -1.
14293
14294 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14295
14296         * lib/chown.c (rpl_chown): Return -1 on failure.
14297
14298 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14299
14300         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14301         Don't check for stddef.h.
14302         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14303         don't use its results.
14304         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14305         since we include them unconditionally.  Don't require
14306         AM_STDBOOL_H, since stdbool is a prerequisite.
14307         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14308         since we assume C89 or better.
14309         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14310         as we don't use their results.
14311         Don't check for fchdir, memmove, memset, strrchr, as we use
14312         them unconditionally.
14313         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14314         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14315
14316 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14317
14318         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14319         Include <stddef.h> unconditionally, since we assume C89 now.
14320         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14321         * lib/fts.c: Include fts_.h first, to check interface.
14322         Do not include intprops.h; no longer needed.
14323         Include cycle-check.h and hash.h, since fts_.h no longer does.
14324         Remove unnecessary casts of closedir to void.
14325         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14326         decide whether to decrement nlinks.
14327         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14328         (FTS): Use struct hash_table * instead of Hash_table, so that
14329         we no longer need to include hash.h here.
14330
14331 2005-05-18  Jim Meyering  <jim@meyering.net>
14332
14333         * modules/dirfd (License): Change to LGPL.  Most of the code
14334         is already in the public domain.
14335
14336 2005-05-18  Jim Meyering  <jim@meyering.net>
14337
14338         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14339         Reported by Yoann Vandoorselaere.
14340
14341 2005-05-17  Jim Meyering  <jim@meyering.net>
14342
14343         * m4/fts.m4: New file, from coreutils.
14344
14345 2005-05-17  Jim Meyering  <jim@meyering.net>
14346
14347         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14348
14349 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14350
14351         Sync from coreutils.
14352         * m4/unlinkdir.m4: New file.
14353
14354 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14355
14356         Sync from coreutils.
14357         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14358         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14359         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14360         White space changes only.
14361         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14362         special.
14363         * lib/yesno.c: Include getline.h, not ctype.h.
14364         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14365         Use getline to remove arbitrary restriction on response length.
14366
14367 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14368
14369         * config/srclist-update: Spell out "Street" in FSF postal
14370         mail address; this is the style the FSF seems to prefer.
14371
14372         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14373         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14374         this updates FSF postal mail address.
14375
14376         Sync from coreutils.
14377         * modules/unlinkdir: New file.
14378         * modules/yesno (Depends-on): Add getline.
14379         * MODULES.html.sh (File system functions): Add unlinkdir.
14380
14381 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14382
14383         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14384         lib/strsep.h:
14385         Change the initial comment to refer to GPL, not LGPL.
14386         gnulib-tool will change it to LGPL as needed.
14387
14388         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14389         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14390         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14391         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14392         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14393         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14394         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14395         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14396         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14397         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14398         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14399         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14400         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14401         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14402         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14403         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14404         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14405         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14406         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14407         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14408         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14409         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14410         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14411         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14412         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14413         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14414         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14415         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14416         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14417         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14418         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14419         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14420         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14421         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14422         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14423         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14424         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14425         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14426         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14427         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14428         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14429         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14430         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14431         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14432         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14433         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14434         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14435         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14436         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14437         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14438         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14439         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14440         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14441         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14442         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14443         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14444         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14445         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14446         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14447         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14448         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14449         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14450         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14451         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14452         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14453         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14454         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14455         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14456         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14457         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14458         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14459         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14460         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14461         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14462         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14463         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14464         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14465         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14466         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14467         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14468         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14469         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14470         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14471         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14472         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14473         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14474         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14475         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14476         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14477         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14478         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14479         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14480         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14481         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14482         lib/yesno.c, lib/yesno.h:
14483         Update FSF postal mail address.
14484
14485 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14486
14487         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14488         tests/test-memmem.c, tests/test-stpncpy.c:
14489         Update FSF postal mail address.
14490
14491 2005-05-13  Bruno Haible  <bruno@clisp.org>
14492
14493         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14494         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14495         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14496         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14497         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14498         Add support for 64-bit integers in the MSVC compiler.
14499
14500 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14501
14502         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14503
14504 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14505
14506         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14507
14508 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14509
14510         * doc/getdate.texi (General date syntax): Don't say that date
14511         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14512         Problem reported by Nic Ferrier.
14513
14514 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14515
14516         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14517         specified in ai_socktype. Fix invalid ai_protocol
14518         check. ai_protocol is usually set to 0 or depending on
14519         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14520         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14521         ai_socktype / ai_protocol in the returned addrinfo structure.
14522
14523 2005-05-10  Simon Josefsson  <jas@extundo.com>
14524
14525         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14526         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14527
14528 2005-05-10  Karl Berry  <karl@gnu.org>
14529
14530         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14531         (from http://www.gnu.org/licenses).
14532         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14533         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14534         fdl.texi suffices.
14535
14536 2005-05-10  Karl Berry  <karl@gnu.org>
14537
14538         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14539         (COPYING.DOC): remove.
14540
14541         * config/srclist-update: new FSF address.
14542
14543 2005-05-10  Derek Price  <derek@ximbiot.com>
14544
14545         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14546         possible.
14547
14548 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14549             Bruno Haible  <bruno@clisp.org>
14550
14551         * modules/inet_ntop: New file.
14552         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14553         inet_ntop.
14554
14555 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14556             Bruno Haible  <bruno@clisp.org>
14557
14558         * m4/inet_ntop.m4: New file.
14559
14560 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14561             Bruno Haible  <bruno@clisp.org>
14562
14563         * lib/inet_ntop.h: New file.
14564         * lib/inet_ntop.c: New file, from glibc with modifications.
14565
14566 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14567
14568         * modules/time_r (License): Change to LGPL.
14569         * modules/extensions (License): Change to LGPL.  Actually,
14570         the license is more permissive than that, but currently gnulib-tool
14571         doesn't know how to handle more-permissive licenses.
14572
14573         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14574         Problem reported by Dave Love.
14575
14576 2005-05-08  Jim Meyering  <jim@meyering.net>
14577
14578         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14579         blank.
14580
14581 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14582
14583         * modules/argmatch (Depends-on): Add stdbool.
14584         * modules/backupfile (Depends-on): Likewise.
14585         * modules/chdir-long (Depends-on): Likewise.
14586         * modules/closeout (Depends-on): Likewise.
14587         * modules/cycle-check (Depends-on): Likewise.
14588         * modules/dirname (Depends-on): Likewise.
14589         * modules/fnmatch (Depends-on): Likewise.
14590         * modules/fsusage (Depends-on): Likewise.
14591         * modules/fwriteerror (Depends-on): Likewise.
14592         * modules/getcwd (Depends-on): Likewise.
14593         * modules/getloadavg (Depends-on): Likewise.
14594         * modules/hard-locale (Depends-on): Likewise.
14595         * modules/makepath (Depends-on): Likewise.
14596         * modules/mountlist (Depends-on): Likewise.
14597         * modules/nanosleep (Depends-on): Likewise.
14598         * modules/posixtm (Depends-on): Likewise.
14599         * modules/quotearg (Depends-on): Likewise.
14600         * modules/readtokens (Depends-on): Likewise.
14601         * modules/readtokens0 (Depends-on): Likewise.
14602         * modules/readutmp (Depends-on): Likewise.
14603         * modules/save-cwd (Depends-on): Likewise.
14604         * modules/strftime (Depends-on): Likewise.
14605         * modules/userspec (Depends-on): Likewise.
14606         * modules/utimecmp (Depends-on): Likewise.
14607         * modules/xgetcwd (Depends-on): Likewise.
14608         * modules/xnanosleep (Depends-on): Likewise.
14609         * modules/xstrtod (Depends-on): Likewise.
14610         * modules/yesno (Depends-on): Likewise.
14611
14612 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14613
14614         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14615         needless checks.
14616
14617 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14618
14619         Merge from coreutils.  Among other things,
14620         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14621         * lib/fd-safer.c: New file.
14622         * lib/fcntl-safer.h, open-safer.c: Remove.
14623         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14624         * lib/dup-safer.c: Include unistd-safer.h first.
14625         Don't include errno.h.
14626         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14627         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14628         * lib/file-type.c: Rely on file-type.h change.
14629         * lib/getloadavg.c: Include unistd-safer.h.
14630         (getloadavg): Use safer open.
14631         * lib/getusershell.c: Include "stdio-safer.h".
14632         (getusershell): Use safer fopen.
14633         * lib/long-options.c (long_options): Use NULL rather than 0.
14634         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14635         'free'.
14636         * lib/modechange.c: Likewise.
14637         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14638         (MODE_DONE): New constant.
14639         (struct mode_change): Remove 'next' member.
14640         (make_node_op_equals): New function; like the old one of the
14641         same name, except it allocates an array.
14642         (mode_compile, mode_create_from_ref): Use it.
14643         (mode_compile): Allocate result as an array, not a linked list.
14644         Parse octal string ourself, so that we catch mistakes like "+0".
14645         (mode_adjust): Arg is an array, not a linked list.
14646         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14647         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14648         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14649         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14650         Remove.  This is now stat-macros.h's job.
14651         (talloc): Remove.  All callers replaced by xalloc, so that
14652         our invokers don't have to worry about reporting memory failures.
14653         (make_node_op_equals): Remove.
14654         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14655         New constants.
14656         (struct mode_change): Moved here from modechange.h.
14657         (mode_append_entry): Remove.
14658         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14659         apps to have incorrect behavior.  Use simpler algorithm for head
14660         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14661         Detect more invalid usages rather than having somewhat-random behavior.
14662         Don't insert an "a=" action, as that leads to incorrect behavior.
14663         (mode_compile, mode_create_from_ref): Return NULL on error instead
14664         of an enum, since now there's only one way to have an error.  All
14665         callers changed.
14666         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14667         at the correct time.  Simplify calculation of "+u" and its ilk.
14668         Don't mishandle "+X".
14669         (mode_free): Remove "register" and localize decls.
14670         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14671         (struct mode_change): Move to modechange.c; callers don't
14672         need to see this stuff.
14673         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14674         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14675         (mode_change, mode_adjust): Reflect the new signatures noted above.
14676         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14677         that might redefine system include files.
14678         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14679         (my_usleep): Use NULL rather than (void *) 0.
14680         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14681         Use siginterrupt to specify that system calls should be interrupted.
14682         (rpl_nanosleep): Move initialization of suspended closer to call of
14683         my_usleep.
14684         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14685         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14686         (desirable_utmp_entry): New function.
14687         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14688         using x2nrealloc, to simplify logic.
14689         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14690         size calculation.  Do not assume utmp file is a regular file.
14691         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14692         (READ_UTMP_CHECK_PIDS): New constant.
14693         * lib/save-cwd.c: Include unistd-safer.h.
14694         (save_cwd): Use fd_safer.
14695         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14696         [!_LIBC] Include "stat-macros.h" instead.
14697         * lib/unistd-safer.h (fd_safer): New decl.
14698
14699 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14700
14701         * modules/getloadavg (Depends-on): Add unistd-safer.
14702         * modules/getusershell (Depends-on): Add stdio-safer.
14703         * modules/lstat (Depends-on): Remove xalloc.
14704         * modules/mkstemp (Depends-on): Add stat-macros.
14705         * modules/modechange (Depends-on): Remove xstrtol.
14706         Add stat-macros, xalloc.
14707         * modules/save-cwd (Depends-on): Add unistd-safer.
14708         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14709         * modules/unistd-safer (Files): Add lib/fd-safer.c
14710         (Makefile.am): Remove lib_SOURCES.
14711
14712         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14713         Remove fcntl-safer; unistd-safer supersedes it.
14714
14715 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14718         AC_HEADER_STAT.
14719         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14720         (gl_PREREQ_CHOWN): Remove.
14721         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14722         it.  Don't require AC_HEADER_STAT.
14723         (gl_PREREQ_LSTAT): Remove.
14724         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14725         Don't require AC_HEADER_STAT.
14726         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14727         (gl_PREREQ_RMDIR): Remove.
14728         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14729         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14730         the stat-macros module a prerequisite.
14731         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14732         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14733         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14734         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14735         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14736         variable names.
14737         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14738         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14739         variable prefixes.
14740         * m4/fcntl-safer.m4: Remove.
14741         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14742         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14743         Invoke gl_PREREQ_FD_SAFER.
14744         (gl_PREREQ_FD_SAFER): New macro.
14745         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14746         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14747         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14748         Remove duplicate call to AC_LIBOBJ(readutmp).
14749         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14750
14751         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14752         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14753
14754 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14755
14756         * MODULES.html.sh (Misc): Add byteswap.
14757
14758 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14759
14760         * modules/getcwd (Depends-on): Add extensions.
14761         * modules/openat (Depends-on): Likewise.
14762
14763 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14764
14765         * modules/byteswap: New file.
14766
14767 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14768
14769         * m4/byteswap.m4: New file.
14770
14771 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14772
14773         * lib/byteswap_.h: New file.
14774
14775 2005-04-25  Karl Berry  <karl@gnu.org>
14776
14777         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14778
14779 2005-04-25  Albert Chin  <china@thewrittenword.com>
14780
14781         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14782         Toolkit C bug.
14783
14784 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14785
14786         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14787         (func_ln_if_changed) Remove forcibly for no error message
14788         in case file does not exist.
14789
14790 2005-04-19  Simon Josefsson  <jas@extundo.com>
14791
14792         * gnulib-tool (Options): Make --symlink mean --symbolic.
14793
14794 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14795
14796         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14797
14798 2005-04-16  Simon Josefsson  <jas@extundo.com>
14799
14800         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14801
14802 2005-04-15  Simon Josefsson  <jas@extundo.com>
14803
14804         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14805
14806 2005-04-15  Simon Josefsson  <jas@extundo.com>
14807
14808         * gnulib-tool: Rename --symlink to --symbolic.
14809
14810 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14811
14812         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14813         symbolic links to files instead of copying/moving.  Add --aux-dir,
14814         specifying directory relative --dir where auxiliary build tools
14815         are placed.
14816
14817 2005-04-14  Bruno Haible  <bruno@clisp.org>
14818
14819         * modules/allocsa (License): Change to LGPL.
14820         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14821
14822 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14823
14824         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14825         that "UTC +1 second" continues to work.  Problem reported
14826         by Dmitry V. Levin.
14827         (relunit_snumber): New rule.
14828         (relunit): Use it.
14829
14830 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14831
14832         * lib/getdate.y (universal_time_zone_table): New constant.
14833         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14834         universal_time_zone_table.
14835         (lookup_zone): Prefer universal_time_zone_table to
14836         local_time_zone_table, so that "GMT" time stamps are allowed in
14837         London during the summer.  Problem reported by Ian Abbott.
14838
14839 2005-04-12  Jim Meyering  <jim@meyering.net>
14840
14841         * lib/human.c (humblock): Set *options even when returning due to
14842         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14843         warning from gcc-4.
14844
14845 2005-04-09  Jim Meyering  <jim@meyering.net>
14846
14847         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14848         -Wuninitialized: initialize tm0.tm_year.
14849
14850 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14851
14852         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14853         count, since there's no maximum.  All uses changed.
14854         Add member dsts_seen.
14855         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14856         not being INT_MAX.
14857         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14858         Use pc_rels_seen to decide whther a date is absolute.
14859
14860         * lib/getdate.y (number): Don't overwrite year.
14861         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14862         check.
14863
14864 2005-04-02  Simon Josefsson  <jas@extundo.com>
14865
14866         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14867         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14868
14869 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14870
14871         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14872         where no absolute path name can be longer than PATH_MAX.
14873
14874 2005-03-27  Jim Meyering  <jim@meyering.net>
14875
14876         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14877
14878 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14879
14880         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14881         "one's complement" -> "ones' complement" in comment, as per Knuth.
14882         "value of type" -> "type or expression" in comment.
14883         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14884
14885 2005-03-26  Jim Meyering  <jim@meyering.net>
14886
14887         Comment nits.
14888         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14889         Correct typos: s/or/of/.
14890
14891 2005-03-26  Jim Meyering  <jim@meyering.net>
14892
14893         * modules/check-include-files: Move to ../ and rename to...
14894         * check-module: ...this.
14895
14896 2005-03-25  Jim Meyering  <jim@meyering.net>
14897
14898         * modules/xvasprintf (Files): Add xalloc.h.
14899
14900 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14901
14902         * modules/gettext (Files): config/config.rpath ->
14903         build-aux/config.rpath
14904         * modules/iconv (Files): Likewise.
14905         Problem reported by Oskar Liljeblad.
14906
14907 2005-03-23  Jim Meyering  <jim@meyering.net>
14908
14909         * modules/check-include-files: New script to check for
14910         missing dependencies, multiple includes, etc.
14911
14912         * modules/c-strtold (Depends-on): Add xalloc.
14913         * modules/c-strtod (Depends-on): Add xalloc.
14914         * modules/hash (Depends-on): Add xalloc.
14915         (Files): Remove lib/xalloc.h.
14916
14917         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14918         * modules/userspec (Files): Add lib/inttostr.h.
14919
14920 2005-03-23  Jim Meyering  <jim@meyering.net>
14921
14922         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14923
14924 2005-03-22  Jim Meyering  <jim@meyering.net>
14925
14926         * modules/stat-macros: New module.
14927         * modules/canonicalize, modules/euidaccess, modules/file-type,
14928         * modules/filemode, modules/lchown, modules/makepath,
14929         * modules/rmdir, modules/stat: Depend on new stat-macros module
14930         rather than listing lib/stat-macros.h manually.
14931         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14932
14933 2005-03-22  Jim Meyering  <jim@meyering.net>
14934
14935         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14936
14937 2005-03-22  Bruno Haible  <bruno@clisp.org>
14938
14939         * config/srclist.txt: Replace target directory 'config' with
14940         'build-aux'.
14941         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14942         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14943         ../build-aux/.
14944
14945 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14946
14947         * modules/chdir-long (Depends-on): Add mempcpy.
14948
14949         * modules/acl, modules/backupfile, modules/c-strtod,
14950         modules/c-strtold, modules/canon-host, modules/canonicalize,
14951         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14952         modules/exclude, modules/exitfail, modules/file-type,
14953         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14954         modules/getdate, modules/getline, modules/getpagesize,
14955         modules/getpass, modules/getugroups, modules/group-member,
14956         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14957         modules/inttostr, modules/long-options, modules/makepath,
14958         modules/md5, modules/memcasecmp, modules/memcoll,
14959         modules/modechange, modules/mountlist, modules/path-concat,
14960         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14961         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14962         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14963         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14964         modules/strftime, modules/strndup, modules/strverscmp,
14965         modules/timespec, modules/unlocked-io, modules/userspec,
14966         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14967         modules/yesno:
14968         Remove lib_SOURCES line from Makefile.am section, as this is now
14969         done automatically by the corresponding Autoconf macro.
14970
14971 2005-03-21  Jim Meyering  <jim@meyering.net>
14972
14973         Changes imported from coreutils.
14974
14975         * lib/cycle-check.c: Don't include xalloc.h.
14976
14977         * lib/path-concat.c: Don't include assert.h.
14978         (path_concat): Remove assertion that would have triggered
14979         for ABASE starting with more than one slash.
14980         Reported by Andreas Schwab.
14981
14982         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14983         properly when ABASE is an absolute file name.
14984         Correct the description of this function.
14985         Include <assert.h>.
14986         Add an assertion and a test driver.
14987         This fixes a bug introduced on 2004-07-02.
14988         Andreas Schwab reported the resulting failure of cp --parents:
14989         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14990
14991 2005-03-21  Jim Meyering  <jim@meyering.net>
14992
14993         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14994         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14995
14996 2005-03-21  Jim Meyering  <jim@meyering.net>
14997         and  Paul Eggert  <eggert@cs.ucla.edu>
14998
14999         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15000         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15001         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15002         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15003         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15004         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15005         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15006         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15007         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15008         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15009         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15010         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15011         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15012         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15013         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15014         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15015         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15016         for these modules.
15017
15018 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15019
15020         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15021         (which shouldn't happen), generate nothing instead of returning 0
15022         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15023
15024 2005-03-16  Bruno Haible  <bruno@clisp.org>
15025
15026         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15027         HAVE_LONGLONG_64BIT.
15028
15029 2005-03-16  Bruno Haible  <bruno@clisp.org>
15030
15031         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15032         HAVE_LONGLONG_64BIT.
15033
15034 2005-03-16  Bruno Haible  <bruno@clisp.org>
15035
15036         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15037         HAVE_LONGLONG_64BIT.
15038
15039 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15040
15041         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15042         reliably distinguish strftime failure from empty output on POSIX
15043         hosts.
15044
15045 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15046
15047         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15048         (iconv_string): Don't guess a size-zero buffer, as that might cause
15049         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15050         result would be 'too large', where 'too large' is (heuristically)
15051         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15052         overflow concerns.  This will prevent some unwanted malloc failures
15053         when the inputs are very large.
15054
15055 2005-03-15  Karl Berry  <karl@gnu.org>
15056
15057         * config/srclist.txt (config.rpath): from gettext.
15058         * config/config.rpath: update.
15059
15060 2005-03-15  Bruno Haible  <bruno@clisp.org>
15061
15062         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15063         to 'negate'.
15064
15065         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15066         variable.
15067
15068         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15069         results.
15070
15071 2005-03-14  Simon Josefsson  <jas@extundo.com>
15072
15073         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15074         <fx@gnu.org>.
15075
15076 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15077
15078         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15079         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15080         intprops.h.
15081         * lib/strtol.c: Likewise.
15082
15083 2005-03-14  Jim Meyering  <jim@meyering.net>
15084
15085         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15086         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15087         to be nonzero so that we (and caller) can detect the difference
15088         between a valid zero-length expansion and an error return, even
15089         when the underlying strftime fails before writing anything into
15090         that location.
15091
15092 2005-03-14  Bruno Haible  <bruno@clisp.org>
15093
15094         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15095         Update from GNU gettext 0.14.3.
15096
15097 2005-03-10  Jim Meyering  <jim@meyering.net>
15098
15099         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15100
15101 2005-03-10  Jim Meyering  <jim@meyering.net>
15102
15103         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15104         so that this module works on systems without fchdir.
15105
15106 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15107
15108         Factor int-properties macros into a single file, except for
15109         glibc-related files.
15110         * lib/intprops.h: New file.
15111         * lib/getloadavg.c: Include it instead of limits.h.
15112         (INT_STRLEN_BOUND): Remove.
15113         * lib/human.c: Include intprops.h.
15114         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15115         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15116         302/1000.
15117         * lib/inttostr.h: Include intprops.h instead of limits.h.
15118         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15119         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15120         for consistency with intprops.h.
15121         (time_t_is_integer, twos_complement_arithmetic): Use them.
15122         * lib/sig2str.h: Include <signal.h>, intprops.h.
15123         (INT_STRLEN_BOUND): Remove.
15124         * lib/strftime.c (TYPE_SIGNED): Remove.
15125         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15126         * lib/strtol.c: Adjust comments to match intprops.h.
15127         * lib/userspec.c: Include intprops.h.
15128         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15129         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15130         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15131         instead of rolling our own expressions.
15132         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15133
15134         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15135         instead of int.
15136         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15137         the right thing even if adding 1900 would overflow.  Similarly
15138         for tm_mon + 1 and tm_yday + 1.
15139         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15140         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15141         (DO_SIGNED_NUMBER): New macro.
15142         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15143
15144 2005-03-07  Bruno Haible  <bruno@clisp.org>
15145
15146         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15147
15148 2005-03-07  Bruno Haible  <bruno@clisp.org>
15149
15150         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15151
15152 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15153
15154         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15155         (func_import): Only replace files via --import when they have actually
15156         changed.
15157
15158 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15159
15160         * m4/mmap-anon.m4: New file.
15161         * m4/pagealign_alloc.m4: New file.
15162
15163 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15164             Bruno Haible  <bruno@clisp.org>
15165
15166         * modules/pagealign_alloc: New file.
15167         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15168
15169 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15170             Bruno Haible  <bruno@clisp.org>
15171
15172         * lib/pagealign_alloc.h: New file.
15173         * lib/pagealign_alloc.c: New file.
15174
15175 2005-03-03  Bruno Haible  <bruno@clisp.org>
15176
15177         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15178         Use an all-permissive copyright notice, recommended by RMS.
15179
15180 2005-03-02  Bruno Haible  <bruno@clisp.org>
15181
15182         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15183         of AIX, the replacement has to be done only after <string.h> is
15184         included, therefore not in config.h. stpncpy.h does the replacement,
15185         and stpncpy.c uses it.
15186
15187 2005-03-02  Bruno Haible  <bruno@clisp.org>
15188
15189         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15190         stpncpy.c uses it.
15191
15192 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15193
15194         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15195         The workaround isn't strictly needed for POSIX conformance, and
15196         it's too much of a pain to configure and maintain.  We'll ask
15197         people to fix their kernels instead.
15198         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15199         (NANOSLEEP_BUG_WORKAROUND): Remove.
15200         (xnanosleep): Remove the workaround.
15201
15202 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15203
15204         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15205         Reported by Derek Price.
15206         (Include): Add "timespec.h".
15207
15208         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15209
15210 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15211
15212         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15213         to detect nanosleep bug.
15214
15215 2005-03-01  Bruno Haible  <bruno@clisp.org>
15216
15217         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15218
15219 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         * modules/gethrxtime: New file.
15222         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15223         (Depends-on): Add gethrxtime.
15224         (configure.ac): Add gl_XNANOSLEEP.
15225         (Makefile.am): Remove lib_SOURCES line.
15226
15227 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15228
15229         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15230         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15231
15232 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15233
15234         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15235         * lib/timespec.h (gettime): Return void, since it always
15236         succeeds now.  All uses changed.
15237         * lib/gettime.c (gettime) Likewise.
15238         [HAVE_NANOTIME]: Prefer nanotime.
15239         Assume gettimeofday succeeds, as POSIX requires.
15240         Assime time () succeeds, since other code already does.
15241         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15242         (timespec_subtract): Remove.
15243         (NANOSLEEP_BUG_WORKAROUND): New constant.
15244         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15245         things considerably.  Use it only on GNU/Linux hosts, since the
15246         workaround shouldn't be needed elsewhere.
15247
15248 2005-02-24  Bruno Haible  <bruno@clisp.org>
15249
15250         * modules/gettext (Files): Add m4/glibc2.m4.
15251
15252 2005-02-24  Bruno Haible  <bruno@clisp.org>
15253
15254         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15255         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15256         * m4/progtest.m4:
15257         Update from GNU gettext 0.14.2.
15258         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15259
15260 2005-02-24  Bruno Haible  <bruno@clisp.org>
15261
15262         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15263         * lib/config.charset: Update from GNU gettext 0.14.2.
15264
15265 2005-02-24  Bruno Haible  <bruno@clisp.org>
15266
15267         * lib/gettext.h: Update from GNU gettext 0.14.2.
15268
15269 2005-02-23  Simon Josefsson  <jas@extundo.com>
15270
15271         * m4/iconvme.m4: New file.
15272
15273 2005-02-23  Jim Meyering  <jim@meyering.net>
15274
15275         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15276         change.
15277         Thanks to Bruno Haible for catching it.
15278
15279 2005-02-22  Simon Josefsson  <jas@extundo.com>
15280
15281         * modules/iconvme: New file.
15282
15283         * MODULES.html.sh: Add iconvme.
15284
15285 2005-02-22  Simon Josefsson  <jas@extundo.com>
15286
15287         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15288
15289 2005-02-22  Simon Josefsson  <jas@extundo.com>
15290
15291         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15292
15293 2005-02-22  Jim Meyering  <jim@meyering.net>
15294
15295         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15296         s/ifndef/ifdef/.
15297
15298 2005-02-20  Neil Conway  <neilc@samurai.com>
15299
15300         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15301         returned by OSX/Darwin if the specified buffer is not large
15302         enough for the hostname.
15303
15304 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15305
15306         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15307         pass it to _help, otherwise the latter coredumps trying to
15308         dereference state.root_argp.
15309
15310 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15311
15312         * modules/chdir-long (Depends-on): Add memrchr.
15313         * modules/memrchr (Files): Add lib/memrchr.h.
15314         (Include): "memrchr.h".
15315
15316 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15317
15318         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15319
15320 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15321
15322         * lib/memrchr.h: New file.
15323         * lib/chdir-long.c: Include it.
15324         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15325         Don't bother including stddef.h.
15326
15327 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15328
15329         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15330         inclusion.
15331         Include <sys/types.h>, for dev_t.
15332         (ME_DUMMY, ME_REMOTE): Move from here....
15333         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15334         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15335         Dmitry V. Levin.
15336         Include mountlist.h first, to test the interface.
15337
15338 2005-01-29  Bruno Haible  <bruno@clisp.org>
15339
15340         * lib/progname.c (program_name): Initialize.
15341         Needed when linking statically on MacOS X.
15342
15343 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15344
15345         Sync from coreutils.
15346         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15347         (Depends-on): Add c-strtod.
15348         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15349
15350 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15351
15352         Sync from coreutils.
15353         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15354
15355         Remove files that are specific to coreutils.
15356         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15357
15358 2005-01-28  Bruno Haible  <bruno@clisp.org>
15359
15360         * modules/javacomp: New file.
15361         * MODULES.html.sh (Java): Add javacomp.
15362
15363 2005-01-28  Bruno Haible  <bruno@clisp.org>
15364
15365         * m4/javacomp.m4: New file, from GNU gettext.
15366
15367 2005-01-28  Bruno Haible  <bruno@clisp.org>
15368
15369         * lib/javacomp.sh.in: New file, from GNU gettext.
15370         * lib/javacomp.h: New file, from GNU gettext.
15371         * lib/javacomp.c: New file, from GNU gettext.
15372
15373 2005-01-26  Simon Josefsson  <jas@extundo.com>
15374
15375         * lib/gai_strerror.c: Use GPL in header.
15376
15377 2005-01-26  Bruno Haible  <bruno@clisp.org>
15378
15379         * modules/javaexec: New file.
15380         * MODULES.html.sh (Java): Add javaexec.
15381
15382 2005-01-26  Bruno Haible  <bruno@clisp.org>
15383
15384         * m4/javaexec.m4: New file, from GNU gettext.
15385
15386 2005-01-26  Bruno Haible  <bruno@clisp.org>
15387
15388         * lib/javaexec.sh.in: New file, from GNU gettext.
15389         * lib/javaexec.h: New file, from GNU gettext.
15390         * lib/javaexec.c: New file, from GNU gettext.
15391
15392 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15393
15394         * modules/lchown (Depends-on): Remove lchown.h
15395
15396 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15397
15398         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15399         must be defined if the header file was not found, in order
15400         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15401
15402 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15403
15404         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15405         initializers for struct pentry_state.
15406         (__argp_error): Check return value of __asprintf
15407         (__argp_failure): Translate error message
15408
15409         * lib/argp-parse.c: Removed braces around the expansion of N_()
15410
15411 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15412
15413         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15414         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15415         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15416         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15417         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15418         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15419         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15420         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15421         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15422         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15423         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15424         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15425         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15426         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15427         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15428         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15429         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15430         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15431         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15432         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15433         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15434         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15435         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15436         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15437         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15438         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15439         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15440         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15441         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15442         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15443         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15444         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15445         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15446         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15447         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15448         Use an all-permissive copyright notice, recommended by RMS.
15449
15450 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15451
15452         * modules/chdir-long (Depends-on): Remove mempcpy.
15453
15454 2005-01-21  Jim Meyering  <jim@meyering.net>
15455
15456         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15457         same value as for Solaris 9.
15458
15459         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15460         component length.  This included changing the parameter to be
15461         of type `char *' rather than `char const *'.
15462         * lib/chdir-long.h (chdir_long): Update prototype.
15463
15464         * lib/openat.c (fdopendir, fstatat): New functions.
15465         * lib/openat.h: Include headers required for use of DIR and struct
15466         stat.
15467         [AT_SYMLINK_NOFOLLOW]: Define.
15468         (fdopendir, fstatat): Add prototypes.
15469
15470 2005-01-21  Bruno Haible  <bruno@clisp.org>
15471
15472         * modules/classpath: New file.
15473         * MODULES.html.sh (Java): Add classpath.
15474
15475 2005-01-21  Bruno Haible  <bruno@clisp.org>
15476
15477         * lib/classpath.h: New file, from GNU gettext.
15478         * lib/classpath.c: New file, from GNU gettext.
15479
15480 2005-01-20  Simon Josefsson  <jas@extundo.com>
15481
15482         * modules/version-etc-fsf: New file.
15483
15484 2005-01-20  Simon Josefsson  <jas@extundo.com>
15485
15486         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15487         * lib/version-etc.c: Remove version_etc_copyright.
15488         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15489         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15490
15491 2005-01-20  Simon Josefsson  <jas@extundo.com>
15492
15493         * lib/base64.h (isbase64): Add.
15494
15495         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15496         using a unsigned prototype, don't inline.
15497         (base64_decode): Use it.
15498
15499 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15500
15501         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15502         it.
15503
15504 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15505
15506         * lib/save-cwd.c (save_cwd): Remove code to support the case
15507         where fchdir is missing or flaky.
15508
15509 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15510
15511         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15512
15513 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15514
15515         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15516         AC_LIBSOURCES now does this.
15517         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15518         with new ullong_max module.
15519
15520 2005-01-19  Bruno Haible  <bruno@clisp.org>
15521
15522         * modules/sh-quote: New file.
15523         * MODULES.html.sh (Executing programs): Add sh-quote.
15524
15525 2005-01-19  Bruno Haible  <bruno@clisp.org>
15526
15527         * lib/sh-quote.h: New file, from GNU gettext.
15528         * lib/sh-quote.c: New file, from GNU gettext.
15529
15530 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15531
15532         Merge from coreutils.
15533         * m4/ullong_max.m4: New file.
15534         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15535         (gl_MACROS): Assume localeconv exists.
15536
15537 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15538
15539         Merge changes from coreutils, as described below in several
15540         changelogs dated today.
15541
15542         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15543         (O_DIRECTORY): Remove; not needed here, since "." must be
15544         a directory.  All uses removed.
15545         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15546         universal on Suns, and we also need to test for IRIX.
15547         Revamp code to use 'if' rather than '#if'.
15548         Avoid unnecessary comparison of cwd->desc to 0.
15549
15550         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15551         for known valid error numbers rather than observed invalid ones.
15552
15553 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * modules/ullong_max: New file.
15556
15557         * modules/chdir-long, modules/openat: New files.
15558         * modules/save-cwd (Depends-on): Depend on chdir-long.
15559         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15560
15561 2005-01-18  Jim Meyering  <jim@meyering.net>
15562
15563         Merge from coreutils.
15564         * m4/chdir-long.m4, m4/openat.m4: New files.
15565         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15566         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15567         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15568         is sane and DOES follow symlinks.  Besides, testing 20 different
15569         systems found no broken chown implementations.
15570         Prompted by a change in rsync's copy of this macro.
15571         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15572
15573         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15574
15575         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15576         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15577         NULL-means-set-to-current-time semantics.
15578         Remove temporary file immediately, rather than waiting
15579         for configure's at-exit trap code to do it.
15580
15581 2005-01-18  Jim Meyering  <jim@meyering.net>
15582
15583         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15584
15585         * lib/utimens.c (futimens): Account for the fact that futimes
15586         can also fail with errno == ENOSYS or errno == ENOENT.
15587         Patch from Dmitry V. Levin.
15588
15589         Change the name of the robust chdir function from chdir to chdir_long.
15590         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15591         (restore_cwd): Use chdir_long, not chdir.
15592         * lib/chdir-long.c: Renamed from chdir.c.
15593         * lib/chdir-long.h: Renamed from chdir.h.
15594         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15595         Hurd.
15596
15597 2005-01-18  Bruno Haible  <bruno@clisp.org>
15598
15599         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15600         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15601         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15602         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15603         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15604         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15605         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15606         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15607         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15608         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15609         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15610         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15611         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15612         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15613         Use an all-permissive copyright notice, recommended by RMS.
15614
15615 2005-01-18  Bob Proulx  <bob@proulx.com>
15616
15617         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15618         simplify offsetof() macro construct to avoid compile failure with
15619         native HP-UX 11.0 ANSI C compiler.
15620
15621 2005-01-17  Bruno Haible  <bruno@clisp.org>
15622
15623         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15624         redundant because stpncpy.m4 takes care of it.
15625
15626 2005-01-17  Bruno Haible  <bruno@clisp.org>
15627
15628         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15629
15630 2005-01-17  Bruno Haible  <bruno@clisp.org>
15631
15632         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15633         used.
15634
15635 2005-01-17  Bruno Haible  <bruno@clisp.org>
15636
15637         * lib/fwriteerror.h (fwriteerror): Change specification to include
15638         fclose.
15639         * lib/fwriteerror.c: Include <stdbool.h>.
15640         (fwriteerror): At the end, close the file stream. Record whether
15641         stdout was already closed.
15642
15643 2005-01-17  Bruno Haible  <bruno@clisp.org>
15644
15645         * lib/execute.c (environ): Declare if needed.
15646         * lib/pipe.c (environ): Likewise.
15647         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15648
15649 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15650
15651         * modules/argp: Depend on vsnprintf
15652
15653 2005-01-10  Jim Meyering  <jim@meyering.net>
15654
15655         * modules/closeout (Depends-on): Add atexit.
15656
15657 2005-01-06  Bruno Haible  <bruno@clisp.org>
15658
15659         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15660
15661 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15664         definitions to be after all include files, to avoid collisions.
15665         Problem reported by Bob Proulx.
15666
15667 2005-01-04  Jim Meyering  <jim@meyering.net>
15668
15669         Changes imported from coreutils.
15670         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15671         as the mkstemp template, use a temporary directory and an
15672         8.3-friendly template to avoid trouble on systems like DJGPP.
15673         Reported by Juan M. Guerrero via Stepan Kasal.
15674         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15675         close. Remove the temporary directory right away, rather than waiting
15676         for configure's at-exit trap code to do it.
15677         Suggestion from Stepan Kasal.
15678
15679 2005-01-01  Simon Josefsson  <jas@extundo.com>
15680
15681         * gnulib-tool: Print #include directives when --import'ing.
15682
15683 2004-12-28  Simon Josefsson  <jas@extundo.com>
15684
15685         * tests/test-base64.c: Include required header files.  Remove
15686         unused variables.
15687
15688 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15689
15690         * modules/error (Depends-on): Remove gettext.
15691
15692 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15693
15694         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15695         not needed.  This removes a dependency on the gettext module.
15696         [defined _LIBC]: Do not include <libintl.h>; not needed.
15697
15698 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15701         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15702
15703 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15704
15705         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15706         HAVE_DECL_STRTOLD.
15707
15708 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15709
15710         * modules/getdate (Depends-on): Remove alloca-opt.
15711
15712 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15713
15714         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15715
15716 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15717
15718         * lib/argp-parse.c: Include <stddef.h>.
15719         (alignof, alignto): New macros.
15720         (parser_init): Don't assume that void * is aligned sufficiently
15721         for struct option.
15722
15723         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15724         need to extend the stack.
15725         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15726         large.
15727
15728 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15729
15730         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15731
15732 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15733
15734         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15735         (2004-10-24) change.  Apparently this was a false alarm.
15736
15737         * modules/getdate: Depend on alloca-opt, not alloca.
15738
15739 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15740
15741         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15742         Remove now-obsolete comment about AIX.
15743         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15744         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15745         (YYMAXDEPTH): New macro.
15746
15747 2004-12-18  Simon Josefsson  <jas@extundo.com>
15748
15749         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15750
15751 2004-12-18  Bruno Haible  <bruno@clisp.org>
15752
15753         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15754
15755 2004-12-18  Bruno Haible  <bruno@clisp.org>
15756
15757         * lib/fatal-signal.c (fatal_signals): Make non-const.
15758         (init_fatal_signals): New function.
15759         (uninstall_handlers, install_handlers): Ignore signals that were set to
15760         SIG_IGN.
15761         (at_fatal_signal): Call init_fatal_signals.
15762         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15763         SIG_IGN.
15764         Reported by Paul Eggert.
15765
15766 2004-12-18  Bruno Haible  <bruno@clisp.org>
15767
15768         * doc/alloca.texi: New file.
15769         * doc/alloca-opt.texi: New file.
15770
15771 2004-12-17  Jim Meyering  <jim@meyering.net>
15772
15773         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15774         Otherwise, install-sh could exit with improper exit status when
15775         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15776
15777 2004-12-16  Simon Josefsson  <jas@extundo.com>
15778
15779         * tests/test-base64.c: Add license.
15780
15781 2004-12-15  Stepan Kasal  <address@hidden>
15782
15783         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15784
15785 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15786
15787         * modules/getcwd (Files): Add m4/d-ino.m4.
15788         Suggested by Mark D. Baushke.
15789
15790 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15791
15792         * lib/getdate.y (textint): New member "negative".
15793         (time_zone_hhmm): New function.
15794         Expect 14 shift-reduce conflicts, not 13.
15795         (o_colon_minutes): New rule.
15796         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15797         (yylex): Set the "negative" member of signed numbers.
15798
15799 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15800
15801         * doc/getdate.texi (Time of day items, Time zone items):
15802         Describe new formats +00:00, UTC+00:00.
15803
15804 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15805
15806         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15807         spurious "-l"s.  Problem reported by Stepan Kasal.
15808
15809 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15810
15811         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15812         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15813
15814 2004-12-04  Simon Josefsson  <jas@extundo.com>
15815
15816         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15817         Vandoorselaere <yoann@prelude-ids.org>.
15818
15819 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15820
15821         Changes imported from coreutils.
15822         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15823         exist.
15824         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15825
15826 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15827
15828         Changes imported from coreutils.
15829         * lib/hard-locale.c: Assume <locale.h> exists.
15830         Include "strdup.h".
15831         (GLIBC_VERSION): New macro.
15832         (hard_locale): Assume setlocale exists.
15833         Rewrite to avoid #ifdef.
15834         Use strdup rather than malloc + strcpy.
15835         * lib/human.c: Assume <locale.h> exists.
15836         (human_readable): Assume localeconv exists.
15837
15838 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15839
15840         * modules/hard-locale (Depends-on): Add strdup.
15841
15842 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15843
15844         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15845         convert T2, not T.  (Imported from libc.)
15846
15847 2004-11-30  Simon Josefsson  <jas@extundo.com>
15848
15849         * modules/restrict (License): Change to LGPL.
15850
15851 2004-11-30  Simon Josefsson  <jas@extundo.com>
15852
15853         * m4/restrict.m4: Add copyright and copying conditions.
15854
15855 2004-11-30  Simon Josefsson  <jas@extundo.com>
15856
15857         * m4/base64.m4: New file.
15858
15859 2004-11-30  Simon Josefsson  <jas@extundo.com>
15860
15861         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15862         base64.
15863
15864         * tests/test-base64.c: New file.
15865
15866         * modules/base64: New file.
15867
15868 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15869
15870         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15871         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15872
15873         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15874
15875 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15876
15877         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15878         (__getcwd.c): Don't restore errno; glibc doesn't.
15879         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15880         first, falling back to our code only if its results look suspicious.
15881         Ensure that the resulting buffer is only as large as necessary.
15882
15883         * lib/readutmp.c: Include readutmp.h first.
15884         Include <errno.h>, since readutmp.h no longer does that.
15885         * lib/readutmp.h: Don't include <errno.h>,
15886         <sys/param.h>, <time.h>; not needed to establish interface.
15887         (errno): Remove decl.
15888         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15889         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15890         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15891
15892 2004-11-28  Simon Josefsson  <jas@extundo.com>
15893
15894         * lib/base64.h, base64.c: New file.
15895
15896 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15897
15898         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15899
15900 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15901
15902         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15903         (Depends-on): Remove pathmax, same.  Add mempcpy.
15904         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15905         (Makefile.am): Append getcwd.h to lib_SOURCES.
15906         (Include): Add getcwd.h.
15907         (Maintainer): Change from Jim Meyering to "all, glibc",
15908         since getdate now uses intended-for-glibc code.
15909         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15910         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15911
15912 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15913
15914         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15915         HP's ANSI C compiler.
15916         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15917         Declaring int functions causes warnings on some modern systems and
15918         shouldn't be needed to compile on ancient ones.
15919         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15920         defined.
15921
15922         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15923         with the following changes.
15924         (__set_errno): Parenthesize properly.
15925         Include <stdbool.h>.
15926         (MIN, MAX, MATCHING_INO): New macros.
15927         (__getcwd): Define with prototype, not K&R form.
15928         Use heuristics to allocate default buffer on stack if possible.
15929         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15930         behavior, and to avoid the PATH_MAX limit when computing
15931         ../../../../...
15932         Use MATCHING_INO to compare inode number to file.
15933         Check for arithmetic overflow in size calculations.
15934         Fix bug in reallocation of dot array that caused getcwd to fail
15935         on directories nested deeper than 75.
15936         Be more careful about saving errno on error.
15937         Do not use realloc; use only free+malloc, as this is a bit
15938         more flexible and avoids a needless copy operation.
15939         Do not inspect st_dev and st_ino for symbolic links; POSIX
15940         doesn't specify the latter.
15941         Check for closedir errors.
15942         Avoid needless casts.
15943         Use "#ifdef weak_alias" around weak_alias, to be like other
15944         glibc code.
15945         The following changes to getcwd.c have effect only when used in
15946         gnulib; they have no effect inside glibc proper.
15947         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15948         as alloca isn't used.
15949         (alloca, __alloca): Likewise.
15950         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15951         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15952         unconditionally, as gnulib assumes C89 or better.
15953         Do not include <sys/param.h>.
15954         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15955         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15956         better.
15957         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15958         Include <dirent.h> in a way that is compatible with modern Autoconf.
15959         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15960         New macros, if not already defined.
15961         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15962         Use "_LIBC", not "defined _LIBC", for consistency.
15963         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15964         a mempcpy module.
15965         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15966         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15967         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15968         credit only to Jim Meyering and adjust the copyright dates.
15969         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15970         <stdlib.h>, <unistd.h>, "pathmax.h".
15971         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15972         (INITIAL_BUFFER_SIZE): Remove.
15973         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15974
15975 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15976
15977         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15978         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15979         Use the _ONCE methods, for efficiency.
15980         Check for fcntl.h.  In test program, include <errno.h>
15981         and <fcntl.h> if available.  Remove old K&R cruft from
15982         test program.  Check for common errors in GNU/Linux,
15983         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15984         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15985         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15986         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15987         name accordingly.
15988         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15989         accommodate new getcwd.c.
15990         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15991         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15992         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15993         that's all we need now.
15994
15995 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15996
15997         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15998         argp-parse.c depends on getopt internals, that means we should
15999         always use our getopt, to be on the safe side.
16000         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16001         order not to spoil the result of an eventual previous invocation
16002         of gl_GETOPT_SUBSTITUTE.
16003
16004 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16005
16006         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16007         redefinition warnings. To avoid them, include the defines
16008         in `#if !defined __need_getopt ... #endif'. The only place
16009         where __getopt_argv_const is used is in definitions
16010         of getopt_long and getopt_long_only below, which are as well
16011         protected by `#ifndef __need_getopt'.
16012         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16013         __need_getopt after including <stdio.h> and <unistd.h> These
16014         headers might have defined it.
16015
16016 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16017
16018         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16019
16020 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16021
16022         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16023         (futimens): New function, which uses futimes if available.
16024         (futimens, utimens): Support timespec==NULL, with same semantics
16025         as utime and utimens.
16026         * lib/utimens.h (futimens): New decl.
16027
16028 2004-11-23  Jim Meyering  <jim@meyering.net>
16029
16030         * lib/getopt_.h: Remove trailing blanks.
16031
16032 2004-11-23  Jim Meyering  <jim@meyering.net>
16033
16034         * lib/__fpending.c: Add comment.
16035
16036 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16037
16038         * modules/canonicalize (Depends-on): Add xreadlink.
16039         Problem reported by James Youngman.
16040
16041 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16042
16043         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16044         New macros.
16045         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16046         optopt): Use them instead of invoking ## directly; otherwise, the
16047         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16048
16049 2004-11-19  Bruno Haible  <bruno@clisp.org>
16050
16051         * lib/strtok_r.c: Move comments from here...
16052         * lib/strtok_r.h: ... to here.
16053
16054 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16055
16056         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16057         implementations that mishandle size_t overflow.
16058
16059 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16060
16061         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16062         might fail.  Problem reported by Yoann Vandoorselaere.
16063         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16064         implementations that mishandle size_t overflow.
16065
16066 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16067
16068         * modules/canon-host (Depends-on): Add strdup.
16069
16070 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16071
16072         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16073
16074 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16075
16076         * lib/canon-host.c: Include "strdup.h".
16077         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16078         Use strdup instead of malloc/strcpy to duplicate strings.
16079
16080         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16081         (human_space_before_unit): New constant.
16082         * lib/human.c (human_readable): Support it.
16083
16084         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16085         (xgetcwd): Set errno correctly when failing.
16086         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16087         the failure is actually due to a PATH_MAX problem.
16088
16089         Further getopt changes to make it more likely that glibc will
16090         buy the changes back.
16091         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16092         (getopt): Use it, so to preserve glibc semantic
16093         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16094         when compiling for libc.
16095         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16096         (getopt_long, getopt_long_only): Use it.
16097
16098         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16099         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16100         (getopt): Argv is now char * const *, as per standard.
16101         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16102         not char *__getopt_argv_const *.
16103         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16104         _getopt_long_only_r): Likewise.
16105         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16106         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16107         _getopt_long_r, _getopt_long_only_r): Likewise.
16108         * lib/getopt_.h (__getopt_argv_const): Remove.
16109         (getopt): Argv is now char * const *, as per standard.
16110
16111         * lib/getdate.y (tORDINAL): New token.
16112         (day, relunit): Allow it for relative times.
16113         (relative_time_table): Use tORDINAL for ordinals.
16114
16115 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16116
16117         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16118         Document that "second" isn't allowed as an ordinal number.
16119
16120 2004-11-16  Jim Meyering  <jim@meyering.net>
16121
16122         * modules/closeout (Depends-on): Add fpending.
16123
16124 2004-11-15  Jim Meyering  <jim@meyering.net>
16125
16126         * lib/closeout.c: Include "__fpending.h" once again.
16127         Include <stdbool.h>.
16128         (close_stdout): Don't fail just because stdout was closed initially,
16129         since some programs don't write to stdout in the normal course of
16130         operation (other than --version and --help), and we don't want this
16131         function to make e.g. `touch file >&-' fail.
16132         But do fail if it was closed and someone has tried to write to it.
16133         E.g., `printf foo >&-' must fail.
16134
16135 2004-11-13  Jim Meyering  <jim@meyering.net>
16136
16137         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16138
16139 2004-11-12  Simon Josefsson  <jas@extundo.com>
16140
16141         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16142         small doc fix is still pending.
16143
16144 2004-11-11  Simon Josefsson  <jas@extundo.com>
16145
16146         * modules/strtok_r: New file.
16147
16148         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16149         strtok_r.
16150
16151 2004-11-11  Simon Josefsson  <jas@extundo.com>
16152
16153         * m4/strtok_r.m4: New file.
16154
16155         * m4/getopt.m4: Replace opterr.
16156
16157 2004-11-11  Simon Josefsson  <jas@extundo.com>
16158
16159         * lib/strtok_r.h, strtok_r.c: New file.
16160
16161 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16162
16163         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16164         of replacing opterr, getopt, etc.  This should handle the
16165         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16166
16167 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16168
16169         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16170         we can stop lying to compilers about the constness of argv when we
16171         are compiled outside glibc.
16172         (getopt, getopt_long, getopt_long_only): Use it.
16173         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16174         _getopt_internal, getopt): Likewise.
16175         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16176         _getopt_long_only_r): Likewise.
16177         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16178         _getopt_long_r, _getopt_long_only_r): Likewise.
16179
16180         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16181         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16182         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16183         the other external symbols.
16184         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16185         declaration, since the above renaming now works around collisions.
16186
16187 2004-11-11  Jim Meyering  <jim@meyering.net>
16188
16189         * lib/linebreak.c: Remove trailing blanks.
16190         * lib/alloca_.h: Likewise.
16191         * lib/acosl.c: Likewise.
16192         * lib/euidaccess.c: Likewise.
16193         * lib/allocsa.h: Likewise.
16194
16195 2004-11-10  Simon Josefsson  <jas@extundo.com>
16196
16197         * m4/getaddrinfo.m4: New file.
16198
16199 2004-11-10  Simon Josefsson  <jas@extundo.com>
16200
16201         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16202
16203 2004-11-10  Simon Josefsson  <jas@extundo.com>
16204
16205         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16206         getaddrinfo.
16207
16208         * modules/getaddrinfo: New file.
16209
16210 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16211
16212         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16213
16214 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16215
16216         * lib/mktime.c (SHR): New macro, which is a portable
16217         substitute for >> that should work even on Crays.
16218         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16219         Problem reported by Mark D. Baushke in
16220         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16221         * lib/getdate.y (SHR): Likewise.
16222         (tm_diff): Use it.
16223         * lib/strftime.c (SHR): Likewise.
16224         (tm_diff): Use it.
16225         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16226         quote_these_too, so that right shifts are well defined.  All uses
16227         changed.
16228
16229 2004-11-10  Jim Meyering  <jim@meyering.net>
16230
16231         Ensure that no close failure goes unreported.
16232         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16233         return early when it seems there's nothing to flush.
16234         Don't include __fpending.h.
16235
16236 2004-11-10  Jim Meyering  <jim@meyering.net>
16237
16238         * modules/closeout (Depends-on): Remove fpending.
16239
16240 2004-11-10  Jim Meyering  <jim@meyering.net>
16241
16242         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16243
16244 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16245
16246         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16247         gl_FUNC_STRFTIME.
16248         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16249         and AC_REQUIRE when possible, to avoid duplicate checks.
16250         Check for <wchar.h>.
16251
16252 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16253
16254         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16255
16256 2004-11-09  Bruno Haible  <bruno@clisp.org>
16257
16258         * m4/sockpfaf.m4: New file.
16259
16260 2004-11-05  Bruno Haible  <bruno@clisp.org>
16261
16262         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16263         Reported by Mark D. Baushke <mdb@cvshome.org>.
16264
16265 2004-11-04  Bruno Haible  <bruno@clisp.org>
16266
16267         2004-09-11  Bruno Haible  <bruno@clisp.org>
16268                 * allocsa.valgrind: New file.
16269         2004-02-06  Bruno Haible  <bruno@clisp.org>
16270                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16271                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16272                 Reported by Christopher Seip <chris.seip@hp.com>.
16273
16274 2004-11-04  Bruno Haible  <bruno@clisp.org>
16275
16276         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16277         (Makefile.am): Distribute it.
16278
16279 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16280
16281         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16282         with errno == ERANGE if the buffer is too small.
16283         Problem reported by Mark D. Baushke.
16284
16285 2004-11-03  Albert Chin  <china@thewrittenword.com>
16286             Paul Eggert  <eggert@cs.ucla.edu>
16287
16288         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16289         equivalent, substitute $ac_type for equivalent type rather than
16290         blindly using uint32_t *always* which won't work if uint32_t is not
16291         available.  Define _UINT32_T to work around typedef of uint32_t if
16292         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16293         2.5.1.
16294
16295 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16296
16297         * m4/jm-macros.m4: Sync from coreutils.
16298         (gl_MACROS): Check for mbrlen, for pathchk.
16299         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16300
16301 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16302
16303         * lib/xreadlink.c (MAXSIZE): New macro.
16304         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16305         size does not exceed MAXSIZE.  Avoid cast.
16306         As suggested by Mark D. Baushke in
16307         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16308         if readlink fails with buffer size just under MAXSIZE, try again
16309         with MAXSIZE.
16310
16311 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16312
16313         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16314
16315 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16316         and  Paul Eggert  <eggert@cs.ucla.edu>
16317
16318         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16319         (get_date): Overparenthesize to avoid GCC warning.
16320
16321 2004-11-02  Bruno Haible  <bruno@clisp.org>
16322
16323         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16324         returns void.
16325
16326 2004-11-02  Bruno Haible  <bruno@clisp.org>
16327
16328         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16329         function returns void.
16330
16331 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16332
16333         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16334         fflush_unlocked, flockfile, funlockfile, funlockfile,
16335         fputs_unlocked, putc_unlocked.
16336
16337 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16338
16339         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16340         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16341         already declared.
16342
16343 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16344
16345         * modules/getdate (Files): Add doc/getdate.texi.
16346         (Depends-on): Add setenv, xalloc.
16347
16348 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16349
16350         * lib/getdate.y: Add support for TZ="foo" within a date string.
16351         Fix some bugs near time_t boundaries.  Reject dates with
16352         out-of-range components, e.g., "Sept 31".
16353         Include <stdlib.h>, "setenv.h", "xalloc.h".
16354         (ISDIGIT_LOCALE): Remove; unused.
16355         Note that the TZ and time functions used here are not reentrant.
16356         (mktime_ok, get_tz): New functions.
16357         (TZBUFSIZE): New constant.
16358         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16359         This requires that we sometimes generate our own TZ="XXX..." setting.
16360
16361 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16362
16363         * doc/getdate.texi: New file, from coreutils with modifications for
16364         the new TZ parsing.
16365
16366 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16367
16368         * lib/mktime.c (not_equal_tm): Remove redundant check.
16369
16370 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16371
16372         * modules/regex (lib_SOURCES): Add regex.c.
16373         Reported by James Youngman in
16374         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16375
16376 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16377
16378         * lib/getdate.y: Use Bison 1.875 features, and some minor
16379         code cleanups.  This change does not affect semantics.
16380         Don't include <stdlib.h>; no longer needed.
16381         Don't include unlocked-io.h; only the "#if TEST" code uses
16382         stdio, and performance isn't crucial there.
16383         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16384         Bison 1.875 features as described below.
16385         All uses of "PC." replaced by "pc->".
16386         (YYSTYPE): Add a forward declaration.
16387         (yylex, yyerror): Use full prototypes in forward decls.
16388         Use "%pure-parser" rather than obsolescent "%pure_parser".
16389         Use %parse-param and %lex-param instead of obsolescent
16390         YYPARSE_PARAM and YYLEX_PARAM.
16391         (meridian_table, month_and_day_table, time_units_table,
16392         relative_time_table, time_zone_table, military_table,
16393         lookup_zone, lookup_word, get_date):
16394         Use NULL instead of 0 where appropriate.
16395         (to_hour): Avoid abort (), to avoid a dependency on
16396         stdlib.h.
16397         (yyerror, yylex): Now accepts parser_control * arg.
16398         (main) [TEST]: Use '\0' rather than 0 for char.
16399
16400 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16401
16402         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16403
16404 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16405
16406         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16407         It's now the caller's responsibility to handle the case where
16408         !HAVE_GETPAGESIZE && !defined getpagesize.
16409
16410         * lib/mktime.c (leapyear): Arg is long int, not int.
16411
16412 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16413
16414         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16415
16416 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16417
16418         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16419         missing.  Problem reported by James Youngman.
16420
16421 2004-10-16  Simon Josefsson  <jas@extundo.com>
16422
16423         * gnulib-tool: Fix comments.  Fix parse problem.
16424         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16425
16426 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16427
16428         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16429         implementation of getopt_long.  Problem reported by Alexander Taler in:
16430         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16431
16432 2004-10-15  Bruno Haible  <bruno@clisp.org>
16433
16434         * gnulib-tool: Untabify. Initialize supplied_libname.
16435         (func_usage): More homogenous output.
16436         (func_modules_transitive_closure, func_modules_to_filelist,
16437         func_emit_lib_Makefile_am): New functions.
16438         (func_import): New function, extracted from big case statement. Use
16439         func_get_license, func_modules_transitive_closure,
16440         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16441         opt_lgpl. Don't use test -a, as it's not portable.
16442         (func_create_testdir): Use func_modules_transitive_closure,
16443         func_modules_to_filelist, func_emit_lib_Makefile_am.
16444
16445 2004-10-15  Bruno Haible  <bruno@clisp.org>
16446
16447         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16448
16449 2004-10-15  Bruno Haible  <bruno@clisp.org>
16450
16451         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16452         the portions belonging to each module.
16453         Suggested by Derek Robert Price <derek@ximbiot.com>.
16454
16455 2004-10-12  Simon Josefsson  <jas@extundo.com>
16456
16457         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16458         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16459         to real functions.
16460
16461 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16462
16463         * modules/vsnprintf: New file.
16464
16465 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16466
16467         * m4/vsnprintf.m4: New file.
16468
16469 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16470
16471         * lib/vsnprintf.h: New file.
16472         * lib/vsnprintf.c: New file.
16473
16474 2004-10-11  Bruno Haible  <bruno@clisp.org>
16475
16476         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16477         vsnprintf.
16478
16479 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16480
16481         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16482
16483 2004-10-07  Bruno Haible  <bruno@clisp.org>
16484
16485         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16486         fits into the provided buffer.
16487
16488 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16489
16490         * lib/diacrit.c, diacrit.h: Add GPL notice.
16491
16492         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16493         notice.
16494         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16495         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16496         This avoids a potential constant-folding bug.
16497
16498 2004-10-05  Bruno Haible  <bruno@clisp.org>
16499
16500         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16501         for the declaration of strsep.
16502
16503 2004-10-05  Bruno Haible  <bruno@clisp.org>
16504
16505         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16506
16507 2004-10-04  Simon Josefsson  <jas@extundo.com>
16508
16509         * modules/memmem: New file.
16510         * tests/test-memmem.c: New file.
16511         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16512
16513 2004-10-04  Simon Josefsson  <jas@extundo.com>
16514
16515         * m4/memmem.m4: New file.
16516
16517 2004-10-04  Simon Josefsson  <jas@extundo.com>
16518
16519         * lib/memmem.h: New file.
16520         * lib/memmem.c: New file, taken from glibc.
16521
16522 2004-10-04  Simon Josefsson  <jas@extundo.com>
16523
16524         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16525         '#ifdef USE_UNLOCKED_IO'.
16526
16527 2004-10-04  Simon Josefsson  <jas@extundo.com>
16528
16529         * config/srclist.txt: Add memmem from glibc.
16530
16531 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16532
16533         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16534
16535         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16536         modules/exclude, modules/getdate, modules/getline,
16537         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16538         modules/getusershell, modules/linebuffer, modules/md5,
16539         modules/mountlist, modules/posixtm, modules/readtokens,
16540         modules/readutmp, modules/regex, modules/sha1,
16541         modules/version-etc, modules/yesno:
16542         Remove dependency on unlocked-io.
16543
16544 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16545
16546         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16547
16548         * m4/unlocked-io.m4: Add copyright notice.
16549         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16550
16551 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16552
16553         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16554         * lib/xmalloc.c (xmemdup): Likewise.
16555         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16556         XFREE): Remove these long-obsolescent macros.
16557         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16558         * lib/xstrdup.c: Remove.
16559
16560         * lib/regex.c (re_comp): Cast gettext return value to char *,
16561         Problem reported by Martin Neitzel via Mark D. Baushke.
16562
16563 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16564
16565         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16566         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16567         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16568         regex.c, sha1.c, version-etc.c, yesno.c:
16569         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16570         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16571         the includer's responsibility.
16572
16573         Sync from coreutils.
16574
16575         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16576         points to the start of a string, as the C Standard says the
16577         resulting behavior is undefined.
16578
16579         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16580         simple -> simple_backups, numbered_existing ->
16581         numbered_existing_backups, numbered -> numbered_backups
16582         to avoid shadowing problems.  All uses changed.
16583         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16584         * lib/backupfile.c (check_extension, numbered_backup):
16585         Rename locals to avoid shadowing 'basename'.
16586         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16587         once.
16588
16589         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16590         * lib/.cvsignore: Add getopt.h.
16591
16592 2004-10-04  Bruno Haible  <bruno@clisp.org>
16593
16594         * modules/README: New file.
16595         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16596         not a module.
16597
16598 2004-10-02  Jim Meyering  <jim@meyering.net>
16599
16600         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16601
16602 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16603
16604         * modules/strsep: New file.
16605
16606 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16607
16608         * m4/strsep.m4: New file.
16609
16610 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16611
16612         * lib/strsep.h: New file.
16613         * lib/strsep.c: New file.
16614
16615 2004-10-01  Simon Josefsson  <jas@extundo.com>
16616
16617         * lib/snprintf.c (snprintf): Handle size==0.
16618
16619 2004-10-01  Simon Josefsson  <jas@extundo.com>
16620             Bruno Haible  <bruno@clisp.org>
16621
16622         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16623         (snprintf): Declare 'args'.
16624
16625 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16626
16627         * lib/snprintf.c: Remove comments as to why each header is needed.
16628
16629 2004-10-01  Bruno Haible  <bruno@clisp.org>
16630
16631         * MODULES.html.sh: Add strsep.
16632
16633 2004-09-30  Simon Josefsson  <jas@extundo.com>
16634
16635         * modules/snprintf: New file.
16636
16637 2004-09-30  Simon Josefsson  <jas@extundo.com>
16638
16639         * m4/snprintf.m4: New file.
16640
16641 2004-09-30  Simon Josefsson  <jas@extundo.com>
16642
16643         * lib/snprintf.h, lib/snprintf.c: New files.
16644
16645 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16646
16647         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16648         (hol_entry_help): Never translate an empty string.
16649         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16650         * lib/argp.h (OPTION_NO_TRANS): New option.
16651
16652 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16653
16654         * modules/argp (Maintainer): Replace Simon Josefsson
16655         by Sergey Poznyakoff.
16656
16657 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16658
16659         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16660         changes merged back into glibc.
16661
16662 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16663
16664         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16665
16666 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16667
16668         * lib/xvasprintf.c: Include xalloc.h.
16669         (xvasprintf): Use xalloc_die, not xmalloc_die.
16670
16671 2004-09-29  Bruno Haible  <bruno@clisp.org>
16672
16673         * modules/alloca-opt: New file, derived from modules/alloca.
16674         * modules/allocsa: Depend on alloca-opt instead of alloca.
16675         * modules/setenv: Likewise.
16676         * modules/vasnprintf: Likewise.
16677         * MODULES.html.sh: Add alloca-opt.
16678
16679 2004-09-28  Simon Josefsson  <jas@extundo.com>
16680
16681         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16682         LGPL, and to replace license template from GPL to LGPL.
16683
16684 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16685
16686         * modules/dummy: Change license to LGPL.
16687
16688 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16689
16690         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16691
16692 2004-09-24  Simon Josefsson  <jas@extundo.com>
16693
16694         * modules/minmax (License): Change from GPL to LGPL.
16695
16696 2004-09-23  Simon Josefsson  <jas@extundo.com>
16697
16698         * gnulib-tool (--import): Typo.
16699
16700 2004-09-23  Simon Josefsson  <jas@extundo.com>
16701
16702         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16703
16704 2004-09-22  Bruno Haible  <bruno@clisp.org>
16705
16706         * modules/*: Add 'License' field.
16707         * gnulib-tool: Accept --extract-license option.
16708         (func_get_license): New function.
16709
16710 2004-09-21  Bruno Haible  <bruno@clisp.org>
16711
16712         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16713         Reported by Simon Josefsson.
16714
16715 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16716
16717         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16718         gl_AC_TYPE_LONG_LONG.
16719
16720 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16721
16722         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16723
16724 2004-09-18  Simon Josefsson  <jas@extundo.com>
16725         and  Paul Eggert  <eggert@cs.ucla.edu>
16726
16727         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16728         calls with autoreconf.  Define GL_LIB.
16729
16730 2004-09-14  Karl Berry  <karl@gnu.org>
16731
16732         * config/srclist.txt: unsync setenv.c, sigh.
16733
16734 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16735
16736         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16737         Problem reported by Bruno Haible in:
16738         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16739
16740 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16741
16742         * config/srclist.txt: Comment out argp-pvh.c.
16743
16744 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16745
16746         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16747         in case some system header has #define'd it.  Problem reported by
16748         Soeren D. Schulze in
16749         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16750
16751 2004-09-09  Karl Berry  <karl@gnu.org>
16752
16753         * regex.[ch]: delete from the root.  These were supposed to be
16754                 synced with emacs cvs, but this has not happened for about
16755                 a year, and anyway nothing else uses emacs regex.[ch].
16756                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16757                 lib/regex[.ch] is untouched.
16758
16759 2004-09-09  Bruno Haible  <bruno@clisp.org>
16760
16761         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16762
16763 2004-09-09  Bruno Haible  <bruno@clisp.org>
16764
16765         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16766         modifications.
16767         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16768
16769 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16770
16771         * modules/xvasprintf: New file.
16772         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16773
16774 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16775
16776         * lib/xvasprintf.h: New file.
16777         * lib/xvasprintf.c: New file.
16778         * lib/xasprintf.c: New file.
16779
16780 2004-09-08  Bruno Haible  <bruno@clisp.org>
16781
16782         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16783
16784 2004-09-08  Bruno Haible  <bruno@clisp.org>
16785
16786         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16787         length is > INT_MAX.
16788         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16789         more.
16790
16791 2004-09-08  Bruno Haible  <bruno@clisp.org>
16792
16793         * lib/stdint_.h: New file, taken from GNU clisp.
16794
16795 2004-09-08  Bruno Haible  <bruno@clisp.org>
16796             Oskar Liljeblad  <oskar@osk.mine.nu>
16797
16798         * modules/stdint: New file.
16799         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16800
16801 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16802
16803         Import from coreutils.
16804         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16805         strings on unbounded length.  alloca's performance benefits aren't
16806         that important here.
16807         (V_STRDUP): Remove.
16808         (parse_with_separator): New function, with most of the internals
16809         of the old parse_user_spec.  Allow user to omit both user and group,
16810         for compatibility with FreeBSD.
16811         Clone only the user name, not the entire spec.
16812         Do not set *uid, *gid unless entirely successful.
16813         Avoid memory leak in some failing cases.
16814         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16815         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16816         (parse_user_spec): Rewrite to use parse_with_separator.
16817
16818 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16819
16820         * modules/userspec: Don't depend on alloca.
16821
16822 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16823
16824         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16825
16826 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16827
16828         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16829         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16830         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16831
16832 2004-08-16  Simon Josefsson  <jas@extundo.com>
16833
16834         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16835         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16836         Add --dry-run for --import.
16837         Let user provided command line parameters override configure.ac
16838         settings.
16839
16840 2004-08-12  Simon Josefsson  <jas@extundo.com>
16841
16842         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16843         as discussed with Paul Eggert in threads rooted at
16844         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16845         and
16846         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16847         Before, the test was empty, and relied on ELIDE_CODE in source
16848         code.)
16849         (gl_PREREQ_GETOPT): New macro.
16850         (gl_GETOPT): Use them.
16851
16852 2004-08-12  Simon Josefsson  <jas@extundo.com>
16853
16854         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16855         * lib/getopt_.h: Renamed from getopt.h.
16856
16857 2004-08-12  Simon Josefsson  <jas@extundo.com>
16858
16859         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16860         Change default library name from libfoo to libgnu.
16861         Now, if you have a configure.ac that says:
16862                 gl_SOURCE_BASE(gl)
16863                 gl_M4_BASE(gl/m4)
16864                 gl_MODULES(error getopt etcetera)
16865                 gl_INIT
16866         you can import all you need by running:
16867                 ../gnulib/gnulib-tool --import
16868
16869         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16870         (Makefile.am): Rewrite, use logic from argz.
16871         (Include): Use <getopt.h> instead of "getopt.h".
16872
16873 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16874
16875         * modules/argp (Files): Add m4/unlocked-io.m4.
16876         (Depends-on): Add extensions.
16877
16878 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16879
16880         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16881         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16882         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16883         Check for program_invocation_name, program_invocation_short_name,
16884         flockfile, funlockfile, features.h, _getopt_long_only_r.
16885
16886 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16887
16888         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16889         its complicated substitute.
16890         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16891         and program_invocation_name.
16892         (__argp_basename) [!_LIBC]: Remove; the only use was
16893         replaced by its body.
16894         (__argp_short_program_name): Change condition from
16895         !defined __argp_short_program_name to
16896         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16897         to match argp-namefrob.h.
16898         (__argp_failure): Don't assume strerror_r returns char *.
16899         * lib/argp-parse.c (N_): Define unconditionally.
16900         (argp_default_options): Fill out initializers with 0 to avoid
16901         gcc warnings.
16902
16903 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16904
16905         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16906         getopt1.c.
16907
16908 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16909
16910         Merge from coreutils.
16911
16912         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16913
16914         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16915         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16916
16917 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16918
16919         Merge from coreutils.
16920
16921         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16922         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16923         for Reliant Unix 5.43.
16924
16925         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16926         (union fooround): Use uintmax_t, not long int.
16927         The rest is a merge from libc:
16928         [defined _LIBC]: Include <shlib-compat.h>.
16929         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16930
16931         * lib/settime.c (settime): Recode to avoid warning with
16932         Sun Forte C 6U2.
16933
16934         * lib/strverscmp.c: Convert to UTF-8.
16935
16936 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16937
16938         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16939         m4/uintmax_t.m4.
16940
16941 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16942
16943         * modules/xalloc-die: New file.
16944         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16945
16946         * modules/md5 (Files): Add m4/uint32_t.m4.
16947         * modules/sha1: Renamed from modules/sha.
16948         (Files):
16949         Rename lib/sha.h to lib/sha1.h.
16950         Rename lib/sha.c to lib/sha1.c.
16951         Rename m4/sha.m4 to m4/sha1.m4.
16952         (lib_SOURCES): Likewise.
16953         (configure.ac): Rename gl_SHA to gl_SHA1.
16954         (Include): sha.h -> sha1.h.
16955
16956 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16957
16958         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16959         * m4/sha1.m4: Renamed from sha.m4.
16960         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16961
16962 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16963
16964         * lib/obstack.h (obstack_empty_p):
16965         Don't assume that chunk->contents is suitably aligned.
16966         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16967         Likewise. Problem reported by Benno in
16968         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16969
16970         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16971         readable.  This could be improved further but it'd take some work.
16972
16973 2004-08-08  Simon Josefsson  <jas@extundo.com>
16974
16975         * modules/xgethostname (Depends-on): Remove exit and error (not
16976         used).
16977
16978         * modules/getpass-gnu: Add getpass.h.
16979         (Depends-on): Add stdbool.
16980         * modules/getpass: Add getpass.h.
16981
16982 2004-08-08  Simon Josefsson  <jas@extundo.com>
16983
16984         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16985         Check getpass declaration.
16986
16987 2004-08-08  Simon Josefsson  <jas@extundo.com>
16988
16989         * lib/xgethostname.c: Don't include error.h (not used).
16990
16991         * lib/getpass.h: Add.
16992         * lib/getpass.c: Include getpass.h first.
16993
16994 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16995
16996         * lib/xalloc-die.c: New file.
16997         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16998         All uses removed.
16999         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17000         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17001         xalloc-die.c.
17002         (_, N_, xalloc_die): Move to xalloc-die.c.
17003         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17004         so that we needn't mess with xalloc_msg_memory_exhausted.
17005
17006         * lib/sha1.h: Renamed from sha.h.
17007         (SHA1_H): Renamed from _SHA_H.
17008         (sha1_ctx): Renamed from sha_ctx.
17009         (sha1_init_ctx): Renamed from sha_init_ctx.
17010         (sha1_process_block): Renamed from sha_process_block.
17011         (sha1_process_bytes): Renamed from sha_process_bytes.
17012         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17013         (sha1_read_ctx): Renamed from sha_read_ctx.
17014         (sha1_stream): Renamed from sha_stream.
17015         (sha1_buffer): Renamed from sha_buffer.
17016         * lib/sha1.c: Likewise; renamed from sha.c.
17017         Do not include <sys/types.h>.
17018         Include <stddef.h> rather than <stdlib.h>.
17019
17020 2004-08-08  Bruno Haible  <bruno@clisp.org>
17021
17022         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17023         FILESYSTEM_PREFIX_LEN.
17024         * lib/progreloc.c: Likewise.
17025         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17026
17027 2004-08-06  Simon Josefsson  <jas@extundo.com>
17028
17029         * modules/progname (Depends-on): Don't depend on stdbool.
17030
17031 2004-08-06  Simon Josefsson  <jas@extundo.com>
17032
17033         * modules/getsubopt: New file.
17034         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17035         getsubopt.
17036
17037 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17038
17039         More merge from coreutils.
17040
17041         * m4/utimens.m4, m4/utimecmp.m4: New files.
17042         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17043         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17044         prereq.m4, sha.m4: Import changes from coreutils.
17045
17046 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17047
17048         More merge from coreutils.
17049         * modules/raise, modules/readtokens0, modules/utimens:
17050         * modules/utimecmp, module/xnanosleep: New files.
17051         * modules/strftime: Add lib/strftime.h.
17052         Change include from <time.h> to "strftime.h".
17053         * modules/yesno: Add lib/yesno.h.
17054         * modules/backupfile: Remove lib/addext.c.
17055         * modules/euidaccess: Add stat-macros.h.
17056         * modules/canonicalize, modules/euidaccess,
17057         modules/filemode, modules/lchown, modules/makepath,
17058         modules/rmdir, modules/stat: Likewise.
17059
17060 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17061
17062         Merge from tar.
17063         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17064         SIZE_MAX is a valid preprocessor constant.
17065         (__argp_basename): Change from "#ifndef _LIBC"
17066         to "#ifndef __argp_short_program_name", so that
17067         we don't compile these functions for tar.
17068
17069         More merges from coreutils.
17070         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17071         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17072         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17073         * lib/addext.c: Remove; no longer needed.
17074         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17075         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17076         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17077         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17078         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17079         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17080         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17081         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17082         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17083         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17084         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17085         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17086         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17087         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17088         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17089         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17090         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17091         Import changes from coreutils.
17092
17093 2004-08-05  Simon Josefsson  <jas@extundo.com>
17094
17095         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17096
17097 2004-08-05  Simon Josefsson  <jas@extundo.com>
17098
17099         * m4/getsubopt.m4: New file.
17100
17101 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17102
17103         Merge from coreutils.
17104
17105         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17106         * m4/getcwd-path-max.m4: New files.
17107
17108         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17109         FILESYSTEM_PREFIX_LEN ->
17110         FILE_SYSTEM_PREFIX_LEN.
17111         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17112         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17113         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17114         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17115
17116         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17117         prerequisite modules now handle the DOS stuff.
17118         Don't check for unistd.h.
17119
17120 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17121
17122         Merge from coreutils.
17123
17124         * lib/.gdb-history: Remove; this doesn't belong here.
17125
17126         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17127         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17128         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17129         * lib/getcwd.c: New files.
17130
17131         * lib/dirname.h: Include <stdbool.h>.
17132         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17133         for consistency with POSIX terminology.  All uses changed.
17134         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17135         (strip_trailing_slashes): Use bool for booleans.
17136         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17137
17138         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17139         sometimes returns a positive errno value even when it succeeds.
17140         (print_errno_message) [!LIBC]: Fall back on strerror if
17141         __strerror_r fails.
17142
17143         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17144         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17145         (longest_relative_suffix): New function.
17146         (path_concat): Use it.  Assume first argument is not NULL.
17147         Port to DOS.  Omit redundant separators.
17148         Report an error instead of returning NULL.
17149         Use mempcpy instead of memcpy.
17150         (xpath_concat): Remove: not declared or used.
17151
17152         * lib/same.h: Include <stdbool.h>
17153         (same_name): Return bool, not int.
17154         * lib/same.c (same_name): Likewise.
17155         (errno): Don't declare; we assume C89 or better now.
17156
17157         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17158         if not already defined.
17159
17160         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17161         * lib/dup-safer.c (errno): Likewise.
17162
17163 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17164
17165         Merge from coreutils.
17166         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17167         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17168         * modules/path-concat: Don't depend on strdup.
17169
17170 2004-08-03  Simon Josefsson  <jas@extundo.com>
17171
17172         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17173         * lib/progname.h: Don't include stdbool.h.
17174
17175 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17176
17177         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17178         * MODULES.html.sh (func_all_modules): Remove fatal.
17179
17180 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17181
17182         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17183
17184 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17185
17186         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17187         working.
17188
17189 2004-08-02  Simon Josefsson  <jas@extundo.com>
17190
17191         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17192         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17193         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17194
17195 2004-08-01  Simon Josefsson  <jas@extundo.com>
17196
17197         * lib/xgetdomainname.c: Include stdlib.h, for free().
17198
17199 2004-07-19  Bruno Haible  <bruno@clisp.org>
17200
17201         * MODULES.html.sh (func_all_modules): Add dummy.
17202
17203 2004-07-16  Simon Josefsson  <jas@extundo.com>
17204
17205         * modules/dummy: New file.
17206
17207 2004-07-16  Simon Josefsson  <jas@extundo.com>
17208
17209         * lib/dummy.c: New file.
17210
17211 2004-07-16  Bruno Haible  <bruno@clisp.org>
17212
17213         * lib/backupfile.h: Add extern "C" for C++.
17214         * lib/closeout.h: Likewise.
17215         * lib/copy-file.h: Likewise.
17216         * lib/findprog.h: Likewise.
17217         * lib/full-write.h: Likewise.
17218         * lib/pathname.h: Likewise.
17219         * lib/progname.h: Likewise.
17220         * lib/stpcpy.h: Likewise.
17221         * lib/stpncpy.h: Likewise.
17222         * lib/strcase.h: Likewise.
17223         * lib/strstr.h: Likewise.
17224         * lib/xalloc.h: Likewise.
17225
17226         * lib/mbswidth.h: Add extern "C" for C++.
17227         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17228
17229 2004-07-13  Robert Millan  <robertmh@gnu.org>
17230
17231         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17232
17233 2004-07-09  Simon Josefsson  <jas@extundo.com>
17234
17235         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17236         failed without this.)
17237
17238 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17239
17240         * modules/chown (Files): Add lib/fchown-stub.c, since
17241         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17242
17243 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17244
17245         * lib/fchown-stub.c: New file.
17246
17247 2004-06-24  Jim Meyering  <jim@meyering.net>
17248
17249         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17250
17251 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17252
17253         * modules/argz: Omit "#include".
17254
17255         * MODULES.html.sh (func_all_modules): Add calloc, to match
17256         2004-06-01 addition of calloc module.
17257
17258 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17259
17260         * m4/argz.m4: New file, which is autoupdated from libtool.
17261
17262 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17263
17264         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17265         libtool.
17266
17267 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17268
17269         * config/srclist-update: Don't insist on "USA." before the
17270         close-comment, as libtool omits the period and puts the */ on a
17271         separate line.
17272         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17273         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17274
17275 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17276
17277         * modules/argz: New file.
17278         * MODULES.html.sh (func_all_modules): Add argz.
17279
17280 2004-06-12  Jim Meyering  <jim@meyering.net>
17281         and  Paul Eggert  <eggert@cs.ucla.edu>
17282
17283         * modules/hash (Files): Add lib/xalloc.h.
17284         * modules/pipe (Depends-on): Add wait-process.
17285         * modules/stat (Depends-on): Add xalloc.
17286         * modules/userspec (Files): Add lib/userspec.h.
17287         * modules/xstrto
17288
17289         Upgrade from gettext-0.13.
17290         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17291         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17292         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17293
17294 2004-06-10  Jim Meyering  <jim@meyering.net>
17295
17296         * lib/calloc.c: New file.
17297
17298 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17299
17300         * lib/getdate.y (yylex): Allow space between sign and number.
17301         Problem reported by Dan Jacobson.
17302
17303 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17304
17305         Merge from coreutils CVS.
17306
17307         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17308         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17309         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17310         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17311         xstrtol.m4: Fix copyright date and/or serial number.
17312
17313         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17314         See if we need an fchown replacement.
17315         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17316         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17317         and use the replacement function if we detect either defect.
17318
17319         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17320         gl_UTIMECMP.
17321
17322 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17323         and  Jim Meyering  <jim@meyering.net>
17324
17325         Merge from coreutils CVS.
17326
17327         * lib/stat-macros.h: New file, with contents from file-type.h
17328         and coreutils' system.h.
17329         * lib/file-type.c: Include "stat-macros.h".
17330         * lib/file-type.h (file_type): Move all macro definitions to new file,
17331         stat-macros.h.
17332
17333         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17334         Wrap old code with this conditional.
17335         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17336         function that does not dereference symlinks.
17337         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17338
17339         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17340         dependency problems.
17341         (xreadlink): Accept new arg SIZE, for efficiency.
17342         All decls and uses changed.
17343         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17344
17345         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17346         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17347
17348         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17349         sysexits.h.
17350
17351 2004-06-01  Jim Meyering  <jim@meyering.net>
17352
17353         * m4/calloc.m4: New file.
17354
17355 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17356
17357         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17358         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17359         Also, fix a typo in a diagnostic.
17360
17361 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17362
17363         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17364         or AC_FUNC_REALLOC.
17365
17366 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17367
17368         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17369         macros to be defined.
17370         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17371         the allocator returns NULL because the requested size is zero.
17372
17373 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17374
17375         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17376         var.  Add comment explaining why libc still defines it.  This
17377         merges the following patch from glibc:
17378         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17379
17380 2004-05-20  Andreas Schwab  <schwab@suse.de>
17381
17382         * m4/free.m4: Replace free if it not known to work, not the other
17383         way round.
17384
17385 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17386
17387         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17388         present in glibc since revision 1.1 of this file.
17389         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17390         obstack_alignment_mask, obstack_alloc, obstack_base,
17391         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17392         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17393         obstack_grow0, obstack_init, obstack_int_grow,
17394         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17395         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17396         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17397         nonexistent functions.
17398
17399 2004-05-18  Karl Berry  <karl@gnu.org>
17400
17401         * config/srclist.txt: break link for vasnprintf.c.
17402
17403 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17404
17405         Port obstack to the AS/400, where pointers are 16 bytes wide and
17406         you cannot cast an integer to a valid pointer.  This patch is
17407         currently waiting to be integrated into glibc; see
17408         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17409
17410         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17411         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17412         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17413         (struct obstack): temp member is now a union of a pointer and
17414         an integer, instead of an integer.  All integer uses changed.
17415         This does not affect the physical layout of struct obstack,
17416         except on hosts (like the AS/400) where the size or alignment of
17417         void * is greater than that of ptrdiff_t.
17418         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17419         __STDC__)]: Store temporary in pointer member of union, not
17420         integer member.
17421         * lib/obstack.c: Include <stddef.h>, for offsetof.
17422         (struct fooalign): Remove; it doesn't need a name.
17423         (union fooround): Change double to long double, and add void *.
17424         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17425         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17426         not a macro.  Hence the values are always int; so remove all
17427         casts-to-int in uses.
17428
17429 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17430
17431         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17432         we can get this patch merged into glibc.
17433
17434 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17435             Paul Eggert  <eggert@cs.ucla.edu>
17436
17437         * m4/argp: Depend on alloca.
17438
17439 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17440             Paul Eggert  <eggert@cs.ucla.edu>
17441
17442         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17443         freecoding.
17444
17445 2004-05-17  Bruno Haible  <bruno@clisp.org>
17446
17447         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17448         precision that consists of a '.' followed by an empty digit string.
17449         Patch by Tor Lillqvist <tml@iki.fi>.
17450
17451 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17452
17453         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17454         for backward compatibility with older code.  We need our own
17455         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17456         it under some other name, and our alloca.h will define it.
17457
17458 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17459             Derek Price  <derek@ximbiot.com>
17460
17461         * lib/alloca.c: Include <alloca.h>, to get our interface.
17462         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17463         include <alloca.h> first.  Use C89 prototype for alloca; this
17464         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17465         Use #elif for simplicity, since we can assume C89 now.
17466         Don't try to source the system alloca.h since it will not be found
17467         and to prevent recursively including its replacement.
17468         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17469         * lib/regex.c: Likewise.
17470
17471 2004-05-16  Derek Price  <derek@ximbiot.com>
17472             Paul Eggert  <eggert@cs.ucla.edu>
17473
17474         getline cleanup.  This changes the getndelim2 API: both order of
17475         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17476         no delimiter).
17477
17478         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17479         interface does that.
17480         (getline): Always use getdelim, so that we don't have two
17481         copies of this code.
17482         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17483         if available.
17484         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17485         (GETNDELIM2_MAXIMUM): New macro.
17486         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17487         instead of the old practice of delim2==0.  All callers changed.
17488         Return -1 on overflow, instead of returning junk.
17489         Do not set *linesize unless allocation succeeds.
17490         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17491         that we include sys/types.h.
17492         * lib/getnline.h: Likewise.
17493         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17494         (getndelim2): Reorder arguments.
17495         * lib/getnline.c (getnline, getndelim):
17496         Don't discard the NMAX argument.
17497         (getnline): Invoke getndelim, to avoid code duplication.
17498         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17499         of (size_t) -1 by callers of the getnline family.
17500
17501 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17502
17503         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17504         Check for gettimeofday.
17505         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17506         Check for settimeofday, stime.
17507
17508 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17509
17510         * lib/nanosleep.c (suspended): Change its type from int to
17511         sig_atomic_t volatile.
17512         (first_call): Make it private to rpl_nanosleep, and have it
17513         be zero initially as that's a bit faster.
17514         (my_usleep): Round up fractional times instead of truncating them,
17515         as this is the usual meaning for 'sleep'.
17516
17517         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17518         doesn't work.
17519         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17520         (ENOSYS): Define if not defined.
17521         (settime): Fall back on stime if it exists and settimeofday fails.
17522         But don't bother with fallbacks if a method fails with errno == EPERM.
17523
17524 2004-05-11  Jim Meyering  <jim@meyering.net>
17525
17526         Prior to this change, the save_cwd caller required read access to the
17527         current directory on most systems (ones with the fchdir function).
17528
17529         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17530         fails, try write-only, and finally, resort to using xgetcwd.
17531
17532 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17533
17534         * lib/obstack.c, obstack.h: Import changes from libc.
17535
17536 2004-04-28  Bruno Haible  <bruno@clisp.org>
17537
17538         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17539         also implicitly appends .exe to executables.
17540         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17541         accepts Windows pathnames.
17542         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17543         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17544         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17545         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17546         Reported by Derek Robert Price <derek@ximbiot.com>.
17547
17548 2004-04-21  Karl Berry  <karl@gnu.org>
17549
17550         * config/srclist.txt (localcharset.c): break sync.
17551
17552 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17553
17554         * m4/host-os.m4: Add a copyright notice.
17555
17556 2004-04-20  Jim Meyering  <jim@meyering.net>
17557
17558         Change UTILS_ to gl_ in AC_DEFINE'd names.
17559         Change utils_- and jm_-prefixed variables, too.
17560         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17561         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17562         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17563
17564         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17565         Don't emit trailing blanks.
17566         Also rename jm_-prefixed variables to have gl_ prefix.
17567
17568         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17569         Also rename jm_-prefixed variables to have gl_ prefix.
17570
17571         * m4/jm-macros.m4: Reflect the renamings.
17572         * m4/prereq.m4: Likewise.
17573
17574 2004-04-20  Jim Meyering  <jim@meyering.net>
17575
17576         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17577         memory.
17578
17579 2004-04-20  Jim Meyering  <jim@meyering.net>
17580             Bruno Haible  <bruno@clisp.org>
17581
17582         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17583         memory when realloc fails.
17584
17585 2004-04-19  Jim Meyering  <jim@meyering.net>
17586
17587         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17588         now that readutmp.c may call `free (0)'.
17589
17590 2004-04-19  Bruno Haible  <bruno@clisp.org>
17591
17592         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17593         * m4/inttypes_h.m4: Likewise.
17594         * m4/stdint_h.m4: Likewise.
17595         * m4/intmax_t.m4: Likewise.
17596         * m4/uintmax_t.m4: Likewise.
17597
17598 2004-04-18  Jim Meyering  <jim@meyering.net>
17599
17600         * m4/prereq.m4: Don't forbid jm_ prefix.
17601
17602         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17603         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17604         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17605         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17606         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17607         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17608         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17609         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17610         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17611         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17612         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17613         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17614         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17615         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17616         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17617         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17618         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17619         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17620         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17621
17622 2004-04-18  Jim Meyering  <jim@meyering.net>
17623
17624         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17625         failure, don't leak memory and do call END_UTMP_ENT.
17626
17627 2004-04-16  Jim Meyering  <jim@meyering.net>
17628
17629         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17630         coreutils' stat program.
17631         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17632
17633 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17634
17635         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17636         C89.
17637         (CHAR_BIT): Remove, since we assume C89.
17638         Include <stdint.h> if available, as per current Autoconf CVS advice.
17639
17640 2004-03-31  Jim Meyering  <jim@meyering.net>
17641
17642         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17643         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17644         * m4/xalloc.m4: Likewise.
17645
17646 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17647
17648         Merge from coreutils.
17649
17650         * m4/inttostr.m4: New file.
17651         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17652         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17653         Require gl_CLOCK_TIME.
17654         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17655
17656 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17657
17658         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17659         not bool, to be more consistent with Unix conventions.
17660         Suggested by Bruno Haible.
17661
17662         Merge from coreutils.
17663
17664         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17665         * lib/umaxtostr.c: New files.
17666
17667         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17668         the usual <time.h> dance.
17669         (get_date): Change signature to support fractional time stamps.
17670         All callers changed.
17671         * lib/getdate.y: Include "getdate.h" first, as we can now
17672         assume C89 and don't need to worry about 'const'.
17673         Similarly, include "unlocked-io.h" near start, not in middle.
17674         Include <limits.h>.
17675         (textint.value): Use long int rather than int.
17676         (textint.digits): Use size_t rather than int.
17677         (BILLION, LOG10_BILLION): New constants.
17678         (parser_control): New member rel_ns.  Members day_ordinal,
17679         time_zone, month, day, hour, minutes, rel_year, rel_month,
17680         rel_day, rel_hour, rel_minutes, rel_seconds
17681         are now long int, not int.  Member seconds is now struct timespec,
17682         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17683         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17684         not int.
17685         (%union.intval): Now long int, not int.
17686         New member timespec.
17687         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17688         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17689         (spec): Now is a timespec or an item list.
17690         (timespec, items): New nonterminals.
17691         (time, rel, relunit, number, get_date):
17692         Add support for fractional seconds.
17693         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17694         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17695         (to_hour): First arg is now long int, not int.
17696         (to_year): Returns long int, not int.
17697         Don't treat year -70 like 70.
17698         (tm_diff): Returns long int, not int.
17699         (lookup_word): Use bool instead of int when appropriate.
17700         (yylex): Use size_t for count, not int.
17701         Detect overflow when parsing large integer constants.
17702         Add support for fractions.
17703         (get_date): Make pointers 'const' if possible.
17704         Use more-portable code to detect integer overflow.
17705         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17706         Don't use ctime; it's not reliable if the year has >4 digits.
17707
17708         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17709         This is for compatibility with BSD.
17710
17711         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17712         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17713         From coreutils' system.h.
17714
17715         * lib/userspec.c: Don't include "posixver.h".
17716         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17717         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17718         compatible extension.  Simplify code by removing a boolean int
17719         that was always nonzero if a string was nonnull.
17720
17721 2004-03-30  Jim Meyering  <jim@meyering.net>
17722
17723         Merge from coreutils.
17724
17725         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17726         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17727         on some systems one must include <grp.h> before it.
17728         Reported by Christian Krackowizer.
17729
17730 2004-03-30  Jim Meyering  <jim@meyering.net>
17731
17732         Merge from coreutils.
17733
17734         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17735
17736         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17737         an empty input stream.
17738
17739         * lib/readtokens.c: Include <stdbool.h>.
17740         (readtoken): Use `size_t' rather than int/long.
17741         All callers adjusted.
17742         Use `bool' rather than `int' where appropriate.
17743         Use memset rather than an explicit loop.
17744         Use x2nrealloc rather than xrealloc.
17745         Allow the use of `\0' as a delimiter.
17746         (readtokens): Likewise.
17747         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17748
17749 2004-03-30  Jim Meyering  <jim@meyering.net>
17750
17751         * m4/realloc.m4: Remove file, since now it does no more than
17752         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17753         the `configure.ac' section of module/realloc.
17754         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17755
17756 2004-03-30  Bruno Haible  <bruno@clisp.org>
17757
17758         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17759         nonnull.
17760
17761 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17762
17763         Merge changes to getloadavg.c from coreutils and Emacs.
17764
17765         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17766         Define to an expression, not to the empty string.
17767         Include cloexec.h and xalloc.h.
17768         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17769         Use set_cloexec_flag rather than rolling our own.
17770         * lib/cloexec.c, lib/cloexec.h: New files.
17771
17772 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17773
17774         * m4/cloexec.m4: New file.
17775
17776 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17777
17778         * lib/getopt.h: Sync with libc CVS.
17779
17780 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17781             Bruno Haible  <bruno@clisp.org>
17782
17783         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17784         mbswidth.
17785
17786 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17787             Bruno Haible  <bruno@clisp.org>
17788
17789         * lib/mbswidth.h: Include <wchar.h> only if
17790         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17791         <wchar.h>.
17792         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17793
17794 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17795
17796         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17797         Sync with libc CVS.
17798         * lib/getopt_int.h: New file, also synced from libc.
17799
17800 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17801
17802         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17803         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17804         Bring back getopt.c, getopt.h, getopt1.c.
17805
17806 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17807
17808         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17809         All uses changed.  Check for sa_sigaction member; this fixes
17810         a bug first reported by Jason Andrade in
17811         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17812
17813 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17814
17815         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17816         '#if' expressions.  Unlike the code it replaces, it does not
17817         depend on (defined _SC_PAGESIZE).  However, it does depend on
17818         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17819         first reported by Jason Andrade in
17820         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17821
17822 2004-02-25  Simon Josefsson  <jas@extundo.com>
17823
17824         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17825
17826 2004-02-25  Simon Josefsson  <jas@extundo.com>
17827
17828         * lib/strdup.h: New file.
17829         * lib/strdup.c: Include it.
17830         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17831         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17832
17833 2004-02-23  Karl Berry  <karl@gnu.org>
17834
17835         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17836         (from fencepost.gnu.org:/gd/gnuorg).
17837
17838 2004-02-23  Karl Berry  <karl@gnu.org>
17839
17840         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17841         * config/srclist.txt: add maintain/standards documents.
17842
17843 2004-02-18  Bruno Haible  <bruno@clisp.org>
17844
17845         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17846         Reported by Derek Robert Price <derek@ximbiot.com>.
17847
17848 2004-02-16  Karl Berry  <karl@gnu.org>
17849
17850         * config/mkinstalldirs, install-sh: update from automake.
17851
17852 2004-02-06  Karl Berry  <karl@gnu.org>
17853
17854         * m4/po.m4: update from gettext 0.14.1.
17855
17856 2004-02-06  Karl Berry  <karl@gnu.org>
17857
17858         * lib/config.charset: update from gettext 0.14.1.
17859
17860 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17861
17862         Add comments and code, prompted by suggestions from Bruno Haible
17863         for sh-quote.
17864         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17865         describing the enum quoting_style values.
17866         * lib/quotearg.c (quotearg_alloc): New function.
17867         (quotearg_buffer_restyled): Treat lone { and } as special.
17868         Treat = as special.  Work around bug with older shells
17869         that "see" a '\' that is really the 2nd byte of a multibyte char.
17870         Quote empty string with shell_quoting_style.
17871
17872 2004-02-03  Bruno Haible  <bruno@clisp.org>
17873
17874         * m4/pipe.m4: New file, from GNU gettext.
17875
17876 2004-02-03  Bruno Haible  <bruno@clisp.org>
17877
17878         * lib/pipe.h: New file, from GNU gettext.
17879         * lib/pipe.c: New file, from GNU gettext.
17880
17881 2004-01-27  Bruno Haible  <bruno@clisp.org>
17882
17883         * m4/execute.m4: New file, from GNU gettext.
17884
17885 2004-01-27  Bruno Haible  <bruno@clisp.org>
17886
17887         * lib/execute.h: New file, from GNU gettext.
17888         * lib/execute.c: New file, from GNU gettext.
17889         * lib/w32spawn.h: New file, from GNU gettext.
17890
17891 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17892
17893         Merge from diffutils.
17894
17895         * lib/file-type.c (file_type): Add typed memory objects.
17896         * lib/file-type.h (S_TYPEISTMO): New macro.
17897
17898         * lib/c-stack.h (c_stack_action): Remove argv argument.
17899         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17900         (die): Don't calculate message unless segv_action returns.
17901         (get_stack_location, min_address_from_argv, max_address_from_argv,
17902         volatile stack_base, volatile_stack_size): Remove.
17903         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17904         that every segmentation violation is a stack overflow.  (Ouch!)
17905         See Debian bug 136249 (still outstanding) for more info about why
17906         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17907
17908 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17909
17910         Exit-status fix from coreutils.
17911
17912         Use exit_failure consistently in place of EXIT_FAILURE,
17913         so that program exit statuses are consistent on failure.
17914
17915         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17916         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17917         * lib/argmatch.h: Comment fix to match the above.
17918         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17919         Now a macro referring to exit_failure, instead of a separate
17920         variable.  Include "exitfail.h" to get it.
17921         * lib/xstrtol.h: Include "exitfail.h".
17922         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17923
17924         * lib/long-options.c (parse_long_options): Use prototype
17925         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17926         for clarity.
17927
17928 2004-01-21  Jim Meyering  <jim@meyering.net>
17929
17930         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17931         so as not to conflict with a different-sized __mktime_internal
17932         function in GNU libc.
17933         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17934         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17935
17936 2004-01-20  Karl Berry  <karl@gnu.org>
17937
17938         * config/config.guess: update from config.
17939
17940         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17941
17942 2004-01-20  Bruno Haible  <bruno@clisp.org>
17943
17944         Safer stack allocation.
17945         * lib/setenv.c: Include allocsa.h.
17946         (alloca): Remove fallback definition.
17947         (freea): Remove macro.
17948         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17949         instead of freea.
17950
17951 2004-01-20  Bruno Haible  <bruno@clisp.org>
17952
17953         * m4/eealloc.m4: New file, from GNU gettext.
17954
17955 2004-01-20  Bruno Haible  <bruno@clisp.org>
17956
17957         * m4/allocsa.m4: New file, from GNU gettext.
17958
17959 2004-01-20  Bruno Haible  <bruno@clisp.org>
17960
17961         * lib/xallocsa.h: New file, from GNU gettext.
17962         * lib/xallocsa.c: New file, from GNU gettext.
17963
17964 2004-01-20  Bruno Haible  <bruno@clisp.org>
17965
17966         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17967
17968 2004-01-20  Bruno Haible  <bruno@clisp.org>
17969
17970         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17971         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17972         specially.
17973
17974 2004-01-20  Bruno Haible  <bruno@clisp.org>
17975
17976         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17977         patch.
17978
17979 2004-01-20  Bruno Haible  <bruno@clisp.org>
17980
17981         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17982
17983 2004-01-20  Bruno Haible  <bruno@clisp.org>
17984
17985         * lib/eealloc.h: New file.
17986
17987 2004-01-20  Bruno Haible  <bruno@clisp.org>
17988
17989         * lib/binary-io.h: Avoid warnings on Cygwin.
17990
17991 2004-01-20  Bruno Haible  <bruno@clisp.org>
17992
17993         * lib/allocsa.h: New file, from GNU gettext.
17994         * lib/allocsa.c: New file, from GNU gettext.
17995
17996 2004-01-18  Karl Berry  <karl@gnu.org>
17997
17998         * doc/gpl.texi, doc/lgpl.texi: new files.
17999
18000 2004-01-18  Karl Berry  <karl@gnu.org>
18001
18002         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18003         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18004
18005 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18006
18007         Merge from coreutils.
18008
18009         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18010         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18011         (gl_DEFAULT_POSIX2_VERSION): Move
18012         the documentation from 'configure' into 'config.hin',
18013         so that 'configure --help' isn't burdened by it and
18014         we don't have to worry about its formatting there.
18015         Reword the documentation so that it's more succinct
18016         and can be run together into a single paragraph.
18017         * m4/same.m4 (gl_SAME): Check for pathconf.
18018
18019 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18020
18021         Merge from coreutils.
18022
18023         * lib/posixver.c: Include posixver.h.
18024
18025         * lib/same.c: Include <stdbool.h>, <limits.h>.
18026         (_POSIX_NAME_MAX): Define if not defined.
18027         (MIN): New macro.
18028         (same_name): If file names are silently truncated, report
18029         that the file names are the same if they are the same after
18030         the silent truncation.
18031
18032         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18033         conversion function.
18034         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18035         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18036         longer needed.
18037
18038 2004-01-15  Jim Meyering  <jim@meyering.net>
18039
18040         Merge from coreutils.
18041
18042         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18043         if no library is required.
18044         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18045         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18046         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18047         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18048         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18049         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18050         value, $ac_cv_search_crypt, if it's "none required".
18051         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18052         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18053         not gl_FUNC_GETLOADAVG.
18054         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18055         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18056
18057 2004-01-15  Jim Meyering  <jim@meyering.net>
18058
18059         Merge from coreutils.
18060
18061         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18062         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18063         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18064
18065         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18066         optional configure-time default.
18067
18068         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18069
18070         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18071
18072 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18073
18074         Merge from coreutils.
18075
18076         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18077         value, $ac_cv_search_nanosleep, if it's "none required".
18078
18079 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18080
18081         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18082         with like-named macro in fnmatch.c.
18083         (EXT): Use an internal constant instead.
18084
18085         Merge fnmatch patches from glibc.
18086         * lib/fnmatch.c (mbsinit): Remove define.
18087         Add libc_hidden_ver (__fnmatch, fnmatch).
18088         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18089         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18090
18091 2004-01-14  Karl Berry  <karl@gnu.org>
18092
18093         * config/install-sh: update from automake.
18094
18095 2004-01-13  Karl Berry  <karl@gnu.org>
18096
18097         * config/install-sh: update from automake.
18098
18099 2004-01-09  Karl Berry  <karl@gnu.org>
18100
18101         * config/install-sh: update from automake.
18102
18103 2004-01-05  Karl Berry  <karl@gnu.org>
18104
18105         * config/config.{sub,guess}: update from config.
18106
18107 2003-12-31  Karl Berry  <karl@gnu.org>
18108
18109         * config/depcomp: update from automake.
18110
18111 2003-12-14  Karl Berry  <karl@gnu.org>
18112
18113         * lib/config.charset: update from gettext-runtime.
18114
18115 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18116
18117         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18118         Bug reported by Alfred M. Szmidt.
18119
18120 2003-12-03  Bruno Haible  <bruno@clisp.org>
18121
18122         * m4/gettext.m4: Upgrade from gettext-0.13.
18123         * m4/po.m4: Upgrade from gettext-0.13.
18124         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18125         * m4/intmax.m4: New file, from gettext-0.13.
18126         * m4/printf-posix.m4: New file, from gettext-0.13.
18127
18128 2003-11-29  Karl Berry  <karl@gnu.org>
18129
18130         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18131
18132 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18133             Bruno Haible  <bruno@clisp.org>
18134
18135         * lib/printf-parse.h: Don't include sys/types.h.
18136         (ARG_NONE): New macro.
18137         (char_directive): Change type of *arg_index fields to size_t.
18138         * lib/printf-parse.c: Don't include sys/types.h.
18139         (SSIZE_MAX): Remove macro.
18140         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18141         Remove unnecessary overflow check.
18142         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18143         fields.
18144
18145 2003-11-25  Bruno Haible  <bruno@clisp.org>
18146
18147         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18148
18149 2003-11-25  Bruno Haible  <bruno@clisp.org>
18150
18151         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18152         gt_TYPE_SSIZE_T.
18153
18154 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18155
18156         * modules/alloca: Remove dependency on xalloc.
18157
18158 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18159
18160         * lib/alloca.c: Remove dependency on xalloc module.
18161         (xalloc_die): Remove.
18162         (memory_full) [!defined emacs]: New macro.
18163         [!defined emacs]: Don't include xalloc.h.
18164         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18165         address arithmetic overflows.  Change datatypes a bit to avoid
18166         unnecessary casts.
18167
18168 2003-11-22  Jim Meyering  <jim@meyering.net>
18169
18170         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18171         s/size/size_t/.
18172
18173 2003-11-21  Karl Berry  <karl@gnu.org>
18174
18175         * config/config.{sub,guess}: update from config.
18176
18177 2003-11-18  Karl Berry  <karl@gnu.org>
18178
18179         * config/config.{sub,guess}: update from config.
18180
18181         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18182
18183 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18184
18185         * README: Mention that S+T cannot overflow if S is the size of
18186         an existing object and T is sufficiently small.
18187
18188 2003-11-17  Jim Meyering  <jim@meyering.net>
18189
18190         On systems without utime and without a utimes function capable of
18191         dealing with a NULL struct utimbuf* argument, this utime replacement
18192         could -- in unusual circumstances -- leak a file descriptor.
18193         * lib/utime.c: Include <unistd.h> and <errno.h>.
18194         (utime_null): Be sure to close `fd' and to preserve errno.
18195         Reported by Geoff Collyer via Arnold Robbins.
18196
18197 2003-11-17  Bruno Haible  <bruno@clisp.org>
18198
18199         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18200         (Depends-on): Add xsize.
18201
18202 2003-11-17  Bruno Haible  <bruno@clisp.org>
18203
18204         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18205
18206 2003-11-17  Bruno Haible  <bruno@clisp.org>
18207
18208         * lib/vasnprintf.c (alloca): Remove fallback definition.
18209         (freea): Remove definition.
18210         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18211         Reported by Paul Eggert.
18212
18213 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18214             Bruno Haible  <bruno@clisp.org>
18215
18216         Protect against address arithmetic overflow.
18217         * lib/printf-args.h: Include stddef.h.
18218         (arguments): Change type of field 'count' to size_t.
18219         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18220         'unsigned int' where appropriate.
18221         * lib/printf-parse.h: Include sys/types.h.
18222         (char_directive): Change type of *arg_index fields to ssize_t.
18223         (char_directives): Change type of fields 'count', max_*_length to
18224         size_t.
18225         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18226         (SSIZE_MAX): Define fallback value.
18227         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18228         instead of 'int' where appropriate. Check a_allocated, d_allocated
18229         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18230         * lib/vasnprintf.c: Include xsize.h.
18231         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18232         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18233         overflow. Avoid wraparound when converting a width or precision from
18234         decimal to binary.
18235
18236 2003-11-16  Bruno Haible  <bruno@clisp.org>
18237
18238         Update from GNU gettext.
18239         * lib/printf-parse.c: Generalize to it can be compiled for wide
18240         strings.
18241         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18242         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18243         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18244         SNPRINTF): New macros.
18245         Don't include <alloca.h> if the file is used inside libintl.
18246         (local_wcslen): New function, for Solaris 2.5.1.
18247         (VASNPRINTF): Use it instead of wcslen.
18248
18249 2003-11-16  Bruno Haible  <bruno@clisp.org>
18250
18251         * lib/xsize.h (xmax): New function.
18252         (xsum, xsum3, xsum4): Declare as "pure" functions.
18253
18254 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18255
18256         * modules/xalloc (Files): Undo latest change, since xalloc.h
18257         no longer needs SIZE_MAX or PTRDIFF_MAX.
18258
18259 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18260
18261         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18262         gl_PTRDIFF_MAX.
18263
18264 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18265
18266         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18267         "return", to pacify some unknown compiler.  Problem reported
18268         by Joerg Schilling.
18269
18270 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18271
18272         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18273         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18274         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18275         heuristic is just as accurate as far as we know, and it removes a
18276         dependency on size_max.m4 and ptrdiff_max.m4.
18277
18278 2003-11-11  Bruno Haible  <bruno@clisp.org>
18279
18280         * modules/xsize (Files): Add m4/size_max.m4.
18281         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18282
18283 2003-11-11  Bruno Haible  <bruno@clisp.org>
18284
18285         * m4/size_max.m4: New file.
18286         * m4/ptrdiff_max.m4: New file.
18287         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18288         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18289         (gl_XALLOC): Invoke it.
18290
18291 2003-11-11  Bruno Haible  <bruno@clisp.org>
18292
18293         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18294         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18295         defined.
18296
18297 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18298
18299         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18300         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18301         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18302         From Bruno Haible.
18303         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18304         not (size_t) -1, since it's defined here.
18305
18306 2003-11-09  Karl Berry  <karl@gnu.org>
18307
18308         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18309
18310 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18311
18312         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18313         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18314         Reject sizes of exactly SIZE_MAX bytes.
18315         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18316         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18317
18318 2003-11-05  Bruno Haible  <bruno@clisp.org>
18319
18320         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18321         SIZE_MAX defined in <limits.h> on Solaris.
18322
18323 2003-11-04  Jim Meyering  <jim@meyering.net>
18324
18325         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18326         variable names, rather than @VAR@.
18327         * modules/poll: Likewise.
18328
18329 2003-11-04  Bruno Haible  <bruno@clisp.org>
18330
18331         * modules/xsize: New file.
18332         * modules/linebreak: Depend on xsize.
18333         * MODULES.html.sh (func_all_modules): Add xsize.
18334
18335 2003-11-04  Bruno Haible  <bruno@clisp.org>
18336
18337         * m4/xsize.m4: New file.
18338
18339 2003-11-04  Bruno Haible  <bruno@clisp.org>
18340
18341         * lib/xsize.h: New file.
18342         * lib/linebreak.c: Include xsize.h.
18343         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18344         argument for overflow.
18345         Suggested by Paul Eggert.
18346
18347 2003-11-03  Karl Berry  <karl@gnu.org>
18348
18349         * config/config.{guess,sub}: update from config.
18350
18351 2003-11-03  Jim Meyering  <jim@meyering.net>
18352
18353         * modules/userspec (lib_SOURCES): Add userspec.h.
18354         (Include): Add "userspec.h".
18355         Improve description.
18356
18357 2003-11-03  Jim Meyering  <jim@meyering.net>
18358
18359         * lib/userspec.c: Include "userspec.h".
18360         * lib/userspec.h: New file.
18361
18362 2003-11-03  Bruno Haible  <bruno@clisp.org>
18363
18364         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18365
18366 2003-11-03  Bruno Haible  <bruno@clisp.org>
18367
18368         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18369         available, to avoid (extremely rare) race condition.
18370         Suggested by Paul Eggert.
18371
18372 2003-11-02  Karl Berry  <karl@gnu.org>
18373
18374         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18375
18376 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18377
18378         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18379         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18380         (read_filesystem_list): Set and use me_type_malloced.
18381         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18382         whatever the type happens to be), for brevity and consistency.
18383         Check for size calculation overflow on Alphas running OSF/1.
18384
18385 2003-10-31  Jim Meyering  <jim@meyering.net>
18386
18387         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18388
18389         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18390
18391 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18392             Bruno Haible  <bruno@clisp.org>
18393
18394         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18395         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18396
18397 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18398
18399         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18400         netbsd*-gnu*.  Suggested by Robert Millan.
18401
18402 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18403
18404         * modules/group-member: Depend on stdbool.
18405
18406 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18407
18408         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18409
18410 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18411
18412         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18413         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18414         after the 'gnu' in these cases.  This fixes some bugs in the
18415         previous change, and is based on suggestions by Robert Millan.
18416
18417 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18418
18419         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18420         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18421         no longer needed.
18422         * lib/quotearg.c (quotearg_n_options): Use it.
18423         * lib/group-member.c: Include <stdbool.h>.
18424         (free_group_info): Arg is now const *; don't free arg.
18425         (get_group_info): Now returns bool and accepts struct group_info *,
18426         rather than returning a malloc'ed struct group_info *.
18427         All uses changed.  Check for overflow in internal size calculation.
18428
18429         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18430         rather than xmalloc/xrealloc.
18431         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18432         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18433         conformance bug: the old code used a pointer after freeing the
18434         storage that it addressed.
18435         * lib/hash.c (hash_initialize): Simplify the code by using
18436         xalloc_oversized rather than doing it by hand.
18437         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18438         the buffer preserved.  Use free and xmalloc instead.
18439         * lib/quotearg.c (quotearg_n_options): Likewise.
18440         Use a simpler test for size overflow.  Don't use xalloc_oversized
18441         because unsigned int might be wider than size_t (!); this suggests
18442         that we should switch from unsigned int to size_t for slot numbers.
18443
18444 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18445
18446         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18447         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18448         NetBSD kernels.  Requested by Richard Stallman.
18449
18450 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18451
18452         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18453         to allocate the returned structure.  Do not allocate a subarray,
18454         as x2nrealloc will do that.
18455         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18456         instead of xnrealloc.
18457         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18458
18459 2003-10-27  Bruno Haible  <bruno@clisp.org>
18460
18461         * lib/stdbool_.h: Better support for BeOS.
18462
18463 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18464
18465         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18466         now uses inline.
18467
18468 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18469
18470         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18471         callers that want to do their own size-overflow checking.  Include
18472         <stdbool.h>, since xalloc_oversized returns bool.
18473         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18474         to use xalloc_oversized.
18475
18476         Add two functions x2realloc, x2nrealloc, for programs that grow
18477         arrays dynamically by doubling their sizes.
18478         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18479         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18480         New functions.
18481
18482         Port to C99 semantics for 'inline' of external functions.
18483         Bug reported by Bruno Haible.
18484         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18485         with the old contents of xnmalloc.
18486         (xnmalloc, xmalloc): Use it.
18487         (xnrealloc_inline): New static inline function,
18488         with the old contents of xnrealloc.
18489         (xnrealloc, xrealloc): Use it.
18490
18491         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18492         that.
18493
18494 2003-10-26  Karl Berry  <karl@gnu.org>
18495
18496         * config/srclist.txt (COPYING.DOC): no longer available from
18497         /gd/gnuorg; don't know where the ultimate source is.
18498
18499 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18500
18501         Fix several address-calculation bugs in the hash modules,
18502         plus some minor code cleanup.
18503
18504         * lib/hash.h: Include <stdbool.h>, for bool.
18505         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18506         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18507         hash_get_n_entries, hash_get_max_bucket_length,
18508         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18509         hash_rehash): Use size_t rather than unsigned.
18510         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18511         hash_get_n_buckets_used, hash_get_n_entries,
18512         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18513         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18514         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18515         Likewise.
18516         (SIZE_MAX): Define if not defined.
18517         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18518         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18519         hash_print):
18520         Use const * when possible.
18521         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18522         (check_tuning): Fix bug: if tuning parameters were very close to
18523         0 or 1, rounding errors could have caused subscript violations.
18524         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18525         (hash_initialize): Add 'fail:' label
18526         to free table and return NULL, and use it to simplify code.
18527         Use calloc rather than clearing the storage ourself.
18528         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18529         buffer size calculations.
18530         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18531         Include <stddef.h>, for size_t.
18532         * lib/hash-pjw.c (hash_pjw): Likewise.
18533         Switch to method described by Bruno Haible.
18534         Include <limits.h>, for CHAR_BIT.
18535         (SIZE_BITS): New macro.
18536
18537 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18538
18539         * m4/getline.m4 (AM_FUNC_GETLINE):
18540         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18541         hosts.  Problem reported by Derek Robert Price in
18542         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18543         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18544         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18545
18546 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18547
18548         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18549         ceiling the allocation at NMAX bytes rather than silently
18550         discarding input bytes before NMAX is reached.  This makes
18551         a difference only if NMAX exceeds SIZE_MAX / 2.
18552
18553         * lib/obstack.c: Merge from glibc.
18554         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18555         Add libc_hidden_def (_obstack_newchunk).
18556         (_obstack_free) [! defined _LIBC]: Remove.
18557         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18558         a clone of the function body.
18559         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18560         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18561
18562         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18563         glibc.
18564         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18565         arg to memcpy.
18566
18567         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18568         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18569         Don't use lvalue casts, as GCC plans to remove support for them
18570         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18571         was also present in the non-GCC version, indicating that this
18572         code had always been buggy and had never been widely used.
18573         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18574         Use the fast variant of each macro, rather than copying the
18575         definiens of the fast variant; that way, we'll be more likely to
18576         catch future bugs in the fast variants.
18577
18578 2003-10-20  Bruno Haible  <bruno@clisp.org>
18579
18580         * modules/wait-process: New file.
18581         * MODULES.html.sh (func_all_modules): Add wait-process.
18582
18583 2003-10-20  Bruno Haible  <bruno@clisp.org>
18584
18585         * m4/wait-process.m4: New file.
18586
18587 2003-10-20  Bruno Haible  <bruno@clisp.org>
18588
18589         * lib/wait-process.h: New file, from GNU gettext.
18590         * lib/wait-process.c: New file, from GNU gettext.
18591
18592 2003-10-19  Jim Meyering  <jim@meyering.net>
18593
18594         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18595         HPUX 10.20.
18596
18597 2003-10-18  Karl Berry  <karl@gnu.org>
18598
18599         * config/config.guess: update from config.
18600
18601 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18602
18603         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18604         (getgroups): First arg is int, not size_t.
18605         Don't let 'free' mangle errno.
18606
18607 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18608
18609         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18610
18611 2003-10-16  Karl Berry  <karl@gnu.org>
18612
18613         * config/config.{guess,sub}: update from config.
18614
18615 2003-10-16  Jim Meyering  <jim@meyering.net>
18616
18617         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18618         memcpy.
18619
18620 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18621
18622         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18623         (SIZE_MAX): Remove.
18624         (new_exclude, add_exclude_file): Initial size no longer needs to
18625         be a power of 2.
18626         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18627         our own address arithmetic overflow checking.
18628
18629         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18630         (fnmatch): Do not alloca more than 2000 wide characters;
18631         instead, use malloc for large buffers.
18632         Check for address arithmetic overflow, and return -1
18633         with errno set to ENOMEM in that case.
18634         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18635         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18636         instead, return -1.  Check for address arithmetic overflow.
18637
18638 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18639
18640         Handle invalid suffixes and overflow independently, so that
18641         callers can treat them independently as needed.  Fix some bugs in
18642         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18643         suffix for a human-readable blocksize.  The major caller-visible
18644         change is the addition of a new
18645         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18646         that both overflow and suffix chars were found.
18647
18648         * lib/human.c (humblock): Don't check separately for invalid suffix
18649         char; that is xstrtoumax's job (now that its bug is fixed).
18650         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18651         INTMAX_MAX]: New macros.
18652         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18653         TYPE_MAXIMUM): New macros.
18654         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18655         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18656         if overflow occurs, as it's what __strtol does and it's more useful
18657         in practice.
18658         (__xstrtol): If __strtol reports some error other than ERANGE,
18659         reflect it to the caller as LONGINT_INVALID.  If it reports
18660         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18661         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18662         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18663         value.
18664         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18665         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18666         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18667         [defined UINTMAX_MAX]: New macros.
18668
18669 2003-10-14  Bruno Haible  <bruno@clisp.org>
18670
18671         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18672
18673 2003-10-14  Bruno Haible  <bruno@clisp.org>
18674
18675         * m4/sig_atomic_t: New file, from GNU gettext.
18676         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18677
18678 2003-10-14  Bruno Haible  <bruno@clisp.org>
18679
18680         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18681         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18682         Also use volatile where needed.
18683
18684 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18685
18686         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18687         Change maintainer from Bruno Haible to 'all'.
18688
18689 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18690
18691         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18692
18693 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18694
18695         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18696         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18697         and define in terms of the other primitives.
18698         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18699         (SIZE_MAX): Define if not already defined.
18700         (array_size_overflow): New function.
18701         (xalloc_die): Abort instead of exiting if 'error' returns.
18702         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18703         (xmalloc, xrealloc): Use them.
18704         (xcalloc): Check for address arithmetic overflow.
18705         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18706         a bit faster than strcpy.
18707
18708 2003-10-10  Simon Josefsson  <jas@extundo.com>
18709
18710         * modules/argp (Depends-on): Add restrict and strcase.
18711
18712 2003-10-10  Simon Josefsson  <jas@extundo.com>
18713
18714         * m4/argp.m4: Add AC_C_INLINE.
18715
18716 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18717
18718         Merge getpass from libc, plus a few fixes.
18719
18720         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18721         Include <stdbool.h>.
18722         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18723         __fsetlocking to empty.
18724         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18725         do include <bits/libc-lock.h>.
18726         Do not include <fcntl.h>; not needed.
18727         [_LIBC]: Include <wchar.h>.
18728         (NOTCANCEL_MODE): New macro.
18729         (flockfile, funlockfile) [_LIBC]: New macros.
18730         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18731         [!_LIBC]: New macros.
18732         (call_fclose): New function.
18733         (getpass): Use it.  Save tty stream separately; this simplifies the
18734         code and makes it more reliable if stdin happens to equal stdout.
18735         Invoke __fsetlocking on tty.
18736         Handle thread cancellation if needed.
18737         Namespace cleanup (use __tcgetattr, __getline).
18738         Use bool for Booleans.
18739         [USE_IN_LIBIO]: Handle wide streams.
18740         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18741         stream might go where.
18742
18743         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18744         doesn't have to include <stdio.h> before us.
18745         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18746         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18747         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18748         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18749         if not declared, so that we can use getpass.c code from libc without
18750         rewriting it.
18751         (flockfile, ftrylockfile, funlockfile): New macros.
18752
18753 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18754
18755         * modules/getpass: Depend on stdbool.
18756
18757 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18758
18759         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18760
18761 2003-10-07  Karl Berry  <karl@gnu.org>
18762
18763         * config/config.{guess,sub}: update from config.
18764
18765 2003-10-06  Jim Meyering  <jim@meyering.net>
18766             Bruno Haible  <bruno@clisp.org>
18767
18768         This lets translators provide better translations for the
18769         "Written by ..." part of --version output.
18770         * lib/version-etc.h: Include stdarg.h.
18771         (version_etc_copyright): Declare as readonly.
18772         (version_etc): Make this function variadic with a NULL-terminated list
18773         of author name strings.
18774         (version_etc_va): New declaration.
18775         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18776         (version_etc_copyright): Declare as readonly.
18777         (version_etc_va): New function. Provide a different translatable string
18778         for each possible number of authors < 10. Abbreviate when there are 10
18779         authors or more.
18780         (version_etc): Make this function variadic. Call version_etc_va.
18781         Suggestion from Gary V. Vaughan.
18782
18783         * lib/long-options.h (parse_long_options): Change prototype: the
18784         authors string is moved to the end and becomes variadic.
18785         * lib/long-options.c: Include stdarg.h.
18786         (parse_long_options): Make this function variadic, too.
18787         Call version_etc_va, not version_etc.
18788
18789 2003-10-06  Bruno Haible  <bruno@clisp.org>
18790
18791         * modules/version-etc-2: Remove file.
18792         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18793
18794 2003-10-06  Bruno Haible  <bruno@clisp.org>
18795
18796         * modules/fatal-signal: New file.
18797         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18798
18799 2003-10-06  Bruno Haible  <bruno@clisp.org>
18800
18801         * m4/fatal-signal.m4: New file.
18802         * m4/signalblocking.m4: New file, from GNU gettext.
18803
18804 2003-10-06  Bruno Haible  <bruno@clisp.org>
18805
18806         * lib/version-etc-2.h: Remove file.
18807         * lib/version-etc-2.c: Remove file.
18808
18809 2003-10-06  Bruno Haible  <bruno@clisp.org>
18810
18811         * lib/fatal-signal.h: New file, from GNU gettext.
18812         * lib/fatal-signal.c: New file, from GNU gettext.
18813
18814 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18815
18816         * README: Rework advice for preventing empty .o files.
18817         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18818         not <sys/types.h>.
18819
18820 2003-10-04  Karl Berry  <karl@gnu.org>
18821
18822         * lib/argp*: update from libc.
18823
18824 2003-10-04  Karl Berry  <karl@gnu.org>
18825
18826         * config/config.{guess,sub}: update from config.
18827
18828 2003-10-02  Bruno Haible  <bruno@clisp.org>
18829
18830         * modules/lchown (Include): Add lchown.h.
18831         * modules/time_r (Include): Use "..." syntax.
18832         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18833
18834 2003-10-01  Simon Josefsson  <jas@extundo.com>
18835
18836         * MODULES.html.sh (func_all_modules): Move gethostname from section
18837         'based on' to section 'lacking' POSIX:2001.
18838
18839 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18840
18841         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18842         to output mode on the same stream.
18843
18844 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18845
18846         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18847         Fix arg typo in previous patch.
18848
18849 2003-09-28  Jim Meyering  <jim@meyering.net>
18850
18851         * lib/error.c: Correct cpp indentation.
18852
18853 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18854
18855         * modules/free: New file.
18856
18857 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18858
18859         * m4/free.m4: New file.
18860
18861 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18862
18863         * lib/minmax.h (MIN, MAX)
18864         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18865         Omit the special code that used __typeof__, since we worry that
18866         it could be more trouble than it's worth.  See:
18867         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18868         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18869
18870         * lib/free.c: New file.
18871
18872 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18873
18874         Trivial fixes to Makefile.am parts of module listings.
18875         * modules/strstr: Append strstr.h to lib_SOURCES.
18876         * modules/strcase: Likewise, for strcase.h.
18877
18878 2003-09-27  Karl Berry  <karl@gnu.org>
18879
18880         * config/mkinstalldirs: update from automake.
18881
18882 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18883
18884         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18885         (error_tail): Do not loop, reallocating temporary buffer, since
18886         the output cannot contain more wide characters than the input
18887         contains bytes, the size must be big enough already.  This avoids
18888         one potential size overflow calculation.  Check for size overflow
18889         when calculating temporary buffer size.  Free temporary buffer
18890         when done, if it was allocated with malloc; this plugs a memory
18891         leak.  Remove casts from void * to pointers, that are no longer
18892         needed now that we're assuming C89 or better.
18893
18894         Merge error changes from glibc.
18895
18896         * lib/error.c, error.h: Update copyright notice header to match glibc.
18897         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18898         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18899         Disable cancellation while printing error.
18900         * lib/error.h: Prepend __ to parameter names.
18901
18902 2003-09-26  Jim Meyering  <jim@meyering.net>
18903
18904         * lib/error.c (error_tail): Move some declarations
18905         into inner scope where the local variables are used.
18906
18907 2003-09-26  Bruno Haible  <bruno@clisp.org>
18908
18909         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18910         stpncpy().
18911         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18912
18913 2003-09-26  Bruno Haible  <bruno@clisp.org>
18914
18915         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18916         (stpncpy): Define as alias for gnu_stpncpy.
18917         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18918
18919 2003-09-25  Simon Josefsson  <jas@extundo.com>
18920
18921         * lib/xgetdomainname.h: New file.
18922         * lib/xgetdomainname.c: New file.
18923
18924 2003-09-25  Simon Josefsson  <jas@extundo.com>
18925             Bruno Haible  <bruno@clisp.org>
18926
18927         * modules/getdomainname: New file.
18928         * modules/xgetdomainname: New file.
18929         * MODULES.html.sh (func_all_modules): Add getdomainname,
18930         xgetdomainname.
18931
18932 2003-09-25  Simon Josefsson  <jas@extundo.com>
18933             Bruno Haible  <bruno@clisp.org>
18934
18935         * m4/getdomainname.m4: New file.
18936
18937 2003-09-25  Simon Josefsson  <jas@extundo.com>
18938             Bruno Haible  <bruno@clisp.org>
18939
18940         * lib/getdomainname.h: New file.
18941         * lib/getdomainname.c: New file.
18942
18943 2003-09-25  Karl Berry  <karl@gnu.org>
18944
18945         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18946
18947 2003-09-25  Karl Berry  <karl@gnu.org>
18948
18949         * config/install-sh: update from automake.
18950
18951 2003-09-25  Bruno Haible  <bruno@clisp.org>
18952
18953         * modules/version-etc-2: New file, from modules/version-etc with
18954         modifications.
18955         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18956
18957 2003-09-25  Bruno Haible  <bruno@clisp.org>
18958
18959         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18960         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18961
18962 2003-09-24  Simon Josefsson  <jas@extundo.com>
18963
18964         * modules/xgethostname: Add xgethostname.h.
18965
18966 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18967
18968         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18969         the buffer associated with the argument.  Bug reported by
18970         Simon Josefsson.
18971
18972 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18973
18974         * README: Document assumptions that 'int' is at least 32 bits
18975         wide, that integer arithmetic is 2's complement without overflow,
18976         that there are no holes in integer values, that adding sizes of
18977         two nonoverlapping objects can't overflow, and that all-bits-zero
18978         yields scalar zero.  Fix spelling and capitalization typos.
18979
18980 2003-09-19  Karl Berry  <karl@gnu.org>
18981
18982         * lib/argp.h: update from libc.
18983
18984 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18985
18986         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18987         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18988         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18989
18990 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18991
18992         * gnulib-tool: Use "test -h", not "test -L", for portability
18993         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18994         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18995         (sed_extract_prog): Issue s commands one-by-one, rather than
18996         using \| in one s command.
18997
18998 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18999
19000         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19001         input error, instead of returning NULL the next time we are called
19002         (and therefore losing track of errno).
19003
19004 2003-09-16  Bruno Haible  <bruno@clisp.org>
19005
19006         * gnulib-tool (func_create_testdir): Warn about duplicated
19007         dependencies.
19008
19009 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19010
19011         * modules/argmatch, modules/fatal, modules/obstack,
19012         modules/xalloc, modules/xgethostname: Sort dependencies by
19013         importance, not alphabetically.
19014
19015 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19016
19017         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19018         fails, so that the caller gets the proper errno.
19019
19020         * lib/readutmp.c (read_utmp): Likewise.
19021         Check for fstat error.  Close stream and free storage
19022         when failing.
19023
19024 2003-09-14  Karl Berry  <karl@gnu.org>
19025
19026         * config/srclist.txt (strdup.c): disable for c89 changes.
19027
19028 2003-09-14  Jim Meyering  <jim@meyering.net>
19029
19030         * lib/getloadavg.c: Correct cpp indentation.
19031         * lib/strdup.c: Likewise.
19032         * lib/vasnprintf.c: Likewise.
19033
19034 2003-09-14  Bruno Haible  <bruno@clisp.org>
19035
19036         * modules/fwriteerror: New file.
19037         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19038
19039 2003-09-14  Bruno Haible  <bruno@clisp.org>
19040
19041         * lib/fwriteerror.h: New file.
19042         * lib/fwriteerror.c: New file.
19043
19044 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19045
19046         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19047         modules/xgethostname, modules/xalloc: Depend on exit.
19048
19049 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19050
19051         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19052
19053         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19054         and AC_MINIX, too, so that their extensions are available.
19055
19056         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19057         This macro has been superseded by gl_BACKUPFILE.
19058
19059         More patches to assume C89 or better.
19060
19061         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19062
19063         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19064         unconditionally.
19065         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19066         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19067         Include <string.h>, <stdlib.h> unconditionally.
19068         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19069         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19070         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19071         headers or for string.h.
19072         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19073         or strtoul.
19074
19075         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19076         headers.
19077         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19078         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19079         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19080         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19081         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19082         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19083         memcpy, memset.
19084         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19085         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19086         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19087         strtol.
19088         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19089         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19090         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19091         strtoul.
19092
19093 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19094
19095         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19096         * lib/obstack.c [!defined _LIBC]: Likewise.
19097         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19098         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19099         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19100
19101         More changes to assume C89 or better.
19102
19103         * lib/error.c (error_tail): Assume vprintf.
19104
19105         * lib/argmatch.c (getenv): Remove decl.
19106         * lib/progreloc.c (get_full_program_name): Define via prototype.
19107         * lib/setenv.c (clearenv): Likewise.
19108         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19109         needed.
19110         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19111         (malloc, memcpy): Remove decls.
19112         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19113         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19114         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19115         (memcpy): Remove macro.
19116         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19117         (__P): Remove.  All uses removed.
19118         (PTR): Remove.  All uses changed to void *.
19119         (CHAR_BIT, NULL): Remove.
19120         (spaces, zeros, memset_space, memset_zero)
19121         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19122         Remove.
19123         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19124         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19125         Define with prototype.
19126         Remove now-unnecessary prototype decl.
19127         (extra_args_spec): Assume ANSI C.  All uses changed.
19128         (extra_args_spec_iso): Remove.
19129         (my_strftime, emacs_strftimeu): Define via prototype.
19130         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19131         unconditionally.
19132         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19133         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19134         (strtoul, strtol): Remove decls.
19135         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19136         LONG_MAX): Remove.
19137         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19138         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19139         (LOCALE_PARAM_PROTO): New macro.
19140         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19141         (INTERNAL (strtol), strtol): Define with a prototype.
19142         (PARAMS): Remove.  All uses removed.
19143         * lib/tempname.c: Include <string.h> unconditionally.
19144         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19145         * lib/xgethostname.c (main): Define with a prototype.
19146         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19147         Include <stdlib.h> unconditionally.
19148         (calloc, malloc, realloc, free): Remove decls.
19149         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19150         Include <stdlib.h> unconditionally.  Sort include file names.
19151         (strtod): Remove.
19152         (xstrtod): Define with a prototype.
19153         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19154         (strtol, strtoul): Remove decls.
19155
19156 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19157
19158         More patches to assume C89 or better.
19159         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19160         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19161         string.h, memchr, STDC_HEADERS.
19162
19163 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19164
19165         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19166         Include <stdlib.h>, <string.h> unconditionally.
19167         Remove now-unnecessary cast to char *.
19168         * lib/strnlen.c: Include <string.h> unconditionally.
19169         * lib/yesno.c (yesno): Define with a prototype.
19170
19171 2003-09-11  Bruno Haible  <bruno@clisp.org>
19172
19173         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19174
19175 2003-09-10  Jim Meyering  <jim@meyering.net>
19176
19177         * lib/error.c: Correct indentation of cpp directives.
19178
19179 2003-09-10  Bruno Haible  <bruno@clisp.org>
19180
19181         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19182         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19183         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19184         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19185         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19186         <stdlib.h> and <string.h> checks.
19187         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19188         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19189
19190 2003-09-10  Bruno Haible  <bruno@clisp.org>
19191
19192         * lib/strcspn.c: Include <string.h> unconditionally.
19193         * lib/strpbrk.c: Include <string.h> unconditionally.
19194         * lib/strstr.c: Include <string.h> unconditionally.
19195         * lib/unicodeio.c: Include <string.h> unconditionally.
19196         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19197         * lib/unsetenv.c: Likewise.
19198         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19199         * lib/yesno.c: Include <stdlib.h> unconditionally.
19200         (rpmatch): Add prototype.
19201
19202 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19203
19204         More patches to assume C89 or better.
19205         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19206         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19207         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19208         or for string.h.
19209         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19210         stdlib.h.
19211         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19212         C headers.
19213         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19214         string.h.
19215         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19216         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19217         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19218         or for string.h.
19219         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19220         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19221         C headers.
19222         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19223         memcpy.
19224         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19225         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19226         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19227         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19228         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19229         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19230         string.h, free.
19231         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19232         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19233         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19234         C headers, or for string.h.
19235         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19236         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19237         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19238         headers, memory.h, stdlib.h, string.h, strings.h.
19239         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19240         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19241         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19242         strchr.
19243         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19244         headers, memory.h, string.h.
19245         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19246         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19247         free.
19248         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19249         headers.
19250         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19251         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19252         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19253         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19254         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19255
19256 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19257
19258         More K&R removal.
19259
19260         * lib/acosl.c (main): Use a prototype.
19261         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19262         tanl.c: Likewise.
19263
19264         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19265
19266         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19267         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19268         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19269         with a prototype.
19270         * lib/getopt.c (const): Remove macro.
19271         Include <string.h> unconditionally.
19272         (my_index): Remove; all uses changed to strchr.
19273         (strlen): Remove decl.
19274         (exchange): Remove forward decl; no longer needed.
19275         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19276         Define with prototype.
19277         * lib/getopt1.c (const): Remove macro.
19278         (getopt_long, getopt_long_only, main): Define with prototype.
19279
19280         * lib/getugroups.c: Include <string.h> unconditionally.
19281
19282         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19283         (getusershell, setusershell, endusershell, readname, main):
19284         Define with prototypes.
19285
19286         * lib/group-member.c: Include group-member.h first.
19287         Include <stdlib.h> unconditionally.
19288
19289         * lib/hard-locale.c: Include hard-locale.h first.
19290         Include <stdlib.h>, <string.h> unconditionally.
19291
19292         * lib/hash.c (free, malloc): Remove decls.
19293         Include <stdlib.h> unconditionally.
19294
19295         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19296         (getenv): Do not declare.
19297
19298         * lib/idcache.c: Include <string.h> unconditionally.
19299
19300         * lib/long-options.c: Include long-options.h first, to test interface.
19301         Include <stdlib.h> unconditionally.
19302
19303         * lib/makepath.c: Include makepath.h first, to test interface.
19304         Include <stdlib.h> and <string.h> unconditionally.
19305
19306         * lib/linebuffer.c: Include <stdlib.h>.
19307         (free): Remove decl.
19308
19309         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19310         stddef.h. rpl_malloc returns void *, not char *.
19311         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19312         prototype.
19313
19314         * lib/md5.h: Include <limits.h> unconditionally.
19315         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19316         (__P): Remove; all uses removed.
19317         * lib/md5.c: Include "md5.h" first.
19318         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19319         md5_buffer, md5_process_bytes, md5_process_block):
19320         Define with prototypes.
19321         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19322         * lib/sha.c: Include "sha.h" first.
19323         Include <stdlib.h>, <string.h> unconditionally.
19324
19325         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19326         * lib/memcmp.c (__ptr_t): Likewise.
19327         * lib/memrchr.c (__ptr_t): Likewise.
19328         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19329         Include <string.h> unconditionally.
19330         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19331         * lib/memchr.c: Include <stdlib.h> unconditionally.
19332         * lib/memchr.c (LONG_MAX): Remove.
19333         * lib/memrchr.c (LONG_MAX): Likewise.
19334         * lib/memchr.c (__memchr): Define via a prototype.
19335         * lib/memrchr.c (__memrchr): Likewise.
19336         * lib/memcmp.c (__P): Remove, and remove all uses.
19337         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19338         Remove forward decls; no longer needed.
19339         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19340         Use types required by C89 in prototype.
19341
19342         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19343         * lib/savedir.c: Likewise.
19344         * lib/mkdir.c (free): Remove decl.
19345         * lib/rmdir.c (rmdir): Define with a prototype.
19346         * lib/savedir.c: Include savedir.h first, to test interface.
19347
19348         * lib/mktime.c (STDC_HEADERS): Remove.
19349         Include <stdlib.h>, <string.h> unconditionally.
19350
19351         * lib/modechange.c: Include <stdlib.h> unconditionally.
19352         (malloc): Remove decl.
19353
19354         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19355         (free): Remove decl.
19356
19357         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19358         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19359         (This type really should be intptr_t, but that's a C99ism.)
19360         (_obstack_memcpy): Remove: all uses changed to memcpy.
19361         Include <string.h> unconditionally.
19362         (struct obstack): Assume __STDC__ for types of members
19363         chunkfun, freefun, extra_arg.
19364         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19365         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19366         obstack_begin, obstack_specify_allocation,
19367         obstack_specify_allocation_with_arg, obstack_chunkfun,
19368         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19369         Remove unprototyped decls and the macros that use them.
19370         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19371         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19372         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19373         (defined __STDC__ && __STDC__)]:
19374         Remove nonprototyped code.
19375         Include <stdlib.h> unconditionally.
19376         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19377         _obstack_allocated_p, _obstack_free, obstack_free,
19378         _obstack_memory_used, print_and_abort):
19379         Define using prototypes.
19380         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19381         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19382         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19383         obstack_next_free, obstack_object_size, obstack_room) [0]:
19384         Remove unused, unprototyped code.
19385
19386         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19387
19388         * lib/physmem.c (physmem_total, physmem_available, main): Define
19389         with prototypes.
19390
19391         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19392         (main): Define with a prototype.
19393
19394         * lib/posixver.c (getenv): Remove decl.
19395
19396         * lib/putenv.c (malloc): Returns void *, not char *.
19397         Include <string.h> unconditionally.
19398         (strchr, memcpy, NULL): Do not define.
19399
19400         * lib/readtokens.c: Include readtokens.h first, to test interface.
19401         Include <stdlib.h>, <string.h> unconditionally.
19402         (init_tokenbuffer): Define with a prototype.
19403
19404         * lib/regex.c (PARAMS): Remove.  All uses removed.
19405         All uses of _RE_ARGS removed, too.
19406         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19407         unconditionally.
19408         (bzero): Assume memset exists.
19409         (memcmp, memcpy, NULL): Remove.
19410         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19411         char, or assignments to local vars of type signed char.
19412         (init_syntax_once, PREFIX(extract_number_and_incr),
19413         PREFIX(print_partial_compiled_pattern),
19414         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19415         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19416         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19417         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19418         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19419         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19420         wcs_compile_range, byte_compile_range, truncate_wchar,
19421         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19422         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19423         count_mbs_length, wcs_re_match_2_internal,
19424         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19425         PREFIX(alt_match_null_string_p),
19426         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19427         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19428         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19429         now-unnecessary declaration, if any.
19430         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19431         regcomp, regexec):
19432         Remove now-unnecessary casts among pointer types.
19433         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19434
19435         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19436         (free): Remove decl.
19437
19438         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19439
19440         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19441         (free): Remove decl.
19442
19443         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19444         * lib/xgetcwd.c: Likewise.
19445
19446         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19447         (free): Remove decl.
19448
19449         * lib/strchrnul.c (strchrnul): Define with a prototype.
19450         Fix bug: c_in was not converted to char before searching.
19451
19452         The following changes are not K&R related:
19453
19454         * lib/group-member.h: Include <sys/types.h>, so that this file is
19455         self-contained.
19456         * lib/makepath.h: Likewise.
19457
19458         * lib/getusershell.c (readname, default_index, line_size, readname):
19459         Use size_t, not int, for sizes.
19460         (readname): If the size overflows, report an error instead of
19461         looping forever.
19462
19463 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19464
19465         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19466         libc.
19467
19468 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19469
19470         * README: New section: portability guidelines.
19471
19472 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19473
19474         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19475         C89 spec.
19476
19477 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19478
19479         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19480
19481 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19482
19483         Assume C89 or better; remove K&R cruft.
19484         A few of these changes were first proposed by Derek Robert Price
19485         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19486
19487         * lib/addext.c: Include <string.h> unconditionally.
19488         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19489         Don't declare getenv or malloc.
19490
19491         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19492         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19493         (NULL): Remove.
19494         (find_stack_direction, alloca): Use prototypes.
19495
19496         * lib/atexit.c (atexit): Define using a prototype.
19497
19498         * lib/basename.c, dirname.c, stripslash.c:
19499         Include <string.h> unconditionally.
19500
19501         * lib/bcopy.c: Include <stddef.h>.
19502         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19503
19504         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19505
19506         * lib/error.h (error, error_at_line, error_print_progname)
19507         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19508         * lib/error.c: Include error.h first, to check interface.
19509         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19510         (VA_START): Remove; all uses changeed to va_start.
19511         (exit, strerror): Remove decls.
19512         (error_print_progname): Prototype uncondionally.
19513         Don't include <errno.h>; no longer needed.
19514         (private_strerror): Remove.
19515         (error_tail): Always define.
19516         (error, error_at_line): Assume C89 or better; always use prototypes.
19517         * lib/fatal.c: Include "fatal.h" first, to test interface.
19518         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19519         (VA_START): Remove; all uses changed to va_start.
19520         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19521         this case.
19522         (exit): Remove decl.
19523         (fatal): Prototype unconditionally.  Assume va_start works.
19524         Abort at end, to pacify gcc.
19525
19526         * lib/euidaccess.c (main): Define with a prototype.
19527
19528         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19529
19530         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19531
19532         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19533         prototypes.
19534         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19535         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19536         (getenv): Remove decl.
19537         (fnmatch): Define using a prototype.
19538         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19539         (FCT): Define using a prototype.
19540
19541         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19542
19543         * lib/gethostname.c: Include <stddef.h>.
19544         (gethostname): Define with prototype.  Length is size_t, not int.
19545
19546 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19547
19548         Assume C89 or better; remove K&R cruft.
19549         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19550         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19551         string.h, getenv, malloc.
19552         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19553         headers.
19554         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19555         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19556         do not check for strerror.
19557         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19558         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19559         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19560         do not check for doprnt or vprintf.
19561         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19562         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19563
19564 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19565
19566         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19567         getversion.c should have been removed then, but was accidentally
19568         preserved.
19569
19570         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19571         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19572
19573 2003-09-08  Karl Berry  <karl@gnu.org>
19574
19575         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19576                 config, forget about prep.
19577
19578         * config/depcomp, missing: update from automake.
19579
19580 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19581
19582         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19583         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19584
19585 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19586
19587         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19588         copy_tm_result.  Bug reported by Simon Josefsson in
19589         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19590
19591 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19592
19593         * m4/time_r.m4: New file.
19594         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19595         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19596         is. Check for timegm declaration.
19597         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19598         Do not check for gmtime_r.
19599         Replace mktime if __mktime_internal does not exist and if mktime
19600         hasn't been replaced already.
19601
19602 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19603
19604         * lib/time_r.c, lib/time_r.h: New files.
19605
19606         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19607         __localtime_r.
19608         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19609         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19610
19611         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19612         __gmtime_r.
19613         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19614         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19615         Include <time_r.h>.
19616
19617         * lib/timegm.c: Switch to glibc implementation, with the following
19618         changes:
19619         [defined HAVE_CONFIG_H]: Include <config.h>.
19620         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19621         (__mktime_internal) [!defined _LIBC]: New decl.
19622         (__gmtime_r) [!defined _LIBC]: New macro and function.
19623         (timegm): Use a prototype, since gnulib assumes C89.
19624         Do not bother declaring tmp to be const, as it's not really usefu.
19625         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19626         (timegm): Declare only if HAVE_DECL_TIMEGM.
19627
19628 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19629
19630         * MODULES.html.sh (func_all_modules): Add time_r.
19631         * modules/time_r: New file.
19632         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19633         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19634
19635 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19636
19637         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19638         Bug reported by Lute Kamstra in
19639         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19640
19641         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19642         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19643         course with correspondingly smaller numbers for tomorrow and
19644         yesterday.  From Tadayoshi Funaba.  Originally installed into
19645         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19646         coreutils merge?).
19647
19648 2003-08-31  Simon Josefsson  <jas@extundo.com>
19649
19650         * modules/timegm: New file.
19651         * MODULES.html.sh (func_all_modules): Add timegm.
19652
19653 2003-08-31  Simon Josefsson  <jas@extundo.com>
19654
19655         * m4/timegm.m4: New file.
19656
19657 2003-08-31  Simon Josefsson  <jas@extundo.com>
19658
19659         * lib/timegm.h: New file.
19660         * lib/timegm.c: New file.  Based on
19661         wget-1.8.2/src/http.c:mktime_from_utc.
19662
19663 2003-08-31  Karl Berry  <karl@gnu.org>
19664
19665         * lib/argp.h: update from libc.
19666
19667 2003-08-28  Bruno Haible  <bruno@clisp.org>
19668
19669         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19670         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19671         followed by '#define fnmatch fnmatch_posix' gives an error.
19672
19673 2003-08-28  Bruno Haible  <bruno@clisp.org>
19674
19675         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19676         warning on QNX, which defines O_BINARY to 000000.
19677
19678 2003-08-27  Jim Meyering  <jim@meyering.net>
19679
19680         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19681         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19682         would fail after 32.  Reported by Danny Levinson.  Details here:
19683         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19684
19685 2003-08-24  Bruno Haible  <bruno@clisp.org>
19686
19687         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19688         MSVC7 <stdio.h> is included later.
19689
19690 2003-08-22  Simon Josefsson  <jas@extundo.com>
19691
19692         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19693
19694 2003-08-20  Karl Berry  <karl@gnu.org>
19695
19696         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19697
19698 2003-08-20  Bruno Haible  <bruno@clisp.org>
19699
19700         * modules/progname: New file.
19701         * MODULES.html.sh (func_all_modules): Add progname.
19702
19703 2003-08-20  Bruno Haible  <bruno@clisp.org>
19704
19705         * lib/progname.h: New file, from GNU gettext.
19706         * lib/progname.c: New file, from GNU gettext.
19707         * lib/progreloc.c: New file, from GNU gettext.
19708
19709 2003-08-19  Jim Meyering  <jim@meyering.net>
19710
19711         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19712         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19713
19714 2003-08-19  Bruno Haible  <bruno@clisp.org>
19715
19716         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19717         more.
19718
19719 2003-08-19  Bruno Haible  <bruno@clisp.org>
19720
19721         * lib/xstrdup.c: Assume <string.h> exists.
19722
19723 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19724
19725         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19726         in makefile rules.
19727
19728 2003-08-18  Jim Meyering  <jim@meyering.net>
19729
19730         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19731         * m4/lib-ld.m4: Likewise.
19732
19733 2003-08-18  Jim Meyering  <jim@meyering.net>
19734
19735         * lib/setenv.h: Indent nested cpp directive.
19736         * lib/vasnprintf.c: Remove trailing blanks.
19737
19738 2003-08-17  Simon Josefsson  <jas@extundo.com>
19739
19740         * modules/xstrndup: New file.
19741         * MODULES.html.sh (func_all_modules): Add xstrndup.
19742
19743 2003-08-17  Simon Josefsson  <jas@extundo.com>
19744
19745         * modules/argp: Fix autoconf macro name. Add more dependencies.
19746
19747 2003-08-17  Simon Josefsson  <jas@extundo.com>
19748
19749         * m4/xstrndup.m4: New file.
19750
19751 2003-08-17  Simon Josefsson  <jas@extundo.com>
19752
19753         * m4/argp.m4: New file.
19754
19755 2003-08-17  Simon Josefsson  <jas@extundo.com>
19756             Bruno Haible  <bruno@clisp.org>
19757
19758         * lib/xstrndup.h: New file.
19759         * lib/xstrndup.c: New file.
19760
19761 2003-08-17  Bruno Haible  <bruno@clisp.org>
19762
19763         * modules/strndup (Files, Include): Add lib/strndup.h.
19764
19765 2003-08-17  Bruno Haible  <bruno@clisp.org>
19766
19767         * modules/euidaccess (Files): Add lib/euidaccess.h.
19768
19769 2003-08-17  Bruno Haible  <bruno@clisp.org>
19770
19771         * lib/strndup.h: New file.
19772
19773 2003-08-17  Bruno Haible  <bruno@clisp.org>
19774
19775         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19776         like AC_GNU_SOURCE.
19777         * modules/extensions (configure.ac): Comment out the invocation of
19778         gl_USE_SYSTEM_EXTENSIONS.
19779
19780 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19781
19782         Merges from coreutils, etc.
19783         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19784         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19785         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19786         fixing a typo.
19787         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19788         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19789
19790 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19791
19792         Document merge from coreutils.
19793         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19794         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19795         * modules/utime: Add m4/utimes-null.m4.
19796
19797 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19798
19799         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19800         space, undoing this 2003-08-12 change:
19801         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19802
19803 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19804
19805         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19806         strtoul.c from libc, undoing this 2003-08-12 change:
19807         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19808
19809 2003-08-16  Jim Meyering  <jim@meyering.net>
19810
19811         Merges from coreutils.
19812         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19813         prefix.  Adjust cache variables similarly.  Create 500 rather than
19814         just 300 files, to exercise bug on Darwin6.5, too.
19815         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19816         $missing_dir.
19817         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19818         AM_SYS_POSIX_TERMIOS.
19819         Reported by mkc@mathdogs.com.
19820         Also change use of $am_cv_sys_posix_termios
19821         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19822         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19823         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19824         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19825         in /proc/mounts until it finds one with matching device number.  This
19826         is unnecessary when the FILE argument *is* a mount point.  No stat call
19827         is necessary in that case.  So, disable the statvfs-testing code on
19828         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19829         as RedHat bug# 84846.
19830         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19831         to 1MB, so as not to render systems with no stack size limit (e.g.,
19832         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19833         Include <unistd.h>.  On some systems,
19834         it is required for the definition of _SC_PAGESIZE.
19835
19836 2003-08-16  Jim Meyering  <jim@meyering.net>
19837
19838         Merge from coreutils.
19839         * lib/xstrtoimax.c: #else #if -> #elif.
19840         * lib/xstrtoumax.c: Likewise.
19841
19842 2003-08-16  Jim Meyering  <jim@meyering.net>
19843
19844         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19845         * m4/utimes.m4: Removed.
19846         * m4/utimes-null.m4: Renamed from utimes.m4.
19847
19848         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19849         to 1MB, so as not to render systems with no stack size limit (e.g.,
19850         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19851         Include <unistd.h>.  On some systems,
19852         it is required for the definition of _SC_PAGESIZE.
19853
19854 2003-08-16  Jim Meyering  <jim@meyering.net>
19855         and Paul Eggert  <eggert@cs.ucla.edu>
19856
19857         Merges from coreutils, etc.
19858
19859         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19860         using the latest version from cvs.  This avoids problems with #line
19861         directives using a vendor (Sun) compiler.
19862         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19863         Don't set GETGROUPS_LIB here; now it's
19864         done via getgroups.m4's wrapper function.
19865         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19866         rather than just in sh-util/configure.in, so that the
19867         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19868         same.
19869         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19870         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19871         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19872         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19873         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19874         Remove code that is now done by the newly-required macros.
19875         Append $(EXEEXT) to DF_PROG.
19876         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19877         Do not invoke or require the following here,
19878         since prereq.m4 or some gnulib .m4 now does this for us:
19879         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19880         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19881         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19882         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19883         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19884         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19885         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19886         AC_FUNC_OBSTACK.
19887         Do not replace the following functions, as this is now the job
19888         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19889         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19890         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19891         atexit getpass, strdup, getpagesize.
19892         Replace 'raise'.
19893         Do not check for the following functions, as this is now the job
19894         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19895         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19896         setregid.
19897         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19898         Check for sys/sysctl.h.
19899         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19900         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19901         of checking for ssize_t ourselves.
19902
19903         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19904         Require every macro that gnulib/modules/* suggests for us.
19905         (jm_PREREQ_ADDEXT): New macro.
19906         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19907         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19908
19909         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19910         (gl_PHYSMEM): Use it.
19911         Also check for `table' function.
19912         Check for new headers and functions.
19913         Add check for sys/sysmp.h.
19914         With suggestions from Kaveh Ghazi.
19915         Ignore headers that are present but cannot be compiled.  This
19916         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19917         C 5.4.
19918
19919 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19920
19921         Document merge from coreutils.
19922         * modules/userspec: Depend on posixver.
19923         * modules/strftime: Depend on tzset.
19924
19925 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19926
19927         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19928         rather than tab, after '#' in shell-script copyright notices.
19929         Suggested by Bruno Haible.
19930
19931 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19932
19933         * config/srclist-update: Use three spaces, rather than tab, after '#'
19934         in shell-script copyright notices.  Suggested by Bruno Haible.
19935         Remove unnecessary parenthesization in regular expression.
19936
19937 2003-08-15  Jim Meyering  <jim@meyering.net>
19938
19939         Merge from coreutils.
19940         * lib/xgethostname.c: Include <stdlib.h>.
19941         (xghostname): Don't exit for anything other than memory-related
19942         failure; just return NULL.
19943         * lib/userspec.c: Include "posixver.h".
19944         (parse_user_spec): Accept `.' as a separator only
19945         in pre-POSIX-200112 mode.
19946         * lib/strtoimax.c: Use #elif rather than #else #if.
19947         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19948         Remove function, now that we can rely on a working tzset function.
19949         [!_LIBC]: Ensure that the required autoconf test has been run.
19950         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19951         Use underlying_strftime for %r.
19952         * lib/sha.c: Merge in some clean-up and optimization changes from
19953         glibc.
19954         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19955         Ensure that it is a multiple of 64.
19956         Rearrange loop exit tests so as to avoid performing an
19957         additional fread after encountering an error or EOF.
19958         * lib/realloc.c: Update copyright date.
19959
19960 2003-08-15  Jim Meyering  <jim@meyering.net>
19961         and Paul Eggert  <eggert@twinsun.com>
19962
19963         Merge from coreutils.
19964         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19965         member but strut utmpx does not.  Needed for AIX 4.3.3.
19966         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19967
19968 2003-08-15  Jim Meyering  <jim@meyering.net>
19969         and Paul Eggert  <eggert@cs.ucla.edu>
19970
19971         Merges from coreutils, etc.
19972         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19973         Require gl_FUNC_TZSET_CLOBBER.
19974         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19975         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19976         members.
19977
19978 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19979
19980         Help the merge from coreutils.
19981         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19982         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19983         * m4/tzset.m4: Use it too.
19984
19985 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19986
19987         * modules/tzset: New file.
19988
19989 2003-08-14  Jim Meyering  <jim@meyering.net>
19990
19991         Merges from coreutils.
19992         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19993         variable names, rather than @FNMATCH_H@.
19994         * modules/alloca: Likewise for $(ALLOCA_H).
19995
19996         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19997         the three copies of the literal target, `fnmatch.h'.
19998         * modules/alloca (alloca.h): Likewise.
19999
20000 2003-08-14  Jim Meyering  <jim@meyering.net>
20001
20002         Merge from coreutils.
20003         * m4/tzset.m4: New file.
20004         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20005         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20006         otherwise, AIX 5.1 systems would end up using the latter.
20007         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20008         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20009         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20010         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20011
20012 2003-08-14  Jim Meyering  <jim@meyering.net>
20013
20014         Merge from coreutils.
20015         * lib/obstack.h: Whitespace changes.
20016         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20017         and xcalloc return values.
20018         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20019         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20020         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20021         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20022         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20023         error from mntctl.
20024         Use mntctl's return value to drive the entry-processing loop, since
20025         we can't rely on the value of the vmt_length member in the last
20026         entry.  On some systems doing so could result in exhausting
20027         virtual memory.  Based in part on a patch from Mike Jetzer.
20028
20029 2003-08-14  Jim Meyering  <jim@meyering.net>
20030         and Paul Eggert  <eggert@twinsun.com>
20031
20032         Merges from coreutils, plus other fixes.
20033         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20034         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20035         for credits and details.  Thanks to Kaveh Ghazi for helping
20036         to keep these files in sync.
20037         (ARRAY_SIZE): Define it.
20038         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20039         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20040         (memcasecmp): Don't assume size_t fits in unsigned int.
20041         Remove casts and duplicate code.
20042         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20043         (memcpy): Remove definition.
20044         Merge in some clean-up and optimization changes from glibc.
20045         [BLOCKSIZE]: Move definition to top of file.
20046         Ensure that it is a multiple of 64.
20047         Rearrange loop exit tests so as to avoid performing an
20048         additional fread after encountering an error or EOF.
20049         * lib/md5.h (md5_uintptr): Define.
20050         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20051         return to the initial working directory.  Preserve errno
20052         for caller.
20053         * lib/idcache.c: Include "xalloc.h".
20054         (xmalloc, xrealloc): Remove decls.
20055         (getuser): Remove casts no longer required in C89.
20056         * lib/human.c: Include stdio.h, for sprintf.
20057         * lib/group-member.c: Include "xalloc.h".
20058         (xmalloc, xrealloc): Remove decls.
20059         (get_group_info): Remove casts no longer required in C89.
20060         * lib/getusershell.c (readname): Remove casts no longer required in
20061         C89.
20062         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20063         * lib/getline.c: Whitespace fix, from coreutils.
20064
20065 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20066
20067         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20068         Check for isascii.
20069
20070         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20071         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20072         Undo previous (whitespace-only) change.
20073
20074 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20075
20076         * lib/exclude.c: Include <ctype.h>
20077         (IN_CTYPE_DOMAIN): New macro.
20078         (is_space): New fn.
20079         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20080         and empty lines.
20081
20082         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20083         Undo previous (whitespace-only) change.
20084
20085 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20086
20087         * config/srclist-update: Change update back to the old behavior,
20088         leaving whitespace alone.  Use one 'sed' command rather than a
20089         pipeline.
20090         (fixlicense): Now a variable, not a function.
20091         (remove_trailing_blanks): Remove.
20092         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20093         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20094         Undo previous (whitespace-only) change.
20095
20096 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20097
20098         Merge from coreutils.
20099         * modules/euidaccess: Add lib_SOURCES, include for new
20100         file euidaccess.h
20101
20102 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20103
20104         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20105         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20106         Normalize leading white space and remove trailing white space.
20107
20108         Merge from coreutils
20109         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20110
20111         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20112         0.12.1.  These files are now being upgraded automatically by
20113         ../config/srclist-update.
20114
20115 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20116
20117         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20118         Normalize leading white space and remove trailing white space.
20119         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20120         notice, as per ../config/srclist-update.
20121
20122         Merge from coreutils.
20123         * lib/euidaccess.h: New file.
20124         * lib/euidaccess.c: Include it.
20125         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20126         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20127         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20128
20129 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20130
20131         * config/srclist-update: Add copyright notice.
20132         (remove_id_lines, remove_trailing_blanks): New constants.
20133         (fixfile): Use them to normalize spacing a bit in copied files.
20134         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20135         Normalize leading white space and remove trailing white space.
20136
20137         * config/texinfo.tex: Sync with texinfo.
20138
20139         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20140         strtoul.c from libc, to merge coreutils whitespace changes.
20141
20142         * config/srclist.txt: Get the following m4 files from gettext:
20143         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20144         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20145         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20146         wint_t.m4.
20147
20148 2003-08-12  Karl Berry  <karl@gnu.org>
20149
20150         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20151         been made.
20152
20153 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20154
20155         * modules/gnu-source, m4/gnu-source.m4:
20156         Remove; we're assuming Autoconf 2.54 or later now.
20157         Suggested by Bruno Haible.
20158         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20159
20160 2003-08-11  Bruno Haible  <bruno@clisp.org>
20161
20162         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20163
20164 2003-08-11  Bruno Haible  <bruno@clisp.org>
20165
20166         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20167         (vasnprintf): Use it instead of wcslen.
20168
20169 2003-08-11  Bruno Haible  <bruno@clisp.org>
20170
20171         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20172         value to ensure that _Bool promotes to int. Use #define for _Bool when
20173         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20174
20175 2003-08-10  Karl Berry  <karl@gnu.org>
20176
20177         * lib/regex.h: update from libc (whitespace fix).
20178
20179 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20180
20181         Merge some files from coreutils.  These changes were
20182         originally made by Jim Meyering.
20183         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20184         many older Unixes require this.
20185         * lib/alloca.c (alloca): Remove cast to argument of free;
20186         no longer needed in C89.
20187         * lib/alloca_.h, regex.h: Fix white space to match
20188         what GNU indent does.
20189
20190 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20191
20192         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20193         apparently Emacs's Unicode mode got confused before my 2003-08-05
20194         checkin.
20195
20196 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20197
20198         * m4/extensions.m4: New file.
20199         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20200         Require gl_USE_SYSTEM_EXTENSIONS.
20201         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20202         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20203
20204 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20205
20206         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20207         * modules/extensions, modules/gnu-source: New files.
20208         * modules/timespec, modules/unlocked-io: Depend on extensions.
20209
20210 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20211
20212         * modules/restrict: New file.
20213         * MODULES.html.sh (func_all_modules): Add restrict.
20214         * modules/regex: Depend on restrict.
20215
20216 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20217
20218         * m4/restrict.m4: New file.
20219         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20220
20221 2003-08-07  Bruno Haible  <bruno@clisp.org>
20222
20223         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20224         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20225
20226 2003-08-07  Bruno Haible  <bruno@clisp.org>
20227
20228         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20229         makes the module 'getndelim2' compatible with the module 'getline'.
20230
20231 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20232
20233         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20234         byte with "\201" to avoid glitches when editing that source file
20235         with multi-gnome-terminal.
20236
20237 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20238
20239         * lib/bumpalloc.h: Remove.
20240
20241 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20242
20243         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20244         * modules/bumpalloc: Remove.
20245
20246 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20247
20248         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20249         GNU coding style.
20250
20251         Merge from coreutils.
20252         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20253         1. From glibc.
20254         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20255         from Karl Berry, implemented by Jim Meyering.
20256         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20257         from Dmitry V. Levin.
20258         Remove anachronistic cast of xrealloc.
20259         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20260         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20261         type. Otherwise, it wouldn't compile with at least /bin/cc on
20262         ymp-cray-unicos9.0.2.X.
20263         Combine two mostly-identical uses of alloca into one.
20264         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20265
20266 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20267
20268         [From Emacs.]
20269
20270         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20271         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20272         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20273         obsolete NLIST_NAME_UNION.
20274         [__GNU__]: Undef BSD and FSCALE.
20275         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20276
20277 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20278
20279         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20280         an enum type, so that it's guaranteed to promote to int.  See:
20281         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20282
20283 2003-08-03  Karl Berry  <karl@gnu.org>
20284
20285         * config/depcomp: update from automake.
20286
20287 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20288
20289         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20290         (strerror): Don't assume that a printable int fits in 14 bytes.
20291
20292 2003-07-31  Bruno Haible  <bruno@clisp.org>
20293
20294         * modules/getpass-gnu: New file.
20295         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20296
20297 2003-07-31  Bruno Haible  <bruno@clisp.org>
20298
20299         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20300
20301 2003-07-24  Karl Berry  <karl@gnu.org>
20302
20303         * config/missing: update from automake.
20304
20305 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20306             Bruno Haible  <bruno@clisp.org>
20307
20308         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20309         * lib/getline.c (getline, getdelim): Likewise.
20310         Remove _GNU_SOURCE define; now it's defined in config.h through
20311         m4/getline.m4.
20312
20313 2003-07-23  Karl Berry  <karl@gnu.org>
20314
20315         * config/config.sub: update from prep.
20316
20317 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20318
20319         * modules/xalloc (Depends-on): Add exitfail.
20320         * modules/xmemcoll: Likewise.
20321
20322 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20323
20324         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20325         over-parenthesization in macros.
20326
20327         Sync with coreutils.
20328
20329         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20330         required by C99.
20331
20332         Use `exit_failure' for xalloc and xmemcoll instead of their own
20333         private exit-failure variables.
20334         * lib/xalloc.h (xalloc_exit_failure): Remove.
20335         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20336         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20337         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20338         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20339         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20340
20341 2003-07-20  Jim Meyering  <jim@meyering.net>
20342
20343         * modules/closeout (Depends-on): Add exitfail.
20344         Suggestion from Bruno Haible.
20345
20346 2003-07-19  Karl Berry  <karl@gnu.org>
20347
20348         * config/config.sub: update from prep.
20349
20350 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20351
20352         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20353         Remove.
20354         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20355         to test that it can stand by itself.  Include "exitfail.h".
20356         Clients should set exit_failure instead.
20357         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20358
20359 2003-07-18  Bruno Haible  <bruno@clisp.org>
20360
20361         * modules/getndelim2: New file.
20362         * modules/getline: Share files with module getndelim2.
20363         * modules/getnline: Depend on getndelim2 instead of sharing files with
20364         it. Add getnline.c to lib_SOURCES.
20365         * MODULES.html.sh (func_all_modules): Add getndelim2.
20366
20367 2003-07-18  Bruno Haible  <bruno@clisp.org>
20368
20369         * m4/getndelim2.m4: New file.
20370         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20371         invoke gl_PREREQ_GETNDELIM2.
20372         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20373         gl_PREREQ_GETNDELIM2.
20374         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20375         gl_GETNDELIM2.
20376
20377 2003-07-18  Bruno Haible  <bruno@clisp.org>
20378
20379         * lib/getndelim2.h: New file.
20380         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20381         getndelim2.h.
20382         (getndelim2): Make non-static. Change return type to ssize_t.
20383         * lib/getline.h: Change argument names.
20384         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20385         * lib/getnline.c: Include getndelim2.h.
20386
20387 2003-07-18  Andreas Schwab  <schwab@suse.de>
20388
20389         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20390
20391 2003-07-17  Karl Berry  <karl@gnu.org>
20392
20393         * config/config.sub: update from prep.
20394
20395 2003-07-17  Bruno Haible  <bruno@clisp.org>
20396
20397         * modules/getnline: New file.
20398         * modules/getline: Add lib/getndelim2.c to source file list.
20399         * MODULES.html.sh (func_all_modules): Add getnline.
20400
20401 2003-07-17  Bruno Haible  <bruno@clisp.org>
20402
20403         * m4/getnline.m4: New file.
20404
20405 2003-07-17  Bruno Haible  <bruno@clisp.org>
20406
20407         * m4/Makefile.am.in: Remove file.
20408         * m4/Makefile.am: Remove file.
20409         * m4/Makefile.in: Remove file.
20410
20411 2003-07-17  Bruno Haible  <bruno@clisp.org>
20412
20413         * lib/getnline.h: New file.
20414         * lib/getnline.c: New file.
20415         * lib/getndelim2.c: New file, extracted from getline.c.
20416         (getndelim2): Renamed from getdelim2, with added nmax argument.
20417         * lib/getline.c: Include getndelim2.c.
20418         (getdelim2): Moved out to getndelim2.c.
20419         (getline, getdelim): Update.
20420
20421 2003-07-17  Bruno Haible  <bruno@clisp.org>
20422
20423         * lib/Makefile.am: Remove file.
20424         * lib/Makefile.in: Remove file.
20425
20426 2003-07-17  Bruno Haible  <bruno@clisp.org>
20427
20428         * configure.in: Remove file.
20429         * Makefile.in: Remove file.
20430
20431 2003-07-17  Bruno Haible  <bruno@clisp.org>
20432
20433         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20434
20435 2003-07-16  Karl Berry  <karl@gnu.org>
20436
20437         * config/srclist-update: was running fixlicense twice, which caused
20438                 texinfo.tex to be nullified for some reason.  Simplify,
20439                 $gplsrc is no longer needed as far as I can see?
20440
20441 2003-07-16  Jim Meyering  <jim@meyering.net>
20442
20443         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20444
20445 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20446
20447         * config/srclist.txt: Get the following files from gettext-runtime/intl
20448         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20449         ref-del.sin.  From Bruno Haible.
20450         * config/srclist-update (fixfile): Change grep pattern again, since the
20451         previous fix didn't work (there was another trailing $).  Use
20452         '[$]' to escape the $s.
20453
20454 2003-07-15  Karl Berry  <karl@gnu.org>
20455
20456         * lib/vasnprintf.c: update from gettext.
20457
20458 2003-07-15  Karl Berry  <karl@gnu.org>
20459
20460         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20461         gets expanded when surrounded by '$'.
20462
20463 2003-07-15  Jim Meyering  <jim@meyering.net>
20464
20465         * modules/save-cwd: Don't depend on error.  From Derek Price.
20466
20467 2003-07-15  Jim Meyering  <jim@meyering.net>
20468
20469         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20470
20471 2003-07-14  Simon Josefsson  <jas@extundo.com>
20472
20473         * modules/mempcpy: New file.
20474         * MODULES.html.sh (func_all_modules): Add mempcpy.
20475
20476 2003-07-14  Simon Josefsson  <jas@extundo.com>
20477
20478         * m4/mempcpy.m4: New file.
20479
20480 2003-07-14  Simon Josefsson  <jas@extundo.com>
20481
20482         * lib/mempcpy.h: New file.
20483         * lib/mempcpy.c: New file.
20484
20485 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20486
20487         * modules/getdate, modules/posixtm: Depend on mktime.
20488
20489 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20490
20491         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20492         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20493         unicodeio.c, unicodeio.h, unlocked-io.h:
20494         Switch from LGPL to GPL.
20495
20496 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20497
20498         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20499         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20500         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20501         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20502         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20503         updated automatically by ../config/srclist-update.  This changes
20504         their license from LPGL to GPL.
20505
20506 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20507
20508         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20509         assumed to refer to the root of the most recent stable gettext version.
20510         * config/srclistvars.sh: Add defaults for eggert.
20511         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20512         Match "This program" as well as "The program".  This is needed
20513         for gettext.
20514
20515 2003-07-14  Jim Meyering  <jim@meyering.net>
20516
20517         Don't emit diagnostics.  Let callers do that.
20518         * lib/save-cwd.c: Don't include "error.h".
20519         (save_cwd): Don't call error.  Ensure that errno is valid
20520         when returning nonzero.
20521
20522         * lib/save-cwd.h (restore_cwd): Update prototype.
20523         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20524         Simplify.  Don't call error upon failure.  Let callers do that.
20525         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20526         when auditing is enabled.  But don't bother updating the #if.
20527
20528 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20529
20530         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20531         it breaks C++ compilation.
20532         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20533
20534 2003-07-10  Simon Josefsson  <jas@extundo.com>
20535
20536         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20537
20538 2003-07-10  Jim Meyering  <jim@meyering.net>
20539
20540         * m4/clock_time.m4: Remove trailing blank.
20541         * m4/intmax_t.m4: Likewise.
20542
20543 2003-07-10  Jim Meyering  <jim@meyering.net>
20544
20545         * lib/vasnprintf.c: Remove trailing blanks.
20546         Make cpp indentation consistent.
20547
20548 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20549
20550         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20551         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20552         Switch from LGPL to GPL.
20553
20554 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20555
20556         * config/srclist.txt: Sort sublists.  Add
20557         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20558         that differ from gnulib for one reason or another; we'd like this list
20559         to be smaller but for now let's document what we have.
20560
20561 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20562
20563         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20564         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20565         and sweeter "eval x=$x".
20566         * config/srclist.txt: Get lib/argp* from glibc.
20567
20568 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20569
20570         * lib/mktime.c: Fix some boundary cases and remove need for floating
20571         point.
20572
20573         Issue a compile-time diagnostic if time_t is floating point, or if
20574         two's complement arithmetic is not in effect, or if arithmetic
20575         right shift does not propagate the sign.  These assumptions were
20576         all in the original code but they weren't checked.
20577
20578         (TIME_T_MIDPOINT, verify): New macros.
20579         (__isleap): Remove; it has integer overflow problems.
20580         (leapyear): New function, without those problems.
20581         (ydhms_tm_diff): Remove; splitting into two parts.
20582         (ydhms_diff): New function, containing the arithmetic part of
20583         the old ydhms_tm_diff function.  Issue a compile-time
20584         diagnostic if we are not using C99 integer division.
20585         Avoid casts when possible.
20586         (guess_time_tm): New function, containing the checking part of
20587         the old ydhms_tm_diff function.  Return the new value, rather than
20588         the difference between it and the old.  Accept a new argument T
20589         so that *T specifies the old value.  Check for overflow in the result.
20590
20591         (__mktime_internal): Use a time_t offset, not a long int offset.
20592         This undoes the 2003-06-04 change, which is no longer needed now
20593         that we have better overflow checking.
20594         (localtime_offset): Likewise.
20595
20596         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20597         and long are 64-bit but int is only 32-bit.
20598         (ydhms_diff): Use long int to store year1 and yday1.
20599         Issue a compile-time diagnostic if long int is not wide enough.
20600
20601         (__mktime_internal): Use long int to store adjusted year and yday.
20602         Use plain C rather than preprocessor commands, if that doesn't
20603         affect efficiency.
20604         Check for overflow (and try to repair) after each probe
20605         rather than checking only at the very end.  This avoids some bugs
20606         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20607         does not equal GMT offset at maximum time).
20608         Use integer to check for overflow rather than floating point; this
20609         is more portable to non-IEEE hosts, and is a tad faster.
20610         When we detect that we are oscillating between two values,
20611         don't check whether tm_isdst has the requested value, since
20612         we already know the answer.  When tm_isdst has the wrong value,
20613         use a different heuristic to find the right one, based on the
20614         extreme values actually observed in practice in tz2003a,
20615         rather than the (overly optimistic) "previous 3 calendar quarters".
20616
20617         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20618         "T const" to accommodate glibc style.
20619         (check_result): Use less-confusing report format.  "long" -> "long int.
20620         (main): Likewise.
20621         Don't loop if the iteration overflows time_t.
20622         Allow a negative step in the iteration.
20623
20624 2003-07-06  Karl Berry  <karl@gnu.org>
20625
20626         * config/depcomp: update from automake.
20627         * config/config.sub: update from prep.
20628
20629 2003-07-03  Karl Berry  <karl@gnu.org>
20630
20631         * config/config.guess: update from prep.
20632
20633 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20634
20635         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20636         xreadlink.c now includes it unconditionally.
20637
20638 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20639
20640         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20641         having it depend on HAVE_SYS_TYPES_H.
20642
20643 2003-07-01  Bruno Haible  <bruno@clisp.org>
20644
20645         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20646         <sys/types.h> should be sufficient.
20647         Reported by Paul Eggert.
20648
20649 2003-06-26  Karl Berry  <karl@gnu.org>
20650
20651         * config/depcomp: update from automake.
20652
20653 2003-06-26  Bruno Haible  <bruno@clisp.org>
20654
20655         * modules/human: Depend on module stdbool.
20656
20657 2003-06-25  Bruno Haible  <bruno@clisp.org>
20658
20659         * modules/readlink: New file.
20660         * modules/xreadlink: Depend on it.
20661         * MODULES.html.sh (func_all_modules): Add readlink.
20662
20663 2003-06-25  Bruno Haible  <bruno@clisp.org>
20664
20665         * m4/readlink.m4: New file.
20666
20667 2003-06-25  Bruno Haible  <bruno@clisp.org>
20668
20669         * lib/readlink.c: New file.
20670
20671 2003-06-22  Karl Berry  <karl@gnu.org>
20672
20673         * config/srclist.txt: update mkinstalldirs from automake.
20674         * config/mkinstalldirs: update.
20675
20676 2003-06-22  Bruno Haible  <bruno@clisp.org>
20677
20678         Portability to mingw32.
20679         * m4/ssize_t.m4: New file, from GNU gettext.
20680         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20681         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20682
20683 2003-06-22  Bruno Haible  <bruno@clisp.org>
20684
20685         * modules/safe-read: Add m4/ssize_t.m4.
20686         * modules/xreadlink: Add m4/ssize_t.m4.
20687
20688 2003-06-20  Bruno Haible  <bruno@clisp.org>
20689
20690         Assume C89, so PARAMS isn't needed.
20691         * lib/unicodeio.h (PARAMS): Remove.
20692         * lib/unicodeio.c: Don't use PARAMS.
20693
20694 2003-06-18  Karl Berry  <karl@gnu.org>
20695
20696         * config/config.{guess,sub}: update from prep.
20697
20698 2003-06-18  Jim Meyering  <jim@meyering.net>
20699
20700         Merge changes from coreutils.
20701         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20702         Remove explicit declarations of xmalloc and realloc.
20703         Include xalloc.h.
20704         (read_utmp): Remove anachronistic cast of xmalloc.
20705
20706 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20707
20708         Assume C89, so PARAMS isn't needed.
20709         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20710         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20711         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20712         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20713         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20714         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20715         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20716         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20717         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20718         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20719         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20720         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20721         no longer needed. Anyway, config.h should always be included before any
20722         other file.
20723
20724 2003-06-11  Simon Josefsson  <jas@extundo.com>
20725
20726         * modules/sysexits: New file.
20727         * MODULES.html.sh (func_all_modules): Add sysexits.
20728
20729 2003-06-11  Simon Josefsson  <jas@extundo.com>
20730
20731         * lib/sysexit_.h: New file.
20732
20733 2003-06-11  Derek Price  <derek@ximbiot.com>
20734
20735         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20736         necessary.
20737
20738 2003-06-11  Bruno Haible  <bruno@clisp.org>
20739
20740         * m4/sysexits.m4: New file.
20741
20742 2003-06-10  Simon Josefsson  <jas@extundo.com>
20743
20744         * lib/argp.h: New file, from glibc.
20745         * lib/argp-ba.c: New file, from glibc.
20746         * lib/argp-eexst.c: New file, from glibc.
20747         * lib/argp-fmtstream.c: New file, from glibc.
20748         * lib/argp-fmtstream.h: New file, from glibc.
20749         * lib/argp-fs-xinl.c: New file, from glibc.
20750         * lib/argp-help.c: New file, from glibc.
20751         * lib/argp-namefrob.h: New file, from glibc.
20752         * lib/argp-parse.c: New file, from glibc.
20753         * lib/argp-pv.c: New file, from glibc.
20754         * lib/argp-pvh.c: New file, from glibc.
20755         * lib/argp-xinl.c: New file, from glibc.
20756
20757 2003-06-10  Simon Josefsson  <jas@extundo.com>
20758
20759         * modules/strchrnul: New file.
20760
20761 2003-06-10  Simon Josefsson  <jas@extundo.com>
20762
20763         * modules/argp: New file.
20764
20765 2003-06-10  Simon Josefsson  <jas@extundo.com>
20766
20767         * m4/strchrnul.m4: New file.
20768
20769 2003-06-10  Simon Josefsson  <jas@extundo.com>
20770
20771         * lib/strchrnul.h: New file.
20772         * lib/strchrnul.c: New file.
20773
20774 2003-06-10  Bruno Haible  <bruno@clisp.org>
20775
20776         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20777
20778 2003-06-07  Karl Berry  <karl@gnu.org>
20779
20780         * config/config.{guess,sub}: update from prep.
20781
20782 2003-06-07  Jim Meyering  <jim@meyering.net>
20783
20784         * modules/strtod: Use $(...) notation, not @...@ for
20785         AC_REPLACE'd variables.
20786         * modules/localcharset: Likewise.
20787
20788 2003-06-07  Jim Meyering  <jim@meyering.net>
20789
20790         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20791         in place of my name in the copyright comment.
20792         Remove definition and uses of __P.
20793
20794         From coreutils.
20795         * lib/stat.c: Don't declare xmalloc explicitly.
20796         Instead, include "xalloc.h".
20797         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20798         xrealloc, and xcalloc return values.
20799         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20800         Improve comment.
20801         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20802
20803 2003-06-07  Bruno Haible  <bruno@clisp.org>
20804
20805         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20806         avoid AC_CONFIG_LINKS.
20807         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20808         fnmatch.h, to avoid AC_CONFIG_LINKS.
20809         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20810
20811 2003-06-07  Bruno Haible  <bruno@clisp.org>
20812
20813         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20814         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20815         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20816         directory.
20817         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20818         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20819         directory.
20820
20821 2003-06-06  Jim Meyering  <jim@meyering.net>
20822
20823         Merge from coreutils.
20824         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20825         Consolidate declarations and initializations of *_base* locals.
20826
20827         Merge from coreutils.
20828         This avoids a core dump on systems without GNU putenv,
20829         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20830         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20831         (unsetenv): New static function, from GNU libc.
20832         (rpl_putenv): Use it.
20833
20834         * lib/modechange.c: Remove trailing blanks.
20835
20836         Merge from coreutils.
20837         * lib/fsusage.c: Remove declaration of statfs.
20838         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20839
20840         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20841
20842 2003-06-06  Jim Meyering  <jim@meyering.net>
20843
20844         * lib/stdbool_.h: Renamed from stdbool.h.in.
20845
20846 2003-06-06  Jim Meyering  <jim@meyering.net>
20847             Bruno Haible  <bruno@clisp.org>
20848
20849         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20850         Adjust Makefile.am snippet not to redirect directly to target.
20851         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20852
20853 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20854
20855         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20856         mismatch, look in future quarters as well as past.  This fixes a
20857         bug when processing fall-backwards gaps immediately after a long
20858         period of daylight-saving time.
20859
20860         * lib/mktime.c: Assume freestanding C89 or better.
20861         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20862         (__P): Remove; not used.
20863         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20864         (mktime, not_equal_tm, print_tm, check_result,
20865         main): Use prototypes.  Use const * where appropriate.
20866         (main): Fix typo in testing code that uncovered by above changes.
20867         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20868
20869 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20870
20871         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20872         locale.h, localeconv.  This merges changes from coreutils.
20873
20874         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20875         It can be removed after the next Autoconf is released.
20876         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20877         needed.
20878
20879 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20880
20881         * lib/mktime.c: Fix Debian bug 177940
20882         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20883         (localtime_offset): Now long int, not time_t, because we want it
20884         to be guaranteed to be signed.  All uses changed.
20885         (__mktime_internal): If overflow would occur when adding offset,
20886         don't add it.
20887
20888         Merge 'human' changes from coreutils.  Rewrite to support
20889         locale-specific notations like thousands separators.
20890         * lib/human.c: Simplify authorship notice.
20891         Include human.h immediately after config.h.
20892         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20893         <limits.h>: Do not include, since human.h does.
20894         (SIZE_MAX, UINTMAX_MAX): New macros.
20895         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20896         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20897         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20898         (power_letter): Renamed from suffixes.
20899         (generate_suffix_backwards): Remove.
20900         (adjust_value): Now takes int style (because of human.h changes)
20901         and long double value (for greater precision on some platforms).
20902         (group_number): New function.
20903         (human_readable): Use it.  Use integer options, not enum.
20904         Put the options before the sizes in the arg list.
20905         Support all the new options.
20906         The old human_readable function has been removed;
20907         use inttostr.h instead.
20908         (human_readable, default_block_size, humblock):
20909         Use uintmax_t, not int, for block sizes.
20910         (human_readable_inexact, block_size_types): Remove.
20911         (block_size_opts): New constant.
20912         (human_options): Renamed from human_block_size, with new signature
20913         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20914         * lib/human.h: Add copyright and authorship notice.
20915         Include <limits.h> and <stdbool.h> unconditionally.
20916         (PARAMS): Remove.  All uses removed.
20917         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20918         (enum human_inexact_style): Remove tag; now a nameless enum.
20919         (human_floor, human_ceiling, human_round_to_even): Now have
20920         values 2, 0, 1 rather than -1, 1, 0.
20921         (human_group_digits, human_suppress_point_zero, human_autoscale,
20922         human_base_1024, human_SI, human_B): New constants.
20923         (human_readable_inexact, human_block_size): Remove.
20924         (human_readable): Size args are now uintmax_t, not int.
20925         (human_options): New decl.
20926
20927         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20928         unnecessary now that we assume C89 or better.  This change
20929         imported from coreutils.
20930
20931         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20932         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20933         in the 2003-05-30 sync from glibc.
20934
20935         .h files should stand alone, but we shouldn't include <sys/types.h>
20936         if we can get away with just <stddef.h>.
20937
20938         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20939         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20940         rather than <sys/types.h>, as we merely need size_t.
20941         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20942         to get size_t.
20943         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20944         Include <stdio.h>, to get FILE.
20945         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20946         memcasecmp.h has included <stddef.h> and all we need is size_t.
20947         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20948         our interface, instead of including <sys/types.h>
20949
20950 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20951
20952         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20953         now, as glibc mktime is buggy on non-glibc systems.
20954
20955 2003-06-03  Karl Berry  <karl@gnu.org>
20956
20957         * config/config.sub: update from prep.
20958
20959 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20960
20961         [from coreutils]
20962         Fix some minor time-related bugs with POSIX time arguments.
20963         Some valid time stamps were being rejected (notably -1, and
20964         time stamps before 1900 on 64-bit hosts).  And some invalid
20965         time stamps were being accepted, e.g. September 31.
20966
20967         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20968         that we can return (time_t) -1 successfully.
20969         * lib/posixtm.c: Likewise.
20970         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20971         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20972         (t): Remove static var.
20973         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20974         of static var.  All uses changed.
20975         (year): Do not reject years before 1900; they can occur with
20976         64-bit time_t.
20977         (posix_time_parse): Do not check for out-of-range components;
20978         that is now the caller's responsibility, since our checks were
20979         only approximations.
20980         (posixtime): Use mktime to check for out-of-range components,
20981         since it knows them exactly.
20982         If mktime returns (time_t) -1, check whether an error actually occurred
20983         by invoking localtime on -1.
20984         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20985         posixtime failures better.
20986         Improve the test data (in comments only).
20987
20988 2003-06-02  Karl Berry  <karl@gnu.org>
20989
20990         * config/mkinstalldirs (version): new variable.
20991         (--version): new option.
20992         (usage): improve message.
20993
20994 2003-05-30  Karl Berry  <karl@gnu.org>
20995
20996         * lib/mktime.c: update from libc.
20997
20998 2003-05-30  Bruno Haible  <bruno@clisp.org>
20999
21000         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21001         * config/config.rpath: Upgrade to gettext-0.12.1.
21002
21003 2003-05-30  Bruno Haible  <bruno@clisp.org>
21004
21005         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21006         * m4/nls.m4: New file, from gettext-0.12.1.
21007         * m4/po.m4: New file, from gettext-0.12.1.
21008         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21009
21010 2003-05-30  Bruno Haible  <bruno@clisp.org>
21011
21012         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21013         * lib/localcharset.h: Likewise.
21014         * lib/localcharset.c: Likewise.
21015
21016 2003-05-29  Karl Berry  <karl@gnu.org>
21017
21018         * config/config.rpath: update from gettext.
21019
21020 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21021
21022         Assume the headers required for C89 freestanding compilers.
21023         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21024         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21025         * m4/human.m4 (gl_HUMAN): Likewise.
21026         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21027         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21028         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21029         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21030         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21031         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21032
21033 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21034
21035         Assume the headers required for C89 freestanding compilers.
21036         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21037         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21038         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21039         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21040         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21041         define, since <limits.h> is guaranteed to do that.
21042         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21043         * lib/exclude.c: Include <stdbool.h> unconditionally.
21044         * lib/tempname.c: Include <stddef.h> unconditionally.
21045         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21046         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21047         <stddef.h> does that.
21048         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21049         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21050         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21051         needed.
21052         * lib/xstrtol.c: Likewise.
21053         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21054         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21055
21056         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21057         warnings on some platforms.
21058
21059         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21060         arbitrarily.
21061
21062 2003-05-26  Jim Meyering  <jim@meyering.net>
21063
21064         Merge in a change from coreutils:
21065         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21066         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21067         that condition, rather than `-1' which is slightly misleading.
21068         Change the name of the cache variable to have the gl_ prefix.
21069         Prompted by a patch from Richard Dawe for DJGPP.
21070
21071 2003-05-24  Karl Berry  <karl@gnu.org>
21072
21073         * config/config.guess: update from prep.
21074
21075 2003-05-22  Karl Berry  <karl@gnu.org>
21076
21077         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21078
21079 2003-05-20  Karl Berry  <karl@gnu.org>
21080
21081         * config/config.guess: update from prep.
21082
21083 2003-05-18  Karl Berry  <karl@gnu.org>
21084
21085         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21086         might actually be set by the user.
21087
21088         * config/depcomp, install-sh, mdate-sh: update from automake.
21089
21090 2003-05-17  Bruno Haible  <bruno@clisp.org>
21091
21092         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21093         invalid expansion for AC_EGREP_CPP.
21094         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21095         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21096         Suggested by Akim Demaille <akim@epita.fr> in
21097         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21098
21099 2003-05-12  Jim Meyering  <jim@meyering.net>
21100
21101         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21102         the space-padded-by-default conversion specifiers, %e, %k, %l.
21103
21104 2003-05-12  Bruno Haible  <bruno@clisp.org>
21105
21106         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21107         the string is longer than 4 KB.
21108
21109 2003-05-11  Karl Berry  <karl@gnu.org>
21110
21111         * config/config.{guess,sub}: update from prep.
21112
21113 2003-05-09  Bruno Haible  <bruno@clisp.org>
21114
21115         * modules/error: Add m4/strerror_r.m4 to file list.
21116
21117 2003-05-03  Bruno Haible  <bruno@clisp.org>
21118
21119         Upgrade to Unicode-4.0.
21120         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21121         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21122         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21123         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21124         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21125         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21126         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21127         Change width of U+E0100..U+E01EF from 1 to 0.
21128
21129 2003-04-25  Jim Meyering  <jim@meyering.net>
21130
21131         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21132         of type size_t, not int.
21133
21134 2003-04-25  Bruno Haible  <bruno@clisp.org>
21135
21136         * lib/copy-file.c: Include <stddef.h>, for size_t.
21137
21138 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21139
21140         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21141         code which expansion is under static control.  Patch imported from
21142         Akim Demaille's patch to Bison; see
21143         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21144
21145 2003-04-14  Bruno Haible  <bruno@clisp.org>
21146
21147         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21148
21149 2003-04-11  Jim Meyering  <jim@meyering.net>
21150
21151         Merge changes from Coreutils.
21152
21153         2003-03-22  Jim Meyering  <jim@meyering.net>
21154
21155         * lib/strftime.c (widen): Cast alloca return value to proper type.
21156
21157         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21158
21159         From GNU libc.
21160         * lib/strftime.c (my_strftime): Handle very large width
21161         specifications for numeric values correctly.  Improve checks for
21162         overflow.
21163
21164         2003-01-19  Jim Meyering  <jim@meyering.net>
21165
21166         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21167         definitions.
21168         (nl_get_alt_digit) [! defined my_strftime]: Define.
21169         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21170         _nl_get_alt_digit and _nl_get_walt_digit.
21171
21172         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21173         libc. These changes have no effect outside of _LIBC.
21174
21175 2003-04-10  Bruno Haible  <bruno@clisp.org>
21176
21177         * modules/findprog: New file.
21178         * MODULES.html.sh (func_all_modules): Add it.
21179
21180 2003-04-10  Bruno Haible  <bruno@clisp.org>
21181
21182         * m4/findprog.m4: New file.
21183         * m4/eaccess.m4: New file.
21184
21185 2003-04-10  Bruno Haible  <bruno@clisp.org>
21186
21187         * lib/findprog.h: New file, from GNU gettext.
21188         * lib/findprog.c: New file, from GNU gettext.
21189
21190 2003-04-05  Jim Meyering  <jim@meyering.net>
21191
21192         Merge changes from Coreutils.
21193
21194         * lib/exclude.h (PARAMS): Remove definition and uses.
21195         * lib/exclude.c: Remove uses of `PARAMS'.
21196
21197         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21198         Add test-cases for DOS filenames. Declare program_name.
21199         (main): Set up program_name.  Patch by Rich Dawe.
21200
21201         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21202         error from mntctl.
21203         Use mntctl's return value to drive the entry-processing loop, since
21204         we can't rely on the value of the vmt_length member in the last
21205         entry.  On some systems doing so could result in exhausting
21206         virtual memory.  Based in part on a patch from Mike Jetzer.
21207
21208 2003-04-04  Bruno Haible  <bruno@clisp.org>
21209
21210         * modules/linebreak: New file.
21211         * MODULES.html.sh (func_all_modules): Add it.
21212
21213 2003-04-04  Bruno Haible  <bruno@clisp.org>
21214
21215         * m4/linebreak.m4: New file.
21216
21217 2003-04-04  Bruno Haible  <bruno@clisp.org>
21218
21219         * lib/linebreak.h: New file, from GNU gettext.
21220         * lib/linebreak.c: New file, from GNU gettext with slight
21221         modifications.
21222         * lib/lbrkprop.h: New file, from GNU gettext.
21223
21224 2003-04-03  Bruno Haible  <bruno@clisp.org>
21225
21226         * modules/utf8-ucs4: New file.
21227         * modules/utf16-ucs4: New file.
21228         * modules/ucs4-utf8: New file.
21229         * modules/ucs4-utf16: New file.
21230         * MODULES.html.sh (func_all_modules): Add them.
21231
21232 2003-04-03  Bruno Haible  <bruno@clisp.org>
21233
21234         * m4/utf-ucs4.m4: New file.
21235         * m4/ucs4-utf.m4: New file.
21236
21237 2003-04-03  Bruno Haible  <bruno@clisp.org>
21238
21239         * lib/utf8-ucs4.h: New file, from GNU gettext.
21240         * lib/utf16-ucs4.h: New file, from GNU gettext.
21241         * lib/ucs4-utf8.h: New file, from GNU gettext.
21242         * lib/ucs4-utf16.h: New file, from GNU gettext.
21243
21244 2003-04-02  Bruno Haible  <bruno@clisp.org>
21245
21246         * modules/binary-io: New file.
21247         * MODULES.html.sh (func_all_modules): Add it.
21248
21249 2003-04-02  Bruno Haible  <bruno@clisp.org>
21250
21251         * lib/binary-io.h: New file, from GNU gettext.
21252
21253 2003-04-01  Bruno Haible  <bruno@clisp.org>
21254
21255         * modules/pathname: New file.
21256         * MODULES.html.sh (func_all_modules): Add it.
21257
21258 2003-04-01  Bruno Haible  <bruno@clisp.org>
21259
21260         * lib/pathname.h: New file, from GNU gettext.
21261         * lib/concatpath.c: New file, from GNU gettext.
21262
21263 2003-03-30  Bruno Haible  <bruno@clisp.org>
21264
21265         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21266
21267 2003-03-30  Bruno Haible  <bruno@clisp.org>
21268
21269         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21270         function chown() doesn't exist.
21271
21272 2003-03-28  Bruno Haible  <bruno@clisp.org>
21273
21274         * modules/copy-file: New file.
21275         * MODULES.html.sh (func_all_modules): Add it.
21276
21277 2003-03-28  Bruno Haible  <bruno@clisp.org>
21278
21279         * m4/copy-file.m4: New file.
21280
21281 2003-03-28  Bruno Haible  <bruno@clisp.org>
21282
21283         * lib/copy-file.h: New file, from GNU gettext.
21284         * lib/copy-file.c: New file, from GNU gettext.
21285
21286 2003-03-18  Jim Meyering  <jim@meyering.net>
21287
21288         * lib/quote.c (quote_n): Fix typo in comment.
21289
21290 2003-03-18  Bruno Haible  <bruno@clisp.org>
21291
21292         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21293         checking.
21294         * m4/onceonly_2_57.m4: Likewise.
21295
21296 2003-03-17  Bruno Haible  <bruno@clisp.org>
21297
21298         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21299         (m4_quote): Remove macro.
21300         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21301
21302 2003-03-14  Jim Meyering  <jim@meyering.net>
21303
21304         Merge changes from Coreutils.
21305         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21306         to be const, in order to avoid warnings.
21307         (obstack_room): Likewise.
21308         (obstack_empty_p): Likewise.
21309
21310 2003-03-14  Bruno Haible  <bruno@clisp.org>
21311
21312         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21313         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21314
21315 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21316
21317         Merge changes from Bison.
21318         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21319         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21320         when compiling Bison 1.875's `bitset bset = obstack_alloc
21321         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21322         * lib/hash.c: Include <stdbool.h> unconditionally.
21323
21324 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21325
21326         * m4/onceonly.m4 (m4_quote): New macro.
21327         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21328         Quote AC_FOREACH variable-expansions properly.
21329
21330 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21331
21332         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21333
21334 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21335
21336         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21337         Reported by Bruce Becker; see:
21338         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21339
21340 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21341             Bruno Haible  <bruno@clisp.org>
21342
21343         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21344         Reported by John Hughes, see
21345         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21346
21347 2003-02-20  Bruno Haible  <bruno@clisp.org>
21348
21349         * MODULES.html.sh (func_all_modules): Add poll.
21350
21351 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21352
21353         * modules/poll: New file.
21354
21355 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21356
21357         * lib/poll_.h: New file.
21358         * lib/poll.c: New file.
21359
21360 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21361
21362         * m4/poll.m4: New file.
21363
21364 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21365
21366         * modules/mathl: New file.
21367
21368 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21369
21370         * lib/mathl.h: New file.
21371         * lib/acosl.c: New file.
21372         * lib/asinl.c: New file.
21373         * lib/atanl.c: New file.
21374         * lib/ceill.c: New file.
21375         * lib/cosl.c: New file.
21376         * lib/expl.c: New file.
21377         * lib/floorl.c: New file.
21378         * lib/frexpl.c: New file.
21379         * lib/ldexpl.c: New file.
21380         * lib/logl.c: New file.
21381         * lib/sincosl.c: New file.
21382         * lib/sinl.c: New file.
21383         * lib/sqrtl.c: New file.
21384         * lib/tanl.c: New file.
21385         * lib/trigl.c: New file.
21386         * lib/trigl.h: New file.
21387
21388 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21389
21390         * m4/mathl.m4: New file.
21391
21392 2003-02-18  Bruno Haible  <bruno@clisp.org>
21393
21394         * MODULES.html.sh (func_all_modules): Add mathl.
21395
21396 2003-02-17  Bruno Haible  <bruno@clisp.org>
21397
21398         * modules/mkdtemp: New module.
21399         * MODULES.html.sh (func_all_modules): Add it.
21400
21401 2003-02-17  Bruno Haible  <bruno@clisp.org>
21402
21403         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21404
21405 2003-02-17  Bruno Haible  <bruno@clisp.org>
21406
21407         * lib/mkdtemp.h: New file, from GNU gettext.
21408         * lib/mkdtemp.c: New file, from GNU gettext.
21409
21410 2003-02-02  Jim Meyering  <jim@meyering.net>
21411
21412         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21413         e.g. glibc-2.2.93.
21414
21415 2003-01-31  Bruno Haible  <bruno@clisp.org>
21416
21417         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21418         'rpl_rename'.
21419         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21420         'rpl_strnlen'.
21421         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21422         'rpl_strtod'.
21423         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21424         'rpl_utime'.
21425
21426 2003-01-31  Bruno Haible  <bruno@clisp.org>
21427
21428         * lib/rename.c: #undef rename before defining rpl_rename.
21429         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21430
21431 2003-01-30  Bruno Haible  <bruno@clisp.org>
21432
21433         * modules/vasnprintf, modules/vasprintf: New modules.
21434         * MODULES.html.sh (func_all_modules): Add them.
21435
21436 2003-01-30  Bruno Haible  <bruno@clisp.org>
21437
21438         * m4/signed.m4: New file, from GNU gettext.
21439         * m4/longdouble.m4: New file, from GNU gettext.
21440         * m4/wchar_t.m4: New file, from GNU gettext.
21441         * m4/wint_t.m4: New file, from GNU gettext.
21442         * m4/vasnprintf.m4: New file.
21443         * m4/vasprintf.m4: New file.
21444
21445 2003-01-30  Bruno Haible  <bruno@clisp.org>
21446
21447         * lib/printf-args.h: New file, from GNU gettext.
21448         * lib/printf-args.c: New file, from GNU gettext.
21449         * lib/printf-parse.h: New file, from GNU gettext.
21450         * lib/printf-parse.c: New file, from GNU gettext.
21451         * lib/vasnprintf.h: New file, from GNU gettext.
21452         * lib/vasnprintf.c: New file, from GNU gettext.
21453         * lib/asnprintf.c: New file, from GNU gettext.
21454         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21455         * lib/vasprintf.c: New file, from GNU gettext.
21456         * lib/asprintf.c: New file, from GNU gettext.
21457
21458 2003-01-29  Bruno Haible  <bruno@clisp.org>
21459
21460         * modules/stpncpy: New module.
21461         * MODULES.html.sh (func_all_modules): Add it.
21462
21463 2003-01-29  Bruno Haible  <bruno@clisp.org>
21464
21465         * m4/stpncpy.m4: New file.
21466
21467 2003-01-29  Bruno Haible  <bruno@clisp.org>
21468
21469         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21470         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21471
21472 2003-01-28  Bruno Haible  <bruno@clisp.org>
21473
21474         * modules/c-ctype: New module.
21475         * MODULES.html.sh (func_all_modules): Add it.
21476
21477 2003-01-28  Bruno Haible  <bruno@clisp.org>
21478
21479         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21480         Paul Eggert.
21481         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21482         Paul Eggert.
21483
21484 2003-01-27  Bruno Haible  <bruno@clisp.org>
21485
21486         * modules/xsetenv: New module.
21487         * MODULES.html.sh (func_all_modules): Add it.
21488
21489 2003-01-27  Bruno Haible  <bruno@clisp.org>
21490
21491         * lib/xsetenv.h: New file, from GNU gettext.
21492         * lib/xsetenv.c: New file, from GNU gettext.
21493
21494 2003-01-23  Jim Meyering  <jim@meyering.net>
21495
21496         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21497         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21498
21499 2003-01-23  Bruno Haible  <bruno@clisp.org>
21500
21501         * modules/minmax: New module.
21502         * MODULES.html.sh (func_all_modules): Add it.
21503
21504 2003-01-23  Bruno Haible  <bruno@clisp.org>
21505
21506         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21507         Eggert.
21508
21509 2003-01-22  Bruno Haible  <bruno@clisp.org>
21510
21511         * modules/exit: New module.
21512         * MODULES.html.sh (func_all_modules): Add it.
21513
21514 2003-01-22  Bruno Haible  <bruno@clisp.org>
21515
21516         * lib/exit.h: New file, from GNU gettext.
21517
21518 2003-01-19  Bruno Haible  <bruno@clisp.org>
21519
21520         * gnulib-tool: Recognize option --extract-maintainer.
21521         (func_get_maintainer): New function.
21522         * modules/*: Add Maintainer entry.
21523
21524 2003-01-16  Jim Meyering  <jim@meyering.net>
21525
21526         * m4/regex.m4: The `regex' struct is both input and output.
21527         Initialize it before each use.  Patch by Tim Waugh.
21528
21529 2003-01-16  Bruno Haible  <bruno@clisp.org>
21530
21531         * MODULES.html.sh: Add a table of contents. Add the module name as
21532         leftmost column. Add hyperlinks.
21533
21534 2003-01-15  Bruno Haible  <bruno@clisp.org>
21535
21536         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21537
21538 2003-01-15  Bruno Haible  <bruno@clisp.org>
21539
21540         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21541         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21542         suffix.
21543
21544 2003-01-15  Bruno Haible  <bruno@clisp.org>
21545
21546         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21547
21548 2003-01-15  Bruno Haible  <bruno@clisp.org>
21549
21550         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21551         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21552
21553 2003-01-14  Jim Meyering  <jim@meyering.net>
21554
21555         * lib/same.c (same_name): Tweak a comment.
21556
21557 2003-01-14  Bruno Haible  <bruno@clisp.org>
21558
21559         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21560         when a string comparison is sufficient.
21561
21562 2003-01-14  Bruno Haible  <bruno@clisp.org>
21563
21564         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21565         'unsigned int'.
21566
21567 2003-01-14  Bruno Haible  <bruno@clisp.org>
21568
21569         * lib/hash-pjw.c: Add comment about low quality of this function.
21570
21571 2003-01-13  Bruno Haible  <bruno@clisp.org>
21572
21573         * modules/stpcpy: Distribute lib/stpcpy.h.
21574         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21575
21576 2003-01-13  Bruno Haible  <bruno@clisp.org>
21577
21578         * modules/*: Add a description.
21579         * modules/strpbrk: Fix Makefile.am snippet.
21580         * modules/strtoimax: Fix dependencies.
21581         * modules/strtoumax: Likewise.
21582
21583 2003-01-13  Bruno Haible  <bruno@clisp.org>
21584
21585         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21586         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21587         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21588
21589 2003-01-13  Bruno Haible  <bruno@clisp.org>
21590
21591         * gnulib-tool (func_create_testdir): Store config/* files in the main
21592         directory.
21593         * config.rpath: Move to ...
21594         * config/config.rpath: ... here.
21595         * modules/gettext: Contains config/config.rpath, not config.rpath.
21596         * modules/iconv: Likewise.
21597
21598 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21599
21600         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21601         to avoid collisions with libcurses and libreadline.
21602
21603         * m4/getstr.m4: Remove.
21604         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21605
21606 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21607
21608         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21609         to avoid collisions with libcurses and libreadline.
21610
21611         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21612         * lib/getstr.h, getstr.c: Remove.
21613         * lib/getline.c: Include "getline.h", to check interface.
21614         Move body of old getstr.c here: this defines MIN_CHUNK and
21615         declares getdelim2, which is renamed from getstr.
21616         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21617
21618         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21619         All uses changed.
21620         * lib/linebuffer.h: Likewise.
21621         (readline): Remove backward-compatibility macro.
21622
21623 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21624
21625         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21626         to avoid collisions with libcurses and libreadline.
21627         * getstr: Remove.
21628         * MODULES.html.sh: Remove getstr.
21629         * modules/getline: Depend on unlocked-io, not getstr.
21630
21631 2003-01-12  Jim Meyering  <jim@meyering.net>
21632
21633         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21634
21635 2003-01-10  Bruno Haible  <bruno@clisp.org>
21636
21637         * modules/alloca: Change Makefile.am requirements. Simplify Include
21638         requirements. Add lib/alloca_.h to file list.
21639
21640 2003-01-10  Bruno Haible  <bruno@clisp.org>
21641
21642         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21643
21644 2003-01-10  Bruno Haible  <bruno@clisp.org>
21645
21646         * lib/alloca_.h: New file.
21647         * lib/getdate.y: Unconditionally include alloca.h.
21648         * lib/makepath.c: Likewise.
21649         * lib/setenv.c: Likewise.
21650         * lib/userspec.c: Likewise.
21651
21652 2003-01-09  Karl Berry  <karl@gnu.org>
21653
21654         * MODULES.html.sh: include `dirname $0` in PATH, to find
21655         gnulib-tool.
21656
21657 2003-01-09  Bruno Haible  <bruno@clisp.org>
21658
21659         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21660         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21661
21662 2003-01-09  Bruno Haible  <bruno@clisp.org>
21663
21664         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21665
21666 2003-01-09  Bruno Haible  <bruno@clisp.org>
21667
21668         * lib/stdbool.h.in: New file.
21669
21670 2003-01-09  Bruno Haible  <bruno@clisp.org>
21671
21672         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21673         * MODULES.html.sh: Likewise.
21674
21675 2003-01-08  Jim Meyering  <jim@meyering.net>
21676
21677         * lib/full-write.c: Undefine and define-away `const' after inclusion
21678         of errno.h, not before.  Suggestion from Bruno Haible.
21679
21680 2003-01-08  Bruno Haible  <bruno@clisp.org>
21681
21682         * modules/full-read: Depend on full-write.
21683
21684 2003-01-08  Bruno Haible  <bruno@clisp.org>
21685
21686         * lib/safe-read.c: Include specification header first, to ensure its
21687         selfcontainedness.
21688         * lib/full-write.c: Likewise.
21689
21690 2003-01-07  Jim Meyering  <jim@meyering.net>
21691
21692         * lib/full-write.c: Rework so that it may serve to define full_read,
21693         too.
21694         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21695
21696 2003-01-07  Bruno Haible  <bruno@clisp.org>
21697
21698         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21699         <inttypes.h>.
21700         * lib/xstrtol.h: Likewise.
21701         * lib/xstrtoimax.c: Likewise.
21702         * lib/xstrtoumax.c: Likewise.
21703         * lib/human.h: Likewise.
21704
21705         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21706         on systems that have <inttypes.h> but not <stdint.h>.
21707
21708 2003-01-07  Bruno Haible  <bruno@clisp.org>
21709
21710         * MODULES.html.sh: Add copyright notice.
21711         (missed_files): Omit CVS directory entries.
21712         (func_module): Make it work with sed-3.02.
21713         * MODULES.txt: Remove file.
21714
21715 2003-01-06  Jim Meyering  <jim@meyering.net>
21716
21717         * lib/version-etc.c: Update year in translatable copyright string.
21718
21719 2003-01-03  Karl Berry  <karl@gnu.org>
21720
21721         * config/config.{guess,sub}: update from prep.
21722
21723 2003-01-02  Karl Berry  <karl@gnu.org>
21724
21725         * doc/COPYING.DOC: belatedly updated to 1.2.
21726
21727 2003-01-01  Karl Berry  <karl@gnu.org>
21728
21729         * gnulib-tool (func_verify_module): report module name $module in
21730         error message, not $1.
21731         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21732         be created, only if it doesn't exist.
21733         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21734
21735 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21736
21737         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21738
21739 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21740
21741         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21742         memcmp if strcoll doesn't work.
21743
21744 2002-12-31  Bruno Haible  <bruno@clisp.org>
21745
21746         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21747         nonempty.
21748
21749 2002-12-31  Bruno Haible  <bruno@clisp.org>
21750
21751         * lib/memcoll.c (STRCOLL): New macro.
21752         (memcoll): Use it.
21753
21754 2002-12-31  Bruno Haible  <bruno@clisp.org>
21755
21756         * lib/localcharset.h: New file.
21757         * lib/localcharset.c: Include it.
21758         * lib/unicodeio.c: Likewise.
21759
21760 2002-12-31  Bruno Haible  <bruno@clisp.org>
21761
21762         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21763         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21764
21765 2002-12-31  Bruno Haible  <bruno@clisp.org>
21766
21767         * lib/getline.h: Include <stddef.h>, for size_t.
21768
21769         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21770         * lib/unicodeio.c: Don't include <stddef.h>.
21771
21772 2002-12-31  Bruno Haible  <bruno@clisp.org>
21773
21774         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21775         HAVE_TM_ZONE.
21776
21777 2002-12-24  Karl Berry  <karl@gnu.org>
21778
21779         * config/config.guess: update from prep.
21780
21781 2002-12-24  Bruno Haible  <bruno@clisp.org>
21782
21783         General infrasructure.
21784         * m4/README: Rewritten.
21785         * m4/onceonly.m4: New file.
21786         * m4/onceonly_2_57.m4: New file.
21787
21788         Module atexit.
21789         * m4/atexit.m4: New file.
21790
21791         Module strtod.
21792         * m4/strtod.m4: New file.
21793
21794         Module strtol.
21795         * m4/strtol.m4: New file.
21796
21797         Module strtoul.
21798         * m4/strtoul.m4: New file.
21799
21800         Module memchr.
21801         * m4/memchr.m4: New file.
21802
21803         Module memcmp.
21804         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21805         (jm_FUNC_MEMCMP): Invoke it.
21806
21807         Module memcpy.
21808         * m4/memcpy.m4: New file.
21809
21810         Module memmove.
21811         * m4/memmove.m4: New file.
21812
21813         Module memset.
21814         * m4/memset.m4: New file.
21815
21816         Module strcspn.
21817         * m4/strcspn.m4: New file.
21818
21819         Module strpbrk.
21820         * m4/strpbrk.m4: New file.
21821
21822         Module strstr.
21823         * m4/strstr.m4: New file.
21824
21825         Module strerror.
21826         * m4/strerror.m4: New file.
21827
21828         Module mktime.
21829         * m4/mktime.m4: Renamed from jm-mktime.m4.
21830         (gl_PREREQ_MKTIME): New macro.
21831         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21832
21833         Module malloc.
21834         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21835         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21836         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21837
21838         Module realloc.
21839         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21840         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21841         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21842
21843         Module strftime.
21844         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21845         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21846         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21847         gl_TM_GMTOFF.
21848         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21849
21850         Module xalloc.
21851         * m4/xalloc.m4: New file.
21852
21853         Module alloca.
21854         * m4/alloca.m4: New file.
21855
21856         Module putenv.
21857         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21858         (jm_FUNC_PUTENV): Invoke it.
21859
21860         Module setenv.
21861         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21862         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21863         when invoked twice.
21864         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21865         gt_FUNC_SETENV.
21866
21867         Module memrchr.
21868         * m4/memrchr.m4: New file.
21869
21870         Module stpcpy.
21871         * m4/stpcpy.m4: New file.
21872
21873         Module strcase.
21874         * m4/strcase.m4: New file.
21875
21876         Module strdup.
21877         * m4/strdup.m4: New file.
21878
21879         Module strnlen.
21880         * m4/strnlen.m4: New file.
21881
21882         Module strndup.
21883         * m4/strndup.m4: New file.
21884
21885         Module xstrtod.
21886         * m4/xstrtod.m4: New file.
21887
21888         Module xstrtol.
21889         * m4/xstrtol.m4: New file.
21890
21891         Module getdate.
21892         * m4/getdate.m4: New file.
21893
21894         Module unlocked-io.
21895         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21896         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21897         * m4/jm-glibc-io.m4n: Remove file.
21898
21899         Module long-options.
21900         * m4/long-options.m4: New file.
21901
21902         Module md5.
21903         * m4/md5.m4: New file.
21904
21905         Module sha.
21906         * m4/sha.m4: New file.
21907
21908         Module getstr.
21909         * m4/getstr.m4: New file.
21910
21911         Module getline.
21912         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21913         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21914         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21915         simply getline. Infoke gl_PREREQ_GETLINE.
21916
21917         Module obstack.
21918         * m4/obstack.m4: New file.
21919
21920         Module hash.
21921         * m4/hash.m4: New file.
21922
21923         Module readtokens.
21924         * m4/readtokens.m4: New file.
21925
21926         Module strverscmp.
21927         * m4/strverscmp.m4: New file.
21928
21929         Module stdbool.
21930         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21931         OSF/1.
21932
21933         Module strtoll.
21934         * m4/strtoll.m4: New file.
21935
21936         Module strtoull.
21937         * m4/strtoull.m4: New file.
21938
21939         Module strtoimax.
21940         * m4/strtoimax.m4: New file.
21941
21942         Module strtoumax.
21943         * m4/strtoumax.m4: New file.
21944
21945         Module xstrtoimax.
21946         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21947         jm_AC_PREREQ_XSTRTOIMAX.
21948         Moved the strtol prerequisites to strtol.m4.
21949         Moved the strtoll prerequisites to strtoll.m4.
21950         Moved the strtoimax prerequisites to strtoimax.m4.
21951
21952         Module xstrtoumax.
21953         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21954         jm_AC_PREREQ_XSTRTOUMAX.
21955         Moved the strtoul prerequisites to strtoul.m4.
21956         Moved the strtoull prerequisites to strtoull.m4.
21957         Moved the strtoumax prerequisites to strtoumax.m4.
21958
21959         Module chown.
21960         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21961         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21962
21963         Module dup2.
21964         * m4/dup2.m4: New file.
21965
21966         Module ftruncate.
21967         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21968         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21969
21970         Module getgroups.
21971         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21972         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21973
21974         Module gettimeofday.
21975         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21976         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21977         gl_PREREQ_GETTIMEOFDAY.
21978
21979         Module mkdir.
21980         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21981         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21982
21983         Module mkstemp.
21984         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21985         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21986         jm_AC_TYPE_UINTMAX_T.
21987         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21988
21989         Module stat.
21990         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21991         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21992
21993         Module lstat.
21994         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21995         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21996
21997         Module timespec.
21998         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21999         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22000         * m4/st_mtim.m4: Indentation.
22001
22002         Module nanosleep.
22003         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22004         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22005         gl_PREREQ_NANOSLEEP.
22006
22007         Module regex.
22008         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22009         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22010         (gl_REGEX): New macro.
22011
22012         Module rename.
22013         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22014         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22015
22016         Module rmdir.
22017         * m4/rmdir.m4: New file.
22018
22019         Module utime.
22020         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22021         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22022         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22023
22024         Module dirname.
22025         * m4/dirname.m4: New file.
22026
22027         Module getopt.
22028         * m4/getopt.m4: New file.
22029
22030         Module unistd-safer.
22031         * m4/unistd-safer.m4: New file.
22032
22033         Module fnmatch.
22034         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22035         declaration.
22036         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22037         (gl_FUNC_FNMATCH_POSIX): New macro.
22038         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22039         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22040         simply fnmatch.
22041
22042         Module exclude.
22043         * m4/exclude.m4: New file.
22044
22045         Module human.
22046         * m4/human.m4: New file.
22047
22048         Module acl.
22049         * m4/acl.m4: Nop.
22050
22051         Module backupfile.
22052         * m4/backupfile.m4: New file.
22053         * m4/d-ino.m4: Indentation.
22054
22055         Module fsusage.
22056         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22057         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22058         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22059
22060         Module dirfd.
22061         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22062         requirements.
22063
22064         Module euidaccess.
22065         * m4/euidaccess.m4: New file.
22066
22067         Module file-type.
22068         * m4/file-type.m4: New file.
22069
22070         Module fileblocks.
22071         * m4/fileblocks.m4: New file.
22072
22073         Module filemode.
22074         * m4/filemode.m4: New file.
22075
22076         Module isdir.
22077         * m4/isdir.m4: New file.
22078
22079         Module lchown.
22080         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22081         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22082
22083         Module makepath.
22084         * m4/makepath.m4: New file.
22085
22086         Module modechange.
22087         * m4/modechange.m4: New file.
22088
22089         Module mountlist.
22090         * m4/mountlist.m4: New file.
22091         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22092         Indentation.
22093
22094         Module path-concat.
22095         * m4/path-concat.m4: New file.
22096
22097         Module pathmax.
22098         * m4/pathmax.m4: New file.
22099
22100         Module same.
22101         * m4/same.m4: New file.
22102
22103         Module save-cwd.
22104         * m4/save-cwd.m4: New file.
22105
22106         Module savedir.
22107         * m4/savedir.m4: New file.
22108
22109         Module xgetcwd.
22110         * m4/xgetcwd.m4: New file.
22111         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22112
22113         Module xreadlink.
22114         * m4/xreadlink.m4: New file.
22115
22116         Module safe-read.
22117         * m4/safe-read.m4: New file.
22118
22119         Module safe-write.
22120         * m4/safe-write.m4: New file.
22121
22122         Module closeout.
22123         * m4/closeout.m4: New file.
22124
22125         Module stdio-safer.
22126         * m4/stdio-safer.m4: New file.
22127
22128         Module getpass.
22129         * m4/getpass.m4: New file.
22130
22131         Module getugroups.
22132         * m4/getugroups.m4: New file.
22133
22134         Module group-member.
22135         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22136         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22137
22138         Module idcache.
22139         * m4/idcache.m4: New file.
22140
22141         Module userspec.
22142         * m4/userspec.m4: New file.
22143
22144         Module gettime.
22145         * m4/clock_time.m4: New file.
22146         * m4/gettime.m4: New file.
22147
22148         Module settime.
22149         * m4/settime.m4: New file.
22150
22151         Module posixtm.
22152         * m4/posixtm.m4: New file.
22153
22154         Module gethostname.
22155         * m4/gethostname.m4: New file.
22156
22157         Module canon-host.
22158         * m4/canon-host.m4: New file.
22159
22160         Module gettext.
22161         * m4/codeset.m4: New file, from gettext-0.11.5.
22162         * m4/gettext.m4: New file, from gettext-0.11.5.
22163         * m4/glibc21.m4: New file, from gettext-0.11.5.
22164         * m4/iconv.m4: New file, from gettext-0.11.5.
22165         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22166         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22167         * m4/inttypes.m4: New file, from gettext-0.11.5.
22168         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22169         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22170         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22171         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22172         * m4/lib-link.m4: New file, from gettext-0.11.5.
22173         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22174         * m4/progtest.m4: New file, from gettext-0.11.5.
22175         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22176         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22177         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22178
22179         Module localcharset.
22180         * m4/localcharset.m4: New file.
22181
22182         Module hard-locale.
22183         * m4/hard-locale.m4: New file.
22184
22185         Module mbswidth.
22186         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22187         onceonly macros.
22188         * m4/mbrtowc.m4: Add comment.
22189
22190         Module memcasecmp.
22191         * m4/memcasecmp.m4: New file.
22192
22193         Module memcoll.
22194         * m4/memcoll.m4: New file.
22195
22196         Module unicodeio.
22197         * m4/unicodeio.m4: New file.
22198
22199         Module rpmatch.
22200         * m4/rpmatch.m4: New file.
22201
22202         Module yesno.
22203         * m4/yesno.m4: New file.
22204
22205         Module exitfail.
22206         * m4/exitfail.m4: New file.
22207
22208         Module c-stack.
22209         * m4/c-stack.m4 (gl_C_STACK): New macro.
22210         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22211
22212         Module error.
22213         * m4/error.m4 (gl_ERROR): New macro.
22214         (jm_PREREQ_ERROR): Use onceonly macros.
22215
22216         Module fatal.
22217         * m4/fatal.m4: New file.
22218
22219         Module getloadavg.
22220         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22221         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22222
22223         Module getpagesize.
22224         * m4/getpagesize.m4: New file.
22225
22226         Module getusershell.
22227         * m4/getusershell.m4: New file.
22228
22229         Module physmem.
22230         * m4/physmem.m4: New file.
22231
22232         Module posixver.
22233         * m4/posixver.m4: New file.
22234
22235         Module quotearg.
22236         * m4/quotearg.m4: New file.
22237
22238         Module quote.
22239         * m4/quote.m4: New file.
22240
22241         Module readutmp.
22242         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22243
22244         Module sig2str.
22245         * m4/sig2str.m4: New file.
22246
22247         Other.
22248         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22249         ulonglong.m4.
22250         * m4/intmax_t.m4: New file.
22251         * m4/d-type.m4: Indentation.
22252         * m4/jm-macros.m4: Update.
22253         * m4/prereq.m4 (jm_PREREQ): Update.
22254         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22255         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22256         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22257         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22258         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22259         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22260         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22261         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22262         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22263         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22264         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22265         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22266         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22267         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22268         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22269         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22270         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22271         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22272         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22273
22274 2002-12-24  Bruno Haible  <bruno@clisp.org>
22275
22276         * MODULES.txt: Update according to m4/ changes.
22277
22278         Module gettext.
22279         * config.rpath: New file, from gettext-0.11.5.
22280
22281         * modules/*: New module descriptions.
22282         * gnulib-tool: New file.
22283         * MODULES.html.sh: New file.
22284
22285 2002-12-21  Karl Berry  <karl@gnu.org>
22286
22287         * doc/fdl.texi: update to version 1.2.
22288
22289 2002-12-19  Karl Berry  <karl@gnu.org>
22290
22291         * config/config.guess: update from prep.
22292
22293 2002-12-18  Bruno Haible  <bruno@clisp.org>
22294
22295         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22296         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22297
22298 2002-12-17  Bruno Haible  <bruno@clisp.org>
22299
22300         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22301         stdlib.h, string.h.
22302
22303 2002-12-17  Bruno Haible  <bruno@clisp.org>
22304
22305         * lib/canon-host.c (strdup): Remove unused declaration.
22306
22307         * lib/fsusage.c: Include full_read.h.
22308         (get_fs_usage): Use full_read instead of safe_read.
22309
22310         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22311
22312 2002-12-12  Karl Berry  <karl@gnu.org>
22313
22314         * config/config.guess: update from prep.
22315
22316 2002-12-11  Bruno Haible  <bruno@clisp.org>
22317
22318         * m4/setenv.m4: New file, from gettext-0.11.5.
22319
22320 2002-12-11  Bruno Haible  <bruno@clisp.org>
22321
22322         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22323         not unsetenv().
22324         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22325         modifications:
22326
22327         2002-12-11  Bruno Haible  <bruno@clisp.org>
22328
22329                 * setenv.c (alloca): Fall back to malloc.
22330                 (freea): New macro.
22331                 (setenv): Use freea() to free memory allocated with alloca().
22332
22333         2002-11-13  Bruno Haible  <bruno@clisp.org>
22334
22335                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22336                 function declarations.
22337                 * unsetenv.c (unsetenv): Likewise.
22338
22339         2002-03-04  Bruno Haible  <bruno@clisp.org>
22340
22341                 Portability to AIX 4.3.3.
22342                 * unsetenv.c: New file, extracted from setenv.c.
22343                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22344
22345         2001-12-20  Bruno Haible  <bruno@clisp.org>
22346
22347                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22348                 use malloc instead. For SunOS 4.
22349
22350         2001-12-11  Bruno Haible  <bruno@clisp.org>
22351
22352                 * setenv.c: Declare alloca.
22353                 (compar_fn_t): New typedef.
22354                 (KNOWN_VALUE, STORE_VALUE): Use it.
22355
22356         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22357         setenv.h.
22358
22359 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22360
22361         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22362         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22363         Choose values that are less likely to collide with system fnmatch
22364         options.
22365         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22366         defined (e.g., a pure POSIX system).
22367         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22368         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22369
22370 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22371
22372         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22373         a pain in practice to deal with generated m4 files.  This change
22374         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22375
22376         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22377         and jm-glibc-io.m4, as they are no longer a special case.
22378         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22379         kludge and the auto-generation stuff.  Check only whether the
22380         functions are declared, not whether they exist, since older hosts
22381         that don't declare the functions can't use the optimization anyway.
22382
22383 2002-12-06  Jim Meyering  <jim@meyering.net>
22384
22385         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22386
22387         Merge in changes from libc's misc/error.c, in preparation
22388         for the merge of gnulib's changes back into libc.
22389
22390         * lib/error.c (_): Define only if not already defined.
22391         Move definition to follow all #include directives.
22392         Include unlocked-io.h only if !_LIBC.
22393         [_LIBC]: Include <libio/libioP.h>.
22394         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22395         (fflush): Tweak definition to use INTUSE.
22396         (putc): Define.
22397
22398 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22399
22400         * lib/alloca.c [defined emacs]: Include "lisp.h".
22401         (xalloc_die) [defined emacs]: New macro.
22402         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22403         [! defined emacs]: Include <xalloc.h>.
22404         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22405         (pointer): Typedef to POINTER_TYPE *.
22406         (malloc): Remove decl; we now always use xmalloc.
22407         (alloca): Use old-style definition, since Emacs needs this.
22408         Check for arithmetic overflow when computing combined size.
22409
22410 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22411
22412         Do not generate unlocked-io.h automatically, since it's easier to
22413         maintain it by hand.
22414
22415         * lib/unlocked-io.h: New file, from GNU diffutils,
22416         but with proper copyright notice and attribution.
22417         * lib/gen-uio: Remove.
22418         * lib/Makefile.am: Add copyright notice.
22419         (libfetish_a_SOURCES): Add unlocked-io.h.
22420         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22421         (DISTCLEANFILES, io_functions): Remove macros.
22422         (EXTRA_DIST): Remove gen_uio.
22423         (unlocked-io.h): Remove rule.
22424
22425 2002-12-04  Jim Meyering  <jim@meyering.net>
22426
22427         Reflect the fact that stat.c and lstat.c are no longer generated.
22428         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22429         (DISTCLEANFILES): Likewise.
22430         (EXTRA_DIST): Likewise.
22431         (all_local): Don't depend on stat.c or lstat.c.
22432         (stat.c, lstat.c): Remove rules.
22433         (EXTRA_DIST): Remove xstat.in.
22434
22435         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22436         * lib/stat.c: New file.  Contents mostly from xstat.in.
22437         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22438         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22439
22440         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22441         too.
22442         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22443
22444 2002-12-03  Jim Meyering  <jim@meyering.net>
22445
22446         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22447         but not semantics, to minimize the differences between these two files.
22448         (safe_read): Change comment to mention SAFE_READ_ERROR.
22449
22450         * lib/safe-read.c (IS_EINTR): Define.
22451         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22452
22453 2002-12-02  Jim Meyering  <jim@meyering.net>
22454
22455         * lib/safe-read.c (EINTR): Define.
22456         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22457         (INT_MAX): Provide fallback.
22458         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22459
22460         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22461
22462 2002-12-02  Bruno Haible  <bruno@clisp.org>
22463
22464         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22465         Define, taken from safe-read.c.
22466         (INT_MAX): Provide fallback.
22467         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22468         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22469
22470         * lib/safe-read.c (EINTR): Remove definition.
22471         (safe_read): Don't use EINTR if it is absent.
22472
22473 2002-12-01  Jim Meyering  <jim@meyering.net>
22474
22475         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22476         zero.
22477         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22478
22479 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22480
22481         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22482         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22483         with `if (! (value < limit)) abort ();', for readability.
22484
22485 2002-11-26  Karl Berry  <karl@gnu.org>
22486
22487         * lib/strdup.c: copy from libc again, with jim's ok.
22488         * lib/.cppi-disable: re-add strdup.c
22489
22490 2002-11-25  Karl Berry  <karl@gnu.org>
22491
22492         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22493         instead of "strtol.c".
22494
22495 2002-11-25  Karl Berry  <karl@gnu.org>
22496
22497         * config/install-sh: update from automake for variable quoting, $0 in
22498         error msgs, etc.
22499
22500         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22501         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22502         entry.
22503
22504 2002-11-25  Jim Meyering  <jim@meyering.net>
22505
22506         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22507
22508 2002-11-24  Karl Berry  <karl@gnu.org>
22509
22510         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22511         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22512
22513 2002-11-24  Jim Meyering  <jim@meyering.net>
22514
22515         Update from coreutils:
22516
22517         * lib/mktime.c: Merge in changes from libc.
22518
22519         Avoid a link-time failure on some Linux systems.
22520         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22521         (otherwise).
22522         (__mon_yday): Declare with the STATIC attribute.
22523         (__mktime_internal): Likewise.
22524         Based on a report from Greg Schafer.
22525
22526 2002-11-23  Jim Meyering  <jim@meyering.net>
22527
22528         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22529         Use `unsigned', not `int', as type of index.
22530
22531         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22532
22533         * lib/fsusage.c: Remove unneeded parentheses around operands of
22534         `defined'.
22535
22536 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22537
22538         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22539         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22540         so that we can be included first.
22541         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22542         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22543         No need to include stddef.h or sys/types.h any more.
22544         Surround local include files with "", not "<>".
22545         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22546         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22547         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22548         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22549         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22550         (ISPRINT): Remove; no longer needed now that we assume C89.
22551
22552         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22553         Preserve errno.
22554
22555         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22556         quotearg_char): Use SIZE_MAX rather than
22557         (size_t) -1 when we are talking about "infinity".
22558
22559         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22560
22561 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22562
22563         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22564         hint that one should use `if (! x) abort ();' rather than `assert
22565         (x);', and anyway it's one less thing to worry about configuring.
22566         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22567         hash_rehash, hash_insert): Use abort rather than assert.
22568
22569 2002-11-22  Bruno Haible  <bruno@clisp.org>
22570
22571         * lib/safe-read.h: Assume C89. Add comments.
22572         (safe_read): Change return type to size_t.
22573         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22574         byte counts > SSIZE_MAX correctly.
22575         * lib/safe-write.h: New file.
22576         * lib/safe-write.c: New file.
22577         * lib/full-read.h: New file.
22578         * lib/full-read.c: New file.
22579         * lib/full-write.h: Assume C89. Add comments.
22580         * lib/full-write.c: Include safe-write.h.
22581         (full_write): Rewritten to use safe_write.
22582         Suggested by Jim Meyering and Paul Eggert.
22583
22584 2002-11-21  Jim Meyering  <jim@meyering.net>
22585
22586         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22587
22588         Merge in changes from the coreutils.
22589
22590         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22591         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22592         <stdint.h>.
22593         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22594         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22595         int.  Work more efficiently if X is the same width as uintmax_t.
22596         Do not compare X to -1, to avoid bogus compiler warning.
22597         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22598         Don't assume that f_frsize and f_bsize are the same type.
22599
22600         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22601         warning on FreeBSD.
22602
22603         * lib/makepath.c (make_path): Restore umask *before* creating the final
22604         component.
22605         (make_path): Minor reformatting.
22606
22607         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22608         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22609         HAVE_MALLOC/HAVE_REALLOC.
22610
22611         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22612         dummy ones.  At least on GNU/Linux systems, `auto' means something
22613         else.
22614         From Michael Stone.
22615
22616 2002-11-21  Bruno Haible  <bruno@clisp.org>
22617
22618         Remove case insensitive option matching.
22619         * lib/argmatch.h (argcasematch): Remove declaration.
22620         (ARGCASEMATCH): Remove macro.
22621         (__xargmatch_internal): Remove case_sensitive argument.
22622         (XARGMATCH): Update.
22623         (XARGCASEMATCH): Remove macro.
22624         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22625         case_sensitive argument.
22626         (argcasematch): Remove function.
22627         (__xargmatch_internal): Remove case_sensitive argument.
22628         (main): Use XARGMATCH instead of XARGCASEMATCH.
22629
22630         * lib/xmalloc.c: Change compile-time error message. Add comment about
22631         required autoconf version.
22632
22633 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22634
22635         Merge argmatch cleanups from Bison.  Assume C89.
22636
22637         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22638         Include stdlib.h, for EXIT_FAILURE.
22639         Always include <string.h>, since we assume C89.
22640         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22641         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22642         Include <stddef.h> instead, since it's all we need for size_t.
22643         (PARAMS): Remove.  All uses removed.
22644         (ARRAY_CARDINALITY): Do not bother to #undef.
22645         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22646         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22647         Remove unnecessary parentheses.
22648         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22649         Insert necessary parentheses.
22650         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22651         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22652
22653 2002-11-19  Bruno Haible  <bruno@clisp.org>
22654
22655         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22656         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22657
22658         * lib/mbswidth.h (PARAMS): Remove macro.
22659         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22660         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22661
22662         * lib/gcd.h (PARAMS): Remove macro.
22663         (gcd): Use ANSI C function declarations.
22664         * lib/gcd.c (gcd): Likewise.
22665
22666 2002-11-15  Bruno Haible  <bruno@clisp.org>
22667
22668         * lib/strcspn.c: Include <stddef.h>.
22669         (strcspn): Use ANSI C function declaration. Change return type to
22670         size_t. Use NULL.
22671         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22672         (strpbrk): Use NULL.
22673         * lib/strpbrk.h (PARAMS): Remove macro.
22674         (strpbrk): Use ANSI C function declaration.
22675         * lib/strstr.c: Don't include <sys/types.h>.
22676         * lib/strstr.h (PARAMS): Remove macro.
22677         (strstr): Use ANSI C function declarations.
22678
22679 2002-11-14  Karl Berry  <karl@gnu.org>
22680
22681         * config/mkinstalldirs: `do' on separate line, instead of
22682         `for var; do'.
22683
22684 2002-11-06  Bruno Haible  <bruno@clisp.org>
22685
22686         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22687         * lib/gcd.c (gcd): Likewise.
22688
22689 2002-11-05  Bruno Haible  <bruno@clisp.org>
22690
22691         * lib/gcd.h: New file, from gettext-0.11.5.
22692         * lib/gcd.c: New file, from gettext-0.11.5.
22693
22694 2002-11-05  Bruno Haible  <bruno@clisp.org>
22695
22696         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22697         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22698         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22699         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22700
22701         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22702         <libintl.h>.
22703         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22704         <libintl.h>.
22705
22706         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22707         * lib/human.c: Include gettext.h instead of <libintl.h>.
22708         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22709         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22710         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22711         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22712         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22713         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22714         (textdomain): Remove definition.
22715         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22716
22717         * lib/long-options.c: Remove include of <libintl.h> and definition of
22718         _.
22719         * lib/same.c: Remove include of <libintl.h> and definition of _.
22720
22721 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22722
22723         * lib/config.charset: A few additions for Solaris.
22724
22725 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22726
22727         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22728         * lib/localcharset.c (locale_charset): Declare as extern "C".
22729
22730 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22731
22732         * lib/config.charset: msdos in uk_UA uses CP1125.
22733
22734 2002-11-04  Bruno Haible  <bruno@clisp.org>
22735
22736         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22737         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22738         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22739         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22740         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22741
22742 2002-11-04  Bruno Haible  <bruno@clisp.org>
22743
22744         * lib/localcharset.c (locale_charset): Don't return an empty string.
22745
22746 2002-11-04  Bruno Haible  <bruno@clisp.org>
22747
22748         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22749         aliases.
22750
22751 2002-11-04  Bruno Haible  <bruno@clisp.org>
22752
22753         * lib/config.charset: Update for newest glibc. Add canonical names
22754         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22755
22756 2002-11-04  Bruno Haible  <bruno@clisp.org>
22757
22758         * lib/config.charset: Add support for NetBSD.
22759
22760 2002-11-04  Bruno Haible  <bruno@clisp.org>
22761
22762         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22763
22764 2002-11-01  Bruno Haible  <bruno@clisp.org>
22765
22766         * configure.in: Add AC_CONFIG_AUX_DIR call.
22767         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22768         test/Makefile.
22769         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22770
22771 2002-09-28  Karl Berry  <karl@gnu.org>
22772
22773         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22774         installed automake until the next release, since changes have been
22775         made.
22776
22777 2002-09-25  Karl Berry  <karl@gnu.org>
22778
22779         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22780         * lib/getopt*: copy from libc/posix.
22781         * lib/gettext.h: copy from gettext.
22782         * lib/.cppi-disable: add strdup.c, gettext.h.
22783
22784 2002-09-25  Karl Berry  <karl@gnu.org>
22785
22786         * config/srclist.txt: enable gettext.h check.
22787         * config/config.{guess,sub}: update from prep.
22788         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22789                 from automake 1.6.3.
22790         See srclist*.
22791
22792 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22793
22794         * regex.c (PATFETCH): Remove the translating fetch.
22795         (PATFETCH_RAW): Rename to PATFETCH.
22796         (set_image_of_range): New fun.
22797         (SET_RANGE_TABLE_WORK_AREA): Use it.
22798         (regex_compile): Don't translate the pattern chars so eagerly.
22799         Only do it when inserting an `exactn' bytecode or when handling
22800         a char-range.
22801         (mutually_exclusive_p): Avoid empty statement.
22802
22803 2002-07-06  Jim Meyering  <meyering@lucent.com>
22804
22805         * m4/README: Don't mention Makefile.am.in.
22806         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22807
22808 2002-07-01  Jim Meyering  <meyering@lucent.com>
22809
22810         * lib/c-stack.c: Include sys/time.h.
22811         From Volker Borchert.
22812
22813 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22814
22815         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22816
22817 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22818
22819         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22820         New macro.  Use it uniformly instead of
22821         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22822         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22823         reported by Vin Shelton.
22824
22825 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22826
22827         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22828         Do not assume SA_SIGINFO behavior.
22829         Bug reported by Jim Meyering on NetBSD 1.5.2.
22830
22831 2002-06-22  Jim Meyering  <meyering@lucent.com>
22832
22833         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22834         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22835
22836         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22837         now that configure.ac uses AC_GNU_SOURCE.
22838         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22839         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22840
22841         Update to latest tools.  Suggestions from Paul Eggert.
22842         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22843         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22844         * m4/fnmatch.m4: Likewise.
22845         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22846         to AC_HEADER_STDBOOL
22847
22848 2002-06-22  Jim Meyering  <meyering@lucent.com>
22849
22850         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22851         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22852
22853 2002-06-22  Jim Meyering  <meyering@lucent.com>
22854
22855         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22856
22857         * lib/exitfail.c, exitfail.h: Likewise.
22858         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22859
22860         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22861         of fnmatch.h.
22862         (EXTRA_DIST): Add fnmatch_loop.c.
22863         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22864
22865         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22866         * lib/fnmatch.c: Update from diffutils-2.8.2.
22867         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22868         * lib/fnmatch.h: Remove file.
22869
22870 2002-06-21  Jim Meyering  <meyering@lucent.com>
22871
22872         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22873         * m4/mbrtowc.m4: Likewise.
22874
22875         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22876         * m4/mbswidth.m4: Reflect name change:
22877         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22878         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22879
22880         * m4/lib-link.m4: Update from gettext-0.11.2.
22881         * m4/gettext.m4: Likewise.
22882
22883         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22884         From Alfred M. Szmidt.
22885
22886 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22887
22888         * lib/file-type.h: Report an error if neither S_ISREG nor
22889         S_IFREG is defined, instead of using a test specific to glibc
22890         2.2.  This should be safe, since POSIX requires S_ISREG and
22891         Unix Version 7 had S_IFREG.  We don't need to check for
22892         <sys/types.h> since we don't use any symbols that it defines.
22893
22894 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22895
22896         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22897         $@-t, so that each temporary file name is unique and valid in the first
22898         8 characters, for operation under DOS.
22899
22900 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22901
22902         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22903
22904 2002-06-15  Jim Meyering  <meyering@lucent.com>
22905
22906         Work even with DJGPP 2.03, which lacks support for symlinks.
22907         From Richard Dawe.
22908         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22909         is defined.
22910         * lib/lchown.c (S_ISLNK): Likewise.
22911
22912 2002-06-15  Jim Meyering  <meyering@lucent.com>
22913
22914         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22915         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22916         have been included before this file.
22917
22918 2002-06-14  Jim Meyering  <meyering@lucent.com>
22919
22920         * lib/file-type.h: Use the version from diffutils-2.8.2.
22921         * lib/file-type.c: Likewise.
22922
22923 2002-06-07  Jim Meyering  <meyering@lucent.com>
22924
22925         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22926         They're needed at least for NetBSD 1.5.2.
22927         ($statxfs_includes): Include those same headers.
22928         ($statxfs_includes): Include sys/vfs.h if available.
22929         ($statxfs_includes): Likewise for sys/statvfs.h.
22930         Check for the following members in both structs statfs and statvfs:
22931         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22932
22933 2002-06-01  Jim Meyering  <meyering@lucent.com>
22934
22935         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22936         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22937
22938 2002-05-28  Jim Meyering  <meyering@lucent.com>
22939
22940         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22941         Reported by Volker Borchert.
22942
22943 2002-05-27  Jim Meyering  <meyering@lucent.com>
22944
22945         Fix a problem seen only on nonconforming systems whereby ls.c's
22946         use of localtime, and then of gettimeofday would cause trouble:
22947         the localtime call used to initialize rpl_gettimeofday's save
22948         mechanism would clobber ls's current local time information so
22949         that in any long listing the first file would always be listed
22950         with date 1970-01-01.  Analysis by Volker Borchert.
22951
22952         * lib/gettimeofday.c (localtime): Undefine.
22953         (rpl_localtime): New function.
22954
22955 2002-05-27  Jim Meyering  <meyering@lucent.com>
22956
22957         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22958         localtime.
22959
22960         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22961         use the replacement function; it wouldn't resolve at link time.
22962         Reported by Volker Borchert.
22963
22964 2002-05-22  Jim Meyering  <meyering@lucent.com>
22965
22966         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22967         file-type.h.
22968         * lib/file-type.h: New file.
22969         * lib/file-type.c (file_type): New file/function.  Extracted from
22970         diffutils.
22971
22972 2002-04-30  Jim Meyering  <meyering@lucent.com>
22973
22974         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22975
22976 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22977
22978         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22979
22980 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22981
22982         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22983         Do not check for alloca.h (no longer used) or stdbool.h (was never
22984         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22985
22986 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22987
22988         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22989
22990 2002-04-29  Jim Meyering  <meyering@lucent.com>
22991
22992         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22993         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22994         Use AC_FUNC_STRNLEN here instead.
22995
22996         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22997         With autoconf-2.53a, it's part of AC_PROG_CC.
22998
22999 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23000
23001         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23002         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23003
23004 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23005
23006         * lib/sig2str.h, lib/sig2str.c: New files.
23007         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23008
23009 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23010
23011         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23012         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23013         of 127, since 64 is the largest conceivable number for ancient
23014         nonstandard hosts.
23015         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23016
23017 2002-04-28  Jim Meyering  <meyering@lucent.com>
23018
23019         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23020
23021 2002-04-24  Jim Meyering  <meyering@lucent.com>
23022
23023         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23024         (jm_PREREQ): Use it.
23025
23026         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23027         mach/mach.h fcntl.h.
23028         Check for this function: setlocale.
23029
23030 2002-04-24  Jim Meyering  <meyering@lucent.com>
23031
23032         * lib/gettext.h: New file, from Gettext.
23033         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23034         (libfetish_a_SOURCES): Add gettext.h.
23035
23036 2002-04-16  Jim Meyering  <meyering@lucent.com>
23037
23038         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23039         ut_pid, ut_id, ut_exit.
23040
23041 2002-04-16  Jim Meyering  <meyering@lucent.com>
23042
23043         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23044         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23045         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23046
23047 2002-04-12  Jim Meyering  <meyering@lucent.com>
23048
23049         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23050         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23051         existence of the getmntinfo function.  Needed for Darwin 5.3.
23052
23053         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23054         This is necessary at least on Darwin 5.3.
23055
23056         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23057         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23058         strnlen.o in the library, and that makes some versions of ranlib
23059         object.
23060
23061 2002-04-12  Jim Meyering  <meyering@lucent.com>
23062
23063         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23064
23065 2002-04-09  Jim Meyering  <meyering@lucent.com>
23066
23067         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23068         to be more precise.  Rather than saying we're checking whether the
23069         function `works', say what we're testing.
23070         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23071         Reported by Bruno Haible.
23072
23073 2002-03-10  Jim Meyering  <meyering@lucent.com>
23074
23075         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23076         Suggestion from Santiago Vila.
23077
23078 2002-03-08  Jim Meyering  <meyering@lucent.com>
23079
23080         * lib/rename.c: Mention that this wrapper is needed also on
23081         mips-dec-ultrix4.4 systems.
23082
23083 2002-03-02  Jim Meyering  <meyering@lucent.com>
23084
23085         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23086         not HAVE_CLOCK_SETTIME.
23087
23088 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23089
23090         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23091         Check for clock_settime.
23092
23093 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23094
23095         * lib/nanosleep.h: Rename to....
23096         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23097
23098         * lib/gettime.c: New file.
23099         * lib/settime.c: New file.
23100         * lib/stime.c: Remove.
23101
23102         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23103         timespec.h.  Remove nanosleep.h.
23104
23105 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23106
23107         * m4/acl.m4: New file.
23108         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23109         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23110
23111 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23112
23113         * lib/acl.c, lib/acl.h: New files.
23114         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23115
23116 2002-02-24  Jim Meyering  <meyering@lucent.com>
23117
23118         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23119         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23120         cause trouble.  Reported by Nelson Beebe.
23121
23122 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23123
23124         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23125         compilers that don't know that xalloc_die never returns.
23126
23127 2002-02-20  Jim Meyering  <meyering@lucent.com>
23128
23129         * lib/getdate.c: Regenerate using bison-1.33.
23130
23131 2002-02-17  Jim Meyering  <meyering@lucent.com>
23132
23133         * config/config.guess (main): Don't use `head -1'; it's no longer
23134         portable. Use `sed 1q' instead.
23135
23136 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23137
23138         * m4/codeset.m4: Upgrade to gettext-0.11.
23139         * m4/gettext.m4: Upgrade to gettext-0.11.
23140         * m4/glibc21.m4: Upgrade to gettext-0.11.
23141         * m4/iconv.m4: Upgrade to gettext-0.11.
23142         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23143         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23144         * m4/lib-ld.m4: New file, from gettext-0.11.
23145         * m4/lib-link.m4: New file, from gettext-0.11.
23146         * m4/lib-prefix.m4: New file, from gettext-0.11.
23147         * m4/progtest.m4: Upgrade to gettext-0.11.
23148
23149 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23150
23151         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23152         (jm_PREREQ): Use it.
23153
23154 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23155
23156         * lib/posixver.c, lib/posixver.h: New files.
23157         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23158
23159 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23160             Bruno Haible  <bruno@clisp.org>
23161
23162         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23163         (fwrite_success_callback): New declaration.
23164         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23165         print_unicode_char. Call failure callback instead of error.
23166         (fwrite_success_callback): New function.
23167         (exit_failure_callback): New function.
23168         (fallback_failure_callback): New function.
23169         (print_unicode_char): Call unicode_to_mb.
23170
23171 2002-01-26  Jim Meyering  <meyering@lucent.com>
23172
23173         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23174         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23175
23176 2002-01-26  Jim Meyering  <meyering@lucent.com>
23177
23178         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23179
23180 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23181
23182         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23183
23184 2002-01-22  Jim Meyering  <meyering@lucent.com>
23185
23186         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23187         Otherwise, some versions of automake would omit the rule that makes
23188         Makefile from Makefile.in.
23189
23190 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23191
23192         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23193         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23194         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23195         (memcoll): Set errno to zero if there is no error.
23196
23197         * lib/quotearg.c (quotearg_buffer_restyled):
23198         Fix bug with quoting buffers containing NUL when backslashing escapes.
23199         This bug was exposed by the other changes in this patch.
23200         (quotearg_n_options): New arg ARGSIZE.
23201         All callers changed.
23202         (quoting_options_from_style): New function.
23203         (quotearg_n_style): Use it.
23204         (quotearg_n_style_mem): New function.
23205
23206         * lib/quotearg.h (quotearg_n_style_mem): New function.
23207
23208 2002-01-19  Jim Meyering  <meyering@lucent.com>
23209
23210         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23211         Remove useless quotes: DF_PROG="df".
23212         * m4/strnlen.m4: New file.
23213
23214 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23215
23216         * lib/backupfile.c (ISDIGIT): Comment fix.
23217         * lib/getdate.y (ISDIGIT): Likewise.
23218         * lib/posixtm.c (ISDIGIT, year): Likewise.
23219         * lib/strverscmp.c (ISDIGIT): Likewise.
23220         * lib/userspec.c (ISDIGIT): Likewise.
23221
23222 2002-01-16  Jim Meyering  <meyering@lucent.com>
23223
23224         * lib/getdate.y: Add three semicolons, each just before a closing
23225         brace. Bison (as of version 1.31) no longer papers over that mistake.
23226
23227 2002-01-05  Jim Meyering  <meyering@lucent.com>
23228
23229         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23230
23231 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23232
23233         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23234         not silently exit merely because the output buffer happens to
23235         have nothing pending.
23236
23237 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23238
23239         See the big note in ../ChangeLog.
23240         * lib/human.c (suffixes): Prefer K to k for 1024.
23241         (generate_suffix_backwards): New function.
23242         (human_readable_inexact): Use it.
23243         * lib/xstrtol.c (__xstrtol): If there is no number but there
23244         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23245         Accept 'K' as well as 'k'.
23246
23247 2001-12-15  Jim Meyering  <meyering@lucent.com>
23248
23249         * lib/regex.h (__restrict_arr): Update from libc.
23250
23251         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23252         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23253         (STREQ): Define.
23254
23255 2001-12-14  Jim Meyering  <meyering@lucent.com>
23256
23257         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23258         Suggestion from Bruno Haible.
23259
23260 2001-12-10  Jim Meyering  <meyering@lucent.com>
23261
23262         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23263         xrealloc, Instead, include "xalloc.h".
23264         (initbuffer): Don't cast xmalloc return value to char*.
23265         (readline): Reword comment.
23266         Don't cast xrealloc return value to char*
23267         Return NULL, not 0.
23268
23269 2001-12-09  Jim Meyering  <meyering@lucent.com>
23270
23271         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23272         about `signed and unsigned type in conditional expression'.
23273         * lib/posixtm.c (posix_time_parse): Likewise.
23274
23275         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23276
23277         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23278         to avoid a pedantic warning.
23279
23280         * lib/getstr.c: Don't include assert.h.
23281         (getstr): Remove warning-evoking assertions.
23282         Return -1 if offset parameter is out of bounds.
23283         Change the type of a local from int to size_t.
23284
23285         * lib/strftime.c (my_strftime_localtime_r): Include this function
23286         definition in the `#if ! HAVE_TM_GMTOFF' block.
23287
23288         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23289         Include xalloc.h instead.
23290
23291 2001-12-02  Jim Meyering  <meyering@lucent.com>
23292
23293         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23294         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23295         included.
23296
23297         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23298         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23299
23300 2001-11-30  Akim Demaille  <akim@epita.fr>
23301
23302         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23303         before being defined.
23304
23305 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23306
23307         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23308         First arg is int, not unsigned.
23309         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23310         (SIZE_MAX, UINT_MAX): New macros.
23311         (quotearg_n_options): Abort if N is negative.
23312         Avoid overflow check on hosts where size_t is 64 bits and int
23313         is 32 bits, as overflow is impossible there.
23314         Fix off-by-one typo that caused unnecessary reallocation.
23315
23316 2001-11-27  Jim Meyering  <meyering@lucent.com>
23317
23318         * lib/tempname.c: Merge with version from libc.
23319         * lib/regex.c: Likewise.
23320
23321         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23322         systems for which STDC_HEADERS is 0, it was not included, resulting in
23323         a warning about an integer-to-pointer conversion problem with getenv.
23324         Reported by Volker Borchert.
23325
23326 2001-11-26  Jim Meyering  <meyering@lucent.com>
23327
23328         * lib/gtod.h: Remove file.
23329         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23330         * lib/gettimeofday.c: Don't include gtod.h.
23331         (GTOD_init): Remove function.
23332         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23333         Suggestion from Volker Borchert.
23334
23335 2001-11-23  Jim Meyering  <meyering@lucent.com>
23336
23337         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23338         it.
23339         * lib/hash.c (struct hash_table): Define it here instead.
23340
23341 2001-11-22  Jim Meyering  <meyering@lucent.com>
23342
23343         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23344
23345 2001-11-20  Jim Meyering  <meyering@lucent.com>
23346
23347         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23348         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23349
23350 2001-11-19  Jim Meyering  <meyering@lucent.com>
23351
23352         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23353         directory.  Use "conftestXXXXXX" as the template.
23354         Suggestion from Paul Eggert.
23355
23356         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23357         immediately, so the test doesn't mistakenly hit the max-open-files
23358         limit.
23359
23360 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23361
23362         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23363         (TEMPORARIES): New macro.
23364         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23365         removes an artificial limitation (e.g. HP-UX 10.20, where
23366         TMP_MAX is 17576).
23367
23368 2001-11-18  Jim Meyering  <meyering@lucent.com>
23369
23370         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23371
23372 2001-11-18  Jim Meyering  <meyering@lucent.com>
23373
23374         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23375         on SunOS 4.
23376
23377         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23378         files will be created before anything else.
23379
23380 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23381
23382         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23383         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23384
23385 2001-11-17  Jim Meyering  <meyering@lucent.com>
23386
23387         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23388         Prompted by a report from Bob Proulx.
23389
23390         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23391         Instead, require UTILS_FUNC_MKSTEMP.
23392
23393 2001-11-17  Jim Meyering  <meyering@lucent.com>
23394
23395         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23396         Now, that's done as part of AC_FUNC_STRTOD.
23397
23398 2001-11-17  Jim Meyering  <meyering@lucent.com>
23399
23400         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23401         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23402         rather than group writable.  Patch by Juan F. Codagnone.
23403
23404         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23405         xrealloc, Instead, include "xalloc.h".
23406
23407         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23408         Remove explicit declarations of xmalloc, xrealloc,
23409         and xstrdup.  Instead, include "xalloc.h".
23410
23411         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23412         unlocked-io.h.
23413         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23414         Likewise.
23415         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23416
23417         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23418         Reported by Padraig Brady.
23419
23420         * lib/mkstemp.c: #undef mkstemp.
23421         Include config.h.
23422         (rpl_mkstemp): Rename from mkstemp.
23423         Protoize.
23424
23425 2001-11-16  Jim Meyering  <meyering@lucent.com>
23426
23427         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23428         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23429         determine the amount of total physical memory, use pstat_getstatic.
23430         HPUX-11 doesn't define _SC_PHYS_PAGES.
23431         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23432         If sysconf couldn't be used to determine the amount of available
23433         physical memory, use both pstat_getstatic and pstat_getdynamic.
23434         Based on a patch from Bob Proulx.
23435
23436 2001-11-10  Jim Meyering  <meyering@lucent.com>
23437
23438         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23439         (jm_PREREQ): Use it.
23440
23441 2001-11-09  Jim Meyering  <meyering@lucent.com>
23442
23443         * m4/jm-macros.m4: Require autoconf-2.52f.
23444         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23445         Use these AC_-prefixed names, not the AM_-prefixed ones.
23446
23447         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23448
23449 2001-11-05  Jim Meyering  <meyering@lucent.com>
23450
23451         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23452
23453 2001-11-04  Jim Meyering  <meyering@lucent.com>
23454
23455         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23456         $DEFS.
23457
23458 2001-11-03  Jim Meyering  <meyering@lucent.com>
23459
23460         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23461         of AC_DEFUN.
23462
23463         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23464         know the name of the variable in the macro definition.
23465
23466 2001-11-03  Jim Meyering  <meyering@lucent.com>
23467
23468         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23469         in argmatch_to_argument call.
23470
23471         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23472         argument.
23473
23474         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23475         e.g., a fault due to an attempt to free a NULL pointer.
23476
23477 2001-11-01  Jim Meyering  <meyering@lucent.com>
23478
23479         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23480         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23481
23482 2001-11-01  Jim Meyering  <meyering@lucent.com>
23483
23484         * lib/dirfd.c, lib/dirfd.h: New files.
23485         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23486
23487         * lib/hash.c (hash_print) [TESTING]: Clean up.
23488
23489 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23490
23491         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23492         to avoid a warning if -Wall.
23493
23494 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23495
23496         * README: New file
23497         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23498         (per RMS's instructions, this is now the canonical source)
23499         * lgpl/, gpl/: New directories.
23500
23501 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23502
23503         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23504
23505 2001-10-21  Jim Meyering  <meyering@lucent.com>
23506
23507         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23508         this code would end up calling gettext even in packages built
23509         with --disable-nls.
23510         * lib/getopt.c (_): Likewise.
23511         * lib/regex.c (_): Likewise.
23512
23513 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23514
23515         * m4/error.m4 (jm_PREREQ_ERROR):
23516         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23517         AC_FUNC_STRERROR_R does that.
23518         Check for strerror declaration.
23519
23520         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23521         are supposed to have them these days.
23522         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23523         Merge changes from latest Autoconf CVS.
23524         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23525         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23526         POSIX decided to standardize on the int flavor of strerror_r.
23527
23528 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23529
23530         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23531         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23532         Use strerror_r that is only a macro, even if it is not a function.
23533         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23534         (private_strerror): Use prototypes, not old-style function definition.
23535         (print_errno_message): New function.
23536         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23537         char*-flavored one.
23538         (error_tail, error, error_at_line): Use it.
23539
23540 2001-10-11  Jim Meyering  <meyering@lucent.com>
23541
23542         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23543         and quote_n (1, ... to avoid clobbering a buffer.
23544
23545 2001-10-05  Jim Meyering  <meyering@lucent.com>
23546
23547         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23548         hash-pjw.h.
23549         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23550         * lib/hash-pjw.h: New file.
23551
23552 2001-09-30  Jim Meyering  <meyering@lucent.com>
23553
23554         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23555         `struct fsstat' has the `f_fstypename' member.
23556         Use that to define FS_TYPE, which is now used to make
23557         the getfsstat link test tighter.
23558
23559 2001-09-30  Jim Meyering  <meyering@lucent.com>
23560
23561         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23562         Include <sys/ucred.h>, for Apple Darwin.
23563         Include sys/mount.h and sys/fs_types.h only if available.
23564         (FS_TYPE): Define.
23565         (read_filesystem_list): Use FS_TYPE.
23566
23567 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23568
23569         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23570         a boolean context.
23571
23572 2001-09-29  Jim Meyering  <meyering@lucent.com>
23573
23574         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23575         [one-argument getmntent function]): Include stdio.h before mntent.h.
23576         SunOS 4.1.x needs it for the declaration of `FILE'.
23577         Patch by Volker Borchert.
23578
23579         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23580         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23581         sys/fs_types.h, and make the link-test for getfsstat guard #include
23582         directives with appropriate #if HAVE_*_H tests so that we can
23583         detect getfsstat on Apple Darwin1.3.7 systems.
23584         Reported by Nelson Beebe.
23585         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23586
23587 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23588
23589         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23590         #defines strtoimax.  Also treat the other strto* functions
23591         like strtoimax.
23592
23593         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23594         Check for strtoul and strtoumax,
23595         as those declarations are made even in the signed case.
23596         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23597         Likewise, for strtol and strtoimax.
23598
23599 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23600
23601         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23602         #defines strtoimax.  Also treat the other strto* functions
23603         like strtoimax.
23604
23605         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23606         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23607         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23608
23609 2001-09-26  Jim Meyering  <meyering@lucent.com>
23610
23611         Most macros in unlocked-io.h had the wrong number of arguments.
23612         * lib/gen-uio: New script.
23613         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23614         * lib/unlocked-io.hin: Remove file.
23615         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23616         rather than trying to embed it here.
23617         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23618         Reported by Padraig Brady.
23619
23620 2001-09-25  Volker Borchert  <bt@teknon.de>
23621
23622         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23623         `result'.
23624
23625 2001-09-24  Jim Meyering  <meyering@lucent.com>
23626
23627         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23628
23629 2001-09-23  Jim Meyering  <meyering@lucent.com>
23630
23631         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23632         instead of the mere test for existence of mntent.h.  The latter
23633         would get a false-positive on AIX 3.4 systems.
23634         In the outer getmntent if-block, don't die if neither of the getmntent
23635         tests succeeds.  Instead, just fall through and continue with the
23636         remaining tests.
23637
23638 2001-09-23  Jim Meyering  <meyering@lucent.com>
23639
23640         * lib/mountlist.c: Remove useless parentheses in #if directives.
23641         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23642         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23643
23644 2001-09-22  Jim Meyering  <meyering@lucent.com>
23645
23646         * m4/gettext.m4: New file.  From gettext.
23647         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23648         * m4/progtest.m4: Likewise
23649         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23650         * m4/glibc21.m4: Likewise.
23651
23652         * m4/libintl.m4: Remove.  No longer used.
23653
23654 2001-09-22  Jim Meyering  <meyering@lucent.com>
23655
23656         * lib/localcharset.c: Update from latest gettext.
23657         * lib/config.charset: Likewise.
23658
23659 2001-09-20  Jim Meyering  <meyering@lucent.com>
23660
23661         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23662         strtoimax.
23663         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23664         strtoumax.
23665
23666 2001-09-20  Jim Meyering  <meyering@lucent.com>
23667
23668         * lib/xstrtol.c (strtoimax): Guard declaration with
23669         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23670         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23671         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23672         (strtoumax): Likewise, for completeness (it wasn't necessary).
23673
23674 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23675
23676         * lib/strtoimax.c (HAVE_LONG_LONG):
23677         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23678         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23679         to work around bug in IBM C compiler.
23680
23681 2001-09-17  Jim Meyering  <meyering@lucent.com>
23682
23683         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23684         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23685         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23686         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23687         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23688         whenever the right hand side need not be expanded by the shell.
23689
23690 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23691
23692         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23693         library.  It's not correct, as some older glibcs are buggy.
23694         fnmatch wasn't fixed until glibc 2.2.
23695
23696         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23697         special shell magic here.
23698
23699 2001-09-16  Jim Meyering  <meyering@lucent.com>
23700
23701         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23702         * m4/jm-macros.m4: Require it.
23703
23704 2001-09-16  Jim Meyering  <meyering@lucent.com>
23705
23706         * lib/mkdir.c: New file.
23707
23708 2001-09-15  Jim Meyering  <meyering@lucent.com>
23709
23710         * m4/jm-macros.m4: Check for help2man.
23711
23712 2001-09-11  Jim Meyering  <meyering@lucent.com>
23713
23714         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23715         The body, by Paul Eggert, was moved here from configure.in.
23716         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23717
23718 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23719
23720         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23721         (jm_PREREQ): Use it.
23722
23723 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23724
23725         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23726         Use ssize_t, not int, to store result of readlink.
23727         Check for ssize_t overflow as well as size_t overflow,
23728         as POSIX says the result of readlink is implementation-defined
23729         when ssize_t overflows.
23730         Remove unnecessary cast to char*.
23731         Use free+malloc instead of realloc, as the storage doesn't need
23732         to be preserved and it's clearer and can be more efficient that way.
23733         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23734         * lib/xreadlink.h (xreadlink): Update prototype.
23735
23736 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23737
23738         * lib/xgetcwd.c: Revert some of the previous change; intead,
23739         fix the HAVE_GETCWD_NULL code to behave more like the
23740         !HAVE_GETCWD_NULL code used to.
23741
23742         Include "xalloc.h".
23743         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23744         invoke xalloc_die.
23745
23746 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23747
23748         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23749         sys/param.h, as pathmax.h includes them.
23750
23751 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23752
23753         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23754         (jm_PREREQ_XGETCWD): New macro.
23755
23756         * m4/getcwd.m4: New file.
23757
23758 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23759
23760         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23761         like the HAVE_GETCWD_NULL code.
23762         Include pathmax.h if not HAVE_GETCWD.
23763         Do not include xalloc.h.
23764         (INITIAL_BUFFER_SIZE): New symbol.
23765         Do not use xmalloc / xrealloc, since the caller is responsible for
23766         handling errors.  Preserve errno around `free' during failure.
23767         Do not overrun buffer when using getwd.
23768
23769 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23770
23771         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23772         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23773         getcwd (NULL, 0).
23774
23775 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23776
23777         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23778         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23779         spotted by Jim Meyering.
23780
23781 2001-09-03  Jim Meyering  <meyering@lucent.com>
23782
23783         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23784         failure.
23785
23786 2001-09-02  Jim Meyering  <meyering@lucent.com>
23787
23788         * lib/error.c: Update from GNU libc.
23789
23790 2001-09-01  Jim Meyering  <meyering@lucent.com>
23791
23792         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23793         Used by df.
23794
23795 2001-09-01  Jim Meyering  <meyering@lucent.com>
23796
23797         * lib/xreadlink.c: New file.
23798         * lib/xreadlink.h: New file.
23799         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23800         xreadlink.h.
23801
23802         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23803         doesn't conflict with sparc Solaris 7's definition in
23804         /usr/include/sys/int_types.h.
23805
23806         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23807         files.
23808         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23809         and strncasecmp as r-values.  Unixware didn't have declarations.
23810
23811 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23812
23813         * lib/xstrtol.h: Add copyright notice.
23814         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23815         LONGINT_INVALID_SUFFIX_CHAR.
23816
23817 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23818
23819         * lib/xstrtol.c (strtoimax): New decl.
23820
23821 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23822
23823         * lib/xgetcwd.c: Don't include pathmax.h.
23824         Include stdlib.h and unistd.h if available.
23825         Include xalloc.h.
23826         (xmalloc, xstrdup, free): Remove decls.
23827         (xgetcwd): Don't assume sizes fit in unsigned.
23828         Check for overflow when computing sizes.
23829         Simplify reallocation code.
23830
23831 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23832
23833         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23834         a directory's st_size can have an arbitrary value, so the old
23835         usage could waste an arbitrary amount of memory.  All uses
23836         changed.
23837         * lib/savedir.h: Update prototype.
23838
23839 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23840
23841         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23842
23843         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23844         old strtoimax.c.
23845
23846         Also, make the following further changes to make this file's
23847         configuration more similar to that of strtol.c:
23848         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23849         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23850         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23851         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23852         changed to signed values.
23853
23854         And make the following changes as well:
23855         Fix copyright notice, as 1999 was missing.
23856         (verify): New macro.
23857         (strtoimax): Check sizes at compile-time, not run-time.
23858         Prefer strtol to strtoll if both work.
23859         (main): Remove; it was not that useful and was a pain to maintain.
23860
23861         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23862
23863 2001-08-31  Jim Meyering  <meyering@lucent.com>
23864
23865         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23866         Use an initial, malloc'd, buffer of length 128 rather than
23867         a statically allocated one of length 1024.
23868
23869 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23870
23871         Simplify code, partly by assuming autoconf 2.52 semantics.
23872
23873         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23874
23875         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23876         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23877         All uses removed.
23878         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23879         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23880         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23881         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23882         jm_AC_HEADER_INTTYPES_H.
23883         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23884
23885         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23886
23887         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23888         Quote first arg of AC_DEFUN.
23889         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23890         since they are needed to parse the include file even if we need
23891         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23892         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23893         but with opposite signedness.
23894
23895 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23896
23897         Merge 'exclude' changes from tar 1.13.22.
23898         This fixes one or two unlikely storage allocation overflow bugs,
23899         but doesn't change user-visible behavior otherwise.
23900
23901 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23902
23903         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23904         (jm_PREREQ_EXCLUDE): New macro.
23905
23906 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23907
23908         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23909         tm to be declared.
23910
23911 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23912
23913         * lib/hash.c: Remove '2001' from copyright notice.
23914
23915 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23916
23917         * lib/full-write.h: New file.
23918         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23919         * lib/full-write.c: Correct credits, as cccp.c no longer
23920         exists and anyway it was so heavily changed from the old cccp
23921         code as to be unrecognizable.  Include full-write.h.
23922         (full_write) Return size_t, with short writes meaning failure.
23923         All callers changed.  This fixes a bug with large buffers
23924         on 64-bit hosts.
23925         * lib/utime.c: Include full-write.h.
23926
23927 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23928
23929         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23930         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23931         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23932         Include if available.
23933         (<xalloc.h>): Include
23934         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23935         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23936         collide with FNM macros.
23937         (struct patopts): New struct.
23938         (struct exclude): Use it, as exclude patterns now come with options.
23939         (new_exclude): Support above changes.
23940         (new_exclude, add_exclude_file):
23941         Initial size must now be a power of two to simplify overflow checking.
23942         (free_exclude, fnmatch_no_wildcards): New function.
23943         (excluded_filename): No longer requires options arg, as the options
23944         are determined by add_exclude.  Now returns bool, not int.
23945         (excluded_filename, add_exclude):
23946         Add support for the fancy new exclusion options.
23947         (add_exclude, add_exclude_file): Now takes int options arg.
23948         Check for arithmetic overflow when computing sizes.
23949         (add_exclude_file): xrealloc might modify errno, so don't
23950         realloc until after errno might be used.
23951
23952         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23953         New macros.
23954         (free_exclude): New decl.
23955         (add_exclude, add_exclude_file): Now takes int options arg.
23956         (excluded_filename): No longer requires options arg, as the options
23957         are determined by add_exclude.  Now returns bool, not int.
23958
23959 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23960
23961         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23962
23963 2001-08-27  Jim Meyering  <meyering@lucent.com>
23964
23965         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23966
23967         * lib/version-etc.c (N_): Remove definition.
23968         Revert most of last change.
23969         Instead, simply don't mark the `Copyright...' string for translation.
23970         Based on advice from Paul Eggert.
23971
23972         * lib/strtoxmax.c: Tweak comment.
23973
23974 2001-08-26  Jim Meyering  <meyering@lucent.com>
23975
23976         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23977
23978         * m4/xstrtoimax.m4: New file.
23979         * m4/xstrtoumax.m4: Add comments explaining why we
23980         AC_REPLACE_FUNCS(strtol).
23981
23982 2001-08-26  Jim Meyering  <meyering@lucent.com>
23983
23984         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23985         of copyright with `%s' so translators don't get an untranslated
23986         message in 2002.
23987         (COPYRIGHT_YEAR): Define.
23988         (version_etc): Use fprintf rather than fputs.
23989         Suggestion from Ulrich Drepper.
23990
23991         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23992
23993         * lib/strtoll.c: New file, from GNU libc.
23994         * lib/xstrtoimax.c: New file.
23995
23996         * lib/xstrtol.h: Add xstrtoimax.
23997         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23998         * lib/strtoimax.c: New file.  Likewise, but first define
23999         STRTOUXMAX_SIGNED.
24000
24001         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24002         ...
24003         * lib/strtoxmax.c: ... then renamed to this.
24004
24005 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24006
24007         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24008         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24009         (jm_AC_TYPE_INTMAX_T): New macro.
24010         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24011
24012         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24013
24014         * m4/longlong.m4: Renamed from ulonglong.m4.
24015         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24016         * m4/uintmax_t.m4: Removed.
24017
24018 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24019
24020         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24021         Port to Solaris 8, where 'sed' requires a space after the 'r'
24022         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24023         Redirect output to $tmp just once.
24024
24025 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24026
24027         * lib/addext.c (<errno.h>): Include.
24028         (errno): Declare if not defined.
24029         (addext): Work correctly when pathconf returns -1 and leaves
24030         errno alone because there is no limit.  Also, work even if
24031         pathconf returns a value greater than SIZE_MAX.
24032
24033 2001-08-12  Jim Meyering  <meyering@lucent.com>
24034
24035         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24036         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24037         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24038         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24039         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24040         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24041         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24042         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24043         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24044         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24045         utime.m4, utimes.m4, xstrtoumax.m4:
24046         Quote the first argument in each use of AC_DEFUN.
24047
24048 2001-08-12  Jim Meyering  <meyering@lucent.com>
24049
24050         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24051         Simply `return getcwd (NULL, 0);'.
24052         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24053         Use 1300 as initial value for length, not PATH_MAX.
24054
24055         * lib/pathmax.h: Clean up cpp syntax.
24056
24057 2001-08-12  Jim Meyering  <meyering@lucent.com>
24058
24059         * lib/gettimeofday.c: New file.
24060         * lib/gtod.h: New file.
24061         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24062
24063 2001-08-05  Jim Meyering  <meyering@lucent.com>
24064
24065         * m4/jm-macros.m4: Require autoconf-2.52.
24066
24067 2001-08-04  Jim Meyering  <meyering@lucent.com>
24068
24069         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24070         stmt, to get in sync with glibc.
24071
24072 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24073
24074         The following changes are from gettext 0.10.39 as maintained by
24075         Bruno Haible.
24076
24077         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24078         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24079         with inverted sense.  All uses changed.
24080
24081         * lib/mbswidth.c: Don't include <limits.h>.
24082         Include <stdlib.h> and <string.h> unconditionally.
24083         (iswcntrl, mbsinit, ISCNTRL): New macros.
24084         (mbsnwidth): Use K&R style function declarations.
24085         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24086         can optimize it when MB_CUR_MAX == 1.
24087         The width of control characters is zero, not 1.
24088
24089 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24090
24091         The following changes are from gettext 0.10.39 as maintained by
24092         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24093
24094         * m4/codeset.m4: Upgrade to serial AM1.
24095         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24096         all uses changed.  Quote first arg of AC_DEFUN.
24097         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24098
24099         * m4/iconv.m4: Upgrade to serial AM2.
24100         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24101         Add --with-libconv-prefix.
24102         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24103         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24104         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24105         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24106         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24107
24108         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24109         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24110         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24111         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24112         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24113         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24114         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24115         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24116         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24117
24118         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24119         string.h any more.
24120
24121         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24122         not the default value.
24123
24124         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24125         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24126         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24127         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24128         Also check for iswcntrl, used for wcwidth fallback.
24129         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24130         to Autoconf 2.13.
24131
24132 2001-08-03  Jim Meyering  <meyering@lucent.com>
24133
24134         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24135         as it was in the original.  Reported by Paul Eggert.
24136
24137 2001-07-16  Jim Meyering  <meyering@lucent.com>
24138
24139         * m4/gettimeofday.m4: New file.
24140         Prompted by a report from Bernhard Baehr.
24141
24142 2001-07-15  Jim Meyering  <meyering@lucent.com>
24143
24144         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24145         stuff. Now it's in ../Makefile.cfg.
24146
24147 2001-07-15  Jim Meyering  <meyering@lucent.com>
24148
24149         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24150         (BUILT_SOURCES): Add unlocked-io.h.
24151         (io_functions): Define.
24152         (unlocked-io.h): New rule.
24153         (DISTCLEANFILES): Add unlocked-io.h.
24154         (all-local): Depend on unlocked-io.h, to ensure it is created.
24155
24156         * lib/unlocked-io.hin: New file
24157
24158         * lib/regex.c: Update from glibc.
24159
24160 2001-07-05  Jim Meyering  <meyering@lucent.com>
24161
24162         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24163         recommendation.
24164         (libfetish_a_SOURCES): Put all .h files here instead.
24165         Remove a thus-exposed (better checks in automake) duplicate and
24166         two unnecessary .h files.
24167
24168 2001-07-04  Jim Meyering  <meyering@lucent.com>
24169
24170         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24171         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24172         distcheck failure.
24173
24174 2001-07-02  Jim Meyering  <meyering@lucent.com>
24175
24176         The following changes were prompted by suggestions from Bruno Haible.
24177
24178         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24179         is now generated.
24180         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24181         definition of EXTRA_DIST.
24182         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24183         ensure that the generated file is created/updated whenever the list
24184         of $(unlocked_functions) is changed.
24185         (jm-glibc-io.m4): New rule.
24186         (unlocked-io.h): New rule -- currently unused.
24187
24188 2001-06-24  Jim Meyering  <meyering@lucent.com>
24189
24190         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24191         unmatched right bracket, rather than kludging it with an extra,
24192         falsely-matching quote in a comment.  Patch by Akim Demaille.
24193
24194 2001-06-11  Jim Meyering  <meyering@lucent.com>
24195
24196         * lib/regex.c: Update from GNU libc.
24197
24198 2001-05-27  Jim Meyering  <meyering@lucent.com>
24199
24200         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24201         Check for ut_type in struct utmp.
24202
24203 2001-05-27  Jim Meyering  <meyering@lucent.com>
24204
24205         * lib/readutmp.h (UT_TYPE): Define.
24206
24207 2001-05-24  Jim Meyering  <meyering@lucent.com>
24208
24209         * lib/argmatch.c: Include "quote.h".
24210         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24211         quote function.  Reported by Göran Uddeborg.
24212
24213 2001-05-22  Jim Meyering  <meyering@lucent.com>
24214
24215         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24216         now that we use the package-supplied version unconditionally.
24217         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24218
24219 2001-05-21  Jim Meyering  <meyering@lucent.com>
24220
24221         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24222         shell syntax errors.
24223
24224 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24225
24226         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24227
24228 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24229
24230         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24231         Don't bother to check library strftime, since
24232         we'll be using our own my_strftime function anyway.
24233         Define my_strftime instead of strftime.
24234
24235 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24236
24237         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24238         which is not yet declared.
24239
24240 2001-05-15  Jim Meyering  <meyering@lucent.com>
24241
24242         * m4/regex.m4: Use proper quoting so brackets appear in the test
24243         program.
24244         Reported by, and with help from, Bruno Haible.
24245
24246 2001-05-13  Jim Meyering  <meyering@lucent.com>
24247
24248         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24249         undefined.
24250
24251 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24252
24253         dirname code cleanup.  base_name now behaves more compatibly
24254         with POSIX basename when given file names that have trailing
24255         slashes, and similarly for dir_name.  Add new primitives
24256         base_len and dir_len.  Put the directory-name-related decls
24257         into dirname.h.
24258
24259         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24260         * lib/backupfile.c (base_name): Likewise.
24261         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24262         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24263         * lib/makepath.c (strip_trailing_slashes): Likewise.
24264         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24265         ISSLASH): Likewise.
24266         * lib/rename.c (strip_trailing_slashes): Likewise.
24267         * lib/same.c (base_name): Likewise.
24268         * lib/stripslash.c (ISSLASH): Likewise.
24269
24270         * lib/addext.c: Include <dirname.h> after size_t is defined.
24271         * lib/backupfile.c: Likewise.
24272
24273         * lib/addext.c (addext): Use base_len to trim redundant
24274         trailing slashes instead of doing it ourselves.
24275         But do not trim the last slash if it is not redundant.
24276
24277         * lib/backupfile.c (find_backup_file_name,
24278         max_backup_version): Use base_len instead of rolling it ourselves.
24279         Handle the case of "" and (on DOS) "C:" correctly.
24280
24281         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24282         needed. Include <string.h>, <dirname.h>.
24283         (base_name): Allow file names ending in slashes, other than names
24284         that are all slashes.  In this case, return the basename followed
24285         by the slashes.  This is more general, and can be used in places
24286         where the original base_name purposely had an assertion failure.
24287         (base_len): New function.
24288
24289         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24290         Do not include <assert.h>; no longer needed.
24291         Include xalloc.h.
24292         (memrchr): Remove decl.
24293         (dir_name_r): Remove.
24294         (dir_len): Renamed from dirlen.  All callers changed.
24295         Rewrite in terms of base_name, for simplicity and consistency.
24296         (dir_name): Never return NULL.  All callers changed.
24297         Do not include <stdlib.h> in test program; no longer needed.
24298         return 0; is fine for test program.
24299
24300         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24301         New macros.
24302         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24303
24304         * lib/path-concat.c (path_concat): Use base_len to compute
24305         base length, not strlen; this means we cannot rely on memcpy
24306         to null-terminate.
24307
24308         * lib/same.c (STREQ): Remove.
24309         (same_name): Handle the case where the basename ends in trailing '/'.
24310
24311         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24312         a slash was stripped.  Do not strip the last slash after a
24313         file system prefix.
24314
24315 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24316
24317         * lib/Makefile.am (libfetish_a_SOURCES):
24318         Add strftime.c, since we now compile it on all hosts.
24319
24320         * lib/strftime.c (my_strftime):
24321         Define to nstrftime if emacs, but only if my_strftime is not defined.
24322         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24323         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24324         Add one more extra argument: a nanoseconds value.
24325         All uses changed.
24326         (ns): New macro.
24327         (my_strftime function): Add %N format.
24328         (emacs_strftimeu): Renamed from emacs_strftime,
24329         with extra ut argument.
24330
24331 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24332
24333         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24334
24335 2001-04-21  Jim Meyering  <meyering@lucent.com>
24336
24337         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24338         doesn't interfere.
24339
24340 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24341
24342         * m4/ftruncate.m4: Check for chsize.
24343         Link with ftruncate.o unconditionally if ftruncate is missing.
24344         This was required when cross-compiling to i586-mingw32msvc.
24345
24346 2001-04-08  Jim Meyering  <meyering@lucent.com>
24347
24348         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24349         recomputed; that's necessary when the offset spans a DST transition.
24350         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24351
24352 2001-04-02  Jim Meyering  <meyering@lucent.com>
24353
24354         * lib/regex.h, regex.c: Update from GNU libc.
24355
24356 2001-03-24  Jim Meyering  <meyering@lucent.com>
24357
24358         * m4/jm-macros.m4: Require autoconf-2.49d.
24359
24360 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24361
24362         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24363
24364 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24365
24366         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24367
24368 2001-03-17  Jim Meyering  <meyering@lucent.com>
24369
24370         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24371         now that the version in autoconf is equivalent.
24372         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24373
24374         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24375         Suggestion from Akim Demaille.
24376
24377         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24378         (jm_PREREQ_TEMPNAME): New function.
24379
24380 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24381
24382         * lib/tempname.c (uint64_t): Define to uintmax_t if
24383         not defined, and if UINT64_MAX is not defined.
24384         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24385         Reported by John David Anglin.
24386
24387 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24388
24389         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24390         resolve alias if codeset is empty.
24391         * lib/config.charset (BeOS): Use wildcard syntax.
24392
24393 2001-03-13  Jim Meyering  <meyering@lucent.com>
24394
24395         * lib/path-concat.c (path_concat)
24396         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24397         concatenating e.g., `C:' and `foo'.
24398         From Bruno Haible.
24399
24400 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24401
24402         * lib/localcharset.c (locale_charset): Don't use
24403         setlocale(LC_CTYPE,NULL). Don't return NULL.
24404         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24405
24406 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24407
24408         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24409         support for DOS/DJGPP.
24410
24411 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24412
24413         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24414         lacks mkstemp.  Compile our own tempname.c if we compile our own
24415         mkstemp.c, as mkstemp relies on tempname.
24416
24417 2001-03-01  Jim Meyering  <meyering@lucent.com>
24418
24419         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24420         AH_VERBATIM really does output its argument verbatim.
24421
24422 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24423
24424         * lib/Makefile.am (libfetish_a_SOURCES):
24425         Add dup-safer.c, fopen-safer.c.
24426         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24427
24428         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24429         * lib/unistd-safer.h: New files.
24430
24431 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24432
24433         The mkstemp replacement is taken from glibc 2.2.2, with some
24434         portability fixes for use outside glibc, as follows:
24435
24436         * lib/tempname.c (struct_stat64): New macro.
24437         (direxists, __gen_tempname): Use it.
24438         This avoids a portability problem with Solaris 8.
24439
24440         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24441         (<stddef.h>, <stdint.h>, <string.h>):
24442         Include only if STDC_HEADERS || _LIBC.
24443         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24444         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24445         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24446         (__set_errno): Define this macro if <errno.h> doesn't.
24447         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24448         Define these macros if <stdio.h> doesn't.
24449         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24450         Define these macros if <sys/stat.h>
24451         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24452         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24453         __xstat64): Define if not _LIBC.
24454         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24455         (__gen_tempname): Invoke gettimeofday only if
24456         HAVE_GETTIMEOFDAY || _LIBC;
24457         otherwise, fall back on plain "time".
24458         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24459
24460         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24461
24462         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24463
24464 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24465
24466         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24467
24468 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24469
24470         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24471         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24472         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24473         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24474
24475 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24476
24477         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24478         Remove workaround macros for hosts that have mbrtowc but not
24479         mbstate_t, as we now insist on proper declarations for both
24480         before using mbrtowc.
24481
24482 2001-02-17  Jim Meyering  <meyering@lucent.com>
24483
24484         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24485         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24486         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24487         UnixWare 7.1.1.
24488
24489         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24490         rather than AC_CACHE_VAL.
24491
24492 2001-02-17  Jim Meyering  <meyering@lucent.com>
24493
24494         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24495         around included file name.
24496
24497         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24498
24499         * lib/strftime.c: Update from GNU libc (the only changes were to
24500         comments).
24501
24502 2001-02-17  Jim Meyering  <meyering@lucent.com>
24503
24504         * lib/regex.c: Update from libc.
24505
24506 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24507
24508         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24509         clash.
24510
24511 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24512
24513         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24514         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24515         Reported by Mark Hounschell via Paul Eggert.
24516
24517 2001-02-07  Jim Meyering  <meyering@lucent.com>
24518
24519         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24520
24521 2001-02-05  Jim Meyering  <meyering@lucent.com>
24522
24523         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24524         it includes the patch required for `large file' support with at least
24525         HP-UX's 10.20 /bin/cc.
24526
24527 2001-02-03  Jim Meyering  <meyering@lucent.com>
24528
24529         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24530         AS_IF, now that it works once again (mysteriously).
24531         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24532
24533 2001-01-30  Jim Meyering  <meyering@lucent.com>
24534
24535         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24536         * m4/chown.m4: Rename conftestchown to conftest.chown.
24537         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24538         s/conftestdir2/conftest.d2/.
24539         * m4/utimes.m4: s/conftestdata/conftest.data/
24540         Inspired by Pavel Roskin's change in autoconf.
24541
24542 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24543
24544         * lib/config.charset: Update for FreeBSD 4.2.
24545
24546 2001-01-27  Jim Meyering  <meyering@lucent.com>
24547
24548         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24549         a use of AS_IF.
24550         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24551
24552 2001-01-26  Jim Meyering  <meyering@lucent.com>
24553
24554         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24555         quotearg.c includes it.
24556
24557 2001-01-26  Jim Meyering  <meyering@lucent.com>
24558
24559         * lib/quotearg.c: Include stddef.h.
24560         * lib/quote.c: Include stddef.h.
24561         Reported by Axel Kittenberger.
24562
24563         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24564         line in double quotes so that it evokes a better diagnostic.
24565         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24566         Reported by Axel Kittenberger.
24567
24568 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24569
24570         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24571         as if it was a `charset'.
24572
24573 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24574
24575         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24576         has const.
24577
24578 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24579
24580         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24581         to avoid a warning.  Add back 'const' to inptr.
24582
24583 2001-01-20  Jim Meyering  <meyering@lucent.com>
24584
24585         Be sure that headers are checked before used in code compiled
24586         for the type checks.
24587         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24588         In place of that, invoke jm_CHECK_ALL_TYPES.
24589         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24590         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24591         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24592         The check for ssize_t was mistakenly run before the test for unistd.h.
24593
24594         The configure-time check for stdbool.h was missing.
24595         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24596         (jm_PREREQ_HASH): New function.
24597
24598 2001-01-17  Jim Meyering  <meyering@lucent.com>
24599
24600         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24601         for autoconf-2.49c.
24602         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24603
24604 2001-01-16  Jim Meyering  <meyering@lucent.com>
24605
24606         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24607         From Bruno Haible.
24608
24609 2001-01-14  Jim Meyering  <meyering@lucent.com>
24610
24611         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24612         foo and bar.  Create conftestdir/ in the script, not in the C code.
24613         Remove directories in the script, not in the C code.
24614         Remove conftestdir{,2} before trying to create the directory.
24615         Make the entire configure script fail if the mkdir fails.
24616
24617 2001-01-14  Jim Meyering  <meyering@lucent.com>
24618
24619         * lib/rename.c: New file.  From Volker Borchert.
24620         Include stdlib.h, string.h or strings.h, and xalloc.h.
24621         Use strip_trailing_slashes rather than open-coding it.
24622
24623 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24624
24625         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24626
24627 2001-01-03  Jim Meyering  <meyering@lucent.com>
24628
24629         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24630         of local `inptr' to avoid warning with some system declarations of
24631         iconv.
24632
24633 2001-01-02  Volker Borchert  <bt@teknon.de>
24634
24635         * m4/rename.m4: New file.
24636         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24637
24638 2001-01-01  Jim Meyering  <meyering@lucent.com>
24639
24640         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24641         even on systems with utmpx.h.  It's necessary for the declaration of
24642         utmp's ut_user member.  Reported by Andreas Jaeger.
24643
24644         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24645         available. They are required for the declarations of getgrgid and
24646         getpwuid resp.
24647         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24648         Reported by Andreas Jaeger.
24649
24650 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24651
24652         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24653         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24654         so `make install' also works in VPATH builds.
24655
24656 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24657
24658         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24659         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24660         can be used in subdirectories.
24661
24662 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24663
24664         * lib/modechange.c: Do not assume that mode_t uses the
24665         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24666         the other-execute bit of FOO even if S_IXOTH != 1.
24667
24668         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24669         WOTH, XOTH, ALLM): New macros.
24670         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24671          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24672         Use them.
24673         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24674         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24675         (mode_compile):
24676         No need to use uintmax_t; unsigned long is long enough.
24677         Don't bother to get suffix since we don't use it.
24678
24679 2000-12-26  Jim Meyering  <meyering@lucent.com>
24680
24681         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24682         better with autoheader.
24683
24684 2000-12-24  Jim Meyering  <meyering@lucent.com>
24685
24686         * lib/hash.c (is_prime): Return explicit boolean values.
24687         (hash_get_first): Return NULL to appease Irix5.6's 89.
24688         Reported by Nelson Beebe.
24689
24690 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24691
24692         * lib/localcharset.c (locale_charset): Add support for Win32.
24693
24694 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24695
24696         * lib/physmem.h, lib/physmem.c: New files.
24697
24698         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24699         (noinst_HEADERS): Add physmem.h.
24700
24701         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24702         't' for compatibility with Solaris 8 sort.
24703
24704 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24705
24706         * lib/config.charset: Add support for BeOS.
24707
24708 2000-12-17  Jim Meyering  <meyering@lucent.com>
24709
24710         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24711         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24712
24713 2000-12-16  Jim Meyering  <meyering@lucent.com>
24714
24715         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24716         N and M) would have treated it like `chown N:N FILE'.
24717
24718         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24719
24720 2000-12-16  Jim Meyering  <meyering@lucent.com>
24721
24722         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24723         SHELLS_FILE to a file name that's useful on djgpp systems.
24724         Include stdlib.h.
24725         (ADDITIONAL_DEFAULT_SHELLS): Define.
24726         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24727         Based mostly on a patch from Prashant TR.
24728
24729 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24730
24731         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24732         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24733         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24734
24735 2000-12-08  Andreas Schwab  <schwab@suse.de>
24736
24737         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24738         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24739
24740 2000-12-07  Jim Meyering  <meyering@lucent.com>
24741
24742         * lib/stripslash.c (ISSLASH): Define.
24743         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24744         `/'.
24745         From Prashant TR.
24746
24747         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24748         (dir_name_r): Declare this function as static.
24749         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24750         manifest itself on a name containing a mix of slashes and
24751         backslashes.
24752         Make this function work with names starting with a DOS-style
24753         drive letter and colon prefix.
24754         (dir_name): Append `.' if necessary.
24755         Based mostly on patches from Prashant TR and Eli Zaretskii.
24756
24757         * lib/dirname.h (dir_name_r): Remove prototype.
24758
24759 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24760
24761         * m4/off_t-format.m4: Remove this file.
24762         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24763
24764 2000-12-06  Jim Meyering  <meyering@lucent.com>
24765
24766         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24767         replacement strtoull, we may well need the replacement strtoul, too.
24768         Check for declarations of strtoul and strtoull.
24769         Check for strtol.  Mainly as a cue to cause automake to include
24770         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24771         Check for limits.h -- strtol.c needs it.
24772
24773 2000-12-05  Jim Meyering  <meyering@lucent.com>
24774
24775         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24776
24777 2000-12-04  Jim Meyering  <meyering@lucent.com>
24778
24779         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24780         Also include memory.h, stdlib.h, unistd.h if appropriate.
24781         Reported by Andreas Jaeger (conflicting declaration of malloc).
24782
24783 2000-12-02  Jim Meyering  <meyering@lucent.com>
24784
24785         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24786         * m4/jm-macros.m4 (jm_MACROS): require it.
24787
24788 2000-12-02  Jim Meyering  <meyering@lucent.com>
24789
24790         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24791
24792 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24793
24794         * lib/memrchr.c: Include <config.h> before any system include file.
24795
24796 2000-11-30  Jim Meyering  <meyering@lucent.com>
24797
24798         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24799
24800 2000-11-30  Jim Meyering  <meyering@lucent.com>
24801
24802         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24803
24804 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24805
24806         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24807
24808 2000-11-26  Jim Meyering  <meyering@lucent.com>
24809
24810         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24811
24812 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24813
24814         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24815         size of (size_t) -1; it's not portable.
24816
24817 2000-11-17  Jim Meyering  <meyering@lucent.com>
24818
24819         * lib/strstr.c: Update from GNU libc.
24820
24821 2000-11-17  Akim Demaille  <akim@epita.fr>
24822
24823         * lib/obstack.h: Formatting changes.
24824         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24825         prevent type checking.
24826         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24827         cast the value to (void *): assigning a `foo *' to a `void *'
24828         variable is valid.
24829         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24830
24831 2000-11-16  Jim Meyering  <meyering@lucent.com>
24832
24833         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24834
24835 2000-11-11  Jim Meyering  <meyering@lucent.com>
24836
24837         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24838
24839 2000-11-10  Jim Meyering  <meyering@lucent.com>
24840
24841         * lib/obstack.h: Update from GNU libc.
24842         * lib/obstack.c: Likewise.
24843
24844 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24845
24846         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24847
24848 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24849
24850         * lib/getusershell.c (setusershell): Use rewind rather than
24851         fseek/fseeko, to avoid configuration hassles with fseeko.
24852         Don't bother opening SHELLS_FILE if shellstream is NULL;
24853         it's not necessary.
24854
24855 2000-11-05  Jim Meyering  <meyering@lucent.com>
24856
24857         * lib/makepath.h (make_dir): Declare.
24858         * lib/makepath.c (make_dir): Remove `static' attribute.
24859         Tweak a comment.
24860
24861 2000-11-04  Jim Meyering  <meyering@lucent.com>
24862
24863         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24864
24865 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24866
24867         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24868         last one in a bucket, advance to the next bucket.
24869
24870 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24871
24872         * lib/fnmatch.c: Do not comment out all the code if we are using
24873         the GNU C library, because in some cases we are replacing buggy
24874         code in the GNU C library itself.
24875
24876 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24877
24878         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24879         (regex_compile): Catch bogus \(\1\).
24880
24881 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24882
24883         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24884         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24885         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24886
24887 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24888
24889         * lib/error.h, getline.h, modechange.h:
24890         Remove "2000" from Copyright line, as the file hasn't been
24891         changed this year other than in the copyright notice.
24892
24893         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24894         was changed this year.
24895
24896 2000-10-29  Jim Meyering  <meyering@lucent.com>
24897
24898         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24899         renaming.
24900         * m4/ls-mntd-fs.m4: Likewise
24901
24902 2000-10-29  Jim Meyering  <meyering@lucent.com>
24903
24904         * lib/xstat.in: Fix grammar in comment.
24905
24906 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24907
24908         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24909         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24910         doesn't define __restrict_arr.
24911
24912 2000-10-28  Jim Meyering  <meyering@lucent.com>
24913
24914         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24915         (jm_PREREQ_MEMCHR): New function.
24916
24917 2000-10-28  Jim Meyering  <meyering@lucent.com>
24918
24919         * lib/memchr.c: Update from libc.
24920         Adjust for portability:
24921         [HAVE_STDLIB_H]: Include stdlib.h.
24922         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24923         Undef __memchr, too.
24924         [!weak_alias]: Define __memchr to memchr.
24925
24926         * lib/regex.c: Update from libc.
24927         * lib/regex.h: Likewise.
24928         * lib/getopt1.c: Likewise.
24929         * lib/memcmp.c: Likewise.
24930
24931         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24932         Avoid using fseek, when possible -- it's broken by design.
24933         Patch by Ulrich Drepper.
24934
24935 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24936
24937         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24938         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24939         Giving in to popular pressure to shut up the compiler with casts.
24940
24941 2000-10-26  Jim Meyering  <meyering@lucent.com>
24942
24943         * lib/strftime.c: Update from libc.
24944
24945 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24946
24947         * regex.c: More `unsigned char' -> `re_char' changes.
24948         Also change several `int' into `re_wchar_t'.
24949         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24950         (PUSH_FAILURE_POINTER): Don't cast any more.
24951         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24952         We want GCC to complain, since this piece of code makes
24953         re_match non-reentrant, which *should* be fixed.
24954         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24955         (EXTEND_BUFFER): Use RETALLOC.
24956         (SET_LIST_BIT): Don't cast.
24957         (re_wchar_t): New type.
24958         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24959         that those two functions will always properly return.
24960         (IMMEDIATE_QUIT_CHECK): Cast to void.
24961         (analyse_first): Use recursion rather than an explicit stack.
24962         (re_compile_fastmap): Can't fail anymore.
24963         (re_search_2): Don't check re_compile_fastmap for failure.
24964         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24965         Now also sets the new value (passed in a new argument).
24966         (re_match_2_internal): Use it.
24967         Also, use a new var `reg' of type size_t when looping through regs
24968         rather than reuse the inappropriate `mcnt'.
24969
24970 2000-10-25  Jim Meyering  <meyering@lucent.com>
24971
24972         * lib/obstack.c: Update from libc.
24973
24974 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24975
24976         * regex.c (regex_compile): Change the way of handling a range from
24977         a char less than 256 to a char not less than 256.
24978
24979 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24980
24981         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24982         NT-Emacs only.
24983         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24984         so that re_search functions only quit when callers expect them to.
24985
24986 2000-10-23  Jim Meyering  <meyering@lucent.com>
24987
24988         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24989         wrong.  That set_locale call must not have any side effects.
24990         From Paul Eggert.
24991
24992 2000-10-22  Jim Meyering  <meyering@lucent.com>
24993
24994         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24995         [CYCLIC]: Remove now-unused definition.
24996
24997         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24998         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24999         Suggestion from Ulrich Drepper.
25000
25001 2000-10-21  Jim Meyering  <meyering@lucent.com>
25002
25003         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25004         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25005         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25006
25007 2000-10-21  Jim Meyering  <meyering@lucent.com>
25008
25009         * lib/dirname.c (memrchr): Declare if necessary.
25010         (dir_name): Remove the restriction that there be no
25011         trailing slashes.  Now, this code skips past them, effectively
25012         ignoring them.
25013         [TEST_DIRNAME] (main): New unit tests.
25014
25015         * lib/memrchr.c: New file from GNU libc.
25016         Undef __memrchr, too.
25017         [!weak_alias]: Define __memrchr to memrchr.
25018         Guard weak_alias use with `#ifdef weak_alias'.
25019
25020 2000-10-21  Jim Meyering  <meyering@lucent.com>
25021
25022         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25023         (dir_name): Use dir_name_r.
25024         * lib/dirname.h (dir_name_r): Declare it.
25025
25026 2000-10-17  Jim Meyering  <meyering@lucent.com>
25027
25028         * lib/quote.h (PARAMS): Define and use.
25029         Reported by Akim Demaille.
25030
25031         * lib/getopt.c: Update from libc.
25032
25033 2000-10-16  Jim Meyering  <meyering@lucent.com>
25034
25035         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25036         setlocale.
25037         From Jan Fedak.
25038
25039 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25040
25041         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25042
25043 2000-09-25  Jim Meyering  <meyering@lucent.com>
25044
25045         * lib/md5.h (rol): Define (from GnuPG).
25046
25047         * lib/sha.c: Give credit (GnuPG) where due.
25048         (M): Use rol rather than open-coding it.
25049         Add a FIXME comment.
25050
25051 2000-09-21  Jim Meyering  <meyering@lucent.com>
25052
25053         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25054         Reported by Michael Stone.
25055
25056 2000-09-20  Jim Meyering  <meyering@lucent.com>
25057
25058         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25059         (noinst_HEADERS): Add sha.h.
25060         Based on code from Scott G. Miller and from GnuPG.
25061
25062 2000-09-18  Jim Meyering  <meyering@lucent.com>
25063
25064         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25065         LIBS. Otherwise, everyone ends up linking with -lelf for some
25066         configurations.
25067         Reported by Mike Stone.
25068
25069 2000-09-15  Jim Meyering  <meyering@lucent.com>
25070
25071         * lib/regex.c: Update from libc.
25072
25073 2000-09-10  Jim Meyering  <meyering@lucent.com>
25074
25075         * lib/getopt.c (_getopt_internal): Update from glibc.
25076
25077 2000-09-09  Jim Meyering  <meyering@lucent.com>
25078
25079         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25080         think it should be used as a general replacement for isascii.
25081         * lib/fnmatch.c: Likewise.
25082         * lib/mbswidth.c: Likewise
25083         * lib/regex.c: Likewise.
25084
25085         Don't use atoi.
25086         * lib/userspec.c: Include sys/param.h and limits.h.
25087         Include xstrtol.h.
25088         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25089         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25090         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25091         UID, GID.  Check range.
25092
25093 2000-09-06  Jim Meyering  <meyering@lucent.com>
25094
25095         * lib/getopt.c (_getopt_internal): Update from glibc.
25096
25097 2000-08-30  Jim Meyering  <meyering@lucent.com>
25098
25099         * lib/strftime.c: Merge in changes from GNU libc.
25100
25101 2000-08-26  Jim Meyering  <meyering@lucent.com>
25102
25103         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25104         * m4/fpending.m4: New file.
25105
25106 2000-08-26  Jim Meyering  <meyering@lucent.com>
25107
25108         * lib/closeout.c: Include "__fpending.h".
25109         (close_stdout_status): Return right away if there's nothing to flush.
25110
25111         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25112         * lib/__fpending.c: New file.
25113         * lib/__fpending.h: New file.
25114
25115 2000-08-20  Jim Meyering  <meyering@lucent.com>
25116
25117         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25118         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25119         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25120
25121 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25122
25123         Improve fileutils installation on systems where running
25124         programs (like install) can't be unlinked.
25125         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25126         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25127
25128 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25129
25130         Standardize on "memory exhausted" instead of "Memory exhausted"
25131         or "virtual memory exhausted".
25132         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25133         "virtual memory exhausted".
25134         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25135         our own message.
25136         * lib/userspec.c (parse_user_spec): Likewise.
25137         * lib/bumpalloc.h: comment fix
25138         * lib/same.c, userspec.c: Include xalloc.h.
25139
25140         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25141         not char *const and pointing to a constant array.
25142         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25143         (xrealloc): Comment fix.
25144
25145         * lib/userspec.c (parse_user_spec):
25146         Don't translate a message until just before returning,
25147         to avoid unnecessary translation.
25148
25149 2000-08-07  Jim Meyering  <meyering@lucent.com>
25150
25151         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25152         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25153         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25154         getgroups.c, gethostname.c, getopt.h, group-member.c,
25155         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25156         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25157         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25158         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25159         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25160         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25161         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25162         yesno.c: Back out Copyright date changes for each file with no change
25163         this year.  This eases coordination with other programs using the same
25164         source code modules.  From Paul Eggert.
25165
25166 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25167
25168         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25169         not char, for compatibility with glibc 2.1.3 strftime.c.
25170
25171 2000-08-03  Greg McGary  <greg@mcgary.org>
25172
25173         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25174         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25175         (EXTEND_BUFFER): Use them.
25176
25177 2000-08-01  Jim Meyering  <meyering@lucent.com>
25178
25179         * lib/dirname.c (ISSLASH): Define.
25180         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25181         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25182         both `\' and `/' may be use as path separators.
25183         Based on a patch from Prashant TR.
25184
25185 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25186
25187         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25188         slot vector a constant, since it might get modified.
25189
25190 2000-07-31  Jim Meyering  <meyering@lucent.com>
25191
25192         * lib/xmalloc.c: Use `virtual memory exhausted', not
25193         `Memory exhausted'.
25194         * lib/obstack.c (print_and_abort): Likewise.
25195
25196 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25197
25198         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25199         buffer, so that the caller can always quote one small
25200         component of a "memory exhausted" message in slot 0.
25201         From a suggestion by Jim Meyering.
25202
25203 2000-07-30  Jim Meyering  <meyering@lucent.com>
25204
25205         * lib/makepath.c (make_path): Quote the other instance, too.
25206
25207         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25208         (STATIC_BUF_SIZE): Define.
25209         (quotearg_n_options): Use only statically allocated storage when
25210         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25211         than STATIC_BUF_SIZE.
25212
25213 2000-07-29  Jim Meyering  <meyering@lucent.com>
25214
25215         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25216         * lib/dirname.c (dir_name): Likewise.
25217
25218         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25219         `/'.
25220
25221         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25222         (dir_name): Assert that there are no trailing slashes.
25223
25224 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25225
25226         * lib/mbswidth.h (mbswidth): Add a flags argument.
25227         (mbswidth): New declaration.
25228         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25229         * lib/mbswidth.c (mbswidth): Add a flags argument.
25230         (mbsnwidth): New function.
25231
25232 2000-07-24  Jim Meyering  <meyering@lucent.com>
25233
25234         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25235
25236 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25237
25238         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25239
25240 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25241
25242         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25243         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25244         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25245         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25246         invoke multibyte primitives.
25247
25248 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25249
25250         * lib/quotearg.c:
25251         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25252         so that mbstate_t is always defined.
25253
25254         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25255         be 1 in at least one GCC installation, and this configuration
25256         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25257         performance on hosts that have mbrtowc but have only unibyte
25258         locales, but I assume these hosts are rare.
25259
25260 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25261
25262         * lib/mbswidth.c (_XOPEN_SOURCE):
25263         Don't define; this causes problems on Solaris 7.
25264         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25265
25266 2000-07-23  Jim Meyering  <meyering@lucent.com>
25267
25268         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25269         too: getgrgid, getpwuid, getuid.
25270
25271 2000-07-23  Jim Meyering  <meyering@lucent.com>
25272
25273         * lib/basename.c (base_name): Add an assertion.
25274
25275 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25276
25277         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25278         shadow its mbsinit function.
25279
25280 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25281
25282         * lib/mbswidth.h: New file.
25283         * lib/mbswidth.c: New file.
25284         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25285         (noinst_HEADERS): Add mbswidth.h.
25286
25287 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25288
25289         * lib/config.charset: Add support for FreeBSD. Improve support for
25290         HP-UX and IRIX 6.
25291
25292 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25293
25294         * m4/mbswidth.m4: New file.
25295         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25296
25297 2000-07-15  Jim Meyering  <meyering@lucent.com>
25298
25299         * lib/makepath.c: Include quote.h.
25300         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25301         corresponding argument in a `quote (...)' call.
25302         Give better diagnostics.
25303
25304         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25305         (noinst_HEADERS): Add quote.h.
25306
25307         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25308         from tar's src/misc.c.
25309         * lib/quote.h: New file.  Prototypes for same.
25310
25311 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25312
25313         From a suggestion by Bruno Haible.
25314         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25315         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25316         to decide whether to define the BeOS workaround macro;
25317         this adjusts to the change to AC_MBSTATE_T.
25318
25319 2000-07-14  Jim Meyering  <meyering@lucent.com>
25320
25321         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25322         jm_AC_TYPE_UINTMAX_T.
25323
25324 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25325
25326         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25327
25328         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25329         quotearg_buffer_restyled): Add support for
25330         clocale_quoting_style.  Undo previous change to
25331         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25332         and "{RIGHT QUOTATION MARK}" msgids.
25333
25334 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25335
25336         From a suggestion by Bruno Haible.
25337         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25338         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25339         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25340         and mbstate_t, to a single-part test that simply defines mbstate_t.
25341         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25342         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25343
25344 2000-07-10  Jim Meyering  <meyering@lucent.com>
25345
25346         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25347
25348         * m4/gnu-source.m4: Output to confdefs.h directly.
25349         Suggestion from Akim Demaille.
25350
25351 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25352
25353         The old behavior of quoting `like this' doesn't look good with
25354         newer, ISO-style fonts.  See:
25355         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25356
25357         Instead, quote "like this" by default.  Let the translator
25358         tailor the locale-specific quoting behavior by providing
25359         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25360
25361         * lib/quotearg.c (N_): New macro.
25362         (gettext_default): New function.
25363         (quotearg_buffer_restyled): Use
25364         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25365         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25366
25367 2000-07-09  Jim Meyering  <meyering@lucent.com>
25368
25369         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25370         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25371
25372         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25373         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25374
25375 2000-07-09  Jim Meyering  <meyering@lucent.com>
25376
25377         * lib/Most files: Update copyright dates to include 2000.
25378
25379 2000-07-08  Jim Meyering  <meyering@lucent.com>
25380
25381         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25382         if not defined.
25383         (xgethostname): Remove now-unnecessary #ifdef.
25384         Move declaration of `err' into loop where it's used.
25385
25386 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25387         and Bruno Haible  <haible@clisp.cons.org>
25388
25389         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25390         only if the test for an object-type mbstate_t fails.  This
25391         prevents us from mistakenly reporting that mbstate_t is a
25392         system object type after we "#define mbstate_t int" to work
25393         around its lack.
25394
25395 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25396         and Bruno Haible  <haible@clisp.cons.org>
25397
25398         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25399
25400 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25401
25402         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25403         to strerror_r.
25404         Include <ctype.h> for use of isalpha.
25405
25406 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25407
25408         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25409         by allocating a larger buffer. Test the gethostname return value for
25410         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25411         returns an error and ENAMETOOLONG isn't defined.
25412
25413 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25414
25415         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25416         dimension.
25417
25418 2000-07-04  Jim Meyering  <meyering@lucent.com>
25419
25420         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25421         of the deprecated AC_CHECKING.
25422
25423 2000-07-04  Jim Meyering  <meyering@lucent.com>
25424
25425         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25426         Reported by Bruno Haible.
25427
25428 2000-07-04  Jim Meyering  <meyering@lucent.com>
25429
25430         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25431         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25432         lacks mbrtowc.
25433
25434 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25435
25436         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25437         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25438
25439 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25440         and Bruno Haible  <haible@clisp.cons.org>
25441
25442         * lib/quotearg.c (mbrtowc):
25443         Assign to *pwc, and return 1 only if result is nonzero.
25444         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25445
25446 2000-07-03  Jim Meyering  <meyering@lucent.com>
25447
25448         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25449
25450 2000-07-03  Jim Meyering  <meyering@lucent.com>
25451
25452         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25453         This is necessary to get a definition of e.g., UTMP_FILE on
25454         HP-UX 10.20.
25455         From Bob Proulx.
25456
25457 2000-07-02  Jim Meyering  <meyering@lucent.com>
25458
25459         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25460
25461         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25462         AC_LIBOBJ(function_name).
25463         * m4/chown.m4: Likewise.
25464         * m4/fnmatch.m4: Likewise.
25465         * m4/ftruncate.m4: Likewise.
25466         * m4/getgroups.m4: Likewise.
25467         * m4/getline.m4: Likewise.
25468         * m4/group-member.m4: Likewise.
25469         * m4/jm-macros.m4: Likewise.
25470         * m4/lstat.m4: Likewise.
25471         * m4/malloc.m4: Likewise.
25472         * m4/memcmp.m4: Likewise.
25473         * m4/nanosleep.m4: Likewise.
25474         * m4/putenv.m4: Likewise.
25475         * m4/realloc.m4: Likewise.
25476         * m4/regex.m4: Likewise.
25477         * m4/stat.m4: Likewise.
25478         * m4/strftime.m4: Likewise.
25479
25480 2000-07-02  Jim Meyering  <meyering@lucent.com>
25481
25482         * lib/quotearg.c (mbstate_t): Don't define here.
25483
25484 2000-07-02  Jim Meyering  <meyering@lucent.com>
25485
25486         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25487
25488 2000-07-01  Jim Meyering  <meyering@lucent.com>
25489
25490         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25491
25492 2000-07-01  Jim Meyering  <meyering@lucent.com>
25493
25494         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25495         problem.
25496
25497 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25498
25499         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25500         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25501
25502 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25503
25504         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25505         per change in ../m4/ls-mntd-fs.m4.
25506         (read_filesystem_list): Ignore symbolic links.
25507
25508 2000-06-29  Jim Meyering  <meyering@lucent.com>
25509
25510         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25511         for declaration of strcmp.
25512
25513         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25514
25515         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25516         Avoid warning by casting result to `char *' to remove `const'.
25517
25518 2000-06-28  Jim Meyering  <meyering@lucent.com>
25519
25520         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25521         included by quotearg.c, for which we perform this test.  From
25522         Bruno Haible.
25523
25524 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25525
25526         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25527         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25528         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25529
25530 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25531
25532         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25533
25534 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25535
25536         savedir now sets errno on failure and invokes xmalloc to get memory.
25537         Fix a couple of other minor bugs while we're at it.
25538
25539         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25540         (NAMLEN): Remove macro.
25541         (malloc, realloc): Remove decls.
25542         (stpcpy): Likewise.
25543         ("xalloc.h"): Include.
25544         (NAME_SIZE_DEFAULT): New macro.
25545         (savedir): Use xmalloc / xrealloc to allocate memory.
25546         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25547         Skip "" directory entries.
25548         Use strlen to calculate directory entry length, since the old method
25549         is rarely used these days and isn't worth supporting.
25550         Don't use a pointer after freeing it.
25551         Check for integer overflow when calculating allocation size.
25552         Use memcpy to copy entries, instead of stpcpy.
25553         Set errno properly when returning NULL.
25554         Check for readdir error.
25555
25556 2000-06-26  Jim Meyering  <meyering@lucent.com>
25557
25558         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25559
25560 2000-06-25  Jim Meyering  <meyering@lucent.com>
25561
25562         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25563         Linux header bug when _XOPEN_SOURCE is defined to 500.
25564
25565 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25566
25567         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25568         deficiency.
25569
25570 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25571
25572         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25573         Include xalloc.h.
25574         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25575
25576 2000-06-24  Jim Meyering  <meyering@lucent.com>
25577
25578         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25579         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25580         for which strerror does return char*, but which lacks a conveniently
25581         accessible declaration of the function.  If the compile-test says
25582         strerror_r doesn't work, then resort to a `run'-test that works on
25583         BeOS and segfaults on DEC Unix.
25584
25585 2000-06-24  Jim Meyering  <meyering@lucent.com>
25586
25587         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25588
25589 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25590
25591         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25592         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25593
25594 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25595
25596         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25597         (mbrtowc, mbstate_t): Define substitutes if
25598         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25599         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25600         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25601
25602 2000-06-23  Jim Meyering  <meyering@lucent.com>
25603
25604         * m4/afs.m4: Add missing AC_MSG_RESULT.
25605         Reported by Bruno Haible.
25606
25607         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25608         Suggestion from Bruno Haible.
25609
25610 2000-06-23  Jim Meyering  <meyering@lucent.com>
25611
25612         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25613
25614 2000-06-21  Jim Meyering  <meyering@lucent.com>
25615
25616         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25617
25618 2000-06-21  Jim Meyering  <meyering@lucent.com>
25619
25620         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25621         (noinst_HEADERS): Add getstr.h.
25622
25623         * lib/getline.c (getstr): Move into a separate file.
25624         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25625         the following changes: new parameter, delim2; both delim[12]
25626         parameters have type `int', not `char'.  The latter would lose
25627         with 8-bit delimiters.
25628         * lib/getstr.h: New file.
25629
25630 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25631
25632         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25633         than 1024, return a memory chunk of least possible size, instead
25634         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25635         Use free/xmalloc instead of xrealloc to avoid copying for very long
25636         paths.
25637
25638 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25639
25640         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25641         the empty string.
25642
25643 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25644
25645         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25646         address, not strdup.  Include <stdlib.h> and don't declare free().
25647
25648 2000-06-19  Jim Meyering  <meyering@lucent.com>
25649
25650         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25651
25652 2000-06-18  Jim Meyering  <meyering@lucent.com>
25653
25654         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25655
25656         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25657         `checking whether...' message to be consistent with that of the
25658         lstat test.
25659
25660 2000-06-18  Jim Meyering  <meyering@lucent.com>
25661
25662         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25663         Besides, these days every porting target provides a mkdir function.
25664
25665         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25666         needed. (this snippet comes from src/system.h).
25667
25668 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25669
25670         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25671
25672 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25673
25674         * lib/human.c (adjust_value): New function.
25675         (human_readable_inexact): Apply rounding style even when
25676         printing approximate values.
25677
25678 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25679
25680         * lib/human.c (human_readable_inexact): Allow an input block
25681         size that is not a multiple of the output block size, and vice versa.
25682         Reported by Piergiorgio Sartor.
25683
25684 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25685
25686         * lib/getdate.y (get_date): Apply relative times after time
25687         zone indicator, not before.  Reported by Todd A. Jacobs.
25688
25689 2000-06-13  Jim Meyering  <meyering@lucent.com>
25690
25691         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25692
25693         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25694
25695 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25696
25697         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25698
25699 2000-06-12  Jim Meyering  <meyering@lucent.com>
25700
25701         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25702         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25703         optional argument.
25704         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25705         the optional argument, `lib'.
25706
25707 2000-06-08  Jim Meyering  <meyering@lucent.com>
25708
25709         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25710
25711 2000-06-04  Paul Eggert  <eggert@twinsun.com>