Move more declarations into <unistd.h>.
[gnulib.git] / ChangeLog
1 2007-02-18  Bruno Haible  <bruno@clisp.org>
2
3         * lib/readlink.c: Include <unistd.h>.
4         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
5         HAVE_READLINK.
6         * modules/readlink (Depends-on): Add unistd.
7         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
8         (Include): Add <unistd.h>.
9
10         * lib/getlogin_r.h: Remove file.
11         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
12         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
13         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
14         HAVE_DECL_GETLOGIN_R.
15         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
16         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
17         (Include): Use <unistd.h> instead of getlogin_r.h.
18
19         * lib/getcwd.h: Remove file.
20         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
21         * lib/xgetcwd.c: Likewise.
22         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
23         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
24         * modules/getcwd (Files): Remove lib/getcwd.h.
25         (Depends-on): Add unistd.
26         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
27         (Include): Use <unistd.h> instad of getcwd.h.
28
29         * lib/ftruncate.c: Include <unistd.h> first.
30         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
31         Set HAVE_FTRUNCATE.
32         * modules/ftruncate (Depends-on): Add unistd.
33         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
34
35         * lib/fchdir.c: Include <unistd.h> first.
36         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
37         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
38         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
39         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
40         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
41
42         * lib/dup2.c: Include <unistd.h> first.
43         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
44         HAVE_DUP2.
45         * modules/dup2 (Depends-on): Add unistd.
46         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
47
48         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
49         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
50         REPLACE_CHOWN. Don't define chown as a macro here.
51         * modules/chown (Depends-on): Add unistd.
52         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
53
54         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
55         Add definition for GL_LINK_WARNING.
56         (chown, dup2): New declarations.
57         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
58         link warning.
59         (ftruncate): New declaration.
60         (getcwd): New declaration, taken from old getcwd.h.
61         (getlogin_r): New declaration, taken from old getlogin_r.h.
62         (readlink): New declaration.
63         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
64         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
65         (gl_PREREQ_UNISTD): Remove macro.
66         (gl_UNISTD_MODULE_INDICATOR): New macro.
67         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
68         many new variables. Don't set UNISTD_H.
69         * modules/unistd (Description): Change.
70         (Depends-on): Add link-warning.
71         (configure.ac): Update.
72         (Makefile.am): Create unistd.h always. Substitute many new variables
73         into it.
74
75 2007-02-18  Bruno Haible  <bruno@clisp.org>
76
77         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
78         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
79         HAVE_GETSUBOPT.
80         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
81         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
82         * lib/getsubopt.h: Remove file.
83         * modules/getsubopt (Files): Remove lib/getsubopt.h.
84         (Depends-on): Add stdlib.
85         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
86         (Includes): Use <stdlib.h> instead of getsubopt.h.
87         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
88         Set HAVE_GETSUBOPT.
89         * lib/getsubopt.c: Don't include getsubopt.h.
90
91 2007-02-18  Bruno Haible  <bruno@clisp.org>
92
93         * modules/fchdir (Depends-on): Add dup2.
94
95 2007-02-18  Bruno Haible  <bruno@clisp.org>
96
97         * lib/stdlib_.h: Handle glibc's special invocation convention
98         specially.
99
100 2007-02-18  Bruno Haible  <bruno@clisp.org>
101
102         * modules/stdlib-tests: New file.
103         * tests/test-stdlib.c: New file.
104
105         * modules/mkstemp (Files): Remove lib/mkstemp.h.
106         (Depends-on): Add stdlib.
107         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
108         (Includes): Use <stdlib.h> instead of mkstemp.h.
109         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
110         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
111         * lib/mkstemp.c: Don't include mkstemp.h.
112         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
113         * lib/stdlib--.h: Don't include mkstemp.h.
114
115         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
116         (Depends-on): Add stdlib.
117         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
118         (Includes): Use <stdlib.h> instead of mkdtemp.h.
119         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
120         HAVE_MKDTEMP.
121         * lib/mkdtemp.c: Don't include mkdtemp.h.
122         * lib/clean-temp.c: Don't include mkdtemp.h.
123
124         * modules/exit (Files): Remove lib/exit.h.
125         (Depends-on): Add stdlib.
126         (Makefile.am): Remove lib_SOURCES.
127         (Include): Use <stdlib.h> instead of exit.h.
128         * lib/argmatch.c: Don't include exit.h.
129         * lib/execute.c: Likewise.
130         * lib/pagealign_alloc.c: Likewise.
131         * lib/pipe.c: Likewise.
132         * lib/wait-process.c: Likewise.
133         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
134         * lib/exitfail.c: Likewise.
135         * lib/savewd.c: Likewise.
136         * lib/xsetenv.c: Likewise.
137
138         * modules/stdlib: New file.
139         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
140         and extra comments about mkstemp().
141         * lib/exit.h: Remove file.
142         * lib/mkdtemp.h: Remove file.
143         * lib/mkstemp.h: Remove file.
144         * m4/stdlib_h.m4: New file.
145         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
146
147 2007-02-18  Bruno Haible  <bruno@clisp.org>
148
149         * modules/math-tests: New file.
150         * tests/test-math.c: New file.
151
152         * modules/math: New file.
153         * modules/mathl (Files): Remove lib/mathl.h.
154         (Depends-on): Add math.
155         (Makefile.am): Don't mention mathl.h.
156         (Include): Use <math.h> instead of mathl.h.
157         * lib/math_.h: New file.
158         * lib/mathl.h: Remove file.
159         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
160         mathl.h.
161         * lib/asinl.c: Likewise.
162         * lib/atanl.c: Likewise.
163         * lib/ceill.c: Likewise.
164         * lib/cosl.c: Likewise.
165         * lib/expl.c: Likewise.
166         * lib/floorl.c: Likewise.
167         * lib/frexpl.c: Likewise.
168         * lib/ldexpl.c: Likewise.
169         * lib/logl.c: Likewise.
170         * lib/sincosl.c: Likewise.
171         * lib/sinl.c: Likewise.
172         * lib/sqrtl.c: Likewise.
173         * lib/tanl.c: Likewise.
174         * lib/trigl.c: Likewise.
175         * m4/math_h.m4: New file.
176         * MODULES.html.sh (Mathematics): Add math.
177
178 2007-02-17  Bruno Haible  <bruno@clisp.org>
179
180         * modules/wctype-tests: New file.
181         * tests/test-wctype.c: New file.
182
183         * modules/wchar-tests: New file.
184         * tests/test-wchar.c: New file.
185
186         * modules/unistd-tests: New file.
187         * tests/test-unistd.c: New file.
188
189         * modules/time-tests: New file.
190         * tests/test-time.c: New file.
191
192         * modules/sysexits-tests: New file.
193         * tests/test-sysexits.c: New file.
194
195         * modules/sys_time-tests: New file.
196         * tests/test-sys_time.c: New file.
197
198         * modules/sys_stat-tests: New file.
199         * tests/test-sys_stat.c: New file.
200
201         * modules/sys_socket-tests: New file.
202         * tests/test-sys_socket.c: New file.
203
204         * modules/sys_select-tests: New file.
205         * tests/test-sys_select.c: New file.
206
207         * modules/string-tests: New file.
208         * tests/test-string.c: New file.
209
210         * modules/stdbool-tests: New file.
211         * tests/test-stdbool.c: New file.
212
213         * modules/netinet_in-tests: New file.
214         * tests/test-netinet_in.c: New file.
215
216         * modules/inttypes-tests: New file.
217         * tests/test-inttypes.c: New file.
218
219         * modules/fcntl-tests: New file.
220         * tests/test-fcntl.c: New file.
221
222         * modules/byteswap-tests: New file.
223         * tests/test-byteswap.c: New file.
224
225         * modules/arpa_inet-tests: New file.
226         * tests/test-arpa_inet.c: New file.
227
228 2007-02-17  Bruno Haible  <bruno@clisp.org>
229
230         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
231         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
232         if the corresponding module is not enabled. Emit link warnings if
233         the function is used nevertheless.
234         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
235         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
236         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
237         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
238         * modules/inttypes (Depends-on): Add link-warning.
239         (Makefile.am): Copy the contents of build-aux/link-warning.h into
240         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
241         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
242         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
243         * modules/imaxdiv (configure.ac): Likewise.
244         * modules/strtoimax (configure.ac): Likewise.
245         * modules/strtoumax (configure.ac): Likewise.
246         
247 2007-02-17  Bruno Haible  <bruno@clisp.org>
248
249         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
250         gl_STRING_MODULE_INDICATOR_DEFAULTS.
251         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
252         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
253
254 2007-02-17  Bruno Haible  <bruno@clisp.org>
255
256         * modules/link-warning: New file.
257         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
258         * lib/string_.h (GL_LINK_WARNING): Remove definition.
259         * modules/string (Depends-on): Add link-warning.
260         (Makefile.am): Copy the contents of build-aux/link-warning.h into
261         string.h.
262         * MODULES.html.sh (Support for building libraries and executables): Add
263         link-warning.
264
265 2007-02-17  Bruno Haible  <bruno@clisp.org>
266
267         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
268         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
269         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
270         long lines.
271
272 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
273             Bruno Haible  <bruno@clisp.org>
274
275         * modules/tmpfile: New file.
276         * lib/tmpfile.c: New file.
277         * m4/tmpfile.m4: New file.
278         * MODULES.html.sh (func_all_modules): New section "Input/output".
279
280 2007-02-15  Bruno Haible  <bruno@clisp.org>
281
282         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
283         (supports_delete_on_close): New function.
284         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
285
286 2007-02-14  Bruno Haible  <bruno@clisp.org>
287
288         * modules/mbspcasecmp-tests: New file.
289         * tests/test-mbspcasecmp.sh: New file.
290         * tests/test-mbspcasecmp.c: New file.
291
292         New module mbspcasecmp.
293         * modules/mbspcasecmp: New file.
294         * lib/mbspcasecmp.c: New file.
295         * lib/string_.h (strncasecmp): Change warning message.
296         (mbspcasecmp): New declaration.
297         * m4/mbspcasecmp.m4: New file.
298         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
299         GNULIB_MBSPCASECMP.
300         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
301         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
302
303 2007-02-14  Bruno Haible  <bruno@clisp.org>
304
305         * modules/mbsncasecmp-tests: New file.
306         * tests/test-mbsncasecmp.sh: New file.
307         * tests/test-mbsncasecmp.c: New file.
308
309         New module mbsncasecmp.
310         * modules/mbsncasecmp: New file.
311         * lib/mbsncasecmp.c: New file.
312         * lib/string_.h (mbsncasecmp): New declaration.
313         * m4/mbsncasecmp.m4: New file.
314         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
315         GNULIB_MBSNCASECMP.
316         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
317         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
318
319 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
320
321         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
322         Verify that it doesn't overlap with our flags.
323         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
324         do not have the desired effect in multibyte locales; instead, use
325         mbscasecmp.
326         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
327         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
328         we don't require GNU fnmatch ourselves (if our users require it, they
329         should do so explicitly).
330
331         Fix regex code so it doesn't rely on strcasecmp.
332         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
333         Otherwise, include gnulib's langinfo.h.
334         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
335         undesirable behavior in non-C locales.  Instead, rely on localecharset.
336         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
337         * modules/regex (FILES): Remove m4/codeset.m4.
338         (Depends-on): Add localcharset.  Remove strcase.
339
340 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
341
342         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
343         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
344
345 2007-02-13  Bruno Haible  <bruno@clisp.org>
346
347         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
348         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
349
350 2007-02-12  Bruno Haible  <bruno@clisp.org>
351
352         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
353         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
354         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
355         time warning rather than a link error.
356
357 2007-02-12  Bruno Haible  <bruno@clisp.org>
358
359         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
360         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
361         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
362
363 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
364
365         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
366         args, not 2.
367
368 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
369
370         New module 'time', so that apps can include <time.h> as per
371         POSIX and GNU instead of separate include files like time_r.h
372         and timegm.h.  This implementation tries out a simpler approach
373         for replacing decls in standard include files (as compared to
374         the string module), somewhat as an experiment.
375
376         * config/srclist.txt: Comment out mktime.c for now.
377         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
378         since it doesn't apply any more.  Use generic wording instead.
379         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
380         'time'.
381         * lib/time_.h, m4/time_h.m4, modules/time: New files.
382         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
383         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
384         Don't include <sys/types.h>; no longer needed since we assume C89.
385         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
386         * lib/strftime.c: Likewise.
387         * lib/time_r.c: Likewise.
388         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
389         * lib/nanosleep.c: Include <time.h> first, to check interface.
390         * lib/strptime.c: Likewise.
391         * lib/time_r.c: Likewise.
392         * lib/timegm.c: Likewise.
393         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
394         needed.
395         * lib/timegm.c: Don't include timegm.h; no longer needed.
396         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
397         time.h now handles any problems in that area.
398         (struct timespec, nanosleep): Remove; time.h now arranges for these.
399         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
400         that time.h defines struct timespec.
401         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
402         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
403         handles that.
404         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
405         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
406         needed.  Set REPLACE_LOCALTIME.
407         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
408         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
409         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
410         nanosleep; time_h.m4 now does that.  Don't require
411         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
412         module handles this now.
413         * modules/getdate (Depends-on): Remove timespec.  Add time.
414         * modules/nanosleep (Depends-on): Likewise.
415         * modules/stat-time (Depends-on): Likewise.
416         * modules/nanosleep (Include): Include time.h, not timespec.h.
417         * modules/strptime (Files): Remove lib/strptime.h.
418         (Depends-on): Add extensions, time.
419         (Include): Include time.h, not strptime.h.
420         * modules/time_r (Files): Remove lib/time_r.h.
421         (Depends-on): Add time.
422         (Include): Include time.h, not time_r.h.
423         * modules/timegm: Likewise.
424         * modules/timespec (Description): Now does timespec-related decls
425         of our own, instead of struct timespec itself.
426         (Depends-on): Add time; remove extensions.
427         (Maintainer): Add self.
428         * modules/utimecmp (Depends-on): Add time; remove timespec.
429         * modules/utimens (Depends-on): Likewise.
430         * modules/xnanosleep (Depends-on): Likewise.
431
432 2007-02-11  Bruno Haible  <bruno@clisp.org>
433
434         * lib/c-strstr.c: Include allocsa.h.
435         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
436         * lib/c-strcasestr.c: Include allocsa.h.
437         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
438         * lib/strcasestr.c: Include allocsa.h.
439         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
440         * lib/mbsstr.c: Include allocsa.h.
441         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
442         allocsa/freesa instead of malloc/free.
443         * lib/mbscasestr.c: Include allocsa.h.
444         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
445         allocsa/freesa instead of malloc/free.
446         * modules/c-strstr (Depends-on): Add allocsa.
447         * modules/c-strcasestr (Depends-on): Likewise.
448         * modules/strcasestr (Depends-on): Likewise.
449         * modules/mbsstr (Depends-on): Likewise.
450         * modules/mbscasestr (Depends-on): Likewise.
451
452 2007-02-11  Bruno Haible  <bruno@clisp.org>
453
454         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
455
456         * modules/mbsspn-tests: New file.
457         * tests/test-mbsspn.sh: New file.
458         * tests/test-mbsspn.c: New file.
459
460 2007-02-11  Bruno Haible  <bruno@clisp.org>
461
462         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
463
464         * modules/mbspbrk-tests: New file.
465         * tests/test-mbspbrk.sh: New file.
466         * tests/test-mbspbrk.c: New file.
467
468 2007-02-11  Bruno Haible  <bruno@clisp.org>
469
470         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
471         unneeded cast.
472
473         * modules/mbscspn-tests: New file.
474         * tests/test-mbscspn.sh: New file.
475         * tests/test-mbscspn.c: New file.
476
477 2007-02-11  Bruno Haible  <bruno@clisp.org>
478
479         * modules/mbscasecmp-tests: New file.
480         * tests/test-mbscasecmp.sh: New file.
481         * tests/test-mbscasecmp.c: New file.
482
483 2007-02-11  Bruno Haible  <bruno@clisp.org>
484
485         Ensure O(n) worst-case complexity of mbscasestr.
486         * lib/mbscasestr.c: Include stdbool.h.
487         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
488         functions.
489         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
490         the bookkeeping indicates that it's worth it.
491         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
492
493         * modules/mbscasestr-tests: New file.
494         * tests/test-mbscasestr1.c: New file.
495         * tests/test-mbscasestr2.sh: New file.
496         * tests/test-mbscasestr2.c: New file.
497         * tests/test-mbscasestr3.sh: New file.
498         * tests/test-mbscasestr3.c: New file.
499         * tests/test-mbscasestr4.sh: New file.
500         * tests/test-mbscasestr4.c: New file.
501         * m4/locale-tr.m4: New file.
502
503 2007-02-11  Bruno Haible  <bruno@clisp.org>
504
505         Ensure O(n) worst-case complexity of mbsstr.
506         * lib/mbsstr.c: Include stdbool.h.
507         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
508         functions.
509         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
510         bookkeeping indicates that it's worth it.
511         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
512
513         * modules/mbsstr-tests: New file.
514         * tests/test-mbsstr1.c: New file.
515         * tests/test-mbsstr2.sh: New file.
516         * tests/test-mbsstr2.c: New file.
517         * tests/test-mbsstr3.sh: New file.
518         * tests/test-mbsstr3.c: New file.
519         * m4/locale-fr.m4: New file.
520
521 2007-02-11  Bruno Haible  <bruno@clisp.org>
522
523         * lib/mbsrchr.c (mbsrchr): Fix bug.
524
525         * modules/mbsrchr-tests: New file.
526         * tests/test-mbsrchr.sh: New file.
527         * tests/test-mbsrchr.c: New file.
528
529 2007-02-11  Bruno Haible  <bruno@clisp.org>
530
531         * lib/mbschr.c (mbschr): Fix bug.
532
533         * modules/mbschr-tests: New file.
534         * tests/test-mbschr.sh: New file.
535         * tests/test-mbschr.c: New file.
536         * m4/locale-zh.m4: New file.
537
538 2007-02-11  Bruno Haible  <bruno@clisp.org>
539
540         Support for copying multibyte string iterators.
541         * lib/mbiter.h: Include <string.h>.
542         (mbiter_multi_copy): New function.
543         (mbi_copy): New macro.
544         * lib/mbuiter.h: Include <string.h>.
545         (mbuiter_multi_copy): New function.
546         (mbui_copy): New macro.
547
548 2007-02-11  Bruno Haible  <bruno@clisp.org>
549
550         New module mbslen.
551         * modules/mbslen: New file.
552         * lib/mbslen.c: New file.
553         * lib/string_.h (mbslen): New declaration.
554         * m4/mbslen.m4: New file.
555         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
556         GNULIB_MBSLEN.
557         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
558         * MODULES.html.sh (Internationalization functions): Add mbslen.
559
560 2007-02-11  Bruno Haible  <bruno@clisp.org>
561
562         Ensure O(n) worst-case complexity of strcasestr substitute.
563         * lib/strcasestr.c: Include stdbool.h.
564         (knuth_morris_pratt): New function.
565         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
566         bookkeeping indicates that it's worth it.
567         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
568
569         * modules/strcasestr-tests: New file.
570         * tests/test-strcasestr.c: New file.
571
572 2007-02-11  Bruno Haible  <bruno@clisp.org>
573
574         Ensure O(n) worst-case complexity of c_strcasestr.
575         * lib/c-strcasestr.c: Include stdbool.h, string.h.
576         (knuth_morris_pratt): New function.
577         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
578         the bookkeeping indicates that it's worth it.
579         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
580
581         * modules/c-strcasestr-tests: New file.
582         * tests/test-c-strcasestr.c: New file.
583
584 2007-02-11  Bruno Haible  <bruno@clisp.org>
585
586         Ensure O(n) worst-case complexity of c_strstr.
587         * lib/c-strstr.c: Include stdbool.h, string.h.
588         (knuth_morris_pratt): New function.
589         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
590         bookkeeping indicates that it's worth it.
591         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
592
593         * lib/c-strstr.c: Complete rewrite for maintainability.
594
595         * modules/c-strstr-tests: New file.
596         * tests/test-c-strstr.c: New file.
597
598 2007-02-11  Bruno Haible  <bruno@clisp.org>
599
600         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
601         5.2.1 and earlier, whereby \055 was treated just like the range
602         delimiter '-'.  Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
603
604 2007-02-08  Bruno Haible  <bruno@clisp.org>
605
606         * modules/regex (Depends-on): Add stdbool.
607         Reported by Dalibor Topic <robilad@kaffe.org>.
608
609 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
610
611         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
612         Prefer returning from main to exiting from it.
613         Remove unnecessary parens after sizeof.
614
615 2007-02-05  Bruno Haible  <bruno@clisp.org>
616
617         New module mbssep.
618         * modules/mbssep: New file.
619         * lib/mbssep.c: New file.
620         * lib/string_.h (strsep): Add a conditional link warning.
621         (mbssep): New declaration.
622         * m4/mbssep.m4: New file.
623         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
624         GNULIB_MBSSEP.
625         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
626         * MODULES.html.sh (Internationalization functions): Add mbssep.
627
628 2007-02-05  Bruno Haible  <bruno@clisp.org>
629
630         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
631         Optimize search in case of 1 delimiter.
632
633 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
634
635         * lib/acl.h: Include sys/types.h before sys/acl.h.
636
637 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
638
639         Merge upstream fix for glibc bugzilla #3957:
640
641         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
642
643         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
644         bit for RE_HAT_LISTS_NOT_NEWLINE.
645         (build_charclass_op): Remove bogus comment.
646
647 2007-02-05  Simon Josefsson  <simon@josefsson.org>
648
649         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
650
651 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
652
653         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
654         * lib/memmem.c [!defined _LIBC]: Include config.h.
655
656 2007-02-04  Bruno Haible  <bruno@clisp.org>
657
658         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
659         warning message.
660
661 2007-02-04  Bruno Haible  <bruno@clisp.org>
662
663         New module mbstok_r.
664         * modules/mbstok_r: New file.
665         * lib/mbstok_r.c: New file.
666         * lib/string_.h (strtok_r): Change argument names to match the
667         comments. Add a conditional link warning.
668         (mbstok_r): New declaration.
669         * m4/mbstok_r.m4: New file.
670         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
671         GNULIB_MBSTOK_R.
672         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
673         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
674
675 2007-02-04  Bruno Haible  <bruno@clisp.org>
676
677         New module mbsspn.
678         * modules/mbsspn: New file.
679         * lib/mbsspn.c: New file.
680         * lib/string_.h (strspn): Add a conditional link warning.
681         (mbsspn): New declaration.
682         * m4/mbsspn.m4: New file.
683         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
684         GNULIB_MBSSPN.
685         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
686         * MODULES.html.sh (Internationalization functions): Add mbsspn.
687
688 2007-02-04  Bruno Haible  <bruno@clisp.org>
689
690         New module mbspbrk.
691         * modules/mbspbrk: New file.
692         * lib/mbspbrk.c: New file.
693         * lib/string_.h (strpbrk): Add a conditional link warning.
694         (mbspbrk): New declaration.
695         * m4/mbspbrk.m4: New file.
696         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
697         GNULIB_MBSPBRK.
698         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
699         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
700
701 2007-02-04  Bruno Haible  <bruno@clisp.org>
702
703         New module mbscspn.
704         * modules/mbscspn: New file.
705         * lib/mbscspn.c: New file.
706         * lib/string_.h (strcspn): Add a conditional link warning.
707         (mbscspn): New declaration.
708         * m4/mbscspn.m4: New file.
709         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
710         GNULIB_MBSCSPN.
711         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
712         * MODULES.html.sh (Internationalization functions): Add mbscspn.
713
714 2007-02-04  Bruno Haible  <bruno@clisp.org>
715
716         New module mbscasestr, reduced goal of strcasestr.
717         * modules/mbscasestr: New file.
718         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
719         (mbscasestr): Renamed from strcasestr.
720         * lib/strcasestr.c: Don't include mbuiter.h.
721         (strcasestr): Remove support for multibyte locales.
722         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
723         Change the conditional link warning.
724         (mbscasestr): New declaration.
725         * m4/mbscasestr.m4: New file.
726         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
727         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
728         REPLACE_STRCASESTR.
729         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
730         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
731         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
732         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
733         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
734         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
735         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
736         (Depends-on): Remove mbuiter.
737         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
738
739 2007-02-04  Bruno Haible  <bruno@clisp.org>
740
741         Simplify handling of strncasecmp.
742         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
743         the conditional link warning.
744         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
745         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
746         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
747         * modules/strcase (configure.ac): Don't invoke
748         gl_STRING_MODULE_INDICATOR.
749         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
750
751 2007-02-04  Bruno Haible  <bruno@clisp.org>
752
753         New module mbscasecmp, reduced goal of strcasecmp.
754         * modules/mbscasecmp: New file.
755         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
756         (mbscasecmp): Renamed from strcasecmp.
757         * lib/strcasecmp.c: Don't include mbuiter.h.
758         (strcasecmp): Remove support for multibyte locales.
759         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
760         Change the conditional link warning.
761         (mbscasecmp): New declaration.
762         * m4/mbscasecmp.m4: New file.
763         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
764         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
765         REPLACE_STRCASECMP.
766         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
767         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
768         GNULIB_MBSCASECMP.
769         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
770         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
771         * modules/strcase (Files): Remove m4/mbrtowc.m4.
772         (Depends-on): Remove mbuiter.
773         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
774
775 2007-02-04  Bruno Haible  <bruno@clisp.org>
776
777         New module mbsstr. Remove module strstr.
778         * modules/mbsstr: New file.
779         * modules/strstr: Remove file.
780         * lib/mbsstr.c: Renamed from lib/strstr.c.
781         (mbsstr): Renamed from strstr.
782         * lib/string_.h (strstr): Remove declaration. Change the conditional
783         link warning.
784         (mbsstr): New declaration.
785         * m4/mbsstr.m4: New file.
786         * m4/strstr.m4: Remove file.
787         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
788         REPLACE_STRSTR.
789         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
790         Don't initialize GNULIB_STRSTR.
791         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
792         substitute GNULIB_STRSTR and REPLACE_STRSTR.
793         * MODULES.html.sh (Internationalization functions): Add mbsstr.
794         (Support for systems lacking ANSI C 89): Remove strstr.
795
796 2007-02-04  Bruno Haible  <bruno@clisp.org>
797
798         New module mbsrchr.
799         * modules/mbsrchr: New file.
800         * lib/mbsrchr.c: New file.
801         * lib/string_.h (strrchr): Add a conditional link warning.
802         (mbsrchr): New declaration.
803         * m4/mbsrchr.m4: New file.
804         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
805         GNULIB_MBSRCHR.
806         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
807         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
808
809 2007-02-04  Bruno Haible  <bruno@clisp.org>
810
811         New module mbschr.
812         * modules/mbschr: New file.
813         * lib/mbschr.c: New file.
814         * lib/string_.h (strchr): Add a conditional link warning.
815         (mbschr): New declaration.
816         * m4/mbschr.m4: New file.
817         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
818         GNULIB_MBSCHR.
819         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
820         * MODULES.html.sh (Internationalization functions): Add mbschr.
821
822 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
823
824         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
825
826         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
827
828 2007-02-04  Bruno Haible  <bruno@clisp.org>
829
830         New module description section 'configure.ac-early'.
831         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
832         (func_get_autoconf_early_snippet): New function.
833         (func_import, func_create_testdir): Use it. Remove special cases for
834         modules 'extensions' and 'lock'.
835         * modules/extensions (configure.ac-early): Require
836         gl_USE_SYSTEM_EXTENSIONS.
837         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
838
839 2007-02-04  Bruno Haible  <bruno@clisp.org>
840
841         Make use of gcj-4.3's -fsource and -ftarget option.
842         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
843         and if so try the options -fsource and -ftarget.
844         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
845         source_version, ftarget_option, target_version arguments.
846         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
847         (is_envjavac_oldgcj_14_14_usable): Renamed from
848         is_envjavac_gcj_14_14_usable.
849         (is_envjavac_oldgcj_14_13_usable): Renamed from
850         is_envjavac_gcj_14_13_usable.
851         (is_gcj_present): Update.
852         (is_gcj_43, is_gcj43_usable): New functions.
853         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
854         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
855         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
856         try the options -fsource and -ftarget.
857
858 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
859
860         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
861         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
862         larger value.
863
864 2007-02-03  Jim Meyering  <jim@meyering.net>
865
866         Give tools a better chance to allocate space for very large buffers.
867         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
868
869         Make pwd and readlink work also when run with an unreadable parent dir
870         on systems with openat support.
871         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
872         provided getcwd function, even when we have openat support.
873         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
874
875 2007-02-02  Bruno Haible  <bruno@clisp.org>
876
877         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
878         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
879         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
880         portability problems if one of these functions is only used on specific
881         platforms.
882         Reported by Paul Eggert.
883
884 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
885
886         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
887         is causing more trouble than it's curing.
888         * lib/regex_internal.h (__mempcpy): Remove.
889         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
890         (and make the code a tad smaller to boot).
891         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
892
893 2007-02-02  Jim Meyering  <jim@meyering.net>
894
895         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
896         section, not in the Makefile.am: one.
897
898 2007-02-02  Eric Blake  <ebb9@byu.net>
899
900         * lib/strchrnul.c: Always include config.h first.
901
902         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
903         gnulib strstr is not necessary here.
904
905 2007-02-02  Simon Josefsson  <simon@josefsson.org>
906
907         * m4/socklen.m4: Fix typo.
908
909 2007-02-02  Eric Blake  <ebb9@byu.net>
910
911         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
912         * modules/netinet_in (Makefile.am): Likewise.
913
914 2007-02-01  Bruno Haible  <bruno@clisp.org>
915
916         * lib/string_.h (GL_LINK_WARNING): New macro.
917         (strcasecmp, strstr, strcasestr): If provided by the system,
918         conditionally define as a macro that leads to a warning instead of to
919         an error.
920         (strncasecmp): Conditionally define as a macro that leads to a warning.
921
922 2007-02-01  Jim Meyering  <jim@meyering.net>
923
924         Give tools a better chance to allocate space for very large buffers.
925         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
926
927 2007-02-01  Karl Berry  <karl@gnu.org>
928
929         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
930
931 2007-02-01  Bruno Haible  <bruno@clisp.org>
932
933         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
934         renamings.
935
936 2007-02-01  Eric Blake  <ebb9@byu.net>
937
938         * modules/regex (Depends-on): Revert dependence on mempcpy.
939         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
940         module's definition of mempcpy.
941         Reported by Paul Eggert.
942
943 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
944
945         * lib/string_.h: If the gnulib module XYZ is not present, undefine
946         the symbol XYZ before redefining it.  This fixes a problem with
947         programs that don't use XYZ, when compiled on systems that define
948         XYZ to something else.
949
950 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
951
952         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
953         occurs when "mkdir -m foo" creates a setgid directory that is (1)
954         writeable to group or other and (2) is intended to have a special
955         mode bit that is set or cleared.  In such a case, the directory
956         should be neither group- nor other-writeable until the special
957         mode bits are right.
958
959 2007-01-31  Eric Blake  <ebb9@byu.net>
960
961         * modules/mountlist (Depends-on): Add strstr.
962
963         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
964         bug.
965         * modules/string (Makefile.am): Remove redundant replacement.
966         * modules/regex (Depends-on): Add mempcpy.
967
968 2007-01-31  Bruno Haible  <bruno@clisp.org>
969
970         New module description field 'Link'.
971         * gnulib-tool (func_usage): Document --extract-link-directive.
972         (sed_extract_prog): Recognize 'Link' directive.
973         (func_get_link_directive): New function.
974         (func_import): Show summary of link directives.
975         Handle --extract-link-directive option.
976         * modules/acl (Link): New section.
977         * modules/clock-time (Link): New section.
978         * modules/euidaccess (Link): New section.
979         * modules/gettext (Link): New section.
980         * modules/iconv (Link): New section.
981         * modules/lock (Link): New section.
982         * modules/nanosleep (Link): New section.
983         * modules/readline (Link): New section.
984
985 2007-01-27  Bruno Haible  <bruno@clisp.org>
986
987         Enforce the use of gnulib modules for unportable <string.h> functions.
988         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
989         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
990         (gl_HEADER_STRING_H_BODY): Require it.
991         * lib/string_.h: If the gnulib module XYZ is not present, redefine
992         the symbol XYZ to one that gives a link error.
993         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
994         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
995         * modules/mempcpy (configure.ac): Likewise.
996         * modules/memrchr (configure.ac): Likewise.
997         * modules/stpcpy (configure.ac): Likewise.
998         * modules/stpncpy (configure.ac): Likewise.
999         * modules/strcase (configure.ac): Likewise.
1000         * modules/strcasestr (configure.ac): Likewise.
1001         * modules/strchrnul (configure.ac): Likewise.
1002         * modules/strdup (configure.ac): Likewise.
1003         * modules/strndup (configure.ac): Likewise.
1004         * modules/strnlen (configure.ac): Likewise.
1005         * modules/strpbrk (configure.ac): Likewise.
1006         * modules/strsep (configure.ac): Likewise.
1007         * modules/strstr (configure.ac): Likewise.
1008         * modules/strtok_r (configure.ac): Likewise.
1009
1010 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1011
1012         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1013
1014 2007-01-30  Jim Meyering  <jim@meyering.net>
1015
1016         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1017
1018 2007-01-29  Bruno Haible  <bruno@clisp.org>
1019
1020         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1021         * lib/execute.c: Likewise.
1022         * lib/pipe.c: Likewise.
1023         * lib/printf-args.h: Likewise.
1024         * lib/printf-args.c: Likewise.
1025         * lib/printf-parse.c: Likewise.
1026         * lib/vasnprintf.c: Likewise.
1027
1028 2007-01-29  Eric Blake  <ebb9@byu.net>
1029
1030         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1031         declaration.
1032
1033 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1034
1035         * lib/strptime.h (strptime): Use 'restrict' for args where
1036         POSIX requires this.
1037         * lib/strptime.c (strptime): Likewise.
1038         Change license notice from LGPL to GPL, since gnulib-tool will
1039         change this as needed.
1040         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1041         defined.
1042         Include "strptime.h" first, to check interface.
1043         Do not #undef _LIBC and _NL_CURRENT.
1044         Do not include <stdlib.h>; no longer needed.
1045         Include "time_r.h" and declare ptime_locale_status
1046         only if _LIBC is not defined.
1047         (__P): Remove unused macro.
1048         (match_string): Bring back glibc version, but use it only if _LIBC
1049         is defined.
1050         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1051         Remove unnecessary assertion and abort() call.
1052         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1053         * m4/strptime.m4: Fix serial number comment.
1054         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1055         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1056         (Depends-on): Add time_r.
1057
1058 2007-01-29  Bruno Haible  <bruno@clisp.org>
1059
1060         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1061         strptime.
1062         * modules/strptime (Depends-on): Add stdbool.
1063         * lib/strptime.h: Include <time.h> always. Add comments.
1064
1065 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1066
1067         * modules/strptime: New file.
1068         * lib/strptime.h: New file.
1069         * lib/strptime.c: New file.
1070         * m4/strptime.m4: New file.
1071
1072 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1073
1074         * MODULES.html.sh: New module mpsort.
1075         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1076
1077         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1078         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1079         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1080         All uses changed.
1081         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1082         All uses changed.
1083         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1084         to _Restrict_.
1085         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1086         the parameter matches the prototype.
1087
1088 2007-01-28  Jim Meyering  <jim@meyering.net>
1089
1090         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1091         sys/time.h here, reverting that part of the previous patch:
1092         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1093
1094 2007-01-28  Bruno Haible  <bruno@clisp.org>
1095
1096         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1097         value of $(SYS_TIME_H).
1098         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1099         remove it conditionally, too. [added by Jim Meyering]
1100         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1101         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1102         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1103         GETTIMEOFDAY_REPLACEMENT to 1.
1104
1105 2007-01-28  Bruno Haible  <bruno@clisp.org>
1106
1107         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1108         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1109         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1110         Set UNISTD_H instead of UNISTD_H2.
1111         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1112
1113 2007-01-28  Bruno Haible  <bruno@clisp.org>
1114
1115         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1116         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1117
1118 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1119
1120         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1121         (func_create_testdir): Ensure C locale for `grep' and `tr'
1122         character ranges.
1123         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1124         ACLOCAL_AMFLAGS parsing state machine.
1125
1126 2007-01-27  Bruno Haible  <bruno@clisp.org>
1127
1128         * modules/unistr/base: Update.
1129
1130 2007-01-27  Bruno Haible  <bruno@clisp.org>
1131
1132         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1133         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1134         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1135         modules/unistr/u32-mbtouc.
1136         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1137         * lib/unistr.h: Update.
1138         * lib/linebreak.c: Update.
1139         * modules/unistr/u32-mbtouc: Renamed from
1140         modules/unistr/u32-mbtouc-safe.
1141         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1142         * lib/unistr.h: Update.
1143         * lib/unistr/u32-to-u8.c: Update.
1144         * lib/unistr/u32-to-u16.c: Update.
1145
1146 2007-01-27  Bruno Haible  <bruno@clisp.org>
1147
1148         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1149         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1150         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1151         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1152         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1153         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1154         modules/unistr/u16-mbtouc.
1155         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1156         * lib/unistr.h: Update.
1157         * lib/linebreak.c: Update.
1158         * modules/linebreak: Update.
1159         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1160         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1161         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1162         * modules/unistr/u16-mbtouc: Renamed from
1163         modules/unistr/u16-mbtouc-safe.
1164         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1165         * lib/unistr.h: Update.
1166         * lib/unistr/u16-to-u8.c: Update.
1167         * modules/unistr/u16-to-u8: Update.
1168         * lib/unistr/u16-to-u32.c: Update.
1169         * modules/unistr/u16-to-u32: Update.
1170
1171 2007-01-27  Bruno Haible  <bruno@clisp.org>
1172
1173         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1174         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1175         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1176         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1177         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1178         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1179         modules/unistr/u8-mbtouc.
1180         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1181         * lib/unistr.h: Update.
1182         * lib/striconveh.c: Update.
1183         * modules/striconveh: Update.
1184         * lib/linebreak.c: Update.
1185         * modules/linebreak: Update.
1186         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1187         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1188         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1189         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1190         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1191         * lib/unistr.h: Update.
1192         * lib/striconveh.c: Update.
1193         * modules/striconveh: Update.
1194         * lib/unistr/u8-to-u16.c: Update.
1195         * modules/unistr/u8-to-u16: Update.
1196         * lib/unistr/u8-to-u32.c: Update.
1197         * modules/unistr/u8-to-u32: Update.
1198
1199 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1200
1201         Sync from Libtool.
1202         * lib/argz.c: Do not include strings.h nor memory.h, include
1203         string.h unconditionally.  Patch by Simon Josefsson.
1204
1205 2007-01-27  Bruno Haible  <bruno@clisp.org>
1206
1207         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1208         from gl_HEADER_STRING_H_BODY.
1209         (gl_HEADER_STRING_H_BODY): Require it.
1210         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1211         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1212         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1213         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1214         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1215         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1216         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1217         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1218         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1219         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1220         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1221         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1222         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1223         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1224         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1225
1226 2007-01-27  Bruno Haible  <bruno@clisp.org>
1227
1228         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1229         check_PROGRAMS into noinst_PROGRAMS.
1230         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1231         check_PROGRAMS in this case.
1232         (func_import): Set for_test to false.
1233         (func_create_testdir): Set for_test to true.
1234
1235 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1236             Bruno Haible  <bruno@clisp.org>
1237
1238         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1239         (Depends-on): Add string.
1240         (Includes): Use <string.h> instead of strcasestr.h.
1241         * modules/string (Makefile.am): Also substitute the value of
1242         REPLACE_STRCASESTR.
1243         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1244         assume strcasestr is declared in <string.h> not <strings.h>. Also
1245         set REPLACE_STRCASESTR.
1246         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1247         REPLACE_STRCASESTR.
1248         * lib/strcasestr.h: Remove file.
1249         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1250         * lib/string_.h (strcasestr): New declaration.
1251
1252 2007-01-27  Bruno Haible  <bruno@clisp.org>
1253
1254         * lib/string_.h: Use 'extern'.
1255
1256 2007-01-27  Jim Meyering  <jim@meyering.net>
1257
1258         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1259         of set-but-not-used local, "q".
1260
1261         * lib/mempcpy.c: Include <config.h> before <string.h>.
1262         This fixes a compilation error on HP-UX, due to the system's
1263         "restrict"-using mempcpy prototype.
1264
1265 2007-01-26  Bruno Haible  <bruno@clisp.org>
1266
1267         Small optimization.
1268         * lib/javacomp.c: Include c-strstr.h.
1269          (is_envjavac_gcj): Use c_strstr instead of strstr.
1270         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1271
1272 2007-01-26  Bruno Haible  <bruno@clisp.org>
1273
1274         * MODULES.html.sh (Unicode string functions): Add the new modules.
1275
1276         * modules/uniconv/u32-strconv-to-locale: New file.
1277         * lib/uniconv/u32-strconv-to-locale.c: New file.
1278
1279         * modules/uniconv/u16-strconv-to-locale: New file.
1280         * lib/uniconv/u16-strconv-to-locale.c: New file.
1281
1282         * modules/uniconv/u8-strconv-to-locale: New file.
1283         * lib/uniconv/u8-strconv-to-locale.c: New file.
1284
1285         * modules/uniconv/u32-strconv-from-locale: New file.
1286         * lib/uniconv/u32-strconv-from-locale.c: New file.
1287
1288         * modules/uniconv/u16-strconv-from-locale: New file.
1289         * lib/uniconv/u16-strconv-from-locale.c: New file.
1290
1291         * modules/uniconv/u8-strconv-from-locale: New file.
1292         * lib/uniconv/u8-strconv-from-locale.c: New file.
1293
1294         * modules/uniconv/u32-strconv-to-enc: New file.
1295         * lib/uniconv/u32-strconv-to-enc.c: New file.
1296         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1297         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1298
1299         * modules/uniconv/u16-strconv-to-enc: New file.
1300         * lib/uniconv/u16-strconv-to-enc.c: New file.
1301         * lib/uniconv/u-strconv-to-enc.h: New file.
1302         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1303         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1304
1305         * modules/uniconv/u8-strconv-to-enc: New file.
1306         * lib/uniconv/u8-strconv-to-enc.c: New file.
1307         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1308         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1309
1310         * modules/uniconv/u32-strconv-from-enc: New file.
1311         * lib/uniconv/u32-strconv-from-enc.c: New file.
1312         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1313         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1314
1315         * modules/uniconv/u16-strconv-from-enc: New file.
1316         * lib/uniconv/u16-strconv-from-enc.c: New file.
1317         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1318         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1319
1320         * modules/uniconv/u8-strconv-from-enc: New file.
1321         * lib/uniconv/u8-strconv-from-enc.c: New file.
1322         * lib/uniconv/u-strconv-from-enc.h: New file.
1323         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1324         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1325
1326         * modules/uniconv/u32-conv-from-enc: New file.
1327         * lib/uniconv/u32-conv-from-enc.c: New file.
1328         * modules/uniconv/u32-conv-from-enc-tests: New file.
1329         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1330
1331         * modules/uniconv/u16-conv-from-enc: New file.
1332         * lib/uniconv/u16-conv-from-enc.c: New file.
1333         * lib/uniconv/u-conv-from-enc.h: New file.
1334         * modules/uniconv/u16-conv-from-enc-tests: New file.
1335         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1336
1337         * modules/uniconv/u8-conv-from-enc: New file.
1338         * lib/uniconv/u8-conv-from-enc.c: New file.
1339         * modules/uniconv/u8-conv-from-enc-tests: New file.
1340         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1341
1342         * modules/uniconv/base: New file.
1343         * lib/uniconv.h: New file.
1344
1345 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1346
1347         * doc/gnulib-tool.texi (Initial import): Update to match current
1348         behavior with strdup module.
1349         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1350         * lib/memmem.h: Remove; all uses removed.  This is now done
1351         by <string.h>.
1352         * lib/mempcpy.h: Likewise.
1353         * lib/memrchr.h: Likewise.
1354         * lib/stpcpy.h: Likewise.
1355         * lib/stpncpy.h: Likewise.
1356         * lib/strcase.h: Likewise.
1357         * lib/strchrnul.h: Likewise.
1358         * lib/strdup.h: Likewise.
1359         * lib/strndup.h: Likewise.
1360         * lib/strnlen.h: Likewise.
1361         * lib/strpbrk.h: Likewise.
1362         * lib/strsep.h: Likewise.
1363         * lib/strstr.h: Likewise.
1364         * lib/strtok_r.h: Likewise.
1365         * lib/string_.h: New file.
1366         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1367         Rely on <string.h> instead.
1368         * lib/canon-host.c: Likewise.
1369         * lib/chdir-long.c: Likewise.
1370         * lib/concatpath.c: Likewise.
1371         * lib/exclude.c: Likewise.
1372         * lib/fchdir.c: Likewise.
1373         * lib/getaddrinfo.c: Likewise.
1374         * lib/getcwd.c: Likewise.
1375         * lib/getsubopt.c: Likewise.
1376         * lib/glob.c: Likewise.
1377         * lib/hard-locale.c: Likewise.
1378         * lib/iconvme.c: Likewise.
1379         * lib/javacomp.c: Likewise.
1380         * lib/mempcpy.c: Likewise.
1381         * lib/memrchr.c: Likewise.
1382         * lib/regex_internal.h: Likewise.
1383         * lib/stpncpy.c: Likewise.
1384         * lib/strcasecmp.c: Likewise.
1385         * lib/strchrnul.c: Likewise.
1386         * lib/strdup.c: Likewise.
1387         * lib/striconv.c: Likewise.
1388         * lib/striconveh.c: Likewise.
1389         * lib/striconveha.c: Likewise.
1390         * lib/strncasecmp.c: Likewise.
1391         * lib/strndup.c: Likewise.
1392         * lib/strnlen.c: Likewise.
1393         * lib/strsep.c: Likewise.
1394         * lib/strstr.c: Likewise.
1395         * lib/strtok_r.c: Likewise.
1396         * lib/userspec.c: Likewise.
1397         * lib/w32spawn.h: Likewise.
1398         * lib/xstrndup.c: Likewise.
1399         * lib/mountlist.c (strstr): Remove decl.
1400         * m4/string_h.m4: New file.
1401         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1402         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1403         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1404         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1405         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1406         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1407         Set REPLACE_STRCASECMP if necessary.
1408         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1409         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1410         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1411         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1412         HAVE_DECL_STRDUP if necessary.
1413         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1414         since gl_FUNC_STRNDUP does that now.
1415         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1416         Check for decl here...
1417         (gl_PREREQ_STRNLEN): ... not here.
1418         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1419         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1420         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1421         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1422         necessary.
1423         * modules/string: New file.
1424         * modules/memmem (Files): Remove special-purpose include file.
1425         (Depends-on): Add string.
1426         (Include): Include <string.h>, not the removed file.
1427         * modules/mempcpy: Likewise.
1428         * modules/memrchr: Likewise.
1429         * modules/stpcpy: Likewise.
1430         * modules/stpncpy: Likewise.
1431         * modules/strcase: Likewise.
1432         * modules/strchrnul: Likewise.
1433         * modules/strdup: Likewise.
1434         * modules/strndup: Likewise.
1435         * modules/strnlen: Likewise.
1436         * modules/strpbrk: Likewise.
1437         * modules/strsep: Likewise.
1438         * modules/strstr: Likewise.
1439         * modules/strtok_r: Likewise.
1440         * tests/test-dirname.c: Don't include "strdup.h", since
1441         <string.h> now suffices.
1442         * tests/test-memmem.c: Don't include "memmem.h", since
1443         <string.h> now suffices.
1444
1445 2007-01-25  Bruno Haible  <bruno@clisp.org>
1446
1447         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1448         *resultp is 0.
1449
1450         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1451         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1452         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1453         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1454
1455         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1456         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1457         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1458         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1459         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1460         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1461
1462 2007-01-24  Bruno Haible  <bruno@clisp.org>
1463
1464         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1465         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1466         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1467         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1468         gl_FUNC_FTS_CORE.
1469         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1470         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1471         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1472         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1473         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1474         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1475         gl_FUNC_FCHOWNAT.
1476         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1477         gl_FUNC_STRFTIME.
1478         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1479         Reported by Ralf Wildenhues.
1480
1481 2007-01-24  Bruno Haible  <bruno@clisp.org>
1482
1483         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1484         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1485         gl_GETADDRINFO.
1486         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1487         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1488         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1489
1490 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1491
1492         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1493         Don't use 'exit'; just return from 'main'.
1494         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1495
1496         * lib/fnmatch_.h: Readjust white space and comments to match
1497         glibc, to avoid spurious diffs.
1498
1499 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1500
1501         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1502         2004-12-01 change by Jakub Jelinek, since this code won't compile
1503         if !LIBC.  Problem reported by Bob Proulx.
1504
1505 2007-01-23  Bruno Haible  <bruno@clisp.org>
1506
1507         * lib/striconveh.c: Include c-strcaseeq.h.
1508         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1509         * modules/striconveh (Depends-on): Add c-strcaseeq.
1510
1511 2007-01-23  Bruno Haible  <bruno@clisp.org>
1512
1513         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1514
1515         * modules/c-strcaseeq: New file.
1516         * lib/c-strcaseeq.h: New file.
1517
1518         * modules/streq: New file.
1519         * lib/streq.h: New file.
1520
1521 2007-01-23  Bruno Haible  <bruno@clisp.org>
1522
1523         * modules/striconveha-tests: New file.
1524         * tests/test-striconveha.c: New file.
1525
1526         * lib/striconveha.h: Include <stdbool.h>.
1527         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1528         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1529         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1530         (mem_iconveha): New function.
1531         (str_iconveha_notranslit): Renamed from str_iconveha.
1532         (str_iconveha): New function.
1533         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1534         c-strcase.
1535
1536 2007-01-23  Bruno Haible  <bruno@clisp.org>
1537
1538         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1539         encodings without forgiving before trying any encoding with handler.
1540         (str_iconveha): Try all encodings without forgiving before trying any
1541         encoding with handler.
1542
1543 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1544
1545         Import the following changes from libc.
1546
1547         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1548
1549         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1550
1551         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1552
1553         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1554         normal_bracket label.
1555
1556         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1557
1558         [BZ #361]
1559         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1560         to normal_bracket after fetching the next character.
1561
1562 2007-01-22  Bruno Haible  <bruno@clisp.org>
1563
1564         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1565         argument.
1566         * lib/striconveh.c (iconv_carefully_1): New function.
1567         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1568         argument.
1569         (str_cd_iconveh): Update.
1570         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1571         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1572         * tests/test-striconveh.c (MAGIC): New macro.
1573         (new_offsets): New function.
1574         (main): Test call with and without offsets.
1575
1576 2007-01-22  Bruno Haible  <bruno@clisp.org>
1577
1578         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1579         * modules/sys_select (Makefile.am): Likewise.
1580         * modules/sys_socket (Makefile.am): Likewise.
1581         * modules/sys_time (Makefile.am): Likewise.
1582
1583 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1584
1585         * modules/gettimeofday (License): Change from GPL to LGPL, since
1586         gettimeofday is a library function.
1587
1588 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1589
1590         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1591
1592 2007-01-21  Bruno Haible  <bruno@clisp.org>
1593
1594         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1595
1596 2007-01-21  Bruno Haible  <bruno@clisp.org>
1597
1598         * modules/striconveha: New file.
1599         * lib/striconveha.h: New file.
1600         * lib/striconveha.c: New file.
1601         * MODULES.html.sh (Internationalization functions): Add striconveha.
1602         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1603         string.
1604         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1605
1606 2007-01-21  Bruno Haible  <bruno@clisp.org>
1607
1608         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1609         * lib/striconveh.c (str_iconveh): Likewise.
1610
1611 2007-01-21  Bruno Haible  <bruno@clisp.org>
1612
1613         * lib/striconveh.h (mem_iconveh): New declaration.
1614         * lib/striconveh.c (mem_iconveh): New function.
1615         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1616
1617 2007-01-21  Bruno Haible  <bruno@clisp.org>
1618
1619         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1620
1621         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1622         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1623         original result buffer.
1624         (str_cd_iconveh): Update.
1625         * tests/test-striconveh.c (main): Update.
1626
1627         * lib/striconv.h (mem_cd_iconv): Change specification.
1628         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1629         result buffer.
1630         (str_cd_iconv): Update.
1631         * tests/test-striconv.c (main): Update.
1632
1633 2007-01-21  Bruno Haible  <bruno@clisp.org>
1634
1635         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1636
1637 2007-01-20  Jim Meyering  <jim@meyering.net>
1638
1639         * lib/userspec.c (parse_with_separator): If a user or group string
1640         starts with "+", skip the corresponding name-to-ID look-up, since
1641         such a look-up must fail: user and group names may not include "+".
1642
1643 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1644
1645         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1646         since we now assume the sys_time module.
1647         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1648         check for sys/time.h; no longer needed.
1649         * modules/poll (Depends-on): Depend on sys_time.
1650
1651 2007-01-18  Bruno Haible  <bruno@clisp.org>
1652
1653         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1654         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1655
1656         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1657         gettimeofday.
1658
1659         * tests/test-gettimeofday.c: Include <time.h>.
1660         (dummy): Remove variable.
1661
1662         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1663         gl_HEADER_SYS_TIME_H.
1664         (gl_HEADER_SYS_TIME_H): New macro.
1665
1666         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1667         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1668         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1669         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1670         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1671         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1672         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1673         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1674         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1675         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1676         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1677
1678         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1679         last change; it caused a compilation error when cross-compiling to
1680         Cygwin.
1681
1682 2007-01-18  Jim Meyering  <jim@meyering.net>
1683
1684         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1685         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1686         than the race-prone "test -d sys || mkdir sys".
1687         (configure.ac): Use AC_PROG_MKDIR_P.
1688         * modules/sys_select: Likewise.
1689         * modules/sys_socket: Likewise.
1690         * modules/sys_time: Likewise.
1691
1692 2007-01-18  Eric Blake  <ebb9@byu.net>
1693
1694         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1695         replace gettimeofday.
1696         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1697         name, to avoid infinite recursion.
1698
1699 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1700
1701         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1702         module sys_time.
1703         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1704         assume timespec.h defines struct timeval.
1705         * lib/settime.c: Likewise.
1706         * lib/utimens.c: Likewise.
1707         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1708         since we now assume the gettimeofday module.
1709         * lib/tempname.c (__gen_tempname): Likewise.
1710         * lib/gettimeofday.h: Remove.
1711         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1712         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1713         Include <time.h>, for 'time()'.
1714         (localtime_buffer_addr): Also use this workaround if
1715         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1716         to simplify the uses.  All uses changed.
1717         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1718         that #undef is inside {}, and 'const' follows type name consistently.
1719         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1720         (gettimeofday): Do not use the maximum possible value for
1721         tv->tv_usec, since that might break usages other than ls.c.
1722         Instead, we'll leave ls.c alone.  This undoes today's patch
1723         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1724         we've never observed the problem but might as well keep the
1725         canary.
1726         * lib/nanosleep.c: Include timespec.h first, for interface check.
1727         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1728         now assume the sys_time module.
1729         * lib/tempname.c: Likewise.
1730         * lib/timespec.h: Likewise.
1731         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1732         needed.
1733         * lib/strftime.c: Likewise.
1734         * lib/timespec.h: Likewise.
1735         * lib/posixtm.c: Include posixtm.h first, for interface check.
1736         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1737         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1738         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1739         * lib/sys_time_.h: New file.
1740         * lib/timespec.h (struct timespec): Use long int, not long.
1741         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1742         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1743         Remove obsolescent call to AC_HEADER_TIME.
1744         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1745         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1746         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1747         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1748         Likewise.
1749         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1750         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1751         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1752         into the sys_time module.  Check for gettimeofday just once.
1753         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1754         for gettimeofday signature to just check the signature.  Merely
1755         compile it, since linking doesn't test signature.  Improve test for
1756         whether gettimeofday.o is actually needed.
1757         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1758         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1759         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1760         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1761         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1762         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1763         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1764         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1765         than worrying about sys/time.h.
1766         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1767         Don't bother worrying about TIME_WITH_SYS_TIME.
1768         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1769         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1770         * m4/sys_time_h.m4: New file.
1771         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1772         Don't include sys/time.h.  Return from main rather than exiting.
1773         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1774         all uses changed.
1775         * modules/gethrxtime (Depends-on): Add sys_time.
1776         * modules/gettime (Depends-on): Likewise.
1777         * modules/gettimeofday (Depends-on): Likewise.
1778         * modules/nanosleep (Depends-on): Likewise.
1779         * modules/settime (Depends-on): Likewise.
1780         * modules/tempname (Depends-on): Likewise.
1781         * modules/utimens (Depends-on): Likewise.
1782         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1783         (Include:) Change back to <sys/time.h>.
1784         (Maintainer:) Add self.
1785         * modules/sys_time: New file.
1786         * modules/tempname (Depends-on): Add gettimeofday.
1787         * tests/test-gettimeofday.c: Include <sys/time.h>
1788         rather than gettimeofday.h.
1789
1790 2007-01-17  Bruno Haible  <bruno@clisp.org>
1791
1792         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1793         the license default to GPL.
1794         (func_create_testdir): Don't complain if a module is LGPL and its
1795         tests module depends on GPLed modules.
1796
1797 2007-01-17  Bruno Haible  <bruno@clisp.org>
1798
1799         * lib/gettimeofday.c (gettimeofday): Add code for the case
1800         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1801         maximum possible value for tv->tv_usec, rather than the minimum one.
1802
1803 2005-10-08  Martin Lambers  <marlam@marlam.de>
1804 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1805 2007-01-16  Bruno Haible  <bruno@clisp.org>
1806
1807         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1808         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1809         gl_FUNC_GETTIMEOFDAY.
1810         (Include): Add gettimeofday.h.
1811         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1812         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1813         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1814         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1815         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1816         * lib/gettimeofday.h: New file.
1817         * lib/gettimeofday.c: Include <sys/timeb.h>.
1818         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1819         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1820         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1821         fall back on time().
1822
1823         * tests/test-gettimeofday.c: New file.
1824         * modules/gettimeofday-tests: New file.
1825
1826 2007-01-16  Eric Blake  <ebb9@byu.net>
1827
1828         * modules/fnmatch (Depends-on): Depend on wchar.
1829         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1830         * m4/fnmatch.m4: Likewise.
1831         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1832         * m4/mbchar.m4: Likewise.
1833         * modules/mbswidth (Depends-on): Depend on wchar.
1834         * lib/mbswidth.c: Assume <wchar.h>.
1835         * m4/mbswidth.m4: Likewise.
1836         * modules/quotearg (Depends-on): Depend on wchar.
1837         * lib/quotearg.c: Assume <wchar.h>.
1838         * m4/quotearg.m4: Likewise.
1839         * modules/regex (Depends-on): Depend on wchar.
1840         * lib/regex_internal.h: Assume <wchar.h>.
1841         * m4/regex.m4: Likewise.
1842         * modules/stdint (Depends-on): Depend on wchar.
1843         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1844         * m4/stdint.m4: Likewise.
1845         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1846         * modules/strftime (Depends-on): Depend on wchar.
1847         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1848         * modules/strtol (Depends-on): Depend on wchar.
1849         * lib/strtol.c: Assume <wchar.h>.
1850         * modules/wcwidth (Depends-on): Depend on wchar.
1851         * lib/wcwidth.h: Assume <wchar.h>.
1852         * m4/wcwidth.m4: Likewise.
1853
1854 2007-01-16  Bruno Haible  <bruno@clisp.org>
1855
1856         * modules/csharpexec-script: New, created from...
1857         * modules/csharpexec: ... this.
1858
1859 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1860
1861         * modules/javaexec-script: New, created from...
1862         * modules/javaexec: ... this.
1863
1864 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1865
1866         * modules/poll (Dependencies): Add sys_select.
1867
1868 2007-01-15  Jim Meyering  <jim@meyering.net>
1869
1870         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1871         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1872         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1873         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1874
1875 2007-01-15  Bruno Haible  <bruno@clisp.org>
1876
1877         * modules/striconveh: New file.
1878         * lib/striconveh.h: New file.
1879         * lib/striconveh.c: New file.
1880         * MODULES.html.sh (Internationalization functions): Add striconveh.
1881
1882         * modules/striconveh-tests: New file.
1883         * tests/test-striconveh.c: New file.
1884
1885 2007-01-15  Bruno Haible  <bruno@clisp.org>
1886
1887         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1888         not from GNU libiconv or GNU libc.
1889
1890 2007-01-15  Bruno Haible  <bruno@clisp.org>
1891
1892         * doc/gnulib-intro.texi (Copyright): Explain the different license
1893         terms for module descriptions, autoconf macros, tests, documentation.
1894
1895 2007-01-14  Bruno Haible  <bruno@clisp.org>
1896
1897         * modules/striconv-tests: New file.
1898         * tests/test-striconv.c: New file.
1899
1900 2007-01-14  Bruno Haible  <bruno@clisp.org>
1901
1902         * modules/iconv-tests: New file.
1903         * tests/test-iconv.c: New file.
1904
1905 2007-01-14  Bruno Haible  <bruno@clisp.org>
1906
1907         * gnulib-tool (func_get_license): For test modules, use the license of
1908         the main module.
1909
1910 2007-01-14  Bruno Haible  <bruno@clisp.org>
1911
1912         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1913         if iconv is found to exist.
1914
1915 2007-01-14  Bruno Haible  <bruno@clisp.org>
1916
1917         * modules/c-ctype-tests: New file.
1918         * tests/test-c-ctype.c: New file.
1919
1920 2007-01-14  Bruno Haible  <bruno@clisp.org>
1921
1922         * modules/binary-io-tests: New file.
1923         * tests/test-binary-io.sh: New file.
1924         * tests/test-binary-io.c: New file.
1925
1926 2007-01-14  Bruno Haible  <bruno@clisp.org>
1927
1928         * modules/array-oset-tests: New file.
1929         * tests/test-array_oset.c: New file.
1930
1931 2007-01-14  Bruno Haible  <bruno@clisp.org>
1932
1933         * modules/array-list-tests: New file.
1934         * tests/test-array_list.c: New file.
1935
1936 2007-01-14  Bruno Haible  <bruno@clisp.org>
1937
1938         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1939         and make.
1940         Reported by Simon Josefsson in
1941         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1942
1943 2007-01-14  Bruno Haible  <bruno@clisp.org>
1944
1945         * modules/allocsa-tests: New file.
1946         * tests/test-allocsa.c: New file.
1947
1948 2007-01-14  Bruno Haible  <bruno@clisp.org>
1949
1950         * modules/fchdir (Depends-on): Add absolute-header.
1951         * modules/unistd (Depends-on): Likewise.
1952
1953 2006-12-30  Bruno Haible  <bruno@clisp.org>
1954
1955         * modules/fchdir: New file.
1956         * modules/unistd (Files): Add lib/unistd_.h.
1957         (Makefile.am): Generate unistd.h from unistd_.h.
1958         * lib/fchdir.c: New file.
1959         * lib/dirent_.h: New file.
1960         * lib/unistd_.h: New file.
1961         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1962         * m4/fchdir.m4: New file.
1963         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1964         (gl_HEADER_UNISTD): Invoke it.
1965         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1966         function.
1967         * lib/backupfile.c (opendir, closedir): Undefine.
1968         * lib/chown.c (open, close): Undefine.
1969         * lib/clean-temp.c (open, close): Undefine.
1970         * lib/copy-file.c (open, close): Undefine.
1971         * lib/execute.c (open, close): Undefine.
1972         * lib/fsusage.c (open, close): Undefine.
1973         * lib/gc-gnulib.c (open, close): Undefine.
1974         * lib/getcwd.c (opendir, closedir): Undefine.
1975         * lib/glob.c (opendir, closedir): Undefine.
1976         * lib/javacomp.c (open, close): Undefine.
1977         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1978         * lib/openat-proc.c (open, close): Undefine.
1979         * lib/pagealign_alloc.c (open, close): Undefine.
1980         * lib/pipe.c (open, close): Undefine.
1981         * lib/progreloc.c (open, close): Undefine.
1982         * lib/savedir.c (opendir, closedir): Undefine.
1983         * lib/utime.c (open, close): Undefine.
1984         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1985
1986 2007-01-10  Bruno Haible  <bruno@clisp.org>
1987
1988         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1989
1990 2007-01-12  Eric Blake  <ebb9@byu.net>
1991
1992         Provide a robust <wchar.h>.  Further simplifications are now
1993         possible in other modules, but not included here.
1994         * modules/wchar: New module.
1995         * m4/wchar.m4: New file.
1996         * lib/wchar_.h: Likewise.
1997         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1998         of the new module.
1999         * MODULES.html.sh (Extended multibyte and wide character utilities):
2000         New section.
2001
2002 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2003
2004         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2005         to a reasonable default for memory allocation.
2006         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2007         file system that reports garbage st_size values for symlinks.
2008         Problem reported by Liyang Hu.
2009
2010 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2011
2012         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2013         Emacs .#* auto-save files).
2014
2015 2007-01-11  Bruno Haible  <bruno@clisp.org>
2016
2017         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2018         directory.
2019
2020 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2021
2022         Use @...@ consistently in lib/wctype_.h.
2023         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2024         on it being set to 1 or 0.
2025         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2026         go back to AC_SUBSTing it.
2027         * modules/wctype (Makefile.am): Undo previous change.
2028
2029 2007-01-10  Eric Blake  <ebb9@byu.net>
2030
2031         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2032         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2033         * modules/wctype (Makefile.am): Likewise.
2034         Reported by Chris McGuire.
2035
2036 2007-01-10  Jim Meyering  <jim@meyering.net>
2037
2038         fts.c: a small readability/maintainability improvement
2039         * lib/fts.c (fts_read): Make this code slightly more readable and
2040         maintainable by hoisting the "sp->fts_cur = p" assignments to
2041         immediately follow the statements that set P.  Derived from
2042         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2043
2044 2007-01-10  Eric Blake  <ebb9@byu.net>
2045
2046         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2047         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2048         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2049         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2050         Reported by Chris McGuire.
2051
2052 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2053
2054         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2055         in sed script.
2056
2057 2007-01-09  Bruno Haible  <bruno@clisp.org>
2058
2059         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2060         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2061         variables.
2062         (func_module): Use them.
2063
2064 2007-01-09  Bruno Haible  <bruno@clisp.org>
2065
2066         * modules/unistr/base: New file.
2067         * lib/unistr.h: New file.
2068
2069         * modules/unistr/u8-to-u16: New file.
2070         * lib/unistr/u8-to-u16.c: New file.
2071
2072         * modules/unistr/u8-to-u32: New file.
2073         * lib/unistr/u8-to-u32.c: New file.
2074
2075         * modules/unistr/u16-to-u8: New file.
2076         * lib/unistr/u16-to-u8.c: New file.
2077
2078         * modules/unistr/u16-to-u32: New file.
2079         * lib/unistr/u16-to-u32.c: New file.
2080
2081         * modules/unistr/u32-to-u8: New file.
2082         * lib/unistr/u32-to-u8.c: New file.
2083
2084         * modules/unistr/u32-to-u16: New file.
2085         * lib/unistr/u32-to-u16.c: New file.
2086
2087         * modules/unistr/u8-check: New file.
2088         * modules/unistr/u16-check: New file.
2089         * modules/unistr/u32-check: New file.
2090         * lib/unistr/u8-check.c: New file.
2091         * lib/unistr/u16-check.c: New file.
2092         * lib/unistr/u32-check.c: New file.
2093
2094         * modules/unistr/u8-chr: New file.
2095         * modules/unistr/u16-chr: New file.
2096         * modules/unistr/u32-chr: New file.
2097         * lib/unistr/u8-chr.c: New file.
2098         * lib/unistr/u16-chr.c: New file.
2099         * lib/unistr/u32-chr.c: New file.
2100
2101         * modules/unistr/u8-cmp: New file.
2102         * modules/unistr/u16-cmp: New file.
2103         * modules/unistr/u32-cmp: New file.
2104         * lib/unistr/u8-cmp.c: New file.
2105         * lib/unistr/u16-cmp.c: New file.
2106         * lib/unistr/u32-cmp.c: New file.
2107
2108         * modules/unistr/u8-cpy: New file.
2109         * modules/unistr/u16-cpy: New file.
2110         * modules/unistr/u32-cpy: New file.
2111         * lib/unistr/u8-cpy.c: New file.
2112         * lib/unistr/u16-cpy.c: New file.
2113         * lib/unistr/u32-cpy.c: New file.
2114         * lib/unistr/u-cpy.h: New file.
2115
2116         * modules/unistr/u8-cpy-alloc: New file.
2117         * modules/unistr/u16-cpy-alloc: New file.
2118         * modules/unistr/u32-cpy-alloc: New file.
2119         * lib/unistr/u8-cpy-alloc.c: New file.
2120         * lib/unistr/u16-cpy-alloc.c: New file.
2121         * lib/unistr/u32-cpy-alloc.c: New file.
2122         * lib/unistr/u-cpy-alloc.h: New file.
2123
2124         * modules/unistr/u8-endswith: New file.
2125         * modules/unistr/u16-endswith: New file.
2126         * modules/unistr/u32-endswith: New file.
2127         * lib/unistr/u8-endswith.c: New file.
2128         * lib/unistr/u16-endswith.c: New file.
2129         * lib/unistr/u32-endswith.c: New file.
2130         * lib/unistr/u-endswith.h: New file.
2131
2132         * modules/unistr/u8-mblen: New file.
2133         * modules/unistr/u16-mblen: New file.
2134         * modules/unistr/u32-mblen: New file.
2135         * lib/unistr/u8-mblen.c: New file.
2136         * lib/unistr/u16-mblen.c: New file.
2137         * lib/unistr/u32-mblen.c: New file.
2138
2139         * modules/unistr/u8-mbtouc: New file.
2140         * modules/unistr/u16-mbtouc: New file.
2141         * modules/unistr/u32-mbtouc: New file.
2142         * lib/unistr/u8-mbtouc.c: New file.
2143         * lib/unistr/u16-mbtouc.c: New file.
2144         * lib/unistr/u32-mbtouc.c: New file.
2145
2146         * modules/unistr/u8-mbtouc-safe: New file.
2147         * modules/unistr/u16-mbtouc-safe: New file.
2148         * modules/unistr/u32-mbtouc-safe: New file.
2149         * lib/unistr/u8-mbtouc-safe.c: New file.
2150         * lib/unistr/u16-mbtouc-safe.c: New file.
2151         * lib/unistr/u32-mbtouc-safe.c: New file.
2152
2153         * modules/unistr/u8-move: New file.
2154         * modules/unistr/u16-move: New file.
2155         * modules/unistr/u32-move: New file.
2156         * lib/unistr/u8-move.c: New file.
2157         * lib/unistr/u16-move.c: New file.
2158         * lib/unistr/u32-move.c: New file.
2159         * lib/unistr/u-move.h: New file.
2160
2161         * modules/unistr/u8-next: New file.
2162         * modules/unistr/u16-next: New file.
2163         * modules/unistr/u32-next: New file.
2164         * lib/unistr/u8-next.c: New file.
2165         * lib/unistr/u16-next.c: New file.
2166         * lib/unistr/u32-next.c: New file.
2167
2168         * modules/unistr/u8-prev: New file.
2169         * modules/unistr/u16-prev: New file.
2170         * modules/unistr/u32-prev: New file.
2171         * lib/unistr/u8-prev.c: New file.
2172         * lib/unistr/u16-prev.c: New file.
2173         * lib/unistr/u32-prev.c: New file.
2174
2175         * modules/unistr/u8-set: New file.
2176         * modules/unistr/u16-set: New file.
2177         * modules/unistr/u32-set: New file.
2178         * lib/unistr/u8-set.c: New file.
2179         * lib/unistr/u16-set.c: New file.
2180         * lib/unistr/u32-set.c: New file.
2181         * lib/unistr/u-set.h: New file.
2182
2183         * modules/unistr/u8-startswith: New file.
2184         * modules/unistr/u16-startswith: New file.
2185         * modules/unistr/u32-startswith: New file.
2186         * lib/unistr/u8-startswith.c: New file.
2187         * lib/unistr/u16-startswith.c: New file.
2188         * lib/unistr/u32-startswith.c: New file.
2189         * lib/unistr/u-startswith.h: New file.
2190
2191         * modules/unistr/u8-stpcpy: New file.
2192         * modules/unistr/u16-stpcpy: New file.
2193         * modules/unistr/u32-stpcpy: New file.
2194         * lib/unistr/u8-stpcpy.c: New file.
2195         * lib/unistr/u16-stpcpy.c: New file.
2196         * lib/unistr/u32-stpcpy.c: New file.
2197         * lib/unistr/u-stpcpy.h: New file.
2198
2199         * modules/unistr/u8-stpncpy: New file.
2200         * modules/unistr/u16-stpncpy: New file.
2201         * modules/unistr/u32-stpncpy: New file.
2202         * lib/unistr/u8-stpncpy.c: New file.
2203         * lib/unistr/u16-stpncpy.c: New file.
2204         * lib/unistr/u32-stpncpy.c: New file.
2205         * lib/unistr/u-stpncpy.h: New file.
2206
2207         * modules/unistr/u8-strcat: New file.
2208         * modules/unistr/u16-strcat: New file.
2209         * modules/unistr/u32-strcat: New file.
2210         * lib/unistr/u8-strcat.c: New file.
2211         * lib/unistr/u16-strcat.c: New file.
2212         * lib/unistr/u32-strcat.c: New file.
2213         * lib/unistr/u-strcat.h: New file.
2214
2215         * modules/unistr/u8-strchr: New file.
2216         * modules/unistr/u16-strchr: New file.
2217         * modules/unistr/u32-strchr: New file.
2218         * lib/unistr/u8-strchr.c: New file.
2219         * lib/unistr/u16-strchr.c: New file.
2220         * lib/unistr/u32-strchr.c: New file.
2221
2222         * modules/unistr/u8-strcmp: New file.
2223         * modules/unistr/u16-strcmp: New file.
2224         * modules/unistr/u32-strcmp: New file.
2225         * lib/unistr/u8-strcmp.c: New file.
2226         * lib/unistr/u16-strcmp.c: New file.
2227         * lib/unistr/u32-strcmp.c: New file.
2228
2229         * modules/unistr/u8-strcpy: New file.
2230         * modules/unistr/u16-strcpy: New file.
2231         * modules/unistr/u32-strcpy: New file.
2232         * lib/unistr/u8-strcpy.c: New file.
2233         * lib/unistr/u16-strcpy.c: New file.
2234         * lib/unistr/u32-strcpy.c: New file.
2235         * lib/unistr/u-strcpy.h: New file.
2236
2237         * modules/unistr/u8-strcspn: New file.
2238         * modules/unistr/u16-strcspn: New file.
2239         * modules/unistr/u32-strcspn: New file.
2240         * lib/unistr/u8-strcspn.c: New file.
2241         * lib/unistr/u16-strcspn.c: New file.
2242         * lib/unistr/u32-strcspn.c: New file.
2243         * lib/unistr/u-strcspn.h: New file.
2244
2245         * modules/unistr/u8-strdup: New file.
2246         * modules/unistr/u16-strdup: New file.
2247         * modules/unistr/u32-strdup: New file.
2248         * lib/unistr/u8-strdup.c: New file.
2249         * lib/unistr/u16-strdup.c: New file.
2250         * lib/unistr/u32-strdup.c: New file.
2251         * lib/unistr/u-strdup.h: New file.
2252
2253         * modules/unistr/u8-strlen: New file.
2254         * modules/unistr/u16-strlen: New file.
2255         * modules/unistr/u32-strlen: New file.
2256         * lib/unistr/u8-strlen.c: New file.
2257         * lib/unistr/u16-strlen.c: New file.
2258         * lib/unistr/u32-strlen.c: New file.
2259         * lib/unistr/u-strlen.h: New file.
2260
2261         * modules/unistr/u8-strmblen: New file.
2262         * modules/unistr/u16-strmblen: New file.
2263         * modules/unistr/u32-strmblen: New file.
2264         * lib/unistr/u8-strmblen.c: New file.
2265         * lib/unistr/u16-strmblen.c: New file.
2266         * lib/unistr/u32-strmblen.c: New file.
2267
2268         * modules/unistr/u8-strmbtouc: New file.
2269         * modules/unistr/u16-strmbtouc: New file.
2270         * modules/unistr/u32-strmbtouc: New file.
2271         * lib/unistr/u8-strmbtouc.c: New file.
2272         * lib/unistr/u16-strmbtouc.c: New file.
2273         * lib/unistr/u32-strmbtouc.c: New file.
2274
2275         * modules/unistr/u8-strncat: New file.
2276         * modules/unistr/u16-strncat: New file.
2277         * modules/unistr/u32-strncat: New file.
2278         * lib/unistr/u8-strncat.c: New file.
2279         * lib/unistr/u16-strncat.c: New file.
2280         * lib/unistr/u32-strncat.c: New file.
2281         * lib/unistr/u-strncat.h: New file.
2282
2283         * modules/unistr/u8-strncmp: New file.
2284         * modules/unistr/u16-strncmp: New file.
2285         * modules/unistr/u32-strncmp: New file.
2286         * lib/unistr/u8-strncmp.c: New file.
2287         * lib/unistr/u16-strncmp.c: New file.
2288         * lib/unistr/u32-strncmp.c: New file.
2289
2290         * modules/unistr/u8-strncpy: New file.
2291         * modules/unistr/u16-strncpy: New file.
2292         * modules/unistr/u32-strncpy: New file.
2293         * lib/unistr/u8-strncpy.c: New file.
2294         * lib/unistr/u16-strncpy.c: New file.
2295         * lib/unistr/u32-strncpy.c: New file.
2296         * lib/unistr/u-strncpy.h: New file.
2297
2298         * modules/unistr/u8-strnlen: New file.
2299         * modules/unistr/u16-strnlen: New file.
2300         * modules/unistr/u32-strnlen: New file.
2301         * lib/unistr/u8-strnlen.c: New file.
2302         * lib/unistr/u16-strnlen.c: New file.
2303         * lib/unistr/u32-strnlen.c: New file.
2304         * lib/unistr/u-strnlen.h: New file.
2305
2306         * modules/unistr/u8-strpbrk: New file.
2307         * modules/unistr/u16-strpbrk: New file.
2308         * modules/unistr/u32-strpbrk: New file.
2309         * lib/unistr/u8-strpbrk.c: New file.
2310         * lib/unistr/u16-strpbrk.c: New file.
2311         * lib/unistr/u32-strpbrk.c: New file.
2312         * lib/unistr/u-strpbrk.h: New file.
2313
2314         * modules/unistr/u8-strrchr: New file.
2315         * modules/unistr/u16-strrchr: New file.
2316         * modules/unistr/u32-strrchr: New file.
2317         * lib/unistr/u8-strrchr.c: New file.
2318         * lib/unistr/u16-strrchr.c: New file.
2319         * lib/unistr/u32-strrchr.c: New file.
2320
2321         * modules/unistr/u8-strspn: New file.
2322         * modules/unistr/u16-strspn: New file.
2323         * modules/unistr/u32-strspn: New file.
2324         * lib/unistr/u8-strspn.c: New file.
2325         * lib/unistr/u16-strspn.c: New file.
2326         * lib/unistr/u32-strspn.c: New file.
2327         * lib/unistr/u-strspn.h: New file.
2328
2329         * modules/unistr/u8-strstr: New file.
2330         * modules/unistr/u16-strstr: New file.
2331         * modules/unistr/u32-strstr: New file.
2332         * lib/unistr/u8-strstr.c: New file.
2333         * lib/unistr/u16-strstr.c: New file.
2334         * lib/unistr/u32-strstr.c: New file.
2335         * lib/unistr/u-strstr.h: New file.
2336
2337         * modules/unistr/u8-strtok: New file.
2338         * modules/unistr/u16-strtok: New file.
2339         * modules/unistr/u32-strtok: New file.
2340         * lib/unistr/u8-strtok.c: New file.
2341         * lib/unistr/u16-strtok.c: New file.
2342         * lib/unistr/u32-strtok.c: New file.
2343         * lib/unistr/u-strtok.h: New file.
2344
2345         * modules/unistr/u8-uctomb: New file.
2346         * modules/unistr/u16-uctomb: New file.
2347         * modules/unistr/u32-uctomb: New file.
2348         * lib/unistr/u8-uctomb.c: New file.
2349         * lib/unistr/u16-uctomb.c: New file.
2350         * lib/unistr/u32-uctomb.c: New file.
2351
2352         * MODULES.html.sh (Unicode string functions): Add the new modules.
2353
2354 2007-01-08  Bruno Haible  <bruno@clisp.org>
2355
2356         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2357         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2358         subdirectories.
2359
2360 2007-01-08  Karl Berry  <karl@gnu.org>
2361
2362         * doc/error.texi: mention that main() fns must set program_name
2363         when progname is used.
2364
2365 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2366
2367         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2368         WCTYPE_H is empty, for the benefit of builds from non-distclean
2369         directories.  Problem reported by Eric Blake in
2370         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2371
2372 2007-01-08  Bruno Haible  <bruno@clisp.org>
2373
2374         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2375         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2376         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2377         PROVIDE_CANONICALIZE_FILENAME_MODE.
2378         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2379
2380 2007-01-08  Bruno Haible  <bruno@clisp.org>
2381
2382         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2383         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2384         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2385         * lib/fts.c: Likewise.
2386         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2387
2388 2006-12-25  Bruno Haible  <bruno@clisp.org>
2389
2390         * modules/utf8-ucs4-safe: New file.
2391         * lib/utf8-ucs4-safe.h: New file.
2392         * lib/unistr/utf8-ucs4-safe.c: New file.
2393
2394         * modules/utf16-ucs4-safe: New file.
2395         * lib/utf16-ucs4-safe.h: New file.
2396         * lib/unistr/utf16-ucs4-safe.c: New file.
2397
2398         * MODULES.html.sh (Unicode string functions): Add the new modules.
2399
2400 2007-01-08  Bruno Haible  <bruno@clisp.org>
2401
2402         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2403         (Depends-on): Add unitypes.
2404         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2405         (u8_mbtouc_aux): Move out to separate file.
2406         (u8_mbtouc): Use ucs4_t, uint8_t types.
2407         * lib/unistr/utf8-ucs4.c: New file.
2408
2409         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2410         (Depends-on): Add unitypes.
2411         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2412         (u16_mbtouc_aux): Move out to separate file.
2413         (u16_mbtouc): Use ucs4_t, uint16_t types.
2414         * lib/unistr/utf16-ucs4.c: New file.
2415
2416         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2417         (Depends-on): Add unitypes.
2418         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2419         (u8_uctomb_aux): Move out to separate file.
2420         (u8_uctomb): Use ucs4_t, uint8_t types.
2421         * lib/unistr/ucs4-utf8.c: New file.
2422
2423         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2424         (Depends-on): Add unitypes.
2425         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2426         (u16_uctomb_aux): Move out to separate file.
2427         (u16_uctomb): Use ucs4_t, uint16_t types.
2428         * lib/unistr/ucs4-utf16.c: New file.
2429
2430 2006-12-25  Bruno Haible  <bruno@clisp.org>
2431
2432         * modules/unitypes: New file.
2433         * lib/unitypes.h: New file.
2434         * MODULES.html.sh (func_all_modules): New section "Unicode string
2435         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2436         this section. Add unitypes.
2437
2438 2007-01-08  Bruno Haible  <bruno@clisp.org>
2439
2440         Avoid variable names that conflict with those from libtool.
2441         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2442         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2443         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2444         library_names_spec to acl_library_names_spec, hardcode_* to
2445         acl_hardcode_*.
2446         Reported by Ralf Wildenhues.
2447
2448 2007-01-08  Bruno Haible  <bruno@clisp.org>
2449
2450         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2451         definition.
2452         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2453         definition.
2454         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2455         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2456         definition.
2457         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2458         definition.
2459         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2460         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2461         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2462         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2463         definition.
2464         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2465         definition.
2466         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2467         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2468         GC_USE_<algorithm>.
2469         * lib/gc-libgcrypt.c: Likewise.
2470         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2471         * modules/gc-arctwo (configure.ac): Likewise.
2472         * modules/gc-des (configure.ac): Likewise.
2473         * modules/gc-hmac-md5 (configure.ac): Likewise.
2474         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2475         * modules/gc-md2 (configure.ac): Likewise.
2476         * modules/gc-md4 (configure.ac): Likewise.
2477         * modules/gc-md5 (configure.ac): Likewise.
2478         * modules/gc-random (configure.ac): Likewise.
2479         * modules/gc-rijndael (configure.ac): Likewise.
2480         * modules/gc-sha1 (configure.ac): Likewise.
2481
2482 2007-01-08  Bruno Haible  <bruno@clisp.org>
2483
2484         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2485         macro definition.
2486         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2487         definition.
2488         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2489         definition.
2490         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2491         * modules/fcntl-safer (configure.ac): Likewise.
2492         * modules/fopen-safer (configure.ac): Likewise.
2493         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2494         GNULIB_FWRITEERROR macro definition.
2495
2496 2007-01-08  Bruno Haible  <bruno@clisp.org>
2497
2498         * m4/gnulib-common.m4: New file.
2499         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2500         (func_get_filelist): Add m4/gnulib-common.m4.
2501
2502 2007-01-08  Bruno Haible  <bruno@clisp.org>
2503
2504         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2505         command.
2506
2507 2007-01-08  Jim Meyering  <jim@meyering.net>
2508
2509         Use a more robust test for a "can't happen" condition.
2510         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2511         narrowed the st_size value.  Presuming the "can't happen" condition
2512         is true, that narrowing could conceivably convert an invalid st_size
2513         value into a valid one.  Instead, use a change based on Matthew
2514         Woehlke's original patch.
2515
2516         Slight readability improvement: use an assert-like macro
2517         in place of literal "abort ()" uses.
2518         * lib/fts.c (fts_assert): Define.
2519         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2520         Use this macro instead of a bare 'abort'.
2521
2522 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2523
2524         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2525         simply work around them.
2526         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2527         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2528         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2529         Don't bother to define as macros, since the standard doesn't require it.
2530         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2531         longer worry about IRIX 5.3.
2532         (HAVE_WCTYPE_CTMP_BUG): Remove.
2533
2534 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2535
2536         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2537         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2538         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2539         Problems reported by Georg Schwarz for IRIX 5.3.
2540
2541         * gnulib-tool (autoconf_minversion): Take the maximum version number
2542         found, not the minimum.  Problem reported by James Youngman.
2543
2544 2007-01-03  Karl Berry  <karl@gnu.org>
2545
2546         * doc/error.texi: new file, explaining interaction with progname.
2547         * doc/gnulib.texi: include it.  Update copyright.
2548
2549 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2550
2551         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2552         AC_CANONICAL_HOST, to improve autobuild outputs.
2553
2554 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2555             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2556
2557         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2558         sockets, server sockets, and other file descriptors.  Count errors
2559         to compute the return value.  Reorder the code a bit to be easier
2560         to follow.  Don't set event bits that were not requested (except
2561         POLLERR and POLLHUP).
2562
2563 2007-01-01  Bruno Haible  <bruno@clisp.org>
2564
2565         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2566
2567 2007-01-03  Jim Meyering  <jim@meyering.net>
2568
2569         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2570
2571 2007-01-02  Bruno Haible  <bruno@clisp.org>
2572
2573         * modules/settime (Include): Require timespec.h.
2574         * modules/nanosleep (Include): Likewise.
2575
2576 2007-01-01  Bruno Haible  <bruno@clisp.org>
2577
2578         * gnulib-tool (func_emit_copyright_notice): Bump year.
2579         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2580
2581 2007-01-01  Bruno Haible  <bruno@clisp.org>
2582
2583         Improve support for OpenBSD.
2584         * build-aux/config.rpath (libname_spec): Export.
2585         (library_names_spec): New variable. Export.
2586         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2587         library_names_spec from the config.rpath output. Locate shared library
2588         through the name pattern in library_names_spec.
2589
2590 2007-01-01  Eric Blake  <ebb9@byu.net>
2591
2592         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2593
2594 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2595
2596         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2597         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2598         assume the C locale, and avoid an "eval" that could cause trouble.
2599         Problem with SORT reported by Bob Proulx.
2600
2601         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2602         Define.  Trivial patch from Henning Nielsen Lund, originally
2603         sent to bug-grep@gnu.org today.
2604
2605 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2606
2607         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2608         struct stat.  Problem reported by Henning Nielsen Lund.
2609         * lib/acl.c: Include acl.h first, to check interface.  Don't
2610         bother to include sys/types.h and sys/stat.h again.
2611
2612 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2613
2614         Import the following change from libc; problem reported by
2615         Sven Verdoolaege.
2616
2617         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2618
2619         [BZ #1373]
2620         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2621
2622 2006-12-28  Jim Meyering  <jim@meyering.net>
2623
2624         * build-aux/announce-gen: Do not assume that the package
2625         builds any of tar.gz, tar.bz2, and .xdelta files.
2626         Suggestion from Simon Josefsson.
2627
2628 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2629
2630         * modules/announce-gen: New file.
2631
2632 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2633
2634         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2635         handles its gotchas now.
2636         * lib/mbswidth.c: Likewise.
2637         * lib/wcwidth.h: Likewise.
2638         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2639         and iswcntrl; the wctype module does this stuff now.
2640         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2641         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2642         * modules/mbchar (Depends-on): Add wctype.
2643         * modules/mbswidth (Depends-on): Likewise.
2644         * modules/wcwidth (Depends-on): Likewise.
2645
2646 2006-12-27  Eric Blake  <ebb9@byu.net>
2647
2648         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2649         module uses more than what <wctype.h> is required to provide.
2650
2651 2006-12-26  Eric Blake  <ebb9@byu.net>
2652
2653         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2654
2655 2006-12-26  Eric Blake  <ebb9@byu.net>
2656
2657         * modules/absolute-header: New module.
2658         * modules/fcntl (Depends-on): Depend on it.
2659         * modules/inttypes (Depends-on): Likewise.
2660         * modules/stdint (Depends-on): Likewise.
2661         * modules/sys_stat (Depends-on): Likewise.
2662         * modules/wctype (Depends-on): Likewise.
2663         * MODULES.html.sh (Support for building libraries and
2664         executables): Document it.
2665
2666 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2667
2668         * gnulib-tool (SED): Remove, undoing previous change.
2669         The problem was that it broke coreutils on Solaris, because
2670         "sed --posix" leaked into a makefile.
2671         (sed): New alias, if 'alias' and GNU sed.
2672
2673 2006-12-24  Jim Meyering  <jim@meyering.net>
2674
2675         Work around an fchownat bug in glibc-2.4:
2676         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2677         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2678         in spite of the -P option.
2679         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2680         New macros.
2681         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2682         * modules/openat (Files): Add lib/fchownat.c.
2683         * lib/openat.c (fchownat): Don't define here.  Move to...
2684         * lib/fchownat.c: ...this new file.
2685
2686 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2687
2688         Fix bug reported by Bruno Haible in
2689         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2690         where quotearg.c didn't compile on Mac OS X 10.2 because it
2691         lacks <wchar.h> and wint_t.
2692         * lib/wctype_.h (__wctype_wint_t): New type.
2693         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2694         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2695         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2696         Arg is now of type __wctype_wint_t, not wint_t.
2697         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2698         substitute HAVE_WINT_T.
2699         * modules/wctype (Files): Add m4/wint_t.m4.
2700         (wctype.h): Substitute HAVE_WINT_T.
2701
2702 2006-12-23  Bruno Haible  <bruno@clisp.org>
2703
2704         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2705
2706 2006-12-23  Bruno Haible  <bruno@clisp.org>
2707
2708         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2709         S_ISLNK.
2710         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2711         mingw.
2712
2713 2006-12-22  Bruno Haible  <bruno@clisp.org>
2714
2715         * lib/copy-file.c: Include acl.h.
2716         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2717         Close the file descriptors only after being done with copy_acl.
2718         * modules/copy-file (Depends-on): Add acl.
2719
2720 2006-12-22  Bruno Haible  <bruno@clisp.org>
2721
2722         * gnulib-tool (SED): New variable.
2723         Use $SED instead of sed everywhere.
2724
2725 2006-12-22  Bruno Haible  <bruno@clisp.org>
2726
2727         * modules/no-c++: New file.
2728         * m4/no-c++.m4: New file.
2729         * MODULES.html.sh (Support for building libraries and executables):
2730         Add no-c++.
2731
2732 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2733
2734         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2735         Include <limits.h>, and use its INT_MAX to rewrite the
2736         j loop so that it does not overflow 'int'.  Problem reported by
2737         Ralf Wildenhues in
2738         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2739         Play it safe by shifting left by 1 rather than multiplying by 2,
2740         as GCC is less likely to optimize this away when the value
2741         is signed (when it assumes overflow leads to undefined behavior).
2742         Also, don't assume time_t uses two's complement.
2743
2744 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2745
2746         * MODULES.html.sh: New module wctype.
2747         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2748         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2749         <wctype.h>, since the new wctype module should fix this.
2750         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2751         the wctype module should arrange for it.
2752         * lib/regex_internal.h: Likewise.
2753         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2754         since the wctype module should handle this now.
2755         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2756         * modules/fnmatch (Depends-on): Add wctype.
2757         * modules/quotearg (Depends-on): Likewise.
2758         * modules/regex (Depends-on): Likewise.
2759
2760 2006-12-19  Bruno Haible  <bruno@clisp.org>
2761
2762         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2763         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2764
2765 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2766
2767         * modules/savewd (Depends-on): Fix dependency on fcntl.
2768
2769 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2770
2771         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2772         conforms to C99, rather than relying on the user's environment
2773         setting of STDINT_H.
2774
2775 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2776         and Eric Blake  <ebb9@byu.net>
2777
2778         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2779         This is more consistent with the other defines here.
2780         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2781         Port to z/OS.  Problem reported by Paul Gilmartin.
2782         Change local vars to use gl_ prefix rather than ac_.
2783         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2784         with other defines.
2785         * modules/double-slash-root: New module.
2786         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2787         (Depends-on): Add double-slash-root.
2788         * MODULES.html.sh (File system functions): Mention new module.
2789
2790 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2791
2792         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2793         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2794         This is for the benefit of gzip, which doesn't do i18n.
2795
2796 2006-12-12  Jim Meyering  <jim@meyering.net>
2797
2798         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2799         Reported by Andreas Schwab <schwab@suse.de>.
2800
2801 2006-12-12  Bruno Haible  <bruno@clisp.org>
2802
2803         Merge these changes.
2804         2006-09-05  Bruno Haible  <bruno@clisp.org>
2805         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2806         iconv_alloc succeeded.
2807         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2808         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2809         test for " && dest " at the end - dest is always != NULL there. Call
2810         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2811         with 2xNULL arguments, also to flush the state storage. Handle the
2812         IRIX iconv behaviour. Realloc the final result, to throw away unused
2813         memory.
2814
2815 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2816
2817         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2818         and fchmodat unconditionally, since glibc 2.4 has them.
2819         Problem reported by Arkadiusz Miskiewicz.
2820
2821 2006-12-10  Bruno Haible  <bruno@clisp.org>
2822
2823         * gnulib-tool (func_import): Show the include files only for those
2824         modules that are copied and specified.
2825         Reported by Karl Berry.
2826
2827 2006-12-08  Jim Meyering  <jim@meyering.net>
2828
2829         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2830         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2831
2832         * build-aux/announce-gen: Add two new options, both optional:
2833         --bootstrap-tools=TOOL_LIST
2834               a comma-separated list of tools, e.g.,
2835               autoconf,automake,bison,gnulib
2836         --gnulib-snapshot-date=DATE
2837               if gnulib is in the bootstrap tool list,
2838               then report this as the snapshot date.
2839               If not specified, use the current date/time.
2840               If you specify a date here, be sure it's UTC.
2841
2842 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2843
2844         * tests/test-argp-2.sh: Fix test to match actual output.
2845         (func_compare): Fix sed script to be portable.
2846
2847 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2848
2849         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2850         workaround for this case.  It is not autoconfigured now; offhand
2851         it's hard to see how to autoconfigure it.
2852
2853 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2854
2855         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2856         a directory that is about to be chowned.  Such a directory's
2857         initial file permissions should permit the owner only and this
2858         should not be changed until after the chown, since the group and
2859         other bits would be incorrect if they granted permission before
2860         the chown.
2861
2862         Fix porting problem for iswctype reported by Georg Schwarz in:
2863         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2864         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2865         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2866         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2867         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2868
2869 2006-12-03  Jim Meyering  <jim@meyering.net>
2870
2871         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2872         p->fts_statp may not yet be defined.
2873         (fts_read): Instead, set it in the caller, once p->fts_statp is
2874         sure to be defined, and corresponds to a top-level directory.
2875         This bug made du -x fail.  Here's the coreutils test case:
2876         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2877         Reported by Mike Frysinger.
2878
2879 2006-12-01  Jim Meyering  <jim@meyering.net>
2880
2881         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2882         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2883         Reported by Simon Josefsson.
2884
2885 2006-11-30  Jim Meyering  <jim@meyering.net>
2886
2887         * m4/warning.m4: Use the all-permissive copyright notice
2888         recommended by RMS (rather than LGPL).
2889         * m4/vararrays.m4: Likewise.
2890         * m4/flexmember.m4: Likewise.
2891
2892 2006-11-29  Bruno Haible  <bruno@clisp.org>
2893
2894         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2895         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2896         using +=.
2897         Reported by Simon Josefsson <simon@josefsson.org>.
2898
2899 2006-11-28  James Youngman <jay@gnu.org>
2900
2901         * README: Advise users that they might find the bug-gnulib@gnu.org
2902         and autotools-announce@gnu.org mailing lists useful.
2903
2904 2006-11-28  Bruno Haible  <bruno@clisp.org>
2905
2906         * m4/ptrdiff_max.m4: Remove file.
2907
2908 2006-11-21  Bruno Haible  <bruno@clisp.org>
2909
2910         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2911         _AC_COMPUTE_INT.
2912         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2913         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2914         _AC_COMPUTE_INT.
2915         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2916         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2917         _AC_COMPUTE_INT.
2918         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2919
2920 2006-11-28  Jim Meyering  <jim@meyering.net>
2921
2922         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2923         warning from "gcc -Wshadow" about shadowing the builtin.
2924
2925 2006-11-27  Bruno Haible  <bruno@clisp.org>
2926
2927         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2928         _AC_COMPUTE_INT.
2929         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2930
2931 2006-11-27  Bruno Haible  <bruno@clisp.org>
2932             Paul Eggert  <eggert@cs.ucla.edu>
2933
2934         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2935
2936 2006-11-26  Bruno Haible  <bruno@clisp.org>
2937
2938         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2939         noinst_LTLIBRARIES.
2940
2941 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2942             Bruno Haible  <bruno@clisp.org>
2943
2944         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2945         if compiling with "gcc -ansi".
2946
2947 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2948
2949         Fix some incompatibilities with gcc -ansi -pedantic.
2950         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2951         if compiling pedantically with GCC, unless it's C99 or later.
2952         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2953         it mishandles gcc -ansi -pedantic as well.
2954         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2955         if gcc -pedantic.
2956         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2957         initializers for struct if -pedantic, unless it's C99 or later.
2958
2959 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2960
2961         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2962         Don't close an fd more than once. Identical atimes indicate
2963         success, not failure.
2964
2965 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2966
2967         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2968
2969 2006-11-23  Jim Meyering  <jim@meyering.net>
2970
2971         * build-aux/announce-gen: New file.  From coreutils.
2972
2973 2006-11-22  Jim Meyering  <jim@meyering.net>
2974
2975         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2976         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2977         (fts_read): Use a temporary to narrow the overused st_size member
2978         before using it in a switch statement.  Reported by Matthew Woehlke.
2979
2980         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2981         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2982
2983 2006-11-20  Bruno Haible  <bruno@clisp.org>
2984
2985         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2986         changequote instead of pairs of brackets.
2987         Reported by Andreas Schwab <schwab@suse.de>.
2988
2989 2006-11-21  Jim Meyering  <jim@meyering.net>
2990
2991         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2992         so as to remain compatible with older compilers.
2993         Patch from Michael Deutschmann.
2994
2995 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2996
2997         * MODULES.html.sh (File system functions): Add openat.
2998
2999         * lib/openat.h (rpl_fstatat): New macro, if
3000         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3001         (fstatat): Define to rpl_fstatat under the same conditions,
3002         unless COMPILING_FSTATAT.
3003         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3004         seems to have the bug.
3005         * lib/fstatat.c: New file.
3006         * modules/openat (Files): Add it.
3007
3008 2006-11-20  Bruno Haible  <bruno@clisp.org>
3009
3010         * Makefile: New file.
3011
3012 2006-11-20  Jim Meyering  <jim@meyering.net>
3013
3014         The beginnings of syntax-related checks for gnulib.
3015         * lib/Makefile: New file.
3016         * lib/t-idcache: New script.  Ensure that the two halves of
3017         idcache.c stay in sync.
3018
3019         * lib/idcache.c: Adjust comments in user- and group- portions to
3020         be more accurate, and to be consistent with one another.
3021
3022 2006-11-20  Jim Meyering  <jim@meyering.net>
3023
3024         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3025         continue using the flexible array member (thus, this module performs
3026         half as many malloc calls), with the addition that...
3027         (getgroup, getuser): Consistently record a non-match via an empty
3028         "name" string, and map an empty string match to a NULL return value.
3029         * modules/idcache (Depends-on): Re-add flexmember.
3030
3031         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3032         (getuidbyname, getgroup, getgidbyname): Likewise.
3033
3034         Use cleaner syntax: NULL rather than 0.
3035         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3036
3037 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3038
3039         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3040         It mishandled the case where the group was missing.
3041         Problem reported by Greg Schafer.
3042         * modules/idcache: Likewise.
3043
3044 2006-11-18  Jim Meyering  <jim@meyering.net>
3045
3046         * check-module (%exempt_header): Add exception for some
3047         conditionally-included headers.
3048
3049         * modules/i-ring (Depends-on): Add verify.
3050         (License): Change to LGPL.
3051
3052 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3053
3054         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3055         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3056         and inttostr.h.  Use snprintf rather than uinttostr, so that
3057         LGPLed code doesn't depend on GPLed.
3058
3059 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3060
3061         * modules/inline (License): Change from GPL to LGPL.
3062
3063 2006-11-17  Jim Meyering  <jim@meyering.net>
3064
3065         * modules/d-type (License): Switch to LGPL.
3066
3067 2006-11-15  Bruno Haible  <bruno@clisp.org>
3068
3069         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3070
3071 2006-11-15  Eric Blake  <ebb9@byu.net>
3072
3073         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3074         the module dependency.
3075
3076 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3077             Bruno Haible  <bruno@clisp.org>
3078
3079         * gnulib-tool (func_create_testdir): Add license consistency check.
3080
3081 2006-11-15  Eric Blake  <ebb9@byu.net>
3082
3083         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3084         random "(cached)" in configure output.
3085
3086 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3087
3088         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3089         test for conforming inttypes.h is both announced and cached.
3090
3091         * MODULES.html.sh (seen_modules, seen_files): New variables.
3092         (func_module): Rewrite to use a few less gnulib-tool and sed
3093         invocations.  Avoid a couple of quadratic algorithms for ...
3094         (missed_modules, missed_files): ... these, with ...
3095         (func_append, func_tmpdir): ... these new functions, from
3096         gnulib-tool.  Analogously, install traps for cleanup.
3097
3098         * tests/test-gc.c (main): Remove unused variables.
3099         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3100
3101 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3102
3103         * modules/inttostr (License): Change to LGPL.
3104
3105 2006-11-14  Eric Blake  <ebb9@byu.net>
3106
3107         * modules/tempname (License): Change to LGPL.
3108
3109 2006-11-14  Eric Blake  <ebb9@byu.net>
3110
3111         * doc/functions.texi (Function Portability): *printf functions on
3112         Cygwin now understand all POSIX size specifiers.
3113
3114 2006-11-14  Bruno Haible  <bruno@clisp.org>
3115
3116         * modules/c-ctype (License): Change to LGPL.
3117
3118 2006-11-12  Bruno Haible  <bruno@clisp.org>
3119
3120         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3121         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3122         for GNOME libraries, for which the include files are installed in
3123         subdirectories of $prefix/include.
3124
3125 2006-11-12  Bruno Haible  <bruno@clisp.org>
3126
3127         * m4/lib-link.m4: Require at least autoconf-2.54.
3128         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3129         name to underscores for the --with option.
3130
3131 2006-11-13  Bruno Haible  <bruno@clisp.org>
3132
3133         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3134         the tests directory.
3135         Reported by Ralf Wildenhues.
3136
3137 2006-11-13  Bruno Haible  <bruno@clisp.org>
3138
3139         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3140         (func_emit_initmacro_end): Undo the override here.
3141         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3142         Works around the famous automake error in coreutils.
3143
3144 2006-11-13  Eric Blake  <ebb9@byu.net>
3145
3146         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3147         element, not its node.
3148
3149 2006-11-12  Bruno Haible  <bruno@clisp.org>
3150
3151         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3152         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3153
3154 2006-11-12  Bruno Haible  <bruno@clisp.org>
3155
3156         * gnulib-tool: New option --local-symlink.
3157         (func_usage): Document it.
3158         (lsymbolic): New variable.
3159         (func_import, func_create_testdir): If --symlink was not specified,
3160         test whether --local-symlink was specified and the file comes from
3161         the local_gnulib_dir.
3162
3163 2006-11-12  Bruno Haible  <bruno@clisp.org>
3164
3165         * gnulib-tool (func_ln): New function.
3166         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3167
3168 2006-11-12  Bruno Haible  <bruno@clisp.org>
3169
3170         Finish support for source files in subdirectories.
3171         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3172         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3173         AUTOMAKE_OPTIONS.
3174         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3175
3176 2006-11-12  Bruno Haible  <bruno@clisp.org>
3177
3178         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3179         EXTRA_lib_SOURCES augmentation.
3180         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3181
3182 2006-11-12  Jim Meyering  <jim@meyering.net>
3183
3184         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3185         file descriptors.  This also averts a failure on systems with
3186         native openat support when a traversed directory lacks "x" access.
3187         * lib/fts_.h: Include "i-ring.h"
3188         (struct FTS) [fts_fd_ring]: New member.
3189         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3190         (FCHDIR): Add parentheses.
3191         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3192         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3193         When descending, rather than simply closing the previous
3194         fts_cwd_fd value, push that file descriptor onto the ring.
3195         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3196         (fts_open): Initialize the new fd_ring member.
3197         (fts_close): Clear the ring.
3198         (fts_safe_changedir): When possible, use our new fd_ring to skip
3199         the diropen and fstat and dev/ino comparison that would normally
3200         accompany a virtual `chdir ("..")'.
3201
3202         * modules/fts (Depends-on): Add i-ring.
3203         * modules/i-ring: New module.
3204         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3205         * m4/i-ring.m4: New file.
3206
3207 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3208
3209         * gnulib-tool (func_create_testdir): Fix replacement of
3210         `build-aux' in configure.ac.  Run autotools in gltests
3211         subdirectory.
3212         (func_create_testdir, func_create_megatestdir, test): There is
3213         no need for '--force' in most autotool invocations in a new
3214         tree.  Actually fail the whole test if any of the tools, or the
3215         configure or make stages fail.
3216
3217         Sync from Automake.
3218         * build-aux/gnupload: Revert last change.  Add pointer to upload
3219         instructions of the GNU Maintenance Instructions.
3220         Suggestion by Karl Berry.
3221
3222 2006-11-10  Jim Meyering  <jim@meyering.net>
3223
3224         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3225
3226 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3227
3228         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3229         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3230         (bind_textdomain_codeset) [! ENABLE_NLS]:
3231         Evaluate all the arguments.  That way, callers get compatible behavior
3232         if the arguments have side effects.  Also, it avoids some GCC
3233         diagnostics in some cases; Joel E. Denny reported problems when Bison
3234         was configured with --enable-gcc-warnigs.
3235
3236 2006-11-10  Jim Meyering  <jim@meyering.net>
3237
3238         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3239         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3240         account.
3241
3242 2006-11-10  Jim Meyering  <jim@meyering.net>
3243
3244         * modules/inline: New file/module.
3245         * modules/xalloc (Files): Remove m4/inline.m4.
3246         (Depends-on): Add inline, instead.
3247         * modules/oset: Likewise.
3248         * modules/list: Likewise.
3249
3250 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3251
3252         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3253         Problem reported by Matthew Woehlke.
3254
3255 2006-11-09  Bruno Haible  <bruno@clisp.org>
3256
3257         * lib/tempname.c (gen_tempname): Remove variant that invokes
3258         __gen_tempname.
3259         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3260         __gen_tempname.
3261
3262 2006-11-08  Bruno Haible  <bruno@clisp.org>
3263
3264         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3265         to 'yes' instead of 'cross-compiling'.
3266
3267 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3268
3269         * lib/quotearg.h (quotearg_free): New decl.
3270         * lib/quotearg.c (quotearg_free): New function.
3271         (slot0, nslots, slotvec0, slotvec):
3272         Now file-scope so that quotearg_free can get at them.
3273
3274 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3275
3276         Sync from Automake.
3277         * build-aux/gnupload: Add missing 'gnu' to example URL.
3278         Report by Karl Berry.
3279
3280 2006-11-08  Bruno Haible  <bruno@clisp.org>
3281
3282         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3283         Suggested by Paul Eggert.
3284
3285 2006-11-08  Jim Meyering  <jim@meyering.net>
3286
3287         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3288         It's already included if !_LIBC.
3289         (fts_safe_changedir): Add a comment.
3290
3291 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3292
3293         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3294         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3295         Matthew Woehlke.
3296
3297         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3298         definitions up, to avoid colliding with change below.
3299         (static_inline) [HAVE_INLINE]: New macro.
3300         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3301         Provide extern decls when !HAVE_INLINE.  Do not define unless
3302         static_inline is defined, either by us or by xmalloc.c.  Use
3303         static_inline rather than static inline.
3304         (XCALLOC): Optimize sizeof(T) = 1 case.
3305         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3306
3307 2006-11-07  Bruno Haible  <bruno@clisp.org>
3308
3309         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3310         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3311         AC_C_INLINE.
3312         * modules/xalloc (Files): Add m4/inline.m4.
3313
3314 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3315
3316         * README: Fix typo.
3317         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3318         (Miscellanous Notes): ...from this.
3319
3320 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3321
3322         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3323         Mention that offsetof should be used instead of sizeof.
3324         From Bruno Haible.
3325
3326 2006-11-07  Bruno Haible  <bruno@clisp.org>
3327
3328         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3329
3330 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3331
3332         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3333         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3334         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3335         (gl_tree_add_before, gl_tree_add_after):
3336         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3337         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3338         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3339         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3340         (gl_linked_add_after, gl_linked_add_at): Likewise.
3341         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3342         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3343         (gl_tree_add_before, gl_tree_add_after): Likewise.
3344         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3345         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3346         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3347
3348 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3349
3350         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3351
3352 2006-11-06  Bruno Haible  <bruno@clisp.org>
3353
3354         * m4/inline.m4: New file.
3355         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3356         * modules/list (Files): Add m4/inline.m4.
3357         * modules/oset (Files): Likewise.
3358
3359 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3360
3361         * lib/idcache.c: Include <stddef.h>, for offsetof.
3362         (struct userid.name): Change from char * to a flexible array member.
3363         All uses changed.
3364         * modules/idcache (Depends-on): Add flexmember.
3365
3366         * MODULES.html.sh (Core language properties): New module flexmember.
3367         * modules/flexmember, m4/flexmember.m4: New files.
3368
3369         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3370         inline functions that are identical with the old xnmalloc_inline,
3371         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3372         that we can avoid some unnecessary integer multiplications and
3373         divisions in the common case where the element size is known at
3374         compile time.
3375         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3376         needed.
3377         (xnboundedmalloc): Remove.
3378         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3379         arguments, for consistency with rest of this header.
3380         (xcharalloc): Rewrite using XNMALLOC.
3381         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3382         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3383         versions have been moved to lib/xalloc.h and renamed to be the
3384         non-*_inline versions.
3385         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3386         and xnrealloc functions, since those functions are now inline and
3387         now call us.
3388         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3389         renaming described above.
3390         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3391         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3392         captures the dependency in AC_C_INLINE.
3393
3394         New module canonicalize-lgpl, proposed by Charles Wilson in
3395         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3396         with a few small changes afterwards.
3397         * MODULES.html.sh (File system functions): New module
3398         canonicalize-lgpl.
3399         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3400         and canonicalize_file_name.
3401         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3402         * modules/canonicalize-lgpl: New files.
3403
3404 2006-11-05  Bruno Haible  <bruno@clisp.org>
3405
3406         * gnulib-tool (func_import, func_create_testdir): Create directories
3407         also for files in subdirectories of lib/.
3408
3409 2006-11-05  Bruno Haible  <bruno@clisp.org>
3410
3411         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3412         ANSI C compliant.
3413
3414 2006-11-03  Bruno Haible  <bruno@clisp.org>
3415
3416         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3417         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3418         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3419         (xnboundedmalloc): New inline function.
3420         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3421         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3422         xmalloc.
3423         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3424         xmalloc.
3425         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3426         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3427         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3428         xmalloc.
3429         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3430         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3431         xmalloc.
3432         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3433         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3434         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3435         xmalloc.
3436         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3437         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3438         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3439         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3440         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3441         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3442         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3443
3444 2006-11-03  Bruno Haible  <bruno@clisp.org>
3445
3446         * lib/c-ctype.h [C++]: Define functions without name mangling.
3447         * lib/fwriteerror.h [C++]: Likewise.
3448         * lib/gcd.h [C++]: Likewise.
3449         * lib/linebreak.h [C++]: Likewise.
3450
3451 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3452
3453         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3454         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3455         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3456         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3457         Check for functions and headers just once.
3458         Check for declaration of canonicalize_file_name.
3459         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3460
3461 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3462
3463         * gnulib-tool (func_import): Fix typo in actioncmd.
3464
3465 2006-11-02  Bruno Haible  <bruno@clisp.org>
3466
3467         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3468         newline sequence in the Makefile.am snippet as a space, like "make"
3469         does.
3470         Reported by Roger Persson <perrog@gmail.com>.
3471
3472 2006-11-01  Bruno Haible  <bruno@clisp.org>
3473
3474         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3475         already declared in <string.h>.
3476         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3477
3478 2006-11-01  Bruno Haible  <bruno@clisp.org>
3479
3480         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3481         * lib/strcase.h: Include <string.h>.
3482         (strcasecmp): Define to rpl_strcasecmp here.
3483
3484 2006-11-01  Bruno Haible  <bruno@clisp.org>
3485
3486         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3487
3488 2006-11-01  Eric Blake  <ebb9@byu.net>
3489
3490         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3491
3492         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3493
3494 2006-10-29  Bruno Haible  <bruno@clisp.org>
3495
3496         Make it compile in C++ mode.
3497         * lib/full-write.c (full_rw): Add a cast.
3498
3499 2006-11-01  Bruno Haible  <bruno@clisp.org>
3500
3501         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3502         be POSIX compliant.
3503         Reported by Roger Persson <perrog@gmail.com>.
3504
3505 2006-11-01  Eric Blake  <ebb9@byu.net>
3506
3507         * lib/getopt_.h: Fix comments.
3508
3509 2006-10-31  Eric Blake  <ebb9@byu.net>
3510
3511         * modules/tmpdir (Depends-on): Add sys_stat.
3512         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3513         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3514         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3515         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3516         tempname.
3517
3518 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3519
3520         Avoid some C++ diagnostics reported by Bruno Haible.
3521         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3522         xmalloc.
3523         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3524         (struct slotvec): Move to top level.
3525         (quotearg_n_options): Rewrite to avoid xmalloc.
3526         * lib/xalloc.h (xcharalloc): New function.
3527         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3528         [defined __cplusplus]: Add function template that provides result
3529         type propagation.  This part of the change is from Bruno Haible.
3530
3531 2006-10-29  Bruno Haible  <bruno@clisp.org>
3532
3533         Make it compile in C++ mode.
3534         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3535         * lib/strnlen1.c (strnlen1): Cast memchr result.
3536         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3537         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3538         (create_temp_dir): Rename local variable 'template'.
3539         (compile_csharp_using_sscli): Add cast.
3540         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3541         * lib/findprog.c (find_in_path): Likewise.
3542         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3543         * lib/wait-process.c (register_slave_subprocess): Likewise.
3544
3545 2006-10-22  Bruno Haible  <bruno@clisp.org>
3546
3547         * modules/tsearch: New file.
3548         * lib/tsearch.h: New file.
3549         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3550         * m4/tsearch.m4: New file.
3551         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3552
3553 2006-10-29  Eric Blake  <ebb9@byu.net>
3554
3555         * lib/arcfour.c: Assume config.h.
3556         * lib/arctwo.c: Likewise.
3557         * lib/base64.c: Likewise.
3558         * lib/check-version.c: Likewise.
3559         * lib/crc.c: Likewise.
3560         * lib/des.c: Likewise.
3561         * lib/gc-gnulib.c: Likewise.
3562         * lib/gc-libgcrypt.c: Likewise.
3563         * lib/gc-pbkdf2-sha1.c: Likewise.
3564         * lib/getaddrinfo.c: Likewise.
3565         * lib/getdelim.c: Likewise.
3566         * lib/getline.c: Likewise.
3567         * lib/hmac-md5.c: Likewise.
3568         * lib/hmac-sha1.c: Likewise.
3569         * lib/iconvme.c: Likewise.
3570         * lib/md2.c: Likewise.
3571         * lib/md4.c: Likewise.
3572         * lib/memxor.c: Likewise.
3573         * lib/read-file.c: Likewise.
3574         * lib/readline.c: Likewise.
3575         * lib/rijndael-alg-fst.c: Likewise.
3576         * lib/rijndael-api-fst.c: Likewise.
3577         * lib/xgetdomainname.c: Likewise.
3578
3579 2006-10-28  Eric Blake  <ebb9@byu.net>
3580
3581         * lib/xstrndup.c: Assume config.h.
3582
3583 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3584
3585         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3586         stat-macros.h is now for our own macros, whereas stat_h is for
3587         macros in the <sys/stat.h> name space.
3588         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3589         (STAT_MACROS_H): Remove.
3590         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3591         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3592         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3593         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3594         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3595         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3596         Move these macros to ...
3597         * lib/stat_.h: here.  Don't include stat-macros.h.
3598         * lib/canonicalize.c: Don't include stat-macros.h.
3599         * lib/chown.c: Likewise.
3600         * lib/euidaccess.c: Likewise.
3601         * lib/file-type.c: Likewise.
3602         * lib/filemode.c: Likewise.
3603         * lib/glob.c: Likewise.
3604         * lib/isapipe.c: Likewise.
3605         * lib/lchown.c: Likewise.
3606         * lib/lstat.c: Likewise.
3607         * lib/mkdir-p.c: Likewise.
3608         * lib/rmdir.c: Likewise.
3609         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3610         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3611         unless mkdir isn't declared, to speed up 'configure'.
3612         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3613         would define all the S_* symbols.
3614         * modules/canonicalize (Depends-on):
3615         Depend on sys_stat, not stat-macros.
3616         * modules/chown: Likewise.
3617         * modules/euidaccess: Likewise.
3618         * modules/filemode: Likewise.
3619         * modules/file-type: Likewise.
3620         * modules/glob: Likewise.
3621         * modules/isapipe: Likewise.
3622         * modules/lchown: Likewise.
3623         * modules/lstat: Likewise.
3624         * modules/mkancesdirs: Likewise.
3625         * modules/rmdir: Likewise.
3626         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3627         * modules/modechange: Likewise.
3628         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3629         (configure.ac): Remove gl_STAT_MACROS.
3630         * modules/sys_stat (Depends-on): Remove stat-macros.
3631
3632 2006-10-27  Bruno Haible  <bruno@clisp.org>
3633
3634         * m4/signed.m4: Remove file.
3635         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3636         invocation.
3637         * modules/vasnprintf (Files): Remove m4/signed.m4.
3638
3639 2006-10-27  Bruno Haible  <bruno@clisp.org>
3640
3641         Update to GNU gettext 0.16.
3642         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3643         m4/inttypes-h.m4, m4/signed.m4.
3644         * m4/gettext.m4: Update to GNU gettext 0.16.
3645         * m4/intl.m4: New file, from GNU gettext.
3646         * m4/intldir.m4: New file, from GNU gettext.
3647         * config/srclist.txt: Update
3648
3649 2006-10-27  Eric Blake  <ebb9@byu.net>
3650
3651         * MODULES.html.sh: Document tempname.
3652         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3653         dependencies.
3654         (Files): Move lib/tempname.c...
3655         * modules/tempname: ...to this new module.
3656         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3657         (gl_PREREQ_TEMPNAME): Move...
3658         * m4/tempname.m4: ...to this new file.
3659         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3660         * modules/sys_stat (Depends-on): Add stat-macros.
3661         * lib/stat_.h (includes): Pick up stat macros.
3662         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3663         if stat macros are broken.
3664         * lib/tempname.c (includes): No need to include "stat-macros.h".
3665         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3666         (direxists, __path_search) [!_LIBC]: Don't compile these in
3667         gnulib; the tmpdir module covers that.
3668         * lib/tempname.h: New file.
3669
3670 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3671
3672         * COPYING: Explain how gnulib-tool converts licence headers.
3673         Almost all wording by Eric Blake.
3674
3675 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3676
3677         * lib/mbchar.h (is_basic_table): Make read-only.
3678         * lib/mbchar.c (is_basic_table): Likewise.
3679         Reported by John Darrington.
3680
3681 2006-10-25  Bruno Haible  <bruno@clisp.org>
3682
3683         * lib/progname.h (set_program_name): Undefine before defining.
3684
3685 2006-10-25  Bruno Haible  <bruno@clisp.org>
3686
3687         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3688         false for non-gcc C++ compilers.
3689         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3690
3691 2006-10-24  Bruno Haible  <bruno@clisp.org>
3692
3693         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3694         iconv implementations like Irix iconv.
3695
3696 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3697
3698         * modules/vararrays: New file.
3699         * m4/vararrays.m4: New file, taken from diffutils.
3700         * MODULES.html.sh: New module vararrays.
3701
3702 2006-10-24  Karl Berry  <karl@gnu.org>
3703
3704         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3705         Don't call GNU Unix.
3706
3707 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3708
3709         * users.txt: Add Libtool.
3710
3711         Sync from Libtool:
3712
3713         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3714
3715         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3716         to gnulib's policy of including config.h unconditionally.
3717
3718 2006-10-24  Bruno Haible  <bruno@clisp.org>
3719
3720         * modules/wcwidth (Files): Add m4/wint_t.m4.
3721         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3722         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3723
3724 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3725
3726         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3727         to pacify GCC with some -W flags enabled.  Problem reported by
3728         Bruno Haible.
3729
3730 2006-10-24  Jim Meyering  <jim@meyering.net>
3731
3732         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3733         Reported by Karl Berry.
3734
3735 2006-10-23  Bruno Haible  <bruno@clisp.org>
3736
3737         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3738
3739 2006-10-24  Bruno Haible  <bruno@clisp.org>
3740
3741         * lib/gl_list.h: Use C comment style, not C++ comment style.
3742
3743 2006-10-23  Eric Blake  <ebb9@byu.net>
3744
3745         * lib/getaddrinfo.c (includes): Add missing include.
3746
3747 2006-10-23  Bruno Haible  <bruno@clisp.org>
3748             Paul Eggert  <eggert@cs.ucla.edu>
3749
3750         Ability to rename obstack_free.
3751         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3752         obstack_free.
3753         (obstack_free): Invoke the __obstack_free macro.
3754         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3755
3756 2006-10-23  Bruno Haible  <bruno@clisp.org>
3757             Paul Eggert  <eggert@cs.ucla.edu>
3758
3759         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3760         __argc, __argv from the declaration. (They are defined as macros on
3761         mingw.)
3762
3763 2006-10-22  Bruno Haible  <bruno@clisp.org>
3764
3765         * doc/gnulib-intro.texi: New file.
3766         * doc/gnulib.texi: Include it.
3767
3768 2006-10-21  Bruno Haible  <bruno@clisp.org>
3769
3770         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3771         "Introduction", "Miscellanous Notes", "Particular Modules".
3772
3773 2006-10-21  Bruno Haible  <bruno@clisp.org>
3774
3775         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3776         Change mostlyclean-local rule to avoid sh syntax error from bash
3777         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3778
3779 2006-10-23  Jim Meyering  <jim@meyering.net>
3780
3781         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3782         in place of snprintf.
3783
3784         * modules/inttostr (Files): Add lib/uinttostr.c.
3785         * lib/uinttostr.c (inttostr): New file/function.
3786         * lib/inttostr.h (uinttostr): Declare.
3787         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3788         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3789         Add uinttostr.
3790         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3791
3792 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3793
3794         * lib/canonicalize.c (ELOOP): Define if not already defined.
3795         Problem reported by Bruno Haible in
3796         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3797
3798 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3799
3800         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3801         Problem reported by Perry Smith and Ville Laurikari.
3802
3803         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3804         uses.
3805
3806 2006-10-19  Bruno Haible  <bruno@clisp.org>
3807
3808         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3809         for mingw.
3810
3811 2006-10-19  Bruno Haible  <bruno@clisp.org>
3812
3813         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3814         Needed for mingw.
3815
3816 2006-10-19  Bruno Haible  <bruno@clisp.org>
3817
3818         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3819
3820 2006-10-19  Bruno Haible  <bruno@clisp.org>
3821
3822         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3823         it.
3824
3825 2006-10-19  Bruno Haible  <bruno@clisp.org>
3826
3827         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3828         invocation.
3829
3830 2006-10-19  Bruno Haible  <bruno@clisp.org>
3831
3832         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3833         mountlist by default.
3834
3835 2006-10-16  Bruno Haible  <bruno@clisp.org>
3836
3837         * lib/c-strstr.c: Include c-strstr.h.
3838
3839 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3840
3841         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3842         in a slash.
3843
3844 2006-10-18  Bruno Haible  <bruno@clisp.org>
3845
3846         * lib/lock.h [C++]: Wrap definitions in extern "C".
3847
3848 2006-10-18  Bruno Haible  <bruno@clisp.org>
3849
3850         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3851         gl_LIBOBJS list.
3852
3853 2006-10-18  Bruno Haible  <bruno@clisp.org>
3854
3855         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3856
3857 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3858
3859         * lib/xstrtol.h: Include gettext.h.
3860         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3861         Problem reported by Eric Blake.
3862         * modules/xstrtol (Depends-on): Add gettext-h.
3863
3864 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3865
3866         * lib/strftime.c (advance): New macro.
3867         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3868         incomplete type, so you can't add 0 to it.  Problem and patch
3869         reported by Eelco Dolstra for dietlibc.
3870
3871 2006-10-18  Jim Meyering  <jim@meyering.net>
3872
3873         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3874         type for a local, and rename it: s/up/user_proc/.
3875
3876 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3877
3878         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3879         READ_UTMP_USER_PROCESS.
3880         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3881
3882 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3883
3884         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3885         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3886
3887 2006-10-17  Eric Blake  <ebb9@byu.net>
3888
3889         * lib/sigprocmask.c (sigprocmask): Fix typo.
3890
3891         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3892
3893         * modules/clean-temp (Makefile.am): Don't add to make output...
3894         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3895         config.h.
3896
3897 2006-10-17  Bruno Haible  <bruno@clisp.org>
3898
3899         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3900         differently if DEFAULT_TEXT_DOMAIN is set.
3901
3902 2006-10-16  Bruno Haible  <bruno@clisp.org>
3903
3904         * lib/clean-temp.c: Include fwriteerror.h.
3905
3906 2006-10-16  Bruno Haible  <bruno@clisp.org>
3907
3908         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3909
3910 2006-10-16  Bruno Haible  <bruno@clisp.org>
3911
3912         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3913         * lib/sigprocmask.h: Include <sys/types.h>.
3914         (sigset_t): Use the system's definition if present.
3915
3916 2006-10-17  Eric Blake  <ebb9@byu.net>
3917
3918         * lib/xvasprintf.c (includes): Assume config.h.
3919         * lib/xasprintf.c (includes): Likewise.
3920
3921 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3922
3923         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3924         at least as wide as intmax_t.
3925
3926 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3927
3928         (Imported from Automake.)
3929         * build-aux/gnupload: Update to version 1.1 of directive file.
3930
3931 2006-10-16  Eric Blake  <ebb9@byu.net>
3932
3933         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3934         match Automake 1.10a.
3935
3936 2006-10-14  Bruno Haible  <bruno@clisp.org>
3937
3938         * modules/sigprocmask: New file.
3939         * lib/sigprocmask.h: New file.
3940         * lib/sigprocmask.c: New file.
3941         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3942         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3943         request sigprocmask.o.
3944         (gl_PREREQ_SIGPROCMASK): New macro.
3945         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3946         (Depends-on): Add sigprocmask.
3947         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3948         gt_SIGNALBLOCKING. Test for 'raise' only once.
3949         * lib/fatal-signal.c: Include sigprocmask.h.
3950         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3951         unblock_fatal_signals): Define always.
3952         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3953         sigprocmask.
3954
3955 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3956
3957         Sync from Automake.
3958         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3959         which incorrectly sets the mode of an existing destination
3960         directory.  In some cases the unpatched install-sh could do the
3961         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3962         system.  We hope this is rare in practice, but it's clearly worth
3963         fixing.  Problem reported by Alex Unleashed in
3964         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3965         Also, don't bother to check for -m bugs unless we're using -m;
3966         suggested by Stepan Kasal.
3967
3968 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3969
3970         Sync from Automake.
3971         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3972         `-c' flag, so they appear at the same position as in %FASTDEP%
3973         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3974         which ignores unknown options only after the first non-option.
3975         Bug report against M4 by Nelson H. F. Beebe.
3976
3977 2006-10-13  Jim Meyering  <jim@meyering.net>
3978
3979         Fix a bug in yesterday's change.
3980         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3981         p->fts_statp->st_dev would be used uninitialized.
3982         Ensures that we always call fts_stat on the very first entry.
3983         Miklos Szeredi reported that find -xdev stopped working.
3984
3985 2006-10-12  Bruno Haible  <bruno@clisp.org>
3986
3987         * gnulib-tool (func_get_automake_snippet): Append an automatically
3988         computed EXTRA_DIST augmentation.
3989         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3990         * modules/alloca-opt (Makefile.am): Likewise.
3991         * modules/allocsa (Makefile.am): Likewise.
3992         * modules/arcfour (Makefile.am): Likewise.
3993         * modules/arctwo (Makefile.am): Likewise.
3994         * modules/argmatch (Makefile.am): Likewise.
3995         * modules/argz (Makefile.am): Likewise.
3996         * modules/atexit (Makefile.am): Likewise.
3997         * modules/backupfile (Makefile.am): Likewise.
3998         * modules/byteswap (Makefile.am): Likewise.
3999         * modules/c-strtod (Makefile.am): Likewise.
4000         * modules/c-strtold (Makefile.am): Likewise.
4001         * modules/calloc (Makefile.am): Likewise.
4002         * modules/canon-host (Makefile.am): Likewise.
4003         * modules/canonicalize (Makefile.am): Likewise.
4004         * modules/chdir-long (Makefile.am): Likewise.
4005         * modules/chdir-safer (Makefile.am): Likewise.
4006         * modules/check-version (Makefile.am): Likewise.
4007         * modules/chown (Makefile.am): Likewise.
4008         * modules/cloexec (Makefile.am): Likewise.
4009         * modules/close-stream (Makefile.am): Likewise.
4010         * modules/closeout (Makefile.am): Likewise.
4011         * modules/crc (Makefile.am): Likewise.
4012         * modules/csharpexec (Makefile.am): Likewise.
4013         * modules/cycle-check (Makefile.am): Likewise.
4014         * modules/des (Makefile.am): Likewise.
4015         * modules/dev-ino (Makefile.am): Likewise.
4016         * modules/dirfd (Makefile.am): Likewise.
4017         * modules/dirname (Makefile.am): Likewise.
4018         * modules/dup2 (Makefile.am): Likewise.
4019         * modules/eealloc (Makefile.am): Likewise.
4020         * modules/error (Makefile.am): Likewise.
4021         * modules/euidaccess (Makefile.am): Likewise.
4022         * modules/exclude (Makefile.am): Likewise.
4023         * modules/exitfail (Makefile.am): Likewise.
4024         * modules/fcntl-safer (Makefile.am): Likewise.
4025         * modules/fcntl (Makefile.am): Likewise.
4026         * modules/file-type (Makefile.am): Likewise.
4027         * modules/fileblocks (Makefile.am): Likewise.
4028         * modules/filemode (Makefile.am): Likewise.
4029         * modules/filenamecat (Makefile.am): Likewise.
4030         * modules/fnmatch (Makefile.am): Likewise.
4031         * modules/fopen-safer (Makefile.am): Likewise.
4032         * modules/fpending (Makefile.am): Likewise.
4033         * modules/fprintftime (Makefile.am): Likewise.
4034         * modules/free (Makefile.am): Likewise.
4035         * modules/fsusage (Makefile.am): Likewise.
4036         * modules/ftruncate (Makefile.am): Likewise.
4037         * modules/fts (Makefile.am): Likewise.
4038         * modules/gc-arcfour (Makefile.am): Likewise.
4039         * modules/gc-des (Makefile.am): Likewise.
4040         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4041         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4042         * modules/gc-md4 (Makefile.am): Likewise.
4043         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4044         * modules/gc-sha1 (Makefile.am): Likewise.
4045         * modules/gc (Makefile.am): Likewise.
4046         * modules/getaddrinfo (Makefile.am): Likewise.
4047         * modules/getcwd (Makefile.am): Likewise.
4048         * modules/getdelim (Makefile.am): Likewise.
4049         * modules/getdomainname (Makefile.am): Likewise.
4050         * modules/getgroups (Makefile.am): Likewise.
4051         * modules/gethostname (Makefile.am): Likewise.
4052         * modules/gethrxtime (Makefile.am): Likewise.
4053         * modules/getline (Makefile.am): Likewise.
4054         * modules/getloadavg (Makefile.am): Likewise.
4055         * modules/getlogin_r (Makefile.am): Likewise.
4056         * modules/getndelim2 (Makefile.am): Likewise.
4057         * modules/getopt (Makefile.am): Likewise.
4058         * modules/getpagesize (Makefile.am): Likewise.
4059         * modules/getpass-gnu (Makefile.am): Likewise.
4060         * modules/getpass (Makefile.am): Likewise.
4061         * modules/getsubopt (Makefile.am): Likewise.
4062         * modules/gettime (Makefile.am): Likewise.
4063         * modules/gettimeofday (Makefile.am): Likewise.
4064         * modules/getugroups (Makefile.am): Likewise.
4065         * modules/getusershell (Makefile.am): Likewise.
4066         * modules/glob (Makefile.am): Likewise.
4067         * modules/group-member (Makefile.am): Likewise.
4068         * modules/hard-locale (Makefile.am): Likewise.
4069         * modules/hash (Makefile.am): Likewise.
4070         * modules/hmac-md5 (Makefile.am): Likewise.
4071         * modules/hmac-sha1 (Makefile.am): Likewise.
4072         * modules/human (Makefile.am): Likewise.
4073         * modules/idcache (Makefile.am): Likewise.
4074         * modules/imaxabs (Makefile.am): Likewise.
4075         * modules/imaxdiv (Makefile.am): Likewise.
4076         * modules/inet_ntop (Makefile.am): Likewise.
4077         * modules/inet_pton (Makefile.am): Likewise.
4078         * modules/intprops (Makefile.am): Likewise.
4079         * modules/inttostr (Makefile.am): Likewise.
4080         * modules/inttypes (Makefile.am): Likewise.
4081         * modules/isapipe (Makefile.am): Likewise.
4082         * modules/javaversion (Makefile.am): Likewise.
4083         * modules/lchmod (Makefile.am): Likewise.
4084         * modules/lchown (Makefile.am): Likewise.
4085         * modules/localcharset (Makefile.am): Likewise.
4086         * modules/long-options (Makefile.am): Likewise.
4087         * modules/lstat (Makefile.am): Likewise.
4088         * modules/malloc (Makefile.am): Likewise.
4089         * modules/mathl (Makefile.am): Likewise.
4090         * modules/mbchar (Makefile.am): Likewise.
4091         * modules/md2 (Makefile.am): Likewise.
4092         * modules/md4 (Makefile.am): Likewise.
4093         * modules/md5 (Makefile.am): Likewise.
4094         * modules/memcasecmp (Makefile.am): Likewise.
4095         * modules/memchr (Makefile.am): Likewise.
4096         * modules/memcmp (Makefile.am): Likewise.
4097         * modules/memcoll (Makefile.am): Likewise.
4098         * modules/memcpy (Makefile.am): Likewise.
4099         * modules/memmem (Makefile.am): Likewise.
4100         * modules/memmove (Makefile.am): Likewise.
4101         * modules/mempcpy (Makefile.am): Likewise.
4102         * modules/memrchr (Makefile.am): Likewise.
4103         * modules/memset (Makefile.am): Likewise.
4104         * modules/memxor (Makefile.am): Likewise.
4105         * modules/mkancesdirs (Makefile.am): Likewise.
4106         * modules/mkdir-p (Makefile.am): Likewise.
4107         * modules/mkdir (Makefile.am): Likewise.
4108         * modules/mkdtemp (Makefile.am): Likewise.
4109         * modules/mkstemp (Makefile.am): Likewise.
4110         * modules/mktime (Makefile.am): Likewise.
4111         * modules/modechange (Makefile.am): Likewise.
4112         * modules/mountlist (Makefile.am): Likewise.
4113         * modules/nanosleep (Makefile.am): Likewise.
4114         * modules/obstack (Makefile.am): Likewise.
4115         * modules/openat (Makefile.am): Likewise.
4116         * modules/pagealign_alloc (Makefile.am): Likewise.
4117         * modules/pathmax (Makefile.am): Likewise.
4118         * modules/physmem (Makefile.am): Likewise.
4119         * modules/poll (Makefile.am): Likewise.
4120         * modules/posixtm (Makefile.am): Likewise.
4121         * modules/posixver (Makefile.am): Likewise.
4122         * modules/putenv (Makefile.am): Likewise.
4123         * modules/quote (Makefile.am): Likewise.
4124         * modules/quotearg (Makefile.am): Likewise.
4125         * modules/raise (Makefile.am): Likewise.
4126         * modules/read-file (Makefile.am): Likewise.
4127         * modules/readline (Makefile.am): Likewise.
4128         * modules/readlink (Makefile.am): Likewise.
4129         * modules/readtokens (Makefile.am): Likewise.
4130         * modules/readutmp (Makefile.am): Likewise.
4131         * modules/realloc (Makefile.am): Likewise.
4132         * modules/regex (Makefile.am): Likewise.
4133         * modules/rename-dest-slash (Makefile.am): Likewise.
4134         * modules/rename (Makefile.am): Likewise.
4135         * modules/rijndael (Makefile.am): Likewise.
4136         * modules/rmdir (Makefile.am): Likewise.
4137         * modules/rpmatch (Makefile.am): Likewise.
4138         * modules/safe-read (Makefile.am): Likewise.
4139         * modules/safe-write (Makefile.am): Likewise.
4140         * modules/same-inode (Makefile.am): Likewise.
4141         * modules/same (Makefile.am): Likewise.
4142         * modules/save-cwd (Makefile.am): Likewise.
4143         * modules/savedir (Makefile.am): Likewise.
4144         * modules/setenv (Makefile.am): Likewise.
4145         * modules/settime (Makefile.am): Likewise.
4146         * modules/sha1 (Makefile.am): Likewise.
4147         * modules/sig2str (Makefile.am): Likewise.
4148         * modules/snprintf (Makefile.am): Likewise.
4149         * modules/stat-macros (Makefile.am): Likewise.
4150         * modules/stat-time (Makefile.am): Likewise.
4151         * modules/stdbool (Makefile.am): Likewise.
4152         * modules/stdint (Makefile.am): Likewise.
4153         * modules/stdlib-safer (Makefile.am): Likewise.
4154         * modules/stpcpy (Makefile.am): Likewise.
4155         * modules/stpncpy (Makefile.am): Likewise.
4156         * modules/strcase (Makefile.am): Likewise.
4157         * modules/strcasestr (Makefile.am): Likewise.
4158         * modules/strchrnul (Makefile.am): Likewise.
4159         * modules/strcspn (Makefile.am): Likewise.
4160         * modules/strdup (Makefile.am): Likewise.
4161         * modules/strerror (Makefile.am): Likewise.
4162         * modules/strftime (Makefile.am): Likewise.
4163         * modules/strndup (Makefile.am): Likewise.
4164         * modules/strnlen (Makefile.am): Likewise.
4165         * modules/strpbrk (Makefile.am): Likewise.
4166         * modules/strsep (Makefile.am): Likewise.
4167         * modules/strstr (Makefile.am): Likewise.
4168         * modules/strtod (Makefile.am): Likewise.
4169         * modules/strtoimax (Makefile.am): Likewise.
4170         * modules/strtok_r (Makefile.am): Likewise.
4171         * modules/strtol (Makefile.am): Likewise.
4172         * modules/strtoll (Makefile.am): Likewise.
4173         * modules/strtoul (Makefile.am): Likewise.
4174         * modules/strtoull (Makefile.am): Likewise.
4175         * modules/strtoumax (Makefile.am): Likewise.
4176         * modules/strverscmp (Makefile.am): Likewise.
4177         * modules/sys_socket (Makefile.am): Likewise.
4178         * modules/sys_stat (Makefile.am): Likewise.
4179         * modules/sysexits (Makefile.am): Likewise.
4180         * modules/time_r (Makefile.am): Likewise.
4181         * modules/timegm (Makefile.am): Likewise.
4182         * modules/timespec (Makefile.am): Likewise.
4183         * modules/tmpfile-safer (Makefile.am): Likewise.
4184         * modules/trim (Makefile.am): Likewise.
4185         * modules/unistd-safer (Makefile.am): Likewise.
4186         * modules/unlinkdir (Makefile.am): Likewise.
4187         * modules/unlocked-io (Makefile.am): Likewise.
4188         * modules/userspec (Makefile.am): Likewise.
4189         * modules/utime (Makefile.am): Likewise.
4190         * modules/utimecmp (Makefile.am): Likewise.
4191         * modules/utimens (Makefile.am): Likewise.
4192         * modules/vasnprintf (Makefile.am): Likewise.
4193         * modules/vasprintf (Makefile.am): Likewise.
4194         * modules/vsnprintf (Makefile.am): Likewise.
4195         * modules/xalloc (Makefile.am): Likewise.
4196         * modules/xgetcwd (Makefile.am): Likewise.
4197         * modules/xnanosleep (Makefile.am): Likewise.
4198         * modules/xreadlink (Makefile.am): Likewise.
4199         * modules/xstrtod (Makefile.am): Likewise.
4200         * modules/xstrtol (Makefile.am): Likewise.
4201         * modules/xstrtold (Makefile.am): Likewise.
4202         * modules/yesno (Makefile.am): Likewise.
4203         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4204
4205 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4206
4207         * modules/error (Makefile.am): Distribute files through
4208         EXTRA_DIST, not lib_SOURCES.
4209
4210 2006-10-12  Eric Blake  <ebb9@byu.net>
4211
4212         * modules/error (Makefile.am): Distribute files in /lib.
4213         * modules/obstack (Makefile.am): Likewise.
4214
4215 2006-10-12  Bruno Haible  <bruno@clisp.org>
4216
4217         * modules/acl (Makefile.am): Distribute all files in lib/ through
4218         EXTRA_DIST.
4219         * modules/arcfour (Makefile.am): Likewise.
4220         * modules/arctwo (Makefile.am): Likewise.
4221         * modules/argmatch (Makefile.am): Likewise.
4222         * modules/argz (Makefile.am): Likewise.
4223         * modules/atexit (Makefile.am): Likewise.
4224         * modules/backupfile (Makefile.am): Likewise.
4225         * modules/c-strtod (Makefile.am): Likewise.
4226         * modules/c-strtold (Makefile.am): Likewise.
4227         * modules/calloc (Makefile.am): Likewise.
4228         * modules/canon-host (Makefile.am): Likewise.
4229         * modules/canonicalize (Makefile.am): Likewise.
4230         * modules/chdir-long (Makefile.am): Likewise.
4231         * modules/chdir-safer (Makefile.am): Likewise.
4232         * modules/check-version (Makefile.am): Likewise.
4233         * modules/chown (Makefile.am): Likewise.
4234         * modules/cloexec (Makefile.am): Likewise.
4235         * modules/close-stream (Makefile.am): Likewise.
4236         * modules/closeout (Makefile.am): Likewise.
4237         * modules/crc (Makefile.am): Likewise.
4238         * modules/cycle-check (Makefile.am): Likewise.
4239         * modules/des (Makefile.am): Likewise.
4240         * modules/dirfd (Makefile.am): Likewise.
4241         * modules/dirname (Makefile.am): Likewise.
4242         * modules/dup2 (Makefile.am): Likewise.
4243         * modules/euidaccess (Makefile.am): Likewise.
4244         * modules/exclude (Makefile.am): Likewise.
4245         * modules/exitfail (Makefile.am): Likewise.
4246         * modules/fcntl-safer (Makefile.am): Likewise.
4247         * modules/file-type (Makefile.am): Likewise.
4248         * modules/fileblocks (Makefile.am): Likewise.
4249         * modules/filemode (Makefile.am): Likewise.
4250         * modules/filenamecat (Makefile.am): Likewise.
4251         * modules/fnmatch (Makefile.am): Likewise.
4252         * modules/fopen-safer (Makefile.am): Likewise.
4253         * modules/fpending (Makefile.am): Likewise.
4254         * modules/fprintftime (Makefile.am): Likewise.
4255         * modules/free (Makefile.am): Likewise.
4256         * modules/fsusage (Makefile.am): Likewise.
4257         * modules/ftruncate (Makefile.am): Likewise.
4258         * modules/fts (Makefile.am): Likewise.
4259         * modules/gc (Makefile.am): Likewise.
4260         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4261         * modules/getaddrinfo (Makefile.am): Likewise.
4262         * modules/getcwd (Makefile.am): Likewise.
4263         * modules/getdelim (Makefile.am): Likewise.
4264         * modules/getdomainname (Makefile.am): Likewise.
4265         * modules/getgroups (Makefile.am): Likewise.
4266         * modules/gethostname (Makefile.am): Likewise.
4267         * modules/gethrxtime (Makefile.am): Likewise.
4268         * modules/getline (Makefile.am): Likewise.
4269         * modules/getloadavg (Makefile.am): Likewise.
4270         * modules/getlogin_r (Makefile.am): Likewise.
4271         * modules/getopt (Makefile.am): Likewise.
4272         * modules/getpass (Makefile.am): Likewise.
4273         * modules/getpass-gnu (Makefile.am): Likewise.
4274         * modules/getsubopt (Makefile.am): Likewise.
4275         * modules/gettime (Makefile.am): Likewise.
4276         * modules/gettimeofday (Makefile.am): Likewise.
4277         * modules/getugroups (Makefile.am): Likewise.
4278         * modules/getusershell (Makefile.am): Likewise.
4279         * modules/glob (Makefile.am): Likewise.
4280         * modules/group-member (Makefile.am): Likewise.
4281         * modules/hard-locale (Makefile.am): Likewise.
4282         * modules/hash (Makefile.am): Likewise.
4283         * modules/hmac-md5 (Makefile.am): Likewise.
4284         * modules/hmac-sha1 (Makefile.am): Likewise.
4285         * modules/human (Makefile.am): Likewise.
4286         * modules/idcache (Makefile.am): Likewise.
4287         * modules/imaxabs (Makefile.am): Likewise.
4288         * modules/imaxdiv (Makefile.am): Likewise.
4289         * modules/inet_ntop (Makefile.am): Likewise.
4290         * modules/inet_pton (Makefile.am): Likewise.
4291         * modules/inttostr (Makefile.am): Likewise.
4292         * modules/isapipe (Makefile.am): Likewise.
4293         * modules/lchown (Makefile.am): Likewise.
4294         * modules/long-options (Makefile.am): Likewise.
4295         * modules/lstat (Makefile.am): Likewise.
4296         * modules/malloc (Makefile.am): Likewise.
4297         * modules/mathl (Makefile.am): Likewise.
4298         * modules/mbchar (Makefile.am): Likewise.
4299         * modules/md2 (Makefile.am): Likewise.
4300         * modules/md4 (Makefile.am): Likewise.
4301         * modules/md5 (Makefile.am): Likewise.
4302         * modules/memcasecmp (Makefile.am): Likewise.
4303         * modules/memchr (Makefile.am): Likewise.
4304         * modules/memcmp (Makefile.am): Likewise.
4305         * modules/memcoll (Makefile.am): Likewise.
4306         * modules/memcpy (Makefile.am): Likewise.
4307         * modules/memmem (Makefile.am): Likewise.
4308         * modules/memmove (Makefile.am): Likewise.
4309         * modules/mempcpy (Makefile.am): Likewise.
4310         * modules/memrchr (Makefile.am): Likewise.
4311         * modules/memset (Makefile.am): Likewise.
4312         * modules/memxor (Makefile.am): Likewise.
4313         * modules/mkancesdirs (Makefile.am): Likewise.
4314         * modules/mkdir (Makefile.am): Likewise.
4315         * modules/mkdir-p (Makefile.am): Likewise.
4316         * modules/mkdtemp (Makefile.am): Likewise.
4317         * modules/mkstemp (Makefile.am): Likewise.
4318         * modules/mktime (Makefile.am): Likewise.
4319         * modules/modechange (Makefile.am): Likewise.
4320         * modules/mountlist (Makefile.am): Likewise.
4321         * modules/nanosleep (Makefile.am): Likewise.
4322         * modules/openat (Makefile.am): Likewise.
4323         * modules/pagealign_alloc (Makefile.am): Likewise.
4324         * modules/physmem (Makefile.am): Likewise.
4325         * modules/poll (Makefile.am): Likewise.
4326         * modules/posixtm (Makefile.am): Likewise.
4327         * modules/posixver (Makefile.am): Likewise.
4328         * modules/putenv (Makefile.am): Likewise.
4329         * modules/quote (Makefile.am): Likewise.
4330         * modules/quotearg (Makefile.am): Likewise.
4331         * modules/raise (Makefile.am): Likewise.
4332         * modules/read-file (Makefile.am): Likewise.
4333         * modules/readline (Makefile.am): Likewise.
4334         * modules/readlink (Makefile.am): Likewise.
4335         * modules/readtokens (Makefile.am): Likewise.
4336         * modules/readutmp (Makefile.am): Likewise.
4337         * modules/realloc (Makefile.am): Likewise.
4338         * modules/regex (Makefile.am): Likewise.
4339         * modules/rename (Makefile.am): Likewise.
4340         * modules/rename-dest-slash (Makefile.am): Likewise.
4341         * modules/rijndael (Makefile.am): Likewise.
4342         * modules/rmdir (Makefile.am): Likewise.
4343         * modules/rpmatch (Makefile.am): Likewise.
4344         * modules/safe-read (Makefile.am): Likewise.
4345         * modules/safe-write (Makefile.am): Likewise.
4346         * modules/same (Makefile.am): Likewise.
4347         * modules/save-cwd (Makefile.am): Likewise.
4348         * modules/savedir (Makefile.am): Likewise.
4349         * modules/setenv (Makefile.am): Likewise.
4350         * modules/settime (Makefile.am): Likewise.
4351         * modules/sha1 (Makefile.am): Likewise.
4352         * modules/sig2str (Makefile.am): Likewise.
4353         * modules/snprintf (Makefile.am): Likewise.
4354         * modules/stdlib-safer (Makefile.am): Likewise.
4355         * modules/stpcpy (Makefile.am): Likewise.
4356         * modules/stpncpy (Makefile.am): Likewise.
4357         * modules/strcase (Makefile.am): Likewise.
4358         * modules/strcasestr (Makefile.am): Likewise.
4359         * modules/strchrnul (Makefile.am): Likewise.
4360         * modules/strcspn (Makefile.am): Likewise.
4361         * modules/strdup (Makefile.am): Likewise.
4362         * modules/strerror (Makefile.am): Likewise.
4363         * modules/strftime (Makefile.am): Likewise.
4364         * modules/strndup (Makefile.am): Likewise.
4365         * modules/strnlen (Makefile.am): Likewise.
4366         * modules/strpbrk (Makefile.am): Likewise.
4367         * modules/strsep (Makefile.am): Likewise.
4368         * modules/strstr (Makefile.am): Likewise.
4369         * modules/strtod (Makefile.am): Likewise.
4370         * modules/strtoimax (Makefile.am): Likewise.
4371         * modules/strtok_r (Makefile.am): Likewise.
4372         * modules/strtol (Makefile.am): Likewise.
4373         * modules/strtoll (Makefile.am): Likewise.
4374         * modules/strtoul (Makefile.am): Likewise.
4375         * modules/strtoull (Makefile.am): Likewise.
4376         * modules/strtoumax (Makefile.am): Likewise.
4377         * modules/strverscmp (Makefile.am): Likewise.
4378         * modules/time_r (Makefile.am): Likewise.
4379         * modules/timegm (Makefile.am): Likewise.
4380         * modules/tmpfile-safer (Makefile.am): Likewise.
4381         * modules/unistd-safer (Makefile.am): Likewise.
4382         * modules/unlinkdir (Makefile.am): Likewise.
4383         * modules/userspec (Makefile.am): Likewise.
4384         * modules/utime (Makefile.am): Likewise.
4385         * modules/utimecmp (Makefile.am): Likewise.
4386         * modules/utimens (Makefile.am): Likewise.
4387         * modules/vasnprintf (Makefile.am): Likewise.
4388         * modules/vasprintf (Makefile.am): Likewise.
4389         * modules/vsnprintf (Makefile.am): Likewise.
4390         * modules/xalloc (Makefile.am): Likewise.
4391         * modules/xgetcwd (Makefile.am): Likewise.
4392         * modules/xnanosleep (Makefile.am): Likewise.
4393         * modules/xreadlink (Makefile.am): Likewise.
4394         * modules/xstrtod (Makefile.am): Likewise.
4395         * modules/xstrtol (Makefile.am): Likewise.
4396         * modules/xstrtold (Makefile.am): Likewise.
4397         * modules/yesno (Makefile.am): Likewise.
4398
4399 2006-10-12  Jim Meyering  <jim@meyering.net>
4400
4401         * m4/getloadavg.m4: Revert the change below.
4402
4403         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4404         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4405         fail with a symlink, which is what coreutils' ./bootstrap now
4406         creates by default.
4407
4408 2006-10-12  Bruno Haible  <bruno@clisp.org>
4409
4410         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4411         mingw.
4412         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4413         MSVC and mingw explicitly.
4414
4415 2006-10-11  Simon Josefsson  <jas@extundo.com>
4416             Bruno Haible  <bruno@clisp.org>
4417
4418         Add support for multiple gnulib-tool invocations in the scope of a
4419         single configure.ac file.
4420         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4421         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4422         with the same contents as the _LIBADD variable.
4423         (func_emit_initmacro_start, func_emit_initmacro_end,
4424         func_emit_initmacro_done): New functions.
4425         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4426         gl_LIBOBJS and gl_LTLIBOBJS.
4427
4428 2006-10-11  Bruno Haible  <bruno@clisp.org>
4429
4430         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4431         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4432         autoreconf. Instead, invoke autopoint explicitly but move back the
4433         *.m4 files from gnulib.
4434
4435 2006-10-11  Bruno Haible  <bruno@clisp.org>
4436
4437         * gnulib-tool (func_usage): Make module names after --create-testdir
4438         optional.
4439         (func_create_testdir): If no module was specified, use nearly all
4440         modules.
4441
4442 2006-10-12  Jim Meyering  <jim@meyering.net>
4443
4444         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4445         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4446         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4447         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4448         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4449         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4450         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4451         (fts_set_stat_required): New function.
4452         (fts_open): Defer the calls to fts_stat, if possible or requested.
4453         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4454         into fts_stat itself.
4455         (fts_read): Perform any required (deferred) fts_stat call.
4456         (fts_build): Likewise, for the directory we're about to open and read.
4457         In the readdir loop, carefully decide whether each entry will require
4458         an eventual call to fts_stat, using dirent.d_type info if available.
4459         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4460         a command line argument into this function.  Update all callers.
4461         Map a return value of FTS_DOT to FTS_D for a command line argument.
4462         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4463         Thanks to Miklos Szeredi for his tenacity and for the initial
4464         bug report about "find" failing on a FUSE-based file system.
4465
4466         * lib/fts.c (fts_open): Use consistent indentation.
4467
4468 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4469
4470         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4471         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4472         reported by Jim Meyering.  All uses of cache variables renamed
4473         to match Autoconf's.
4474         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4475         the other one.
4476
4477         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4478         Fix misspelling in diagnostic.
4479
4480 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4481
4482         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4483         defined.  Problem reported by Matthew Woehlke.
4484
4485         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4486         Add support for Tandem NonStop R series.
4487         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4488         Use new macro.
4489
4490         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4491         (has_trailing_slash): Omit size arg; all callers changed.
4492         Omit 'inline', since it doesn't help performance and we'd
4493         need to configure it.
4494         Don't count //, ///, etc. as having a trailing slash.
4495         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4496         (rpl_rename_dest_slash): On failure, use rename's errno rather
4497         than (in some cases) an incorrect or junk errno.
4498         Simplify code by removing need to compute length; this does
4499         cause it to make two passes instead of one over the file name,
4500         but it's worth it.
4501
4502         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4503         change, since Autoconf's version may no longer be appropriate now
4504         that we are using CVS Autoconf's version.  Add support for Tandem.
4505
4506 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4507             Bruno Haible  <bruno@clisp.org>
4508
4509         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4510         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4511         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4512         gl_AC_TYPE_LONG_LONG.
4513
4514         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4515         instead of HAVE_LONG_LONG.
4516         * lib/printf-args.c (printf_fetchargs): Likewise.
4517         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4518         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4519         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4520         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4521         gl_AC_TYPE_LONG_LONG.
4522
4523 2006-10-11  Bruno Haible  <bruno@clisp.org>
4524
4525         * m4/longlong.m4: Add comments.
4526         * m4/ulonglong.m4: Likewise.
4527
4528 2006-10-10  Bruno Haible  <bruno@clisp.org>
4529
4530         Make it possible to #define stpcpy, strdup to aliases.
4531         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4532         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4533
4534 2006-10-10  Bruno Haible  <bruno@clisp.org>
4535
4536         Make it possible to #define gcd to an alias.
4537         * lib/gcd.c: Include config.h.
4538
4539 2006-10-10  Bruno Haible  <bruno@clisp.org>
4540
4541         Make it possible to #define c_isascii to an alias.
4542         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4543         defined. Undefine the macros before defining them, to avoid gcc
4544         warnings.
4545         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4546         define NO_C_CTYPE_MACROS early.
4547
4548 2006-10-10  Bruno Haible  <bruno@clisp.org>
4549
4550         Make it possible to #define set_program_name to an alias.
4551         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4552         ENABLE_RELOCATABLE early.
4553
4554 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4555
4556         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4557         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4558         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4559         More generally, don't assume that 64-bit signed int is available
4560         if unsigned int is, and vice versa.
4561         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4562         unsigned symbols, not on their signed counterparts.
4563         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4564         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4565         (UINT64_C, UINTMAX_C):
4566         Likewise.
4567         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4568         unsigned counterparts.
4569         (Have_long_long, Unsigned): New macros.
4570         (Int): Renamed from INT.
4571         (strtoimax): Use the new macros.
4572         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4573         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4574         * modules/inttypes (inttypes.h): Substitute
4575         HAVE_UNSIGNED_LONG_LONG_INT.
4576         * modules/stdint (stdint.h): Likewise.
4577         (Files): Add m4/ulonglong.m4.
4578
4579 2006-10-10  Bruno Haible  <bruno@clisp.org>
4580
4581         Fix a gcc -Wshadow warning.
4582         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4583         to 'bucket'.
4584         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4585         gl_linked_indexof_from_to): Likewise.
4586         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4587         Likewise.
4588         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4589         Likewise.
4590         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4591         Reported by Eric Blake.
4592
4593 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4594
4595         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4596         for NetBSD.  Problem reported by Bruno Haible.
4597
4598 2006-10-09  Jim Meyering  <jim@meyering.net>
4599
4600         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4601         Patch from Bruno Haible.
4602
4603 2006-10-09  Jim Meyering  <jim@meyering.net>
4604
4605         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4606         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4607         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4608
4609 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4610
4611         Don't include <config.h> twice; this doesn't work in some cases,
4612         e.g., when config.h has "#define intmax_t long long int" and
4613         we include <config.h>, <inttypes.h>, <config.h> in that order.
4614         Problem reported by Matthew Woehlke in:
4615         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4616         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4617         * lib/fts-cycle.c: Don't include config.h.
4618         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4619         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4620         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4621         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4622         inttypes.h.
4623         * lib/xstrtoumax.c: Likewise.
4624         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4625         __strtol and the like, so that this module is more like its siblings.
4626         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4627         Remove; no longer needed now that we assume gnulib inttypes.h.
4628
4629 2006-10-08  Bruno Haible  <bruno@clisp.org>
4630
4631         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4632         option.
4633
4634 2006-10-07  Jim Meyering  <jim@meyering.net>
4635
4636         * modules/inttypes (inttypes.h): Revert what seems to have been
4637         an inadvertent part of today's change: use "|", not "/" in the
4638         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4639
4640 2006-10-07  Bruno Haible  <bruno@clisp.org>
4641
4642         * modules/sublist: New file.
4643
4644 2006-10-07  Bruno Haible  <bruno@clisp.org>
4645
4646         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4647         * modules/argz (argz.h): Likewise.
4648         * modules/arpa_inet (arpa/inet.h): Likewise.
4649         * modules/byteswap (byteswap.h): Likewise.
4650         * modules/configmake (configmake.h): Likewise.
4651         * modules/fcntl (fcntl.h): Likewise.
4652         * modules/fnmatch (fnmatch.h): Likewise.
4653         * modules/getopt (getopt.h): Likewise.
4654         * modules/glob (glob.h): Likewise.
4655         * modules/inttypes (inttypes.h): Likewise.
4656         * modules/netinet_in (netinet/in.h): Likewise.
4657         * modules/poll (poll.h): Likewise.
4658         * modules/stdbool (stdbool.h): Likewise.
4659         * modules/stdint (stdint.h): Likewise.
4660         * modules/sys_select (sys/select.h): Likewise.
4661         * modules/sys_socket (sys/socket.h): Likewise.
4662         * modules/sys_stat (sys/stat.h): Likewise.
4663         * modules/sysexits (sysexits.h): Likewise.
4664         * modules/unistd (unistd.h): Likewise.
4665         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4666         Add a "DO NOT EDIT" comment to the generated file.
4667         (func_import): Likewise for gnulib-comp.m4.
4668
4669 2006-10-07  Bruno Haible  <bruno@clisp.org>
4670
4671         * lib/gl_sublist.h: New file.
4672         * lib/gl_sublist.c: New file.
4673
4674 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4675
4676         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4677         name (relative to the original working directory) and the file
4678         name component (relative to the temporary working directory).  All
4679         callers changed.
4680         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4681         * lib/mkdir-p.c (make_dir_parents): Likewise.
4682         * lib/mkdir-p.h (make_dir_parents): Likewise.
4683
4684 2006-10-06  Eric Blake  <ebb9@byu.net>
4685
4686         Define several macros for use by the clean-temp module.
4687         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4688         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4689         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4690
4691         * lib/clean-temp.h (close_stream_temp): New declaration.
4692         * lib/clean-temp.c (includes): Pull in headers according to what
4693         other modules are in use.
4694         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4695
4696 2006-10-06  Bruno Haible  <bruno@clisp.org>
4697
4698         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4699         instead of fopen, fwriteerror.
4700
4701 2006-10-06  Bruno Haible  <bruno@clisp.org>
4702
4703         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4704         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4705         int.
4706         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4707         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4708         Return an error indicator.
4709         Suggested by Eric Blake.
4710
4711 2006-10-06  Bruno Haible  <bruno@clisp.org>
4712
4713         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4714         Reported by Eric Blake.
4715
4716 2006-10-06  Bruno Haible  <bruno@clisp.org>
4717
4718         * modules/closeout (Description): Mention stderr too.
4719
4720 2006-10-06  Bruno Haible  <bruno@clisp.org>
4721         and Paul Eggert  <eggert@cs.ucla.edu>
4722
4723         * lib/closeout.c (close_stdout): Also close stderr.
4724         * lib/closeout.h: Update comment.
4725
4726 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4727
4728         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4729         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4730         * lib/dirchownmod.c: Include lchown.h.
4731         * lib/lchown.c: Don't include files that lchown.h now includes.
4732         Don't declare chown, since lchown.h now does that.
4733         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4734         (lchown): Define to rpl_chown if lchown is declared but
4735         does not exist.  Declare using a prototype if lchown is not
4736         declared.  Add a copyright notice.
4737         * lib/mkstemp.h: Include <unistd.h>.
4738         * lib/openat.c: Include lchown.h.
4739
4740         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4741         we now test for that separately.
4742         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4743         rather than O_NOFOLLOW, when testing whether it's possible to
4744         avoid a race condition reliably.
4745         * lib/savewd.c (savewd_chdir): Likewise.
4746
4747         Remove macros that are no longer needed now that stdint.h is
4748         reliable.
4749         * lib/fsusage.c (UINTMAX_MAX): Remove.
4750         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4751         * lib/utimecmp.c (SIZE_MAX): Remove.
4752
4753         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4754
4755         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4756         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4757         O_NOATIME works.
4758
4759 2006-10-05  Bruno Haible  <bruno@clisp.org>
4760
4761         * lib/gl_list.h (gl_sortedlist_search_from_to,
4762         gl_sortedlist_indexof_from_to): New declarations.
4763         (gl_list_implementation): New fields sortedlist_search_from_to,
4764         sortedlist_indexof_from_to.
4765         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4766         inline functions.
4767         * lib/gl_list.c (gl_sortedlist_search_from_to,
4768         gl_sortedlist_indexof_from_to): New functions.
4769         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4770         function.
4771         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4772         (gl_array_sortedlist_search_from_to): New function.
4773         (gl_array_list_implementation): Update.
4774         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4775         function.
4776         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4777         (gl_carray_sortedlist_search_from_to): New function.
4778         (gl_carray_list_implementation): Update.
4779         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4780         gl_linked_sortedlist_indexof_from_to): New functions.
4781         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4782         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4783         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4784         gl_tree_sortedlist_indexof_from_to): New functions.
4785         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4786         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4787         Update.
4788         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4789         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4790         Update.
4791
4792 2006-10-05  Bruno Haible  <bruno@clisp.org>
4793
4794         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4795         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4796         (struct gl_list_implementation): Add fields search_from_to,
4797         indexof_from_to. Remove fields search, indexof.
4798         (gl_list_search): Use the search_from_to method.
4799         (gl_list_search_from, gl_list_search_from_to): New functions.
4800         (gl_list_indexof): Use the indexof_from_to method.
4801         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4802         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4803         (gl_list_search_from, gl_list_search_from_to): New functions.
4804         (gl_list_indexof): Use the indexof_from_to method.
4805         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4806         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4807         gl_array_indexof. Add start_index, end_index arguments.
4808         (gl_array_search_from_to): Renamed from gl_array_search. Add
4809         start_index, end_index arguments.
4810         (gl_array_remove, gl_array_list_implementation): Update.
4811         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4812         gl_carray_indexof. Add start_index, end_index arguments.
4813         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4814         start_index, end_index arguments.
4815         (gl_carray_remove, gl_carray_list_implementation): Update.
4816         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4817         gl_linked_search. Add start_index, end_index arguments.
4818         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4819         start_index, end_index arguments.
4820         (gl_linked_remove): Update.
4821         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4822         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4823         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4824         field to 'size_t'.
4825         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4826         gl_tree_search. Add start_index, end_index arguments.
4827         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4828         start_index, end_index arguments.
4829         (gl_tree_remove): Update.
4830         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4831         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4832         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4833         function.
4834         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4835         gl_tree_search. Add start_index, end_index arguments.
4836         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4837         start_index, end_index arguments.
4838         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4839         Update.
4840         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4841
4842 2006-10-05  Bruno Haible  <bruno@clisp.org>
4843
4844         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4845
4846         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4847         fwriteerror_temp): New declarations.
4848         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4849         (descriptors): New variable.
4850         (cleanup): First, close the descriptors.
4851         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4852         fclose_temp, fwriteerror_temp): New functions.
4853
4854 2006-10-04  Jim Meyering  <jim@meyering.net>
4855
4856         * lib/fts.c (fts_open): Tiny comment change.
4857
4858 2006-10-04  Bruno Haible  <bruno@clisp.org>
4859
4860         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4861         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4862         gl_LOCK_BODY.
4863         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4864         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4865         gl_LOCK_EARLY_BODY.
4866         (gl_LOCK): Require gl_LOCK_BODY.
4867
4868 2006-10-04  Bruno Haible  <bruno@clisp.org>
4869
4870         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4871         (gl_oset_search_atleast): New declaration.
4872         (struct gl_oset_implementation): Add field 'search_atleast'.
4873         (gl_oset_search_atleast): New inline function.
4874         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4875         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4876         (gl_array_oset_implementation): Update.
4877         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4878         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4879         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4880
4881 2006-10-04  Bruno Haible  <bruno@clisp.org>
4882
4883         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4884
4885 2006-10-03  Bruno Haible  <bruno@clisp.org>
4886
4887         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4888         from gl_avltreehash_list_implementation.
4889
4890 2006-10-03  Bruno Haible  <bruno@clisp.org>
4891
4892         * lib/gl_oset.c (gl_oset_add): Fix return type.
4893
4894 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4895
4896         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4897
4898 2006-10-02  Eric Blake  <ebb9@byu.net>
4899
4900         * modules/strnlen (Depends-on): Add extensions.
4901
4902 2006-10-02  Eric Blake  <ebb9@byu.net>
4903
4904         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4905         definition in 2.60+.
4906
4907 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4908
4909         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4910         checks.
4911
4912 2006-10-02  Bruno Haible  <bruno@clisp.org>
4913
4914         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4915         to the AUTOMAKE_OPTIONS.
4916         Reported by Jim Meyering.
4917
4918 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4919
4920         Work around bug in Solaris 10 /proc file system:
4921         /proc/self/fd/NNN/.. isn't the parent directory of
4922         the directory whose file descriptor is NNN.  This needs to
4923         be worked around at run time, not compile time, since a
4924         program might be built on Solaris 8, where things work, and
4925         run on Solaris 10.
4926         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4927         to use the following interface instead:
4928         (OPENAT_BUFFER_SIZE): New macro.
4929         (openat_proc_name): New function.
4930         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4931         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4932         Likewise.
4933         * lib/openat-proc.c: New file.
4934         * modules/openat (Files): Add lib/openat-proc.c.
4935         (Depends-on): Add same-inode, stdbool.
4936         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4937
4938 2006-09-29  Bruno Haible  <bruno@clisp.org>
4939
4940         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4941         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4942         argument. Set stdout_closed before testing for ferror, not after.
4943         (fwriteerror, fwriteerror_no_ebadf): New functions.
4944
4945 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4946
4947         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4948
4949 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4950
4951         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4952         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4953
4954 2006-09-28  Jim Meyering  <jim@meyering.net>
4955
4956         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4957         Include <unistd.h>.
4958
4959 2006-09-28  Bruno Haible  <bruno@clisp.org>
4960
4961         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4962         * modules/linkedhash-list (Depends-on): Likewise.
4963         * modules/rbtreehash-list (Depends-on): Likewise.
4964
4965 2006-09-28  Bruno Haible  <bruno@clisp.org>
4966
4967         * lib/strndup.h: Simplify the redefinition of strndup.
4968         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4969         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4970
4971 2006-09-28  Bruno Haible  <bruno@clisp.org>
4972
4973         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4974         * lib/gl_linkedhash_list.c: Likewise.
4975         * lib/gl_rbtreehash_list.c: Likewise.
4976
4977 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4978
4979         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4980         getaddrinfo.
4981
4982         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4983         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4984         it causes <stdio_ext.h> to cause a compile-time error.
4985         Problem reported by Nelson H. F. Beebe.
4986         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4987         of HAVE_DECL___PENDING.
4988
4989         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4990         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4991         declaration.
4992
4993 2006-09-27  Jim Meyering  <jim@meyering.net>
4994
4995         This file could end up with a definition for a function
4996         named __strndup, rather than rpl_strndup on a system with
4997         incomplete weak_alias support.
4998         * lib/strndup.c (strndup): Rename from __strndup.
4999         Remove #defines that used to map __strndup to strndup.
5000         Don't use K&R prototypes.
5001         Remove LIBC-related code, since this file is not sync'd with glibc.
5002         * lib/strndup.h: Revamp, accordingly.
5003         * m4/strndup.m4: Modernize.
5004
5005 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5006
5007         * modules/savewd (Depends-on): Add 'raise'.
5008         * lib/savewd.c: Include <signal.h>, for 'raise'.
5009
5010 2006-09-26  Jim Meyering  <jim@meyering.net>
5011
5012         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5013         when we detect Darwin 8.7.0's acl_get_file bug.
5014         Rearrange to perform the new (below) run-test while $LIBS
5015         contains any acl-related library.  Set USE_ACL at the end.
5016         (gl_ACL_GET_FILE): New function.
5017
5018 2006-09-26  Eric Blake  <ebb9@byu.net>
5019
5020         * lib/verror.c: Include <config.h> unconditionally.
5021
5022 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5023
5024         * modules/clock-time (Maintainer): Add self.
5025         * modules/getlogin_r (Depends-on): Add extensions.
5026
5027 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5028
5029         * modules/clock-time: New module.
5030         * modules/nanosleep (Depends-on): Add clock-time.
5031         * modules/gethrxtime (Depends-on): Likewise.
5032         * modules/gettime (Depends-on): Likewise.
5033         * modules/settime (Depends-on): Likewise.
5034
5035         * modules/fts-lgpl: Depend on openat.
5036         * modules/mkancesdirs: Depend on savewd.
5037         * modules/mkdir-p: Likewise.
5038
5039 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5040
5041         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5042
5043         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5044         `gl_have_arbitrary_file_name_length_limit' to
5045         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5046         actually works between configure runs.
5047
5048 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5049             Bruno Haible  <bruno@clisp.org>
5050
5051         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5052
5053 2006-09-25  Jim Meyering  <jim@meyering.net>
5054
5055         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5056         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5057
5058 2006-09-25  Eric Blake  <ebb9@byu.net>
5059
5060         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5061         exec's in 2006-09-18 patch when shuffling fds.
5062
5063 2006-09-25  Bruno Haible  <bruno@clisp.org>
5064
5065         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5066         Reported by Jim Meyering.
5067
5068 2006-09-24  Jim Meyering  <jim@meyering.net>
5069
5070         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5071         compare a pointer against a literal "0".  That caused failures with
5072         at least HP-UX's hpcc.
5073
5074 2006-09-22  Simon Josefsson  <jas@extundo.com>
5075
5076         * modules/gc-sha1:
5077         * modules/gc-md4:
5078         * modules/gc-hmac-sha1:
5079         * modules/gc-hmac-md5:
5080         * modules/gc-des:
5081         * modules/gc-arcfour: Distribute more files.
5082
5083 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5084
5085         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5086         (gl_linked_iterator_from_to): Initialize struct completely.
5087         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5088         (gl_tree_iterator_from_to): Likewise
5089         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5090         * lib/gl_array_list.c [lint] (gl_array_iterator)
5091         (gl_array_iterator_from_to): Likewise.
5092         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5093         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5094         (gl_carray_iterator_from_to): Likewise.
5095
5096         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5097         * lib/md4.c (md4_process_block): Remove unused variable.
5098         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5099         parentheses for clarity.
5100
5101 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5102
5103         * modules/bison-i18n (Depends-on): Add gettext.
5104
5105 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5106
5107         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5108         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5109         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5110         also add missing comma that caused broken test.
5111         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5112         stdlib.h, for `abort'.
5113         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5114         variables.
5115         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5116         include unistd.h if present, for `rmdir'.
5117         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5118         variables.
5119         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5120         in the process include standard headers for prototypes.
5121         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5122         gets declared on GNU/Linux.
5123         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5124         unistd.h, for `rmdir'.
5125         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5126
5127         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5128         always true.
5129         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5130
5131         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5132
5133 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5134
5135         * gnulib-tool (func_version): Create output all at once.  This
5136         may help avoid triggering unnecessary SIGPIPEs, and at any
5137         rate it doesn't hurt.
5138
5139 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5140             Bruno Haible  <bruno@clisp.org>
5141
5142         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5143         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5144         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5145
5146         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5147         (gl_FUNC_VASPRINTF): Invoke it.
5148
5149 2006-09-22  Bruno Haible  <bruno@clisp.org>
5150
5151         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5152         getloadavg.c as first argument.
5153
5154 2006-09-22  Bruno Haible  <bruno@clisp.org>
5155
5156         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5157         at the beginning of the gl_INIT macro.
5158         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5159         gl_GETLOADAVG.
5160
5161 2006-09-22  Bruno Haible  <bruno@clisp.org>
5162
5163         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5164         module.
5165         Suggested by Ralf Wildenhues.
5166
5167 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5168
5169         Import this patch from libc:
5170
5171         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5172
5173         * lib/regex_internal.c (re_string_reconstruct): Handle
5174         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5175         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5176         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5177         re_string_context_at.
5178
5179         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5180         now requires it.
5181         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5182         gl_REGEX now does it for us.
5183         (gl_REGEX): Add test taken from
5184         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5185
5186         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5187         Check that large offsets work.  Modernize Autoconf usages.
5188         Prefer "yes" to mean a good thing rather than a bad.
5189         Don't put "#define mkstemp" in config.h, as this might interfere
5190         with standard system headers that "#define mkstemp mkstemp64".
5191
5192         * modules/mkstemp (Depends-on): Add extensions, so that
5193         mkstemp is visible on some platforms.
5194         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5195         (Include): Change to "mkstemp.h" from <stdlib.h>.
5196         (Files): Add mkstemp.h.
5197
5198         * lib/mkstemp.h: New file, since some standard headers
5199         #define mkstemp.
5200         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5201         Include "mkstemp.h".
5202         Make the _LIBC code resemble glibc original more,
5203         e.g., use K&R style.
5204         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5205         (mkstemp): Remove, since mkstemp.h does this for us.
5206         * lib/stdlib--.h: Include mkstemp.h.
5207
5208         Import this patch from libc:
5209
5210         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5211
5212         * lib/tempname.c (__gen_tempname): Change attempts_min
5213         into a macro.  Use preprocessor to decide how to initialize
5214         attempts [Coverity CID 67].
5215
5216 2006-09-20  Bruno Haible  <bruno@clisp.org>
5217
5218         * lib/mkdtemp.c: Import from libc.
5219         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5220                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5221                 attempts_min into a macro.  Use preprocessor to decide how to
5222                 initialize attempts [Coverity CID 67].
5223         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5224                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5225                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5226
5227 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5228
5229         * gnulib-tool (func_exit): New function, to allow to pass the
5230         exit status portably through the trap.  Use everywhere.
5231         (--help, --version): Signal a write error.
5232         (trap): catch SIGPIPE, for write errors.
5233         Exit at the end of the trap, with the correct exit status.
5234
5235 2006-09-19  Karl Berry  <karl@gnu.org>
5236
5237         * doc/gnulib.texi: note about the license texinfo files.
5238
5239 2006-09-19  Eric Blake  <ebb9@byu.net>
5240
5241         * gnulib-tool: Avoid space-tab.
5242
5243 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5244
5245         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5246         that prevented coreutils 6.1 from building.  Problem reported
5247         by Petter Reinholdtsen.
5248
5249 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5250
5251         * gnulib-tool (avoidlist): Fix typo that broke options like
5252         --avoid=lock that are used by coreutils bootstrap.
5253
5254 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5255
5256         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5257         more systematically.
5258
5259 2006-09-18  Jim Meyering  <jim@meyering.net>
5260
5261         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5262
5263 2006-09-18  Bruno Haible  <bruno@clisp.org>
5264
5265         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5266
5267 2006-09-18  Bruno Haible  <bruno@clisp.org>
5268
5269         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5270         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5271         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5272         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5273         * m4/gettext.m4: Require autoconf >= 2.52.
5274         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5275         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5276         of gl_cv_header_inttypes_h.
5277
5278 2006-09-18  Bruno Haible  <bruno@clisp.org>
5279
5280         * lib/javaversion.c: Include configmake.h.
5281
5282 2006-09-18  Bruno Haible  <bruno@clisp.org>
5283
5284         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5285         avoid that the while loops be executed in a subshell.
5286
5287 2006-09-18  Bruno Haible  <bruno@clisp.org>
5288
5289         * MODULES.html.sh (func_module): Break long lines.
5290         Suggested by Bruce Korb <bkorb@gnu.org>.
5291
5292 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5293
5294         Speed up by a factor of 1.12.
5295         * gnulib-tool (nl): New variable.
5296         (func_import): Rewrite include directive extraction to only read each
5297         directive once.
5298
5299 2006-09-17  Bruno Haible  <bruno@clisp.org>
5300
5301         * modules/javaversion (Makefile.am): Remove DEFS setting.
5302         (Depends-on): Add configmake, for PKGDATADIR definition.
5303
5304 2006-09-17  Bruno Haible  <bruno@clisp.org>
5305
5306         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5307
5308 2006-09-17  Bruno Haible  <bruno@clisp.org>
5309
5310         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5311         (func_modules_transitive_closure, func_modules_add_dummy,
5312         func_modules_to_filelist, func_import, func_create_testdir,
5313         func_create_megatestdir, ...): Use it wherever possible.
5314         Suggested by Ralf Wildenhues.
5315
5316 2006-09-16  Karl Berry  <karl@gnu.org>
5317
5318         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5319         to avoid sectioning errors.
5320         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5321         [ifinfo]: blank line after @center-ed titles.
5322         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5323         Spell FSF address consistently with others.
5324         (These changes approved by rms.)
5325
5326 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5327
5328         Speed up by a factor of 1.61.
5329         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5330         already checked module names again.
5331
5332 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5333
5334         Speed up by a factor of 1.13.
5335         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5336         for new_files, and the input to func_add_or_update.
5337
5338 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5339
5340         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5341         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5342
5343 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5344
5345         * modules/mkancesdirs (Depends-on): Add fcntl.
5346         * modules/savewd: New file.
5347         * MODULES.html.sh (File system functions): Add savewd.
5348
5349         * modules/configmake (Makefile.am): Add support for the
5350         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5351
5352 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5353
5354         * m4/savewd.m4: New file.
5355
5356 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5357
5358         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5359         (dirchownmod): New arg FD.  All callers changed.
5360         Use FD rather than opening the directory ourself, as opening is
5361         now the caller's responsibility.
5362         * lib/dirchownmod.h: Likewise.
5363         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5364         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5365         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5366         (test_dir): Remove.
5367         (mkancesdirs): Return length of prefix of FILE that has already
5368         been made, or -2 if there is a child doing the work.  Redo
5369         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5370         ".", and treat ".." specially since it might stray back into
5371         already-created areas.  Use a subprocess if necessary.  New arg
5372         WD; all users changed.  MAKE_DIR function should now return 1
5373         if it creates a directory that is not readable.  Return -2 if
5374         a child process is spun off.
5375         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5376         Adjust signature to match code.
5377         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5378         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5379         all users changed.
5380         * lib/savewd.c, lib/savewd.h: New files.
5381
5382 2006-09-15  Jim Meyering  <jim@meyering.net>
5383
5384         * modules/rename-dest-slash: New module.
5385         * MODULES.html.sh (posix_compat): Add it here.
5386
5387         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5388
5389 2006-09-15  Jim Meyering  <jim@meyering.net>
5390
5391         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5392         file.
5393
5394         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5395
5396 2006-09-15  Jim Meyering  <jim@meyering.net>
5397
5398         * lib/rename-dest-slash.c (has_trailing_slash): Use
5399         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5400         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5401         test before testing whether SRC is a directory.
5402         Suggestions from Bruno Haible.
5403
5404         Avoid a warning about an unused variable.
5405         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5406         into the #ifdef block where it's used.
5407
5408         * lib/rename-dest-slash.c: New file.
5409
5410 2006-09-14  Bruno Haible  <bruno@clisp.org>
5411
5412         * lib/allocsa.c: Include <config.h> unconditionally.
5413         * lib/asnprintf.c: Likewise.
5414         * lib/asprintf.c: Likewise.
5415         * lib/c-strcasecmp.c: Likewise.
5416         * lib/c-strcasestr.c: Likewise.
5417         * lib/c-strncasecmp.c: Likewise.
5418         * lib/c-strstr.c: Likewise.
5419         * lib/classpath.c: Likewise.
5420         * lib/clean-temp.c: Likewise.
5421         * lib/concatpath.c: Likewise.
5422         * lib/copy-file.c: Likewise.
5423         * lib/csharpcomp.c: Likewise.
5424         * lib/csharpexec.c: Likewise.
5425         * lib/execute.c: Likewise.
5426         * lib/fatal-signal.c: Likewise.
5427         * lib/findprog.c: Likewise.
5428         * lib/fwriteerror.c: Likewise.
5429         * lib/gl_array_list.c: Likewise.
5430         * lib/gl_array_oset.c: Likewise.
5431         * lib/gl_avltree_list.c: Likewise.
5432         * lib/gl_avltree_oset.c: Likewise.
5433         * lib/gl_avltreehash_list.c: Likewise.
5434         * lib/gl_carray_list.c: Likewise.
5435         * lib/gl_linked_list.c: Likewise.
5436         * lib/gl_linkedhash_list.c: Likewise.
5437         * lib/gl_list.c: Likewise.
5438         * lib/gl_oset.c: Likewise.
5439         * lib/gl_rbtree_list.c: Likewise.
5440         * lib/gl_rbtree_oset.c: Likewise.
5441         * lib/gl_rbtreehash_list.c: Likewise.
5442         * lib/imaxabs.c: Likewise.
5443         * lib/imaxdiv.c: Likewise.
5444         * lib/javacomp.c: Likewise.
5445         * lib/javaexec.c: Likewise.
5446         * lib/javaversion.c: Likewise.
5447         * lib/linebreak.c: Likewise.
5448         * lib/localcharset.c: Likewise.
5449         * lib/lock.c: Likewise.
5450         * lib/mbchar.c: Likewise.
5451         * lib/mbswidth.c: Likewise.
5452         * lib/mkdtemp.c: Likewise.
5453         * lib/pipe.c: Likewise.
5454         * lib/printf-args.c: Likewise.
5455         * lib/printf-parse.c: Likewise.
5456         * lib/progname.c: Likewise.
5457         * lib/progreloc.c: Likewise.
5458         * lib/readlink.c: Likewise.
5459         * lib/sh-quote.c: Likewise.
5460         * lib/stpcpy.c: Likewise.
5461         * lib/stpncpy.c: Likewise.
5462         * lib/strcasecmp.c: Likewise.
5463         * lib/strcasestr.c: Likewise.
5464         * lib/strcspn.c: Likewise.
5465         * lib/striconv.c: Likewise.
5466         * lib/strncasecmp.c: Likewise.
5467         * lib/strnlen1.c: Likewise.
5468         * lib/strstr.c: Likewise.
5469         * lib/strtok_r.c: Likewise.
5470         * lib/tls.c: Likewise.
5471         * lib/tmpdir.c: Likewise.
5472         * lib/unicodeio.c: Likewise.
5473         * lib/unsetenv.c: Likewise.
5474         * lib/vasnprintf.c: Likewise.
5475         * lib/vasprintf.c: Likewise.
5476         * lib/wait-process.c: Likewise.
5477         * lib/xallocsa.c: Likewise.
5478         * lib/xsetenv.c: Likewise.
5479         * lib/xstriconv.c: Likewise.
5480
5481 2006-09-13  Simon Josefsson  <jas@extundo.com>
5482
5483         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5484         that internally, suggested by Ralf Wildenhues
5485         <Ralf.Wildenhues@gmx.de>.
5486
5487 2006-09-13  Simon Josefsson  <jas@extundo.com>
5488
5489         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5490         @LIBOBJS@.
5491         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5492
5493 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5494
5495         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5496         longer worry about uses that don't define HAVE_CONFIG_H.
5497         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5498         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5499         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5500         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5501         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5502         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5503         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5504         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5505         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5506         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5507         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5508         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5509         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5510         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5511         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5512         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5513         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5514         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5515         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5516         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5517         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5518         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5519         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5520         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5521         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5522         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5523         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5524         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5525         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5526         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5527         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5528         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5529         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5530         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5531         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5532         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5533         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5534         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5535         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5536         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5537         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5538         Likewise.
5539
5540 2006-09-13  Eric Blake  <ebb9@byu.net>
5541
5542         * lib/getopt.c: Fix typo in last commit.
5543
5544 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5545
5546         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5547         dgettext.
5548
5549 2006-09-12  Jim Meyering  <jim@meyering.net>
5550
5551         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5552         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5553         Reported by Nelson H. F. Beebe.
5554
5555 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5556
5557         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5558         program_invocation_name and program_invocation_short_name are
5559         initialized.
5560         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5561         and program_invocation_short_name to argp.h, so they are visible
5562         to user programs.
5563         * lib/argp.h: Likewise
5564
5565 2006-09-10  Bruno Haible  <bruno@clisp.org>
5566
5567         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5568         m4/inttypes_h.m4, m4/uintmax_t.m4.
5569
5570 2006-09-10  Bruno Haible  <bruno@clisp.org>
5571
5572         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5573         gl_AC_TYPE_UINTMAX_T.
5574
5575 2006-09-10  Bruno Haible  <bruno@clisp.org>
5576
5577         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5578
5579 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5580
5581         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5582         convention.  Text proposed by Bruno Haible.
5583         (struct argp_option): Document the use of N_() wrappers.
5584
5585         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5586         '\v', and translate the two parts separately, instead of feeding
5587         the whole string to gettext.  This allows to exclude
5588         '\v' from the strings visible to the translator by writing doc
5589         strings as N_("..") "\v" N_("..").
5590
5591 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5592
5593         * config/srclist.txt: Undo latest change; the bug was fixed.
5594
5595 2006-09-09  Bruno Haible  <bruno@clisp.org>
5596
5597         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5598         assignments if building a library without libtool.
5599         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5600         in func_emit_lib_Makefile_am.
5601         (func_import): When building a static library libfoo.a, arrange to
5602         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5603         (func_create_testdir): Likewise.
5604         * modules/gc (configure.ac, Makefile.am): If building statically,
5605         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5606         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5607         * modules/striconv (configure.ac, Makefile.am): Likewise.
5608         Based on a suggestion by Ralf Wildenhues.
5609
5610 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5611
5612         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5613         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5614         Also:
5615
5616         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5617         Add year_2050_test to catch glibc bug 2821
5618         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5619
5620         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5621         Prefer #ifdef to #if.
5622
5623         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5624         Return from 'main' instead of calling 'exit'.
5625
5626 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5627
5628         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5629         returned the maximum time_t value rather than (time_t) -1.
5630         Problem originally reported by William Bardwell
5631         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5632
5633         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5634         Moved to here ...
5635         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5636         ... from here.
5637
5638 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5639
5640         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5641         2821 is fixed.
5642
5643 2006-09-08  Jim Meyering  <jim@meyering.net>
5644
5645         Don't make generated files read-only.  That would bother too many
5646         people.  However, do retain the ability to work when targets are
5647         read-only: remove the destination and temporary files before writing
5648         them (when generated via sed or echo), or by using the -f option for
5649         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5650         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5651         * modules/byteswap, modules/configmake, modules/fcntl:
5652         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5653         * modules/localcharset, modules/netinet_in, modules/poll:
5654         * modules/stdbool, modules/stdint, modules/sys_select:
5655         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5656
5657 2006-09-08  Jim Meyering  <jim@meyering.net>
5658
5659         Avoid new build failure on FreeBSD 6.0.
5660         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5661         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5662         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5663
5664 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5665
5666         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5667
5668 2006-09-07  Jim Meyering  <jim@meyering.net>
5669
5670         Fix global typo in last change: use chmod u-w, not chmod u-x.
5671         Spotted by Paul Eggert and Bruce Korb.
5672         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5673         * modules/byteswap, modules/configmake, modules/fcntl:
5674         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5675         * modules/localcharset, modules/netinet_in, modules/poll:
5676         * modules/stdbool, modules/stdint, modules/sys_select:
5677         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5678
5679 2006-09-06  Jim Meyering  <jim@meyering.net>
5680
5681         Make generated files be read-only.
5682         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5683         Ensure that each generated file is now read-only.
5684         * modules/argz: Likewise.
5685         * modules/arpa_inet: Likewise.
5686         * modules/byteswap: Likewise.
5687         * modules/configmake: Likewise.
5688         * modules/fcntl: Likewise.
5689         * modules/fnmatch: Likewise.
5690         * modules/getopt: Likewise.
5691         * modules/glob: Likewise.
5692         * modules/inttypes: Likewise.
5693         * modules/netinet_in: Likewise.
5694         * modules/poll: Likewise.
5695         * modules/stdbool: Likewise.
5696         * modules/stdint: Likewise.
5697         * modules/sys_select: Likewise.
5698         * modules/sys_socket: Likewise.
5699         * modules/sys_stat: Likewise.
5700         * modules/sysexits: Likewise.
5701         * modules/localcharset: Same as above, but continue using temporary
5702         file named "t-$@" (why different?) rather than the "$@-t" used
5703         everywhere else.
5704
5705         * modules/sysexits (Makefile.am): Replace literal occurrences
5706         of "sysexit.h" more readable, and more consistent, "$@".
5707
5708 2006-09-06  Bruno Haible  <bruno@clisp.org>
5709
5710         * modules/striconv: New file.
5711         * modules/xstriconv: New file.
5712         * MODULES.html.sh (Internationalization functions): Add striconv,
5713         xstriconv.
5714
5715 2006-09-06  Bruno Haible  <bruno@clisp.org>
5716
5717         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5718         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5719         not using libtool correctly.
5720
5721 2006-09-06  Bruno Haible  <bruno@clisp.org>
5722
5723         * lib/striconv.h: New file.
5724         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5725         iconvstring.c.
5726         * lib/xstriconv.h: New file.
5727         * lib/xstriconv.c: New file.
5728
5729 2006-09-06  Bruno Haible  <bruno@clisp.org>
5730
5731         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5732         lib_..._LDFLAGS.
5733
5734 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5735
5736         * lib/argz_.h: Sync from Libtool.
5737
5738         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5739                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5740
5741         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5742
5743 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5744
5745         * modules/trim: New file.
5746
5747 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5748
5749         * lib/trim.h: New file.
5750         * lib/trim.c: New file.
5751
5752 2006-09-05  Bruno Haible  <bruno@clisp.org>
5753
5754         * MODULES.html.sh (String handling): Add trim.
5755
5756 2006-09-04  Karl Berry  <karl@gnu.org>
5757
5758         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5759         until next release.
5760
5761 2006-09-03  Bruno Haible  <bruno@clisp.org>
5762
5763         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5764         correctly.
5765
5766 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5767
5768         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5769         not gl_GETLOADAVG.  Omit unneeded semicolons.
5770         Problems reported by Ralf Wildenhues in
5771         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5772         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5773         at the end, which is the usual gnulib style.
5774
5775         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5776         of doing all the work ourselves.
5777         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5778         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5779
5780 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5781
5782         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5783         Problem reported by Ralf Wildenhues in
5784         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5785
5786         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5787         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5788
5789 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5790
5791         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5792         yesterday's patch by changing test -n to test -z.
5793
5794 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5795
5796         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5797         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5798         the former is now obsolescent.
5799
5800         * modules/chdir-long (Depends-on): Add fcntl.
5801
5802 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5803
5804         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5805         obsolescent, and programs should use gnulib instead.
5806         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5807         but with prefixes changed.
5808
5809 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5810
5811         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5812         or stdbool.h, because they might not exist while configuring.
5813
5814         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5815         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5816         does that for us.
5817         (O_DIRECTORY): Remove.
5818
5819 2006-08-31  Eric Blake  <ebb9@byu.net>
5820
5821         * gnulib-tool: Don't let emacs change spaces to TAB.
5822
5823 2006-08-31  Bruno Haible  <bruno@clisp.org>
5824
5825         * gnulib-tool: When calling func_import more than once, do it in a
5826         subshell.
5827         Reported by Eric Blake <ebb9@byu.net>.
5828
5829 2006-08-31  Bruno Haible  <bruno@clisp.org>
5830
5831         * gnulib-tool (nl): Remove variable.
5832         (sed_transform_lib_file): Use more robust test for config-h module.
5833         (func_import): Fix typo in 2006-08-25 patch.
5834
5835 2006-08-31  Bruno Haible  <bruno@clisp.org>
5836
5837         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5838         specified, augment Makefile.am variables instead of assigning them.
5839
5840 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5841
5842         Work around a bug in both the Linux and SunOS 64-bit kernels:
5843         nanosleep mishandles sleeps for longer than 2**31 seconds.
5844         Problem reported by Frank v Waveren in
5845         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5846         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5847         Check for nanosleep bug.
5848         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5849
5850 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5851
5852         Work around a bug in both the Linux and SunOS 64-bit kernels:
5853         nanosleep mishandles sleeps for longer than 2**31 seconds.
5854         Problem reported by Frank v Waveren in
5855         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5856         * lib/nanosleep.c (BILLION): New constant.
5857         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5858         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5859         implementation.
5860
5861 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5862
5863         * modules/nanosleep (Depends-on): Add gettime.
5864
5865 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5866         and Simon Josefsson  <jas@extundo.com>
5867         and Oskar Liljeblad  <oskar@osk.mine.nu>
5868
5869         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5870         * gnulib-tool (func_import): New license type 'unmodifiable license
5871         text'.
5872         * modules/fdl: Use it.  Longer description.
5873         * module/gpl, module/lgpl: New files.
5874
5875 2006-08-30  Jim Meyering  <jim@meyering.net>
5876
5877         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5878         shadowing the parameter.
5879
5880 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5881
5882         Sync from Libtool:
5883
5884         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5885
5886         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5887         sharing with gnulib.  Report by Eric Blake.
5888
5889 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5890
5891         * modules/isapipe: New file.
5892         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5893
5894 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5895
5896         * modules/configmake (Makefile.am): Add a comment, and omit
5897         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5898         by Bruno Haible.
5899
5900 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5901
5902         * m4/isapipe.m4: New file.
5903
5904 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5905
5906         * lib/isapipe.c, lib/isapipe.h: New files.
5907
5908 2006-08-29  Jim Meyering  <jim@meyering.net>
5909
5910         * modules/configmake (Makefile.am): Make configmake.h depend on
5911         Makefile.  Otherwise, a stale configmake.h could hang around.
5912
5913 2006-08-29  Eric Blake  <ebb9@byu.net>
5914
5915         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5916         resolution of upstream bug 3044.
5917
5918 2006-08-29  Bruno Haible  <bruno@clisp.org>
5919
5920         * modules/localcharset (Depends-on): Add configmake.
5921         (Makefile.am): Remove setting of LIBDIR through DEFS.
5922
5923 2006-08-29  Bruno Haible  <bruno@clisp.org>
5924
5925         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5926         defined.
5927
5928 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5929
5930         * modules/fcntl: New file.
5931         * modules/chdir-safer (Depends-on): Add fcntl.
5932         * modules/fts: Likewise.
5933         * modules/mkdir-p: Likewise.
5934
5935         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5936         This undoes the most recent change, since we're now addressing the
5937         problem in a different way.
5938
5939         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5940         into output, since the output might be called Makefile.am even
5941         if $makefile_name is something different.
5942         (func_import): Use $makefile_am rather than
5943         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5944         empty.
5945
5946         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5947
5948 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5949
5950         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5951         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5952         recent change to stdint.m4, since we're now addressing the problem in a
5953         different way.
5954
5955 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5956
5957         * m4/fcntl_h.m4: New file.
5958
5959 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5960
5961         * lib/fcntl_.h: New file.
5962         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5963         the fcntl module.
5964         * lib/dirchownmod.c: Likewise.
5965         * lib/fts.c: Likewise.
5966
5967         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5968         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5969         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5970         just before including <inttypes.h>, to avoid circular inclusion.
5971
5972 2006-08-28  Jim Meyering  <jim@meyering.net>
5973
5974         * doc/visibility.texi: Actually read and correct the grammar of the
5975         sentence affected by yesterday's change.
5976
5977 2006-08-28  Eric Blake  <ebb9@byu.net>
5978
5979         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5980         needs wrapper.
5981
5982 2006-08-28  Eric Blake  <ebb9@byu.net>
5983
5984         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5985
5986 2006-08-28  Eric Blake  <ebb9@byu.net>
5987
5988         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5989
5990 2006-08-28  Bruno Haible  <bruno@clisp.org>
5991
5992         * modules/c-strstr: New file, from GNU gettext.
5993         * MODULES.html.sh (String handling): Add c-strstr.
5994
5995 2006-08-28  Bruno Haible  <bruno@clisp.org>
5996
5997         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5998         macros.
5999         Reported by Eric Blake.
6000
6001 2006-08-28  Bruno Haible  <bruno@clisp.org>
6002
6003         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6004         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6005         * lib/vasprintf.c: Include errno.h, limits.h.
6006         (EOVERFLOW): New fallback definition.
6007         (vasprintf): Test here whether the string length is > INT_MAX.
6008         * lib/vsnprintf.c: Include errno.h, limits.h.
6009         (EOVERFLOW): New fallback definition.
6010         (vsnprintf): Fix bug when generated string was too long for the buffer.
6011         Test here whether the string length is > INT_MAX.
6012
6013 2006-08-28  Bruno Haible  <bruno@clisp.org>
6014
6015         * lib/inttypes_.h (SCNX*): Remove definitions.
6016         Reported by Eric Blake.
6017
6018 2006-08-28  Bruno Haible  <bruno@clisp.org>
6019
6020         * lib/c-strstr.h: New file, from GNU gettext.
6021         * lib/c-strstr.c: New file, from GNU gettext.
6022
6023 2006-08-28  Bruno Haible  <bruno@clisp.org>
6024
6025         * gnulib-tool: Reorder some statements.
6026
6027 2006-08-28  Bruno Haible  <bruno@clisp.org>
6028
6029         * gnulib-tool: New option --makefile-name.
6030         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6031         $makefile_name.
6032         (func_import): Write $makefile_name to the cache file, and read it from
6033         there unless explicitly specified. Use $makefile_name as file name
6034         instead of Makefile.am. Adjust the recommendations accordingly.
6035
6036 2006-08-28  Bruno Haible  <bruno@clisp.org>
6037
6038         * gnulib-tool (func_verify_module): Check against misapplying patch.
6039
6040 2006-08-28  Bruno Haible  <bruno@clisp.org>
6041
6042         * gnulib-tool (func_relativize, func_relconcat): New functions.
6043         Give an error if --local-dir is given with --update.
6044         Remove trailing slashes from $local_gnulib_dir.
6045         (func_import): Store the relativized $local_gnulib_dir in
6046         gnulib-cache.m4, and read it from there if not specified explicitly.
6047
6048 2006-08-28  Bruno Haible  <bruno@clisp.org>
6049
6050         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6051         is the current directory. Respect also $local_gnulib_dir.
6052
6053 2006-08-28  Bruno Haible  <bruno@clisp.org>
6054             Simon Josefsson  <jas@extundo.com>
6055
6056         BeOS portability.
6057         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6058
6059 2006-08-27  Jim Meyering  <jim@meyering.net>
6060
6061         * doc/visibility.texi: Remove duplicate word: "pointer".
6062
6063 2006-08-26  Bruno Haible  <bruno@clisp.org>
6064
6065         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6066         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6067         (Makefile.am): Create inttypes.h from inttypes_.h.
6068         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6069
6070         * modules/imaxabs: New file.
6071
6072         * modules/imaxdiv: New file.
6073
6074 2006-08-26  Bruno Haible  <bruno@clisp.org>
6075
6076         * m4/inttypes.m4: New file.
6077         * m4/_inttypes_h.m4: Remove file.
6078         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6079         PRI_MACROS_BROKEN.
6080         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6081
6082         * m4/imaxabs.m4: New file.
6083
6084         * m4/imaxdiv.m4: New file.
6085
6086 2006-08-26  Bruno Haible  <bruno@clisp.org>
6087
6088         * lib/inttypes_.h: New file.
6089         * lib/inttypes.h: Remove file.
6090         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6091
6092         * lib/imaxabs.c: New file.
6093
6094         * lib/imaxdiv.c: New file.
6095
6096 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6097
6098         New config-h module, so that "make" output needn't be cluttered
6099         by -DHAVE_CONFIG_H.
6100         * MODULES.html.sh (Support for building libraries and executables):
6101         Add config-h.
6102         * modules/config-h: New file.
6103         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6104         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6105         the config-h module is used.
6106
6107         New configmake module, so that "make" output needn't be cluttered
6108         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6109         * MODULES.html.sh (Support for building libraries and executables):
6110         Add configmake.
6111         * modules/configmake: New file.
6112
6113 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6114
6115         * m4/config-h.m4: New file.
6116
6117 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6118
6119         * config/srclist.txt: Add elisp-comp.
6120
6121 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6122
6123         * MODULES.html.sh (Support for building libraries and executables):
6124         Add elisp-comp.
6125         * build-aux/elisp-comp: New file.
6126         * modules/elisp-comp: New file.
6127
6128 2006-08-24  Bruno Haible  <bruno@clisp.org>
6129
6130         * gnulib-tool (func_create_testdir): Use non-default values of
6131         sourcebase and m4base.
6132
6133 2006-08-24  Bruno Haible  <bruno@clisp.org>
6134
6135         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6136         HTML structure.
6137
6138 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6139
6140         * modules/openat (Depends-on): Add lchown.
6141
6142 2006-08-23  Bruno Haible  <bruno@clisp.org>
6143
6144         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6145         of gl_LOCK_EARLY instead of gl_LOCK.
6146
6147 2006-08-23  Bruno Haible  <bruno@clisp.org>
6148
6149         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6150         on OSF/1 to no.
6151         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6152
6153 2006-08-23  Bruno Haible  <bruno@clisp.org>
6154
6155         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6156         as unusable.
6157
6158         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6159         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6160         (gl_LOCK): New macro.
6161
6162 2006-08-22  Simon Josefsson  <jas@extundo.com>
6163
6164         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6165         to md5 module.
6166
6167 2006-08-22  Simon Josefsson  <jas@extundo.com>
6168
6169         * MODULES.html.sh: Add "Support for maintaining and release
6170         projects".
6171
6172         * build-aux/gnupload: New file, from coreutils.
6173
6174 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6175
6176         Avoid the need for AC_LIBSOURCES in m4 macros.
6177         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6178         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6179         * modules/check-version (EXTRA_DIST): Add check-version.h.
6180         * modules/crc (EXTRA_DIST): Add crc.h.
6181         * modules/des (EXTRA_DIST): Add des.h.
6182         * modules/gc (EXTRA_DIST): Add gc.h.
6183         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6184         * modules/getline (EXTRA_DIST): Add getline.h.
6185         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6186         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6187         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6188         * modules/md2 (EXTRA_DIST): Add md2.h.
6189         * modules/md4 (EXTRA_DIST): Add md4.h.
6190         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6191         * modules/read-file (EXTRA_DIST): Add read-file.h.
6192         * modules/readline (EXTRA_DIST): Add readline.h.
6193         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6194         rijndael-api-fst.h.
6195
6196 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6197
6198         * m4/rijndael.m4 (gl_ARCFOUR):
6199         * m4/arctwo.m4 (gl_ARCTWO):
6200         * m4/check-version.m4 (gl_CHECK_VERSION):
6201         * m4/crc.m4 (gl_CRC):
6202         * m4/des.m4 (gl_DES):
6203         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6204         * m4/gc.m4 (gl_GC):
6205         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6206         * m4/getline.m4 (gl_FUNC_GETLINE):
6207         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6208         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6209         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6210         * m4/md2.m4 (gl_MD2):
6211         * m4/md4.m4 (gl_MD4):
6212         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6213         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6214         * m4/readline.m4 (gl_FUNC_READLINE):
6215         * m4/rijndael.m4 (gl_RIJNDAEL):
6216         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6217         to get the necessary .h files and whatnot.
6218
6219 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6220
6221         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6222         gnulib rather than the other way around.
6223         * config/srclistvars.sh (COREUTILS): Remove.
6224
6225 2006-08-22  Jim Meyering  <jim@meyering.net>
6226
6227         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6228
6229         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6230
6231 2006-08-22  Eric Blake  <ebb9@byu.net>
6232
6233         * modules/regexprops-generic: New file.
6234         * MODULES.html.sh (Support for building documentation): List it.
6235
6236 2006-08-22  Eric Blake  <ebb9@byu.net>
6237
6238         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6239         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6240         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6241         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6242
6243 2006-08-22  Bruno Haible  <bruno@clisp.org>
6244
6245         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6246         and lib_LTLIBRARIES like the other lib_* variables.
6247
6248 2006-08-22  Bruno Haible  <bruno@clisp.org>
6249
6250         * build-aux/x-to-1.in: New file, from GNU gettext.
6251
6252 2006-08-22  Bruno Haible  <bruno@clisp.org>
6253
6254         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6255         <utmpx.h> exists.
6256
6257 2006-08-22  Bruno Haible  <bruno@clisp.org>
6258
6259         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6260         <utmpx.h> exists.
6261
6262 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6263
6264         BeOS portability.
6265         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6266         exist.
6267         Problem reported by Bruno Haible.
6268
6269 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6270
6271         Avoid the need for AC_LIBSOURCES in m4 macros.
6272         * modules/acl (EXTRA_DIST): Add acl.h.
6273         * modules/argmatch (Files): Add m4/argmatch.m4.
6274         (configure.ac): Add gl_ARGMATCH.
6275         (EXTRA_DIST): Renamed from lib_SOURCES, for
6276         consistency with the other modules.  Remove argmatch.c.
6277         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6278         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6279         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6280         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6281         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6282         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6283         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6284         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6285         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6286         * modules/closeout (EXTRA_DIST): Add closeout.h.
6287         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6288         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6289         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6290         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6291         dirname.h; remove basename.c and stripslash.c.
6292         * modules/exclude (EXTRA_DIST): Add exclude.h.
6293         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6294         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6295         * modules/file-type (EXTRA_DIST): Add file-type.h.
6296         * modules/filemode (EXTRA_DIST): Add filemode.h.
6297         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6298         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6299         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6300         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6301         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6302         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6303         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6304         * modules/getdate (EXTRA_DIST): Add getdate.c.
6305         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6306         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6307         * modules/getpass (EXTRA_DIST): Add getpass.h.
6308         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6309         * modules/group-member (EXTRA_DIST): Add group-member.h.
6310         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6311         * modules/hash (EXTRA_DIST): Add hash.h.
6312         * modules/human (EXTRA_DIST): Add human.h.
6313         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6314         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6315         * modules/lchown (EXTRA_DIST): Add lchown.h.
6316         * modules/long-options (EXTRA_DIST): Add long-options.h.
6317         * modules/lstat (EXTRA_DIST): Add lstat.h.
6318         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6319         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6320         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6321         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6322         * modules/memxor (EXTRA_DIST): Add memxor.h.
6323         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6324         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6325         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6326         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6327         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6328         * modules/physmem (EXTRA_DIST): Add physmem.h.
6329         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6330         * modules/posixver (EXTRA_DIST): Add posixver.h.
6331         * modules/quote (EXTRA_DIST): Add quote.h.
6332         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6333         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6334         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6335         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6336         regex_internal.h regexec.c.
6337         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6338         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6339         * modules/same (EXTRA_DIST): Add same.h.
6340         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6341         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6342         * modules/savedir (EXTRA_DIST): Add savedir.h.
6343         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6344         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6345         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6346         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6347         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6348         * modules/strdup (EXTRA_DIST): Add strdup.h.
6349         * modules/strftime (EXTRA_DIST): Add strftime.h.
6350         * modules/strndup (EXTRA_DIST): Add strndup.h.
6351         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6352         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6353         * modules/time_r (EXTRA_DIST): Add time_r.h.
6354         * modules/timespec (EXTRA_DIST): Add timespec.h.
6355         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6356         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6357         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6358         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6359         * modules/userspec (EXTRA_DIST): Add userspec.h.
6360         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6361         * modules/utimens (EXTRA_DIST): Add utimens.h.
6362         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6363         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6364         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6365         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6366         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6367         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6368         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6369         * modules/yesno (EXTRA_DIST): Add yesno.h.
6370
6371 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6372
6373         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6374
6375         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6376         * m4/dev-ino.m4, same-inode.m4: Remove.
6377
6378         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6379         * m4/acl.m4 (AC_FUNC_ACL):
6380         * m4/backupfile.m4 (gl_BACKUPFILE):
6381         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6382         * m4/canon-host.m4 (gl_CANON_HOST):
6383         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6384         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6385         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6386         * m4/cloexec.m4 (gl_CLOEXEC):
6387         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6388         * m4/closeout.m4 (gl_CLOSEOUT):
6389         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6390         * m4/dirname.m4 (gl_DIRNAME):
6391         * m4/exclude.m4 (gl_EXCLUDE):
6392         * m4/exitfail.m4 (gl_EXITFAIL):
6393         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6394         * m4/file-type.m4 (gl_FILE_TYPE):
6395         * m4/filemode.m4 (gl_FILEMODE):
6396         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6397         * m4/fpending.m4 (gl_FUNC_FPENDING):
6398         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6399         * m4/fts.m4 (gl_FUNC_FTS):
6400         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6401         * m4/getdate.m4 (gl_GETDATE):
6402         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6403         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6404         * m4/getpass.m4 (gl_FUNC_GETPASS):
6405         * m4/gettime.m4 (gl_GETTIME):
6406         * m4/getugroups.m4 (gl_GETUGROUPS):
6407         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6408         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6409         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6410         * m4/hash.m4 (gl_HASH):
6411         * m4/idcache.m4 (gl_IDCACHE):
6412         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6413         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6414         * m4/long-options.m4 (gl_LONG_OPTIONS):
6415         * m4/lstat.m4 (gl_FUNC_LSTAT):
6416         * m4/md5.m4 (gl_MD5):
6417         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6418         * m4/memcoll.m4 (gl_MEMCOLL):
6419         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6420         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6421         * m4/memxor.m4 (gl_MEMXOR):
6422         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6423         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6424         * m4/modechange.m4 (gl_MODECHANGE):
6425         * m4/mountlist.m4 (gl_MOUNTLIST):
6426         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6427         * m4/openat.m4 (gl_FUNC_OPENAT):
6428         * m4/pathmax.m4 (gl_PATHMAX):
6429         * m4/physmem.m4 (gl_PHYSMEM):
6430         * m4/posixtm.m4 (gl_POSIXTM):
6431         * m4/posixver.m4 (gl_POSIXVER):
6432         * m4/quote.m4 (gl_QUOTE):
6433         * m4/quotearg.m4 (gl_QUOTEARG):
6434         * m4/readtokens.m4 (gl_READTOKENS):
6435         * m4/readutmp.m4 (gl_READUTMP):
6436         * m4/regex.m4 (gl_REGEX):
6437         * m4/safe-read.m4 (gl_SAFE_READ):
6438         * m4/safe-write.m4 (gl_SAFE_WRITE):
6439         * m4/same.m4 (gl_SAME):
6440         * m4/save-cwd.m4 (gl_SAVE_CWD):
6441         * m4/savedir.m4 (gl_SAVEDIR):
6442         * m4/settime.m4 (gl_SETTIME):
6443         * m4/sha1.m4 (gl_SHA1):
6444         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6445         * m4/stat-macros.m4 (gl_STAT_MACROS):
6446         * m4/stat-time.m4 (gl_STAT_TIME):
6447         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6448         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6449         * m4/strdup.m4 (gl_FUNC_STRDUP):
6450         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6451         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6452         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6453         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6454         * m4/time_r.m4 (gl_TIME_R):
6455         * m4/timespec.m4 (gl_TIMESPEC):
6456         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6457         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6458         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6459         * m4/userspec.m4 (gl_USERSPEC):
6460         * m4/utimecmp.m4 (gl_UTIMECMP):
6461         * m4/utimens.m4 (gl_UTIMENS):
6462         * m4/xalloc.m4 (gl_XALLOC):
6463         * m4/xgetcwd.m4 (gl_XGETCWD):
6464         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6465         * m4/xreadlink.m4 (gl_XREADLINK):
6466         * m4/xstrtod.m4 (gl_XSTRTOD):
6467         * m4/yesno.m4 (gl_YESNO):
6468         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6469         to get the necessary .h files and whatnot.
6470
6471 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6472             Bruno Haible  <bruno@clisp.org>
6473
6474         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6475         /bin/sh understanding of '!' conditional negation.
6476
6477 2006-08-21  Jim Meyering  <jim@meyering.net>
6478
6479         * modules/openat (Depends-on): Really alphabetize.
6480
6481         * modules/acl (Depends-on): Add error and quote.
6482
6483         * check-module (find_included_lib_files): Add at-func.c to the
6484         ok-to-include-more-than-once white list.
6485
6486         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6487
6488 2006-08-21  Bruno Haible  <bruno@clisp.org>
6489
6490         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6491         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6492         Reported by Martin Lambers <marlam@marlam.de>.
6493
6494 2006-08-21  Bruno Haible  <bruno@clisp.org>
6495
6496         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6497         specify an installation location, don't emit a noinst_LIBRARIES or
6498         noinst_LTLIBRARIES assignment.
6499
6500 2006-08-21  Bruno Haible  <bruno@clisp.org>
6501
6502         BeOS portability.
6503         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6504         BeOS has mbrtowc() but no <wctype.h>.
6505
6506 2006-08-21  Bruno Haible  <bruno@clisp.org>
6507
6508         BeOS portability.
6509         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6510         exist.
6511
6512 2006-08-21  Bruno Haible  <bruno@clisp.org>
6513
6514         BeOS portability.
6515         * lib/mbchar.h: Include <wctype.h> only if it exists.
6516
6517 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6518
6519         Remove files that are no longer needed by their respective modules.
6520         * m4/obstack.m4: Remove.
6521         * m4/strerror_r.m4: Remove.
6522         * m4/uint32_t.m4: Remove.
6523         * m4/uintptr_t.m4: Remove.
6524         * m4/ullong_max.m4: Remove.
6525         * m4/xstrtoimax.m4: Remove.
6526         * m4/xstrtoumax.m4: Remove.
6527
6528         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6529         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6530         dependencies now capture this.
6531
6532         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6533         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6534         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6535         * m4/human.m4 (gl_HUMAN): Likewise.
6536         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6537         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6538
6539         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6540
6541         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6542         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6543         stdint.
6544         * m4/human.m4 (gl_HUMAN): Likewise.
6545         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6546         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6547         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6548         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6549         * m4/xstrtol (gl_XSTRTOL): Likewise.
6550
6551         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6552         AC_TYPE_LONG_LONG_INT.
6553         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6554         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6555         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6556         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6557
6558         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6559         on stdbool.
6560
6561         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6562         (gl_PREREQ_XSTRTOUL): Remove.
6563
6564         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6565
6566         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6567         mode.
6568
6569 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6570
6571         Add and change modules to make it easier for coreutils to use
6572         gnulib-tool.
6573         * modules/backupfile (Files): Remove m4/d-ino.m4.
6574         (Depends-on): Add d-ino.
6575         * modules/cycle-check (Depends-on): Add stdint.
6576         (lib_SOURCES): Add cycle-check.h.
6577         * modules/d-ino: New module.
6578         * modules/d-type: New module.
6579         * modules/error (Files): Remove m4/strerror_r.m4.
6580         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6581         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6582         m4/inttypes_h.m4, m4/uintmax_t.m4.
6583         (Depends-on): Add stdint.
6584         (lib_SOURCES): Add fsusage.h.
6585         * modules/getcwd (Files): Remove d-ino.m4.
6586         (Depends-on): Add d-ino.
6587         * modules/getndelim2 (Depends-on): Add stdint.
6588         * modules/glob (Files): Remove m4/d-type.m4.
6589         (Depends-on): Add d-type.
6590         * modules/host-os: New module.
6591         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6592         m4/inttypes_h.m4, m4/uintmax_t.m4.
6593         * Depends-on: Add stdint.
6594         (lib_SOURCES): Add human.h.
6595         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6596         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6597         m4/uintmax_t.m4, m4/ulonglong.m4.
6598         (Depends-on): Add stdint.
6599         (EXTRA_DIST): Add inttostr.h.
6600         * modules/lchmod: New module.
6601         * modules/link-follow: New module.
6602         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6603         (Depends-on): Add lchmod.
6604         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6605         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6606         (Depends-on): Add stdint.
6607         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6608         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6609         (Depends-on): Add stdint.
6610         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6611         * modules/perl: New module.
6612         * modules/regex (Depends-on): Add stdint.
6613         * modules/rmdir-errno: New module.
6614         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6615         m4/intmax_t.m4.
6616         (Depends-on): Add stdint.
6617         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6618         m4/uintmax_t.m4.
6619         (Depends-on): Add stdint.
6620         * modules/unlink-busy: New module.
6621         * modules/utimecmp (Depends-on): Add stdint.
6622         * modules/uptime: New module.
6623         * modules/winsz-ioctl: New module.
6624         * modules/winsz-termios: New module.
6625         * modules/xnanosleep (Depends-on): Add nanosleep.
6626         * modules/ullong_max: Remove.
6627         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6628         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6629         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6630         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6631         (Depends-on): Add inttypes.
6632         (lib_SOURCES): Add xstrtol.h.
6633         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6634         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6635         * MODULES.html.sh: Move 'assert' into the assert section.
6636         Move 'dummy' into the linking section.
6637         Remove ullong_max.
6638         Add section for compatibility checks for POSIX:2001 functions,
6639         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6640         winsz-ioctl, and winsz-termios into it.
6641         Add lchmod.
6642         Add top-level Misc section and put host-os, perl, and uptime
6643         into it.
6644
6645 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6646
6647         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6648         now assume the stdint module.  Do not include inttypes.h.
6649         * lib/fsusage.h: Likewise.
6650         * lib/getndelim2.c: Likewise.
6651         * lib/human.h: Likewise.
6652         * lib/inttostr.h: Likewise.
6653         * lib/obstack.c: Likewise.
6654         * lib/regex_internal.h: Likewise.
6655         * lib/tempname.c: Likewise.
6656         * lib/utimecmp.c: Likewise.
6657         * lib/xstrtol.h: Likewise.
6658
6659         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6660
6661         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6662         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6663         * lib/xtime.h: Likewise.
6664
6665 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6666
6667         * modules/openat (Files): Add lib/fchmodat.c.
6668         Fixes problem reported by Jay Youngman.
6669
6670 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6671
6672         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6673         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6674
6675 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6676             Bruno Haible  <bruno@clisp.org>
6677
6678         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6679         and is a script that invokes bison. Tighten the code. Add comments.
6680
6681 2006-08-18  Jim Meyering  <jim@meyering.net>
6682
6683         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6684         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6685         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6686         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6687
6688 2006-08-18  Bruno Haible  <bruno@clisp.org>
6689
6690         * modules/bison-i18n: New file.
6691         * MODULES.html.sh (Internationalization functions): Add it.
6692
6693 2006-08-18  Bruno Haible  <bruno@clisp.org>
6694
6695         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6696         sys/statvfs.h. When getmntinfo was found, check its declaration and
6697         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6698
6699 2006-08-18  Bruno Haible  <bruno@clisp.org>
6700
6701         * m4/bison-i18n.m4: New file, from bison.
6702
6703 2006-08-18  Bruno Haible  <bruno@clisp.org>
6704
6705         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6706         (ME_DUMMY): Treat "kernfs" as a dummy.
6707         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6708
6709 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6710
6711         Update from coreutils.
6712
6713         2006-08-15  Jim Meyering  <jim@meyering.net>
6714
6715         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6716
6717         2006-01-17  Jim Meyering  <jim@meyering.net>
6718
6719         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6720
6721         2006-01-11  Jim Meyering  <jim@meyering.net>
6722
6723         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6724         Check for the lchmod function.
6725
6726 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6727
6728         Update from coreutils.
6729
6730         * lib/__fpending.h: Add copyright notice.
6731         * lib/fprintftime.h: Likewise.
6732         * lib/savedir.c: Use (C) in copyright notice.
6733         * lib/savedir.h: Likewise.
6734
6735         2006-08-15  Jim Meyering  <jim@meyering.net>
6736
6737         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6738         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6739         in support of the EXPECTED_ERRNO macro.
6740         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6741         definitions.  Instead, define the appropriate symbols and include
6742         "at-func.c".
6743         * lib/mkdirat.c (mkdirat): Likewise.
6744         * lib/fchmodat.c (fchmodat): Likewise.
6745         (ENOSYS): Remove definition.
6746         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6747         it.  Don't include "unistd--.h" -- it wasn't ever used.
6748
6749         2006-01-17  Jim Meyering  <jim@meyering.net>
6750
6751         Rewrite fts.c not to change the current working directory,
6752         by using openat, fstatat, fdopendir, etc..
6753
6754         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6755         (HAVE_OPENAT_SUPPORT): Define.
6756         [_LIBC] (fchdir): Don't undef or define; no longer used.
6757         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6758         Now, this `function' always succeeds, and consumes its file descriptor
6759         parameter -- so callers must not close such FDs.  Update callers.
6760         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6761         (diropen): Add parameter, SP.  Adjust all callers.
6762         Implement using diropen_fd, rather than open.
6763         (fts_open): Initialize new member, fts_cwd_fd.
6764         Remove fts_rft-setting code.
6765         (fts_close): Close fts_cwd_fd, if necessary.
6766         (__opendir2): Define in terms of opendir or opendirat,
6767         depending on whether the FST_NOCHDIR flag is set.
6768         (fts_build): Since fts_safe_changedir consumes its FD, and since
6769         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6770         and close the dup'd file descriptor upon failure.
6771         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6772         (fts_safe_changedir): Tweak semantics to reflect that this function
6773         now calls cwd_advance_fd and hence consumes its FD argument.
6774         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6775         [struct FTS] (fts_rft): Remove now-unused member.
6776         [struct FTS] (fts_cycle.state): Improve comment.
6777
6778         * lib/openat.c (openat_needs_fchdir): New function.
6779         * lib/openat.h (openat_needs_fchdir): Declare it.
6780
6781 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6782
6783         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6784         Problem and fix reported by Pádraig Brady in
6785         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6786
6787 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6788
6789         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6790
6791 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6792
6793         * lib/memcoll.c (memcoll): Optimize for the common case where the
6794         arguments are bytewise equal.
6795
6796 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6797
6798         * doc/regexprops-generic.texi: Add a copyright notice.
6799
6800 2006-08-15  Bruno Haible  <bruno@clisp.org>
6801
6802         * modules/tmpdir (License): Change to LGPL.
6803
6804 2006-08-15  Bruno Haible  <bruno@clisp.org>
6805
6806         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6807         module.
6808
6809 2006-08-14  Simon Josefsson  <jas@extundo.com>
6810
6811         * config/srclist.txt: Add gnupload.
6812
6813 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6814
6815         Change copyright notice from LGPL 2 to GPL 2, since that's the
6816         standard form used in the gnulib repository.
6817         * tests/test-lock.c: Likewise.
6818         * tests/test-stdint.c: Likewise.
6819         * tests/test-tls.c: Likewise.
6820
6821         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6822         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6823         Add copyright notice.
6824
6825         * check-module: Add copyright notice.  Output a copyright
6826         notice if "--version" is specified.
6827         * modules/COPYING: New file.
6828         * tests/test-getaddrinfo.c: Add copyright notice.
6829         * tests/test-verify.c: Likewise.
6830
6831 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6832
6833         Change copyright notice from LGPL 2 to GPL 2, since that's the
6834         standard form used in the gnulib repository.
6835         * lib/lock.c: LGPL -> GPL.
6836         * lib/lock.h: Likewise.
6837         * lib/strnlen1.c: Likewise.
6838         * lib/strnlen1.h: Likewise.
6839         * lib/tls.c: Likewise.
6840         * lib/tls.h: Likewise.
6841         * lib/tmpdir.c: Likewise.
6842
6843         * lib/TODO: Remove; this belongs only in coreutils.
6844
6845 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6846
6847         Add copyright notices to long-enough files that lack them, since
6848         otherwise the files aren't clearly free.  Use the same notice that
6849         getdate.texi already uses.
6850         * doc/alloca-opt.texi: Add copyright notice.
6851         * doc/alloca.texi: Likewise.
6852         * doc/ctime.texi: Likewise.
6853         * doc/functions.texi: Likewise.
6854         * doc/gcd.texi: Likewise.
6855         * doc/gnulib-tool.texi: Likewise.
6856         * doc/inet_ntoa.texi: Likewise.
6857         * doc/visibility.texi: Likewise.
6858
6859         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6860         * doc/quote.texi: Add copyright notice.
6861
6862         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6863         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6864         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6865         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6866         is now obsolete, and give a pointer to the Sun list.
6867         Add copyright notice.
6868
6869 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6870
6871         * config/srclistvars.sh: Add copyright notice.
6872
6873 2006-08-14  Eric Blake  <ebb9@byu.net>
6874
6875         Import the following change from libc:
6876
6877         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6878
6879         Upstream bug 2997.
6880         * lib/misc/error.c: Add space between program name and message if file
6881         name is missing.
6882
6883 2006-08-12  Karl Berry  <karl@gnu.org>
6884
6885         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6886         remove, these originate in gnulib now.
6887
6888 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6889
6890         * doc/Makefile (standards.info standards.html standards.dvi):
6891         Also depend on make-stds.texi.
6892
6893 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6894
6895         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6896         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6897
6898         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6899         in wchar_t.  Problem reported by Eric Blake.
6900
6901         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6902         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6903         Also, help the compiler to keep LEN in a register.
6904
6905 2006-08-11  Eric Blake  <ebb9@byu.net>
6906
6907         * users.txt: Sort.  Add tar.
6908
6909 2006-08-11  Bruno Haible  <bruno@clisp.org>
6910
6911         * users.txt: New file.
6912
6913 2006-08-11  Bruno Haible  <bruno@clisp.org>
6914
6915         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6916         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6917
6918 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6919
6920         * modules/snprintf (Depends-on): Remove minmax.
6921         (Maintainer): Add self and Bruno.
6922
6923 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6924
6925         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6926         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6927         (EOVERFLOW): Define if the system does not.
6928         Do not include "minmax.h"; it wasn't used.
6929         (snprintf): Don't assume size_t promotes to an unsigned type.
6930         Fix bug when generated string was too long for the buffer: the
6931         buffer's contents are supposed to be the initial prefix of the
6932         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6933         exceeds INT_MAX; do the check ourselves.
6934
6935         Import the following changes from libc:
6936
6937         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6938
6939         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6940         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6941         set wc to the byte which couldn't be converted.
6942         (re_string_reconstruct): Don't clear valid_raw_len before calling
6943         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6944         tip_context using re_string_context_at.
6945
6946         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6947
6948         * lib/posix/regex.h: g++ still cannot handled [restrict].
6949
6950         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6951
6952         * lib/posix/regex.h: Remove special handling for VMS.
6953
6954 2006-08-10  Jim Meyering  <jim@meyering.net>
6955
6956         * modules/same-inode: New module.
6957         * modules/dev-ino: New module.
6958         * modules/cycle-check: Depend on these modules, rather than simply
6959         including their .h files.
6960         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6961         required via m4/cycle-check.m4.
6962         * modules/same: Depend on new same-inode module, rather than
6963         including same-inode.h.
6964         * modules/chdir-safer: New file.
6965
6966         * modules/chown (Depends-on): Add stat-macros.
6967
6968 2006-08-10  Jim Meyering  <jim@meyering.net>
6969
6970         * m4/cycle-check.m4: New file.
6971         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6972         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6973
6974 2006-08-10  Eric Blake  <ebb9@byu.net>
6975
6976         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6977         in from original proposal.
6978
6979 2006-08-10  Eric Blake  <ebb9@byu.net>
6980         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6981
6982         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6983         namespace.
6984
6985 2006-08-10  Bruno Haible  <bruno@clisp.org>
6986
6987         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6988         as well.
6989
6990 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6991
6992         Sync from coreutils.
6993
6994         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6995
6996         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6997         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6998
6999 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7000
7001         * modules/restrict: Remove; no longer needed now that we assume
7002         Autoconf 2.59 or later.
7003         * MODULES.html.sh: Remove 'restrict'.
7004         * modules/argp (Depends-on): Remove 'restrict'.
7005         * modules/base64 (Depends-on): Likewise.
7006         * modules/gc (Depends-on): Likewise.
7007         * modules/getaddrinfo (Depends-on): Likewise.
7008         * modules/glob (Depends-on): Likewise.
7009         * modules/inet_ntop (Depends-on): Likewise.
7010         * modules/inet_pton (Depends-on): Likewise.
7011         * modules/memxor (Depends-on): Likewise.
7012         * modules/regex (Depends-on): Likewise.
7013         * modules/strtok_r (Depends-on): Likewise.
7014         * modules/time_r (Depends-on): Likewise.
7015
7016 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7017
7018         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7019         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7020         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7021         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7022         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7023         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7024         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7025         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7026
7027         Merge from coreutils.
7028         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7029         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7030         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7031         * m4/time_r.m4 (gl_TIME_R): Likewise.
7032
7033 2006-08-09  Karl Berry  <karl@gnu.org>
7034
7035         * config/srclist.txt: no more gettext-tools, per Bruno.
7036
7037 2006-08-08  Eric Blake  <ebb9@byu.net>
7038
7039         * modules/verror: New module.
7040         * MODULES.html.sh: Document it.
7041
7042 2006-08-08  Eric Blake  <ebb9@byu.net>
7043
7044         * lib/verror.h, lib/verror.c: New files.
7045
7046 2006-08-08  Eric Blake  <ebb9@byu.net>
7047
7048         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7049         verror_at_line output complies with GNU Coding Standards even when
7050         file is NULL.
7051
7052 2006-08-07  Bruno Haible  <bruno@clisp.org>
7053
7054         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7055         versions of AIX.
7056         Reported by Ralf Wildenhues.
7057
7058 2006-08-07  Bruno Haible  <bruno@clisp.org>
7059
7060         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7061         in an AC_DEFUN. Needed so that the autoconf snippets can use
7062         AC_REQUIRE.
7063
7064 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7065
7066         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7067         Initialize pkgdata_DATA.
7068         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7069         overriding it.
7070
7071 2006-08-06  Eric Blake  <ebb9@byu.net>
7072
7073         * lib/error.h: Fold in some upstream changes from glibc.
7074         * lib/error.c: Likewise.
7075
7076 2006-08-04  Bruno Haible  <bruno@clisp.org>
7077
7078         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7079         Make the mostlyclean-local rule depend on mostlyclean-generic.
7080         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7081
7082 2006-07-31  Bruno Haible  <bruno@clisp.org>
7083
7084         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7085         <stdlib.h>, <string.h>.
7086
7087 2006-07-30  Bruno Haible  <bruno@clisp.org>
7088
7089         * modules/readlink (License): Change to LGPL.
7090
7091 2006-07-30  Bruno Haible  <bruno@clisp.org>
7092
7093         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7094         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7095         set PKGDATADIR to point to it.
7096
7097 2006-07-30  Bruno Haible  <bruno@clisp.org>
7098
7099         * modules/csharpexec (configure.ac): Comment out macro invocation.
7100         * modules/javaexec (configure.ac): Likewise.
7101         * modules/javacomp-script (configure.ac): Likewise.
7102
7103         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7104
7105 2006-07-30  Bruno Haible  <bruno@clisp.org>
7106
7107         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7108         linked-list.
7109
7110 2006-07-30  Bruno Haible  <bruno@clisp.org>
7111
7112         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7113
7114 2006-07-30  Bruno Haible  <bruno@clisp.org>
7115
7116         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7117         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7118         get removed.
7119
7120 2006-07-29  Bruno Haible  <bruno@clisp.org>
7121
7122         Make it possible for gnulib-tool to work with locally modified or
7123         augmented gnulib repositories.
7124         * gnulib-tool (func_usage): Document --local-dir option.
7125         (local_gnulib_dir): New variable.
7126         Handle --local-dir option.
7127         (func_lookup_file): New function.
7128         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7129         (func_get_description, func_get_filelist, func_get_description,
7130         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7131         func_get_automake_snippet, func_get_include_directive,
7132         func_get_license, func_get_maintainer): Use func_lookup_file.
7133         (func_import, func_create_testdir): Use func_lookup_file.
7134
7135 2006-07-29  Bruno Haible  <bruno@clisp.org>
7136
7137         * modules/setenv (Depends-on): Add unistd.
7138
7139 2006-07-29  Bruno Haible  <bruno@clisp.org>
7140
7141         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7142
7143 2006-07-29  Bruno Haible  <bruno@clisp.org>
7144
7145         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7146
7147 2006-07-29  Bruno Haible  <bruno@clisp.org>
7148
7149         * gnulib-tool (import, update): If there is no Makefile.am, look at
7150         aclocal.m4, instead of bailing out.
7151
7152 2006-07-29  Bruno Haible  <bruno@clisp.org>
7153
7154         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7155         Categorize the options by when they are useful.
7156
7157 2006-07-29  Bruno Haible  <bruno@clisp.org>
7158
7159         * gnulib-tool (func_usage): Document option --no-libtool.
7160         Handle option --no-libtool.
7161         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7162         for changed semantics of $libtool variable.
7163         (func_import): Likewise. If libtool is not used, show this through
7164         an option --no-libtool.
7165         (func_create_testdir): Update.
7166
7167 2006-07-29  Bruno Haible  <bruno@clisp.org>
7168
7169         * gnulib-tool (func_import): Extend error message about missing
7170         --doc-base.
7171
7172 2006-07-29  Bruno Haible  <bruno@clisp.org>
7173
7174         * gnulib-tool (func_import): Don't create the $docbase directory if
7175         there is no file to store there.
7176
7177 2006-07-29  Bruno Haible  <bruno@clisp.org>
7178
7179         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7180         relevant, look for configure.ac there, not in the current directory.
7181         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7182
7183 2006-07-29  Bruno Haible  <bruno@clisp.org>
7184
7185         * gnulib-tool (SORT): New variable.
7186         (func_usage): Undocument --assume-autoconf option.
7187         Remove --assume-autoconf option handling.
7188         (autoconf_minversion): Determine from the contents of configure.ac.
7189         (func_import): Remove autoconf_minversion handling.
7190         Suggested by Eric Blake.
7191
7192 2006-07-29  Bruno Haible  <bruno@clisp.org>
7193
7194         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7195
7196 2006-07-29  Bruno Haible  <bruno@clisp.org>
7197
7198         * config/srclist.txt (*setenv.[ch]): Remove rules.
7199
7200 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7201
7202         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7203
7204 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7205
7206         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7207         arpa/inet.h.
7208
7209 2006-07-28  Simon Josefsson  <jas@extundo.com>
7210
7211         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7212         * modules/inet_pton (Depends-on): Likewise.
7213
7214 2006-07-28  Simon Josefsson  <jas@extundo.com>
7215
7216         * m4/netinet_in_h.m4: New file.
7217
7218 2006-07-28  Simon Josefsson  <jas@extundo.com>
7219
7220         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7221         #include's.
7222
7223 2006-07-28  Simon Josefsson  <jas@extundo.com>
7224
7225         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7226         #include's.
7227
7228 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7229
7230         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7231         setgid on directories only if they set these bits.
7232         * lib/modechange.h: Remove obsolete comment about masks.
7233
7234 2006-07-28  Eric Blake  <ebb9@byu.net>
7235
7236         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7237         macro expansion.
7238
7239 2006-07-28  Bruno Haible  <bruno@clisp.org>
7240
7241         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7242
7243 2006-07-28  Bruno Haible  <bruno@clisp.org>
7244
7245         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7246
7247 2006-07-28  Bruno Haible  <bruno@clisp.org>
7248
7249         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7250         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7251         Define fallbacks.
7252         Avoids link error on FreeBSD 4.x.
7253         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7254
7255         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7256         encoding.
7257         * lib/mbswidth.c (iswcntrl): Likewise.
7258
7259 2006-07-27  Bruno Haible  <bruno@clisp.org>
7260
7261         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7262         test.
7263
7264 2006-07-27  Bruno Haible  <bruno@clisp.org>
7265
7266         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7267         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7268         defined.
7269
7270 2006-07-26  Eric Blake  <ebb9@byu.net>
7271
7272         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7273
7274 2006-07-26  Eric Blake  <ebb9@byu.net>
7275
7276         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7277         like mingw that lack mkstemp.
7278         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7279         avoid compilation warning on mingw.
7280
7281 2006-07-26  Bruno Haible  <bruno@clisp.org>
7282
7283         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7284         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7285         INT_FAST*_MIN, INTPTR_MIN.
7286
7287 2006-07-25  Bruno Haible  <bruno@clisp.org>
7288
7289         * modules/version-etc (Depends-on): Add stdarg.
7290
7291 2006-07-25  Bruno Haible  <bruno@clisp.org>
7292
7293         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7294         complex commands.
7295
7296 2006-07-25  Bruno Haible  <bruno@clisp.org>
7297
7298         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7299         defined in <stdarg.h> or config.h.
7300
7301 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7302
7303         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7304         (gl_STDIO_SAFER): Remove.
7305
7306 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7307
7308         * MODULES.html.sh (File stream based Input/Output):
7309         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7310         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7311         * modules/fopen-safer, modules/tmpfile-safer: New files.
7312         * modules/stdio-safer: Remove.
7313
7314 2006-07-24  Bruno Haible  <bruno@clisp.org>
7315
7316         * modules/tmpdir: New file.
7317         * MODULES.html.sh (File system functions): Add it.
7318
7319 2006-07-24  Bruno Haible  <bruno@clisp.org>
7320
7321         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7322         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7323
7324 2006-07-24  Bruno Haible  <bruno@clisp.org>
7325
7326         * modules/clean-temp: New file.
7327
7328 2006-07-24  Bruno Haible  <bruno@clisp.org>
7329
7330         * m4/tmpdir.m4: New file, from GNU gettext.
7331
7332 2006-07-24  Bruno Haible  <bruno@clisp.org>
7333
7334         * lib/tmpdir.h: New file, from GNU gettext.
7335         * lib/tmpdir.c: New file, from GNU gettext.
7336
7337 2006-07-24  Bruno Haible  <bruno@clisp.org>
7338
7339         * lib/clean-temp.h: New file, from GNU gettext.
7340         * lib/clean-temp.c: New file, from GNU gettext.
7341
7342 2006-07-23  Eric Blake  <ebb9@byu.net>
7343
7344         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7345         (Depends-on): Add binary-io.
7346
7347 2006-07-23  Eric Blake  <ebb9@byu.net>
7348
7349         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7350
7351 2006-07-23  Eric Blake  <ebb9@byu.net>
7352
7353         * lib/tmpfile-safer.c: New file.
7354         * lib/stdio-safer.h (fopen_safer): Add prototype.
7355         * lib/stdio--.h (tmpfile): Make safer.
7356
7357 2006-07-23  Bruno Haible  <bruno@clisp.org>
7358
7359         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7360         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7361         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7362         gl_linked_remove_at): Use it.
7363
7364 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7365         and Simon Josefsson <jas@extundo.com>
7366
7367         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7368
7369         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7370
7371 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7372
7373         * modules/close-stream: New file.
7374         * modules/closeout (Description): Make it clear that it exits
7375         with a diagnostic on error.
7376         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7377         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7378
7379 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7380
7381         * m4/close-stream.m4: New file.
7382
7383 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7384
7385         * lib/close-stream.c, lib/close-stream.h: New files.
7386
7387 2006-07-22  Bruno Haible  <bruno@clisp.org>
7388
7389         Merge from GNU gettext 0.15.
7390
7391         2006-05-01  Bruno Haible  <bruno@clisp.org>
7392
7393                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7394
7395         2006-07-22  Bruno Haible  <bruno@clisp.org>
7396
7397                 * modules/javaversion: New file.
7398                 * MODULES.html.sh (Java): Add javaversion.
7399
7400         2006-03-12  Bruno Haible  <bruno@clisp.org>
7401
7402                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7403
7404         2005-12-04  Bruno Haible  <bruno@clisp.org>
7405
7406                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7407                 (untested).
7408
7409         2006-06-21  Bruno Haible  <bruno@clisp.org>
7410
7411                 Avoid warnings from recent versions of mcs.
7412                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7413                 -o, -L, -r any more. Use options documented since mcs-1.0
7414                 instead. Similarly for -g.
7415
7416         2005-12-04  Bruno Haible  <bruno@clisp.org>
7417
7418                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7419                 .resources, not .resource.
7420
7421         2005-07-09  Bruno Haible  <bruno@clisp.org>
7422
7423                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7424                 add a .dll suffix.
7425                 Reported by Mark Junker <mjscod@gmx.de>.
7426
7427         2006-07-22  Bruno Haible  <bruno@clisp.org>
7428
7429                 * modules/gettext: Upgrade to gettext-0.15.
7430                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7431                 m4/visibility.m4.
7432                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7433
7434 2006-07-22  Bruno Haible  <bruno@clisp.org>
7435
7436         Merge from GNU gettext 0.15.
7437
7438         2006-03-25  Bruno Haible  <bruno@clisp.org>
7439
7440                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7441
7442         2006-07-21  Bruno Haible  <bruno@clisp.org>
7443
7444                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7445                 "1.1".
7446
7447         2006-05-09  Bruno Haible  <bruno@clisp.org>
7448
7449                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7450                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7451                 for the conftestver execution.
7452
7453         2006-05-01  Bruno Haible  <bruno@clisp.org>
7454
7455                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7456                 optional target-version argument. Verify that the compiler
7457                 groks source of the specified source-version, or add -source
7458                 option as necessary. Verify that the compiler produces
7459                 bytecode in the specified target-version, or add -target and
7460                 -source options as necessary. Make the result of the test
7461                 available as variable CONF_JAVAC. Also log error output in
7462                 config.log.
7463
7464         2006-03-11  Bruno Haible  <bruno@clisp.org>
7465
7466                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7467
7468         2006-05-09  Bruno Haible  <bruno@clisp.org>
7469
7470                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7471                 CLASSPATH_SEPARATOR to a semicolon.
7472
7473         2006-03-12  Bruno Haible  <bruno@clisp.org>
7474
7475                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7476                 available as variable CONF_JAVA, for subsequent autoconf
7477                 tests. Also log error output in config.log.
7478
7479         2006-07-19  Bruno Haible  <bruno@clisp.org>
7480
7481                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7482                 that getline works on glibc2 systems. Needed to avoid trouble
7483                 in relocatable.c.
7484                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7485
7486         2005-12-04  Bruno Haible  <bruno@clisp.org>
7487
7488                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7489                 launcher (untested).
7490
7491         2005-12-04  Bruno Haible  <bruno@clisp.org>
7492
7493                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7494
7495         2006-07-22  Bruno Haible  <bruno@clisp.org>
7496
7497                 * gettext.m4: Update from GNU gettext-0.15.
7498                 * nls.m4: Likewise.
7499                 * po.m4: Likewise.
7500                 * inttypes-pri.m4: Likewise.
7501                 * inttypes-h.m4: Renamed from inttypes.m4.
7502                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7503
7504 2006-07-22  Bruno Haible  <bruno@clisp.org>
7505
7506         Merge from GNU gettext 0.15.
7507
7508         2005-07-05  Bruno Haible  <bruno@clisp.org>
7509
7510                 * printf-args.c (printf_fetchargs): Work around broken
7511                 definition of wint_t on mingw.
7512
7513         2005-02-12  Bruno Haible  <bruno@clisp.org>
7514
7515                 * xallocsa.h: Add extern "C" for C++.
7516
7517         2006-05-17  Bruno Haible  <bruno@clisp.org>
7518
7519                 Cygwin portability.
7520                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7521
7522         2006-04-30  Bruno Haible  <bruno@clisp.org>
7523
7524                 * progreloc.c: Include <mach-o/dyld.h> if available.
7525                 (find_executable): Use _NSGetExecutablePath when possible.
7526
7527         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7528
7529                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7530                 function.
7531
7532         2005-12-29  Bruno Haible  <bruno@clisp.org>
7533
7534                 * progreloc.c (set_program_name_and_installdir): Fix
7535                 compilation error.
7536
7537         2005-12-04  Bruno Haible  <bruno@clisp.org>
7538
7539                 Cygwin portability.
7540                 * progreloc.c: Include <windows.h> also on Cygwin.
7541                 (find_executable): Add support for Cygwin.
7542                 (set_program_name_and_installdir): Handle also platforms with
7543                 nonempty EXEEXT.
7544
7545         2006-07-11  Bruno Haible  <bruno@clisp.org>
7546
7547                 * javacomp.c: Fix a comment.
7548                 Reported by Jim Meyering.
7549
7550         2006-04-30  Bruno Haible  <bruno@clisp.org>
7551
7552                 * javacomp.h (compile_java_class): Add source_version,
7553                 target_version arguments.
7554                 * javacomp.c: Rewritten to choose only a compiler that
7555                 respects the specified source_version and target_version.
7556
7557         2006-06-27  Bruno Haible  <bruno@clisp.org>
7558
7559                 Assume correct S_ISDIR macro.
7560                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7561
7562         2006-07-22  Bruno Haible  <bruno@clisp.org>
7563
7564                 * javaversion.h: New file, from GNU gettext.
7565                 * javaversion.c: New file, from GNU gettext.
7566                 * javaversion.java: New file, from GNU gettext.
7567                 * javaversion.class: New file, from GNU gettext.
7568
7569         2006-05-17  Bruno Haible  <bruno@clisp.org>
7570
7571                 Cygwin portability.
7572                 * javaexec.c (execute_java_class): Test for jview program
7573                 also on Cygwin.
7574
7575         2006-04-09  Bruno Haible  <bruno@clisp.org>
7576
7577                 * fatal-signal.c: Don't include string.h.
7578                 (at_fatal_signal): Use a copying loop instead of memcpy.
7579
7580         2005-12-04  Bruno Haible  <bruno@clisp.org>
7581
7582                 * csharpexec.c: Add support for 'clix' launcher (untested).
7583                 (execute_csharp_using_sscli): New function.
7584                 (execute_csharp_program): Call it.
7585
7586         2006-06-21  Bruno Haible  <bruno@clisp.org>
7587
7588                 Avoid warnings from recent versions of mcs.
7589                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7590                 -o, -L, -r any more. Use options documented since mcs-1.0
7591                 instead. Similarly for -g.
7592
7593         2005-07-09  Bruno Haible  <bruno@clisp.org>
7594
7595                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7596                 add a .dll suffix.
7597                 Reported by Mark Junker <mjscod@gmx.de>.
7598
7599         2006-06-17  Bruno Haible  <bruno@clisp.org>
7600
7601                 * config.charset: Update for NetBSD 3.0.
7602
7603         2006-05-17  Bruno Haible  <bruno@clisp.org>
7604
7605                 Cygwin portability.
7606                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7607
7608         2006-05-16  Bruno Haible  <bruno@clisp.org>
7609
7610                 * localcharset.c [CYGWIN]: Include <windows.h>.
7611                 (get_charset_aliases): For Cygwin, return the same CPxxx
7612                 aliases list as under WIN32.
7613                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7614                 the environment variables. Fall back to GetACP().
7615
7616         2006-04-05  Bruno Haible  <bruno@clisp.org>
7617
7618                 * config.charset: Update Juan Manuel Guerrero's address.
7619
7620         2005-02-12  Bruno Haible  <bruno@clisp.org>
7621
7622                 * allocsa.h: Add extern "C" for C++.
7623
7624         2005-02-10  Bruno Haible  <bruno@clisp.org>
7625
7626                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7627                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7628
7629         2006-07-22  Bruno Haible  <bruno@clisp.org>
7630
7631                 * gettext.h: Update to GNU gettext-0.15.
7632
7633 2006-07-22  Bruno Haible  <bruno@clisp.org>
7634
7635         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7636         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7637         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7638
7639 2006-07-21  Eric Blake  <ebb9@byu.net>
7640
7641         * modules/stdlib-safer: New file.
7642         * MODULES.html.sh (File stream based Input/Output): Add
7643         stdlib-safer.
7644
7645 2006-07-21  Eric Blake  <ebb9@byu.net>
7646
7647         * lib/stdlib-safer.h: New file from coreutils, required by
7648         stdlib--.h.
7649
7650 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7651
7652         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7653
7654 2006-07-20  Bruno Haible  <bruno@clisp.org>
7655
7656         * gnulib-tool: Recognize new option --assume-autoconf.
7657         (autoconf_minversion): New variable.
7658         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7659
7660 2006-07-20  Bruno Haible  <bruno@clisp.org>
7661
7662         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7663
7664 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7665
7666         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7667         Reindent and repaginate.
7668
7669 2006-07-19  Derek Price  <derek@ximbiot.com>
7670
7671         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7672         Correct grammar.
7673
7674 2006-07-17  Bruno Haible  <bruno@clisp.org>
7675
7676         * modules/list: New file.
7677         * modules/array-list: New file.
7678         * modules/carray-list, modules/carray-list-tests: New files.
7679         * modules/linked-list, modules/linked-list-tests: New files.
7680         * modules/avltree-list, modules/avltree-list-tests: New files.
7681         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7682         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7683         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7684         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7685         * modules/oset: New file.
7686         * modules/array-oset: New file.
7687         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7688         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7689         * tests/test-carray_list.c: New file.
7690         * tests/test-linked_list.c: New file.
7691         * tests/test-avltree_list.c: New file.
7692         * tests/test-rbtree_list.c: New file.
7693         * tests/test-linkedhash_list.c: New file.
7694         * tests/test-avltreehash_list.c: New file.
7695         * tests/test-rbtreehash_list.c: New file.
7696         * tests/test-avltree_oset.c: New file.
7697         * tests/test-rbtree_oset.c: New file.
7698         * MODULES.html.sh (Container data structures): New section.
7699
7700 2006-07-17  Bruno Haible  <bruno@clisp.org>
7701
7702         * m4/gl_list.m4: New file.
7703
7704 2006-07-17  Bruno Haible  <bruno@clisp.org>
7705
7706         * lib/gl_list.h: New file.
7707         * lib/gl_list.c: New file.
7708         * lib/gl_array_list.h: New file.
7709         * lib/gl_array_list.c: New file.
7710         * lib/gl_carray_list.h: New file.
7711         * lib/gl_carray_list.c: New file.
7712         * lib/gl_linked_list.h: New file.
7713         * lib/gl_linked_list.c: New file.
7714         * lib/gl_anylinked_list1.h: New file.
7715         * lib/gl_anylinked_list2.h: New file.
7716         * lib/gl_avltree_list.h: New file.
7717         * lib/gl_avltree_list.c: New file.
7718         * lib/gl_anyavltree_list1.h: New file.
7719         * lib/gl_anyavltree_list2.h: New file.
7720         * lib/gl_rbtree_list.h: New file.
7721         * lib/gl_rbtree_list.c: New file.
7722         * lib/gl_anyrbtree_list1.h: New file.
7723         * lib/gl_anyrbtree_list2.h: New file.
7724         * lib/gl_anytree_list1.h: New file.
7725         * lib/gl_anytree_list2.h: New file.
7726         * lib/gl_linkedhash_list.h: New file.
7727         * lib/gl_linkedhash_list.c: New file.
7728         * lib/gl_anyhash_list1.h: New file.
7729         * lib/gl_anyhash_list2.h: New file.
7730         * lib/gl_avltreehash_list.h: New file.
7731         * lib/gl_avltreehash_list.c: New file.
7732         * lib/gl_rbtreehash_list.h: New file.
7733         * lib/gl_rbtreehash_list.c: New file.
7734         * lib/gl_anytreehash_list1.h: New file.
7735         * lib/gl_anytreehash_list2.h: New file.
7736
7737         * lib/gl_oset.h: New file.
7738         * lib/gl_oset.c: New file.
7739         * lib/gl_array_oset.h: New file.
7740         * lib/gl_array_oset.c: New file.
7741         * lib/gl_avltree_oset.h: New file.
7742         * lib/gl_avltree_oset.c: New file.
7743         * lib/gl_rbtree_oset.h: New file.
7744         * lib/gl_rbtree_oset.c: New file.
7745         * lib/gl_anytree_oset.h: New file.
7746
7747 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7748
7749         * m4/mkancesdirs.m4: New file.
7750         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7751         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7752         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7753         it.
7754
7755 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7756
7757         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7758         * lib/mkancesdirs.h: New files.
7759         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7760         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7761         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7762         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7763         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7764         callers changed.  Revamp internals significantly, by not
7765         attempting to create directories that are temporarily more
7766         permissive than the final results.  Do not attempt to use
7767         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7768         This removes some race conditions, fixes some bugs, and simplifies
7769         things.  Use new dirchownmod function to do owner and mode changes.
7770         * lib/mkdir-p.h: Likewise.
7771         * lib/modechange.c (octal_to_mode): New function.
7772         (struct mode_change): New member mentioned.
7773         (make_node_op_equals): New arg mentioned.  All callers changed.
7774         (mode_compile): Keep track of which mode bits the user has explicitly
7775         mentioned.
7776         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7777         New arg PMODE_BITS, to keep track of which mode bits the user
7778         mentioned; it treats S_ISUID and S_ISGID speciall.
7779         All callers changed.
7780         * lib/modechange.h: Likewise.
7781
7782 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7783
7784         * MODULES.html.sh: Add mkancestors.
7785         * modules/mkancesdirs: New module.
7786         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7787         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7788         The chdir-safer and afs files are now orphans; I'll remove them
7789         unless someone speaks up.
7790         Add lib/dirchownmod.c, lib/dirchownmod.h.
7791         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7792         Add lchown, mkancesdirs.
7793         (Maintainer): Add self.
7794
7795 2006-07-15  Karl Berry  <karl@gnu.org>
7796
7797         * gnulib-tool: help message wording/arrangement.
7798
7799 2006-07-14  Simon Josefsson  <jas@extundo.com>
7800
7801         * doc/gnulib.texi (Libtool and Windows): New section.
7802
7803 2006-07-12  Simon Josefsson  <jas@extundo.com>
7804
7805         * modules/gendocs (License): Fix license, approved by Karl.
7806
7807 2006-07-12  Eric Blake  <ebb9@byu.net>
7808
7809         * MODULES.html.sh: Add gendocs.
7810
7811 2006-07-11  Eric Blake  <ebb9@byu.net>
7812
7813         * modules/fdl: New module, to install doc/fdl.texi.
7814         * MODULES.html.sh: Add new section for documentation modules.
7815         * gnulib-tool: Avoid space-tab.
7816         (--doc-base): New option, to manage files from doc.
7817
7818 2006-07-11  Eric Blake  <ebb9@byu.net>
7819
7820         * m4/absolute-header.m4: Fix comments to match recent change.
7821
7822 2006-07-11  Eric Blake  <ebb9@byu.net>
7823
7824         * gnulib-tool: List --doc-base before --tests-base.
7825
7826 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7827
7828         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7829
7830 2006-07-11  Bruno Haible  <bruno@clisp.org>
7831
7832         * README: Mention where to put documentation.
7833
7834 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7835
7836         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7837
7838 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7839
7840         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7841         to stdint.m4.
7842
7843 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7844
7845         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7846         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7847         "no/such/file/stdint.h" when there is no such file, so that
7848         the resulting C code can be parsed by dodgy compilers.
7849         Problems reported by Bob Proulx.
7850
7851 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7852
7853         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7854         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7855         macros into the GNU _D_EXACT_NAMLEN.
7856         * lib/savedir.c:  Likewise.
7857         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7858
7859 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7860         and Paul Eggert  <eggert@cs.ucla.edu>
7861
7862         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7863         * m4/savedir.m4:
7864         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7865         macros into the GNU _D_EXACT_NAMLEN.
7866
7867 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7868
7869         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7870         around the absolute name, to work around a problem with the HP-UX
7871         11.23 native C compiler, reported by Bob Proulx.
7872
7873 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7874
7875         * doc/maintain.texi, make-stds.texi: Sync from
7876         <http://savannah.gnu.org/projects/gnustandards>.
7877
7878 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7879
7880         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7881
7882 2006-07-09  Jim Meyering  <jim@meyering.net>
7883
7884         * m4/glob.m4: Remove a doubled word in a comment.
7885
7886 2006-07-09  Jim Meyering  <jim@meyering.net>
7887
7888         * lib/argp-pv.c: Remove a doubled word in a comment.
7889         * lib/check-version.c (check_version): Likewise.
7890         * lib/javacomp.c (compile_java_class): Likewise.
7891
7892 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7893
7894         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7895         for the benefit of people using Autoconf 2.60.  If you want to
7896         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7897         (or m4/onceonly.m4, if pre-2.57) manually.
7898
7899 2006-07-08  Jim Meyering  <jim@meyering.net>
7900
7901         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7902         comment.
7903         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7904         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7905         comment.
7906
7907 2006-07-08  Jim Meyering  <jim@meyering.net>
7908
7909         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7910
7911 2006-07-07  Simon Josefsson  <jas@extundo.com>
7912
7913         * tests/test-crc.c: Change expected crc value, the test vector
7914         were probably computed using the old broken crc.c?
7915
7916 2006-07-06  Simon Josefsson  <jas@extundo.com>
7917
7918         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7919         now the canonical place for the M4 file).
7920
7921         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7922         from the sys_socket dependency now.
7923
7924         * modules/inet_pton (Files): Ditto.
7925
7926         * modules/inet_ntop (Files): Ditto.
7927
7928 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7929
7930         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7931         not gl_PREREQ_GETUSERSHELL.
7932
7933 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7934
7935         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7936         with only one argument, for Autoconf 2.60.
7937         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7938         expand to nothing, so add a shell command to avoid syntax error.
7939         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7940
7941 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7942
7943         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7944
7945 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7946
7947         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7948         no longer needed.  Check for isblank decl.
7949         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7950         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7951         of existence.
7952
7953 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7954
7955         * lib/getloadavg.c: Use __VMS, not VMS.
7956         * lib/getopt.c: Likewise.
7957         * lib/getpagesize.h: Likewise.
7958         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7959         and probably does not work.
7960
7961 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7962
7963         * lib/.cppi-disable: Add wcwidth.
7964         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7965         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7966         (ISGRAPH): Remove.  All uses changed to isgraph.
7967         (FOLD) [!defined _LIBC]: Remove special case.
7968         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7969         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7970         HAVE_ISBLANK.
7971         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7972         case.
7973
7974 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7975
7976         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7977         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7978         brackets.  Other minor changes to suppress some compiler
7979         warnings.
7980
7981 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7982         and Paul Eggert  <eggert@cs.ucla.edu>
7983
7984         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7985         of invoking obsolescent AC_HEADER_DIRENT macro.
7986         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7987         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7988         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7989         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7990         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7991         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7992         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7993         * m4/readdir.m4: Remove; no longer needed.
7994
7995 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7996         and Paul Eggert  <eggert@cs.ucla.edu>
7997
7998         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7999         Don't worry about this obsolete case any more.
8000         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8001         directories.
8002         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8003         worry about this obsolete case any more.
8004         * lib/fts.c: Likewise.
8005         * lib/getcwd.c: Likewise.
8006         * lib/glob.h: Likewise.
8007         * lib/savedir.c: Likewise.
8008
8009 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8010
8011         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8012         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8013         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8014         needed.
8015         All uses removed.
8016         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8017         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8018         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8019         needed.
8020         * m4/getdate.m4 (gl_GETDATE): Likewise.
8021         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8022         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8023         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8024         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8025         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8026         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8027         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8028         needed.
8029
8030 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8031
8032         * lib/memcasecmp.c: Include <limits.h>.
8033         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8034         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8035         Don't assume isdigit succeeds only on '0' through '9'.
8036
8037 2006-07-05  Eric Blake  <ebb9@byu.net>
8038
8039         * modules/getaddrinfo (Depends-on): Add snprintf.
8040
8041 2006-07-05  Eric Blake  <ebb9@byu.net>
8042
8043         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8044         to avoid 'header present but could not be compiled' on cygwin.
8045
8046 2006-07-05  Eric Blake  <ebb9@byu.net>
8047
8048         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8049         missing from netdb.h.
8050         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8051
8052 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8053
8054         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8055         no longer needed.
8056         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8057         * m4/getdate.m4 (gl_GETDATE): Likewise.
8058         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8059         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8060         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8061         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8062         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8063
8064 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8065
8066         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8067         All uses of is_space replaced by isspace.
8068         * lib/exit.h: Don't talk about STDC_HEADERS.
8069         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8070         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8071         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8072         replaced by isprint etc.
8073         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8074         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8075         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8076         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8077         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8078         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8079
8080 2006-07-05  Bruno Haible  <bruno@clisp.org>
8081
8082         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8083         the function exists, before testing against AIX.
8084         Reported by Martin Lambers <marlam@marlam.de>.
8085
8086 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8087
8088         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8089         From Mark D. Baushke.
8090
8091 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8092
8093         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8094         to the absolute name, not just one, to bypass Sun C 5.8's
8095         "warning: #include of /usr/include/... may be non-portable".
8096
8097 2006-07-04  Eric Blake  <ebb9@byu.net>
8098
8099         * modules/dirname-tests: New test module.
8100         * tests/test-dirname.c: New file, replacing dirname.c
8101         TEST_DIRNAME section that was recently deleted.
8102
8103 2006-07-04  Bruno Haible  <bruno@clisp.org>
8104
8105         Assume ANSI C header files and <ctype.h> functions.
8106         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8107         (mbsnwidth): Use isprint, iscntrl instead.
8108
8109 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8110
8111         Merge from coreutils.
8112         * MODULES.html.sh: Add xstrtold.
8113         * modules/xstrtold: New file.
8114         * modules/cycle-check (Files): Add lib/same-inode.h.
8115         * modules/dirname (Files): Add m4/double-slash-root.m4.
8116         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8117         * modules/mkdir-p (Files): Add lib/same-inode.h.
8118         * modules/same (Files): Add lib/same-inode.h.
8119
8120 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8121
8122         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8123         This is to keep the terminology clean; POSIX talks about
8124         "absolute pathnames", not "full pathnames", but the GNU
8125         Coding Standards say to use "path" for something else;
8126         so use "absolute" to keep both sides happy.
8127         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8128         Set gl_absolute_header, not gl_full_header_path.
8129         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8130         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8131         All uses changed.
8132
8133         Merge from coreutils.
8134
8135         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8136
8137         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8138         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8139         want to require the building of c-strtod.o.
8140         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8141         needs -lm directly.
8142         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8143
8144         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8145
8146         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8147         --as-needed option if available.  Problem reported by Albert Chin in
8148         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8149         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8150         cc merely issues a bunch of annoying warnings for --as-needed
8151         (this problem was reported by Bob Proulx).  Also, try linking with
8152         -lm to detect a bug in binutils 2.16 (this problem was reported
8153         by Ralf Wildenhues).
8154
8155         2006-06-18  Jim Meyering  <jim@meyering.net>
8156
8157         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8158         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8159         macro.
8160         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8161         also check for glibc-2.4's abort-inducing bug.
8162
8163         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8164         Low-probability clean-up should be to use rmdir to get rid of
8165         the just-created directory, not unlink.
8166
8167         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8168         configure fail, and request a bug report to inform us about it.
8169         Add a comment that, barring reports to the contrary, in 2007 we'll
8170         assume ftruncate is universally available.
8171
8172         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8173
8174         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8175
8176         2006-03-12  Jim Meyering  <jim@meyering.net>
8177
8178         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8179         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8180         * m4/same.m4 (gl_SAME): Likewise.
8181         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8182
8183         2006-03-11  Eric Blake  <ebb9@byu.net>
8184
8185         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8186         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8187         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8188         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8189
8190 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8191
8192         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8193         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8194         reported by Mark D. Baushke, one in
8195         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8196
8197         Merge from coreutils.
8198
8199         * lib/.cppi-disable: Add stdint_.h.
8200         * lib/.cvsignore: Add stdint.h.
8201
8202         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8203
8204         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8205         both double and long double versions.
8206         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8207         * lib/xstrtold.c: New file.
8208         * lib/xstrtod.h (xstrtold): New decl.
8209
8210         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8211
8212         * lib/filemode.c (setst): Remove.
8213         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8214         (arguably) clearer, and the generated code is a bit smaller on my
8215         Debian GNU/Linux stable x86 host.
8216
8217         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8218
8219         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8220         Assume that filemode.h includes sys/types.h and sys/stat.h.
8221         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8222         (ftypelet): Reorder to put common cases first, for efficiency.
8223         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8224         to do 'M'.
8225         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8226         of 10, for compatibility with FreeBSD.  All callers changed.
8227         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8228         types that can't be deduced solely from st_mode.  First arg is now a
8229         const pointer.
8230         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8231         (strmode): Renamed from mode_string.
8232         (filemodestring): New decl.
8233         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8234         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8235         needed.
8236         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8237
8238         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8239
8240         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8241         fsusage.h now does that.  Include fsusage.h first, to test interface.
8242         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8243         at most one method (the old code could have generated decls that
8244         didn't conform to C89, not that this was ever exercised).
8245         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8246
8247         2006-03-19  Jim Meyering  <jim@meyering.net>
8248
8249         Work even in a chroot where d_ino values for entries in "/"
8250         don't match the stat.st_ino values for the same names.
8251         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8252         number, iterate through all entries again, using lstat instead.
8253         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8254         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8255
8256         * lib/getcwd.c (__getcwd): Clarify a comment.
8257         Use memcpy in place of a call to strcpy.
8258
8259         2006-03-12  Jim Meyering  <jim@meyering.net>
8260
8261         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8262         matches that of the current directory (which we're about to chdir ".."
8263         out of), then save the dev-ino of the parent, instead.
8264
8265         * lib/same-inode.h (SAME_INODE): New file/macro.
8266         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8267         Include "same-inode.h", instead.
8268         * lib/same.c: Likewise.
8269         * lib/cycle-check.h: Include "same-inode.h".
8270         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8271         * lib/cycle-check.c (SAME_INODE): Remove definition.
8272         * lib/root-dev-ino.h: Include "same-inode.h".
8273
8274         2006-03-11  Eric Blake  <ebb9@byu.net>
8275
8276         * lib/same.c (same_name): s/base_name/last_component/
8277         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8278         * lib/filenamecat.c (file_name_concat): Likewise.
8279
8280         2006-03-11  Eric Blake  <ebb9@byu.net>,
8281                     Paul Eggert  <eggert@cs.ucla.edu>
8282
8283         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8284         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8285         drive prefix.
8286         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8287         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8288         (last_component): New method.
8289         * lib/dirname.c (dir_len): Determine when drive letters need a
8290         subsequent slash.  Preserve // when it is special.
8291         (dir_name): Don't append dot when drive letter is absolute.
8292         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8293         * lib/basename.c (base_name): New semantics - malloc the result.
8294         Preserve // when it is special.  Preserve relative files that look
8295         like drive letters.
8296         (base_len): Preserve // when it is special.
8297         (last_component): New method, similar to old base_name semantics.
8298         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8299         base_name.  Strip redundant slashes from ///.
8300
8301 2006-07-03  Jim Meyering  <jim@meyering.net>
8302
8303         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8304         macro is used before the first cycle_check call.
8305
8306 2006-07-03  Eric Blake  <ebb9@byu.net>
8307
8308         * modules/dirname (Depends-on): Add xstrndup.
8309
8310 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8311
8312         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8313         test cases, so that config.log is a bit easier to follow.
8314
8315 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8316
8317         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8318         both are 64 bits, since this seems to be the tradition, and this
8319         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8320         we ever run into a host that prefers long long to long in this
8321         case, we'll need another configure-time test.  Problem reported by
8322         Jim Meyering.
8323
8324 2006-07-02  Eric Blake  <ebb9@byu.net>
8325
8326         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8327
8328 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8329
8330         * modules/inttypes (Depends-on): No longer depends on stdint.
8331         * modules/stdint (Description): Say more about assumptions.
8332         Say that the fast types might differ.  Say macros are used.
8333         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8334         (Makefile.am): Revise list of substituted symbols to match
8335         new stdint.m4.
8336         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8337         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8338         * tests/test-stdint.c (verify_same_types)
8339         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8340         the code conforms to C99/C89.
8341         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8342         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8343
8344 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8345
8346         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8347         but fix a bug, by requiring at least 64 bits.
8348         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8349         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8350         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8351         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8352
8353         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8354         changes.  Make 2.59 a prerequisite.  Check and substitute for
8355         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8356         inttypes.h.  Do not use special include files; just use the
8357         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8358         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8359         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8360         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8361         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8362         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8363         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8364         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8365         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8366         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8367         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8368         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8369         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8370         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8371         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8372         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8373         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8374         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8375         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8376         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8377         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8378         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8379         not check for things that C99 does not require, e.g., int8_t.  If
8380         a test isn't needed unless <stdint.h> isn't working, and is
8381         unlikely to be needed for any other reason, then don't do it
8382         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8383         size_t, since we assume C89 freestanding at least.  Do not check
8384         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8385         the right thing even if the types are not defined.  Instead use:
8386         (gl_STDINT_TYPE_PROPERTIES): New macro.
8387         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8388         testing whether <sys/types.h> clashes, as Autoconf does this for
8389         us now.  All uses removed.
8390         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8391         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8392         (gl_CHECK_TYPE_SAME):
8393         Remove; no longer needed.
8394         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8395         exists, since we'll return 0 anyway in that case.
8396         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8397
8398 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8399
8400         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8401         possible collision with system files.
8402         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8403         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8404         WCHAR_MIN and WCHAR_MAX in this case.
8405         (<stddef.h>): Do not include; no longer needed.
8406         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8407         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8408         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8409         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8410         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8411         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8412         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8413         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8414         !defined(__c99))]: Include in this case too, since it's harmless
8415         now.
8416         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8417         dangerous to do so.
8418         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8419         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8420         (_STDINT_MIN, _STDINT_MAX): New macros.
8421         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8422         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8423         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8424         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8425         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8426         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8427         macros, not typedefs; this simplifies things quite a bit.
8428         Use long int for all types narrower than int64_t.
8429         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8430         Define in terms of long long int or int64_t or long int,
8431         not int64_t or int32_t.  This saves some compile-time testing.
8432         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8433         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8434         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8435         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8436         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8437         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8438         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8439         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8440         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8441         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8442         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8443         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8444         undef any previous version and define our own version, for
8445         simplicity and consistency with the new macros for types.
8446         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8447         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8448         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8449         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8450         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8451         @WINT_T_SUFFIX@ to keep things simple here.
8452         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8453         Simplify by assuming typical 8/16/32/64 host, since we're
8454         already doing that elsewhere anyway.
8455         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8456         and assume long long int is 64 bits if available.  This
8457         speeds up 'configure'.
8458
8459 2006-07-01  Eric Blake  <ebb9@byu.net>
8460
8461         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8462         Reported by Andreas Buening.
8463
8464 2006-07-01  Eric Blake  <ebb9@byu.net>
8465
8466         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8467
8468 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8469
8470         * lib/getaddrinfo.c: fixed typo
8471
8472 2006-06-29  Jim Meyering  <jim@meyering.net>
8473
8474         * modules/strftime (Maintainer): Add my name, since with the
8475         FPRINTFTIME changes strftime.c has forked from glibc.
8476
8477 2006-06-29  Eric Blake  <ebb9@byu.net>
8478
8479         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8480
8481 2006-06-29  Eric Blake  <ebb9@byu.net>
8482
8483         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8484
8485 2006-06-29  Eric Blake  <ebb9@byu.net>
8486
8487         * lib/stat_.h: New file.
8488
8489 2006-06-29  Eric Blake  <ebb9@byu.net>
8490
8491         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8492         unused static function.
8493
8494 2006-06-29  Eric Blake  <ebb9@byu.net>
8495
8496         * doc/functions.texi (Function Portability): Document missing lstat
8497         on mingw.
8498
8499 2006-06-29  Eric Blake  <ebb9@byu.net>
8500
8501         * MODULES.html.sh: Add sys_stat.
8502         * modules/sys_stat: New module.
8503         * modules/mkstemp (Depends-on): Add sys_stat.
8504
8505 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8506
8507         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8508
8509 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8510
8511         * m4/c-bs-a.m4: Removed.
8512
8513 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8514
8515         * lib/strftime.c: Assume strftime() exists.
8516
8517 2006-06-29  Derek Price  <derek@ximbiot.com>
8518
8519         * modules/c-bs-a: Removed - \a is C89.
8520         * MODULES.html.sh: Remove c-bs-a.
8521
8522 2006-06-29  Bruno Haible  <bruno@clisp.org>
8523
8524         * modules/wcwidth (License): Change to LGPL.
8525
8526 2006-06-28  Simon Josefsson  <jas@extundo.com>
8527
8528         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8529         on _WIN32.
8530
8531         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8532         getnameinfo.
8533
8534 2006-06-28  Simon Josefsson  <jas@extundo.com>
8535
8536         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8537
8538 2006-06-28  Simon Josefsson  <jas@extundo.com>
8539
8540         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8541         functions there.  It will succeed on Windows XP, but on Windows
8542         2000 and (presumably) earlier, it will fail, and use the internal
8543         re-implementation.
8544         (use_win32_p): New function.
8545         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8546         Support AI_NUMERICSERV to disable getservbyname.
8547         (getnameinfo): New function, only supports
8548         NI_NUMERICHOST|NI_NUMERICSERV for now.
8549
8550         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8551         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8552         getnameinfo.
8553
8554 2006-06-28  Eric Blake  <ebb9@byu.net>
8555
8556         * modules/wcwidth: New file.
8557         * modules/mbchar (Depends-on): Add wcwidth.
8558         * modules/mbswidth (Depends-on): Add wcwidth.
8559         * MODULES.html.sh: Add wcwidth.
8560
8561 2006-06-28  Eric Blake  <ebb9@byu.net>
8562
8563         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8564         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8565
8566 2006-06-28  Eric Blake  <ebb9@byu.net>
8567
8568         * lib/xvasprintf.h: Fix comments.
8569
8570 2006-06-28  Eric Blake  <ebb9@byu.net>
8571
8572         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8573         * lib/mbswidth.c (wcwidth): Move from here...
8574         * lib/wcwidth.h: ...to this new file.
8575
8576 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8577
8578         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8579
8580         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8581         it's obsolete.
8582         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8583
8584 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8585
8586         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8587         Autoconf 2.60 says this stuff was obsolete.
8588
8589 2006-06-28  Bruno Haible  <bruno@clisp.org>
8590
8591         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8592
8593 2006-06-28  Bruno Haible  <bruno@clisp.org>
8594
8595         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8596         gt_TYPE_WCHAR_T.
8597
8598 2006-06-28  Bruno Haible  <bruno@clisp.org>
8599
8600         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8601         declaration for wcwidth.
8602         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8603
8604 2006-06-28  Bruno Haible  <bruno@clisp.org>
8605
8606         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8607         (mkdir): Define using _mkdir.
8608
8609 2006-06-28  Bruno Haible  <bruno@clisp.org>
8610
8611         * lib/getaddrinfo.h: Fix POSIX URL.
8612         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8613         _WIN32.
8614         (use_win32_p): Make static.
8615         (getaddrinfo): Reject service name if it is empty or does not consist
8616         solely of decimal digits, or if its value is > 65535.
8617         (getnameinfo): Remove useless casts.
8618
8619 2006-06-27  Simon Josefsson  <jas@extundo.com>
8620
8621         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8622         Eggert and Martin Lambers.
8623
8624 2006-06-27  Simon Josefsson  <jas@extundo.com>
8625
8626         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8627         Eggert and Martin Lambers.
8628
8629 2006-06-27  Bruno Haible  <bruno@clisp.org>
8630
8631         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8632         result to 0, not to empty.
8633         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8634
8635 2006-06-27  Bruno Haible  <bruno@clisp.org>
8636
8637         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8638
8639 2006-06-26  Simon Josefsson  <jas@extundo.com>
8640
8641         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8642         present.
8643
8644 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8645
8646         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8647         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8648         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8649
8650 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8651
8652         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8653
8654 2006-06-26  Bruno Haible  <bruno@clisp.org>
8655
8656         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8657
8658 2006-06-26  Bruno Haible  <bruno@clisp.org>
8659
8660         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8661
8662 2006-06-26  Bruno Haible  <bruno@clisp.org>
8663
8664         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8665         SGI C compiler in pre-C99 mode.
8666         Suggested by Mark D. Baushke and Larry Jones.
8667
8668 2006-06-26  Bruno Haible  <bruno@clisp.org>
8669
8670         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8671         WCHAR_MAX.
8672         Reported by Mark D. Baushke and Larry Jones.
8673
8674 2006-06-26  Bruno Haible  <bruno@clisp.org>
8675
8676         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8677         in pre-C99 mode.
8678         Suggested by Mark D. Baushke and Larry Jones.
8679
8680 2006-06-23  Simon Josefsson  <jas@extundo.com>
8681             Bruno Haible  <bruno@clisp.org>
8682
8683         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8684         Emit mostlyclean-local rule.
8685         (func_emit_tests_Makefile_am): Likewise.
8686         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8687
8688 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8689
8690         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8691
8692 2006-06-23  Bruno Haible  <bruno@clisp.org>
8693
8694         * tests/test-stdint.c: Update to match ISO C 99 Technical
8695         Corrigendum 1.
8696
8697 2006-06-23  Bruno Haible  <bruno@clisp.org>
8698
8699         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8700
8701 2006-06-23  Bruno Haible  <bruno@clisp.org>
8702
8703         * lib/stdint_.h: Treat IRIX like OpenBSD.
8704
8705 2006-06-23  Bruno Haible  <bruno@clisp.org>
8706
8707         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8708         ISO C 99 Technical Corrigendum 1.
8709
8710 2006-06-22  Simon Josefsson  <jas@extundo.com>
8711
8712         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8713         MinGW.
8714
8715 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8716
8717         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8718         needed.  Some compiler complained about some of them.  Problem reported
8719         by Larry Jones in
8720         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8721
8722 2006-06-21  Simon Josefsson  <jas@extundo.com>
8723
8724         * tests/test-getaddrinfo.c: New file.
8725
8726         * modules/getaddrinfo-tests: New file.
8727
8728         * MODULES.html.sh: Add inet_pton.
8729
8730         * modules/inet_pton: New file.
8731
8732 2006-06-21  Simon Josefsson  <jas@extundo.com>
8733
8734         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8735         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8736         of using the (limited) gnulib implementation on Windows XP.
8737
8738         * m4/inet_pton.m4: New file.
8739
8740 2006-06-21  Simon Josefsson  <jas@extundo.com>
8741
8742         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8743         variable.
8744
8745         * lib/socket_.h: Don't define WINVER.
8746
8747         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8748         slightly modified to work in gnulib.
8749
8750 2006-06-21  Simon Josefsson  <jas@extundo.com>
8751
8752         * doc/gnulib.texi (Windows sockets): Add.
8753
8754 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8755
8756         * lib/read-file.c (fread_file): Start with buffer allocation of
8757         0 bytes rather than 1 byte; this simplifies the code.
8758         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8759         code to free buffer and save/restore errno.
8760         (internal_read_file): Remove unused local.
8761
8762 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8763
8764         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8765         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8766         Problem reported by Denis Excoffier in
8767         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8768
8769 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8770
8771         * modules/sys_socket, modules/socklen: Include sys/types since
8772         FreeBSD 4.x's sys/socket.h needs it.
8773
8774 2006-06-19  Simon Josefsson  <jas@extundo.com>
8775
8776         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8777
8778 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8779
8780         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8781
8782 2006-06-19  Bruno Haible  <bruno@clisp.org>
8783
8784         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8785         and FULL_PATH_INTTYPES_H in angle brackets.
8786         Reported by Mark D. Baushke <mdb@gnu.org>.
8787
8788 2006-06-17  Eric Blake  <ebb9@byu.net>
8789
8790         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8791         errno.
8792
8793 2006-06-17  Bruno Haible  <bruno@clisp.org>
8794
8795         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8796         <sys/inttypes.h>.
8797
8798 2006-06-17  Bruno Haible  <bruno@clisp.org>
8799
8800         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8801         whether errno is declared. Assume <errno.h> declares errno.
8802
8803 2006-06-17  Bruno Haible  <bruno@clisp.org>
8804
8805         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8806
8807 2006-06-17  Bruno Haible  <bruno@clisp.org>
8808
8809         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8810         problem on Solaris 2.5.1.
8811
8812 2006-06-16  Eric Blake  <ebb9@byu.net>
8813
8814         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8815         * lib/unicodeio.c [!defined errno]: Likewise.
8816         * lib/strtol.c [!defined errno]: Likewise.
8817         * lib/strtod.c [!defined errno]: Likewise.
8818
8819 2006-06-15  Eric Blake  <ebb9@byu.net>
8820
8821         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8822
8823 2006-06-15  Eric Blake  <ebb9@byu.net>
8824
8825         * config/srclist.txt (ssize_t.m4): Lose sync.
8826
8827 2006-06-15  Bruno Haible  <bruno@clisp.org>
8828
8829         * modules/stdint (Files): Include m4/full-header-path.m4,
8830         m4/size_max.m4, m4/wchar_t.m4.
8831         (Makefile.am): Many more substitutions.
8832         * modules/stdint-tests: New file.
8833         * tests/test-stdint.c: New file.
8834
8835 2006-06-15  Bruno Haible  <bruno@clisp.org>
8836
8837         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8838         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8839         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8840         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8841         gl_CHECK_TYPE_SAME): New macros.
8842
8843 2006-06-15  Bruno Haible  <bruno@clisp.org>
8844
8845         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8846
8847 2006-06-15  Bruno Haible  <bruno@clisp.org>
8848
8849         * lib/stdint_.h: Rewritten to be fully auto-configured.
8850         Fixes bug on HP-UX/IA64.
8851
8852 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8853
8854         * lib/getdate.y (__attribute__): Don't define if already defined.
8855         Problem reported by Larry Jones.
8856         * lib/utimens.c (__attribute__): Likewise.
8857
8858 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8859
8860         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8861         reported by Andreas Schwab.
8862
8863 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8864             Bruno Haible  <bruno@clisp.org>
8865
8866         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8867         check for the declaration of strnlen and a run test that exposes the
8868         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8869         rpl_strndup.
8870
8871 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8872             Bruno Haible  <bruno@clisp.org>
8873
8874         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8875
8876 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8877
8878         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8879         compile test, for Tru64 4.0D.
8880
8881 2006-05-28  Karl Berry  <karl@gnu.org>
8882
8883         * config/srclist.txt (printf-args.c): lose sync.
8884
8885 2006-05-26  Martin Lambers  <marlam@marlam.de>
8886
8887         * lib/getpass.c: Updates the test for the native W32 API, and adds
8888         missing includes, thus fixing compilation warnings.
8889
8890 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8891
8892         * lib/exclude.c (exclude_fnmatch): New function.
8893         (excluded_file_name): Call exclude_fnmatch.
8894         * lib/exclude.h (excluded_file_name): New prototype
8895
8896 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8897
8898         * lib/tempname.c (small_open, large_open): New macros.
8899         (__open, __open64) [!_LIBC]: Remove.
8900         (__gen_tempname): Use small_open and large_open instead of __open
8901         and __open64.  This fixes a portability bug on HP-UX 11.11i
8902         reported by Simon Wing-Tang in
8903         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8904
8905 2006-05-24  Bruno Haible  <bruno@clisp.org>
8906
8907         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8908         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8909         Reported by Thorsten Maerz <torte@netztorte.de> via
8910         Aaron Stone <aaron@serendipity.cx>.
8911
8912 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8915         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8916         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8917         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8918         not really conditional on the cache.
8919         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8920
8921 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8922
8923         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8924         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8925         (my_usleep): Don't mishandle maximum value.
8926
8927 2006-05-19  Jim Meyering  <jim@meyering.net>
8928
8929         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8930
8931 2006-05-17  Bruno Haible  <bruno@clisp.org>
8932
8933         Cygwin portability.
8934         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8935
8936 2006-05-17  Bruno Haible  <bruno@clisp.org>
8937
8938         * lib/stdint_.h: Fix recognition of Cygwin.
8939
8940 2006-05-15  Bruno Haible  <bruno@clisp.org>
8941
8942         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8943         on libtool patch by Ralf Wildenhues.
8944
8945 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8946
8947         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8948         test for C99 conformance; (bool) 0.5 is an integer constant
8949         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8950         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8951
8952 2006-05-11  Simon Josefsson  <jas@extundo.com>
8953
8954         * m4/xvasprintf.m4: Fix obvious typo.
8955
8956 2006-05-11  Jim Meyering  <jim@meyering.net>
8957
8958         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8959         James Lemley.
8960
8961 2006-05-10  Simon Josefsson  <jas@extundo.com>
8962
8963         * lib/md4.c: Typo fix, update copyright years.
8964         (K1, K2): Don't use L because it turn computations into 64-bit on
8965         64-bit platforms.
8966
8967 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8968
8969         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8970         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8971         unwanted sign propagation, e.g., on hosts with 64-bit int.
8972         There still are some problems with reeelly weird theoretical hosts
8973         (e.g., 33-bit int) but it's not worth worrying about now.
8974         * lib/sha1.c (rol): Likewise.
8975         (K1, K2, K3, K4): Remove unnecessary L suffix.
8976
8977 2006-05-10  Bruno Haible  <bruno@clisp.org>
8978
8979         * lib/des.c: Cast to avoid warnings.
8980
8981 2006-05-09  Bruno Haible  <bruno@clisp.org>
8982
8983         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8984         (Depends-on): Depend also on xsize, stdarg.
8985         (configure.ac): Add gl_XVASPRINTF.
8986
8987 2006-05-09  Bruno Haible  <bruno@clisp.org>
8988
8989         * m4/xvasprintf.m4: New file.
8990
8991 2006-05-09  Bruno Haible  <bruno@clisp.org>
8992
8993         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8994         (EOVERFLOW): Define fallback value.
8995         (xstrcat): New function.
8996         (xvasprintf): Recognize the special case of a string concatenation.
8997
8998 2006-05-08  Eric Blake  <ebb9@byu.net>
8999
9000         * gnulib-tool (func_version): Base copyright year on CVS date.
9001         (func_emit_copyright_notice): New function.
9002         (func_emit_lib_Makefile_am): Use it.
9003         (func_emit_tests_Makefile_am): Likewise.
9004         (func_import): Likewise.
9005
9006 2006-05-08  Bruno Haible  <bruno@clisp.org>
9007
9008         * modules/stdarg: New file.
9009         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9010
9011 2006-05-08  Bruno Haible  <bruno@clisp.org>
9012
9013         * m4/stdarg.m4: New file, from GNU gettext.
9014
9015 2006-05-08  Bruno Haible  <bruno@clisp.org>
9016
9017         * config/srclist.txt (build-aux/config.rpath): different from latest
9018         release.
9019
9020 2006-05-08  Bruno Haible  <bruno@clisp.org>
9021
9022         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9023
9024 2006-05-05  Jim Meyering  <jim@meyering.net>
9025
9026         * m4/warning.m4: New file, derived from bison's file by the same name.
9027
9028 2006-05-03  Bruno Haible  <bruno@clisp.org>
9029
9030         * lib/stdint_.h: Shorter URL.
9031         * lib/inttypes.h: Likewise.
9032
9033 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9034
9035         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9036
9037 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9038
9039         * lib/verify.h: Document the internals better.  Most of this change
9040         was written by Bruno Haible.
9041
9042 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9043
9044         * doc/verify.texi: New file, partly based on a proposal by
9045         Bruno Haible.
9046
9047 2006-05-02  Bruno Haible  <bruno@clisp.org>
9048
9049         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9050         test from here...
9051         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9052
9053 2006-04-29  Bruno Haible  <bruno@clisp.org>
9054
9055         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9056         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9057
9058 2006-04-29  Bruno Haible  <bruno@clisp.org>
9059
9060         * gnulib-tool: Make --update option actually work.
9061
9062 2006-04-29  Bruno Haible  <bruno@clisp.org>
9063
9064         * doc/gcd.texi: New file.
9065         * doc/gnulib.texi: Include it.
9066
9067 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9068
9069         * lib/getdate.y (get_date): When adding relative date, start with the
9070         initial time, not with the result of the first mktime call.
9071
9072 2006-04-25  Bruno Haible  <bruno@clisp.org>
9073
9074         * gnulib-tool (func_import): Output the include directives in three
9075         blocks, sorted separately.
9076         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9077
9078 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9079
9080         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9081         to define main with arguments, for C++.  Reported by Eric Blake.
9082         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9083         Prefer 'int main ()' to 'int main (void)', for C++.
9084         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9085         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9086         for 'main', for C99 and C++.
9087
9088 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9089
9090         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9091         Don't assume that exit status -1 is valid.
9092         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9093         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9094         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9095         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9096         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9097         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9098         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9099         functions can be used without declaring them, or that you can
9100         exit with status -1.
9101         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9102
9103 2006-04-24  Karl Berry  <karl@gnu.org>
9104
9105         * config/srclist.txt (longdouble.m4): sync lost.
9106
9107 2006-04-24  Eric Blake  <ebb9@byu.net>
9108
9109         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9110
9111 2006-04-24  Bruno Haible  <bruno@clisp.org>
9112
9113         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9114         poll() implementation in AIX.
9115         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9116
9117 2006-04-24  Bruno Haible  <bruno@clisp.org>
9118
9119         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9120         assigned exactly once.
9121
9122 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9123             Bruno Haible  <bruno@clisp.org>
9124
9125         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9126         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9127         for AM_CPPFLAGS.
9128
9129 2006-04-23  Bruno Haible  <bruno@clisp.org>
9130
9131         * modules/copy-file: Depend on unistd.
9132         * modules/execute: Likewise.
9133         * modules/fatal-signal: Likewise.
9134         * modules/findprog: Likewise.
9135         * modules/mkdtemp : Likewise.
9136         * modules/pipe: Likewise.
9137         * modules/wait-process: Likewise.
9138
9139 2006-04-23  Bruno Haible  <bruno@clisp.org>
9140
9141         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9142         condition was already detected.
9143         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9144
9145 2006-04-23  Bruno Haible  <bruno@clisp.org>
9146
9147         * lib/copy-file.c: Include <unistd.h> unconditionally.
9148         * lib/execute.c: Likewise.
9149         * lib/fatal-signal.c: Likewise.
9150         * lib/findprog.c: Likewise.
9151         * lib/mkdtemp.c: Likewise.
9152         * lib/pipe.h: Likewise.
9153         * lib/pipe.c: Likewise.
9154         * lib/wait-process.h: Likewise.
9155
9156 2006-04-23  Bruno Haible  <bruno@clisp.org>
9157
9158         * gnulib-tool (func_usage): Fix --import description. Document
9159         --update.
9160         (func_import): Create temporary file in a temporary directory, if
9161         --dry-run is specified. Silence errors from 'grep' when there are no
9162         m4 files in $m4dir.
9163         (func_create_testdir): Silence errors from 'grep' when there are no
9164         m4 files in $m4dir.
9165         Reported by Karl Berry <karl@freefriends.org>.
9166
9167 2006-04-20  Bruno Haible  <bruno@clisp.org>
9168
9169         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9170         one argument, so that the code will be portable to Autoconf 2.60.
9171         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9172         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9173         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9174
9175 2006-04-19  Derek Price  <derek@ximbiot.com>
9176             Eric Blake  <ebb9@byu.net>
9177
9178         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9179         rather than "/full/path.h".  Update comment to match.  Shorten &
9180         generalize m4_translit call via AS_TR_CPP.
9181
9182 2006-04-19  Derek Price  <derek@ximbiot.com>
9183             Eric Blake  <ebb9@byu.net>
9184
9185         * lib/inttypes.h: Correct grammar in comment.
9186
9187 2006-04-18  Derek Price  <derek@ximbiot.com>
9188             Paul Eggert  <eggert@cs.ucla.edu>
9189
9190         * modules/inttypes: New file.
9191         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9192
9193 2006-04-18  Derek Price  <derek@ximbiot.com>
9194             Paul Eggert  <eggert@cs.ucla.edu>
9195
9196         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9197         New files.
9198
9199 2006-04-18  Derek Price  <derek@ximbiot.com>
9200             Paul Eggert  <eggert@cs.ucla.edu>
9201
9202         * lib/inttypes.h: New file.
9203         * lib/strtoimax.c: Assume <inttypes.h>.
9204
9205 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9206
9207         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9208         isn't mounted.  Problem reported by Kir Kolyshkin.
9209
9210 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9211
9212         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9213         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9214         Derek R. Price.
9215         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9216         implementation.
9217
9218 2006-04-12  Eric Blake  <ebb9@byu.net>
9219
9220         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9221         is now done automatically by the corresponding Autoconf macro.
9222
9223 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9224
9225         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9226         time_r.h.
9227
9228 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9229
9230         Merge regex changes from libc, removing some of our
9231         POSIX-conformance changes that were rejected and redoing them in a
9232         less-intrusive way.
9233
9234         * lib/regcomp.c (re_compile_internal, init_dfa):
9235         Length arg is now size_t, not Idx.  All uses changed.
9236         (peek_token): Forward decl now says internal_function.
9237         (__re_error_msgid, __re_error_msgid_idx):
9238         Now static rather than extern with attribute_hidden.
9239         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9240         For some reason libc prefers K&R style defns for external functions.
9241         (regerror) [!defined _LIBC]: Likewise.
9242         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9243         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9244         (build_range_exp, build_collating_symbol):
9245         Use K&R-style defn.
9246         (re_compile_fastmap): Use '\0' to memset, not 0.
9247         (utf8_sb_map): Make the calculations more obvious.
9248         (init_dfa, parse_bracket_exp, build_charclass_op):
9249         Call calloc and cast result, as glibc does.
9250         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9251         (build_range_exp, build_collating_symbol):
9252         Now internal functions.
9253
9254         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9255
9256         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9257         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9258         Don't depend on VMS; depend on __VMS instead, for POSIX
9259         namespace cleanness.
9260         (regoff_t): Define to ssize_t, not long int.
9261
9262         Remove the REG_ macros named below.  Instead, make the old names
9263         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9264         __USE_GNU_REGEX.
9265         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9266         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9267         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9268         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9269         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9270         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9271         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9272         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9273         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9274         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9275         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9276         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9277         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9278         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9279         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9280         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9281         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9282         (REG_NREGS):
9283         Remove.  All uses replaced by the old RE_* names.
9284         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9285         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9286         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9287         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9288         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9289         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9290         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9291         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9292         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9293         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9294         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9295         Don't bother having these macros be independent of each others'
9296         values, since they no longer exist in the POSIX name space.
9297
9298         Rename the following member names back to their old names,
9299         unless !__USE_GNU_REGEX.  All uses changed back.
9300         (buffer): Renamed from re_buffer.
9301         (allocated): Renamed from re_allocated.
9302         (used): Renamed from re_used.
9303         (syntax): Renamed from re_syntax.
9304         (fastmap): Renamed from re_fastmap.
9305         (translate): Renamed from re_translate.
9306         (can_be_null): Renamed from re_can_be_null.
9307         (regs_allocated): Renamed from re_regs_allocated.
9308         (fastmap_accurate): Renamed from re_fastmap_accurate.
9309         (no_sub): Renamed from re_no_sub.
9310         (not_bol): Renamed from re_not_bol.
9311         (not_eol): Renamed from re_not_eol.
9312         (newline_anchor): Renamed from re_newline_anchor.
9313         (num_regs): Renamed from rm_num_regs.
9314         (start): Renamed from rm_start.
9315         (end): Renamed from rm_end.
9316
9317         (free_state): Move up a bit.
9318
9319         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9320         #define to be empty.
9321         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9322         when that is what is intended.
9323         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9324         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9325         (MAX): New macro.
9326         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9327         All uses changed back to re_malloc, etc.  It's now the caller's
9328         responsibility to check for overflow; all callers changed.
9329         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9330         (re_x2nrealloc): Remove.
9331         (free_state): Remove decl.
9332
9333         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9334         (re_set_registers, re_exec):
9335         Use K&R-style defn.
9336
9337         2006-01-31  Roland McGrath  <roland@redhat.com>
9338
9339         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9340         Reported by Mike Frysinger <vapier@gentoo.org>.
9341
9342         2006-01-15  Andreas Jaeger  <aj@suse.de>
9343
9344         [BZ #1950]
9345         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9346         build_wcs_upper_buffer change.
9347         (build_wcs_upper_buffer): Change return type.
9348
9349         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9350
9351         * lib/regex_internal.h: Include <stdint.h> if available.
9352
9353         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9354
9355         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9356
9357         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9358
9359         * lib/regcomp.c: Adjust for changed secondary hash function.
9360
9361         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9362
9363         * lib/regex.h: Pretty printing.
9364         Clean up namespace a bit.
9365
9366         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9367
9368         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9369         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9370
9371         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9372                     Ulrich Drepper  <drepper@redhat.com>
9373
9374         [BZ #1302]
9375         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9376         changed.
9377         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9378
9379         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9380
9381         [BZ #281]
9382         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9383         * lib/regcomp.c: Remove unnecessary uses of
9384         unsigned RE_TRANSLATE_TYPE.
9385         * lib/regex_internal.h: Likewise.
9386         * lib/regex_internal.c: Likewise.
9387         * lib/regexec.c: Likewise.
9388         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9389
9390         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9391
9392         * lib/regexec.c (find_recover_state): Remove unnecessary
9393         initialization.
9394         (transit_state_bkref): Make DFA a const pointer.
9395         (get_subexp): Likewise.
9396         (check_arrival): Likewise.
9397         (update_cur_sifted_state): Likewise.
9398         (re_search_internal): Likewise.
9399         (prune_impossible_nodes): Likewise.
9400         (acquire_init_state_context): Likewise.
9401         (proceed_next_node): Likewise.
9402         (set_regs): Likewise.
9403         (free_fail_stack_return): Likewise.
9404         (check_arrival_expand_ecl): Mark DFA parameter as const.
9405         (check_arrival_expand_ecl_sub): Likewise.
9406         (check_subexp_limits): Likewise.
9407         (sub_epsilon_src_nodes):  Likewise.
9408         (add_epsilon_src_nodes):  Likewise.
9409         (merge_state_array): Likewise.
9410         (update_regs): Likewise.
9411         (build_trtable): Likewise.
9412         (sift_states_backward): Mark MCTX parameter as const.
9413         (build_sifted_states): Likewise.
9414         (update_cur_sifted_state): Likewise.
9415         (sift_states_mkref): Likewise.
9416         (check_arrival_expand_ecl): Mark eclosure as const.
9417         (check_dst_limits_calc_pos_1): Likewise.
9418         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9419         pointer.
9420
9421         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9422
9423         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9424         (transit_state_sb): Likewise.
9425         (transit_state_mb): Likewise.
9426         (sift_states_iter_mb): Likewise.
9427         (check_arrival_add_next_nodes): Likewise.
9428         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9429         [_LIBC] (re_search_2_stub): Use mempcpy.
9430
9431         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9432         mbrtowc for very simple UTF-8 case.
9433
9434         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9435         a pointer-to-const.
9436         (re_acquire_state_context): Likewise.
9437         * lib/regex_internal.h: Adjust prototypes.
9438
9439         * lib/regex.c: Prevent using C++ compilers.
9440
9441         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9442         (re_acquire_state_context): Likewise.
9443
9444 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9445
9446         * modules/regex (Depends-on): Add ssize_t.
9447
9448 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9449
9450         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9451         translation table.
9452
9453 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9454
9455         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9456
9457 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9458             Bruno Haible  <bruno@clisp.org>
9459
9460         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9461         <sys/types.h> and <inttypes.h>.
9462
9463 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9464
9465         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9466         `__error_t_defined', so argp.h will not typedef the former.
9467
9468 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9469
9470         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9471         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9472         glibc names.  Even if glibc is changed to conform to POSIX, the
9473         traditional names will be available anyway, since regex depends on
9474         the extensions module.  Also, fix a longstanding typo in the
9475         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9476         reported by Emanuele Giaquinta.  Also, change sense of cached
9477         variable, so that the message makes sense.
9478
9479 2006-03-24  Simon Josefsson  <jas@extundo.com>
9480
9481         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9482         including some doc fixes.
9483         (base64_encode_alloc): Fix +1 bug on allocation failures.
9484
9485 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9486
9487         * lib/base64.c (base64_encode): Do not read past end of array with
9488         unsanitized input on systems with CHAR_BIT > 8.
9489
9490 2006-03-24  Eric Blake  <ebb9@byu.net>
9491
9492         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9493
9494 2006-03-22  Karl Berry  <karl@gnu.org>
9495
9496         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9497         * config/srclistvars.sh (COREUTILS): new var.
9498
9499 2006-03-17  Jim Meyering  <jim@meyering.net>
9500
9501         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9502         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9503
9504 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9505
9506         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9507         no longer needs it.  Instead, check that regoff_t is as least
9508         as wide as ptrdiff_t.
9509
9510         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9511         so that our regex.h stays compatible with the installed regex.
9512         This is helpful for installers who configure --without-included-regex.
9513         Problem reported by Emanuele Giaquinta.
9514
9515 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9516
9517         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9518         Typedef to long int, not to off_, as POSIX will likely change
9519         in that direction.
9520
9521 2006-03-15  Eric Blake  <ebb9@byu.net>
9522
9523         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9524
9525 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9526
9527         * lib/argp-help.c (validate_uparams): Fix typo
9528         * lib/argp-parse.c (argp_default_options): Consistently begin help
9529         messages with a lowercase letter.
9530
9531 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9532
9533         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9534         overrun buffers and shouldn't be used (much as gets shouldn't be
9535         used).
9536         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9537
9538 2006-03-08  Simon Josefsson  <jas@extundo.com>
9539
9540         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9541         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9542
9543 2006-03-08  Simon Josefsson  <jas@extundo.com>
9544
9545         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9546         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9547
9548 2006-03-08  Simon Josefsson  <jas@extundo.com>
9549
9550         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9551         signal that configure disabled the device.
9552
9553 2006-03-08  Simon Josefsson  <jas@extundo.com>
9554
9555         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9556         languages.
9557
9558 2006-03-07  Simon Josefsson  <jas@extundo.com>
9559
9560         * modules/getopt (Depends-on): Add unistd.
9561
9562         * modules/unistd: New file.
9563
9564 2006-03-07  Simon Josefsson  <jas@extundo.com>
9565
9566         * modules/gc-random: New file.
9567
9568 2006-03-07  Simon Josefsson  <jas@extundo.com>
9569
9570         * m4/unistd_h.m4: New file.
9571
9572 2006-03-07  Simon Josefsson  <jas@extundo.com>
9573
9574         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9575         test to be side-effect free by storing the result in the cache
9576         variable gl_cv_lib_readline, and moving the assignment of
9577         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9578         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9579
9580 2006-03-07  Simon Josefsson  <jas@extundo.com>
9581
9582         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9583         error on missing devices (the functions will return an error).
9584
9585         * m4/gc.m4: Move random stuff to gc-random.m4
9586
9587 2006-03-07  Simon Josefsson  <jas@extundo.com>
9588
9589         * lib/unistd_.h: New file.
9590
9591 2006-03-07  Simon Josefsson  <jas@extundo.com>
9592
9593         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9594
9595 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9596
9597         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9598         Problem reported by Juan Manuel Guerrero.
9599
9600 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9601
9602         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9603         the unistd module.
9604         * lib/getlogin_r.c: Likewise.
9605         * lib/getlogin_r.h: Likewise.
9606         * lib/glob.c: Likewise.
9607         * lib/pagealign_alloc.c: Likewise.
9608         * lib/unistd_.h: Remove; no longer needed.
9609
9610 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9611
9612         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9613         Add unistd.
9614         * modules/c-stack (Depends-on): Add unistd.
9615         * modules/getlogin_r: Likewise.
9616         * modules/glob: Likewise.
9617         * modules/pagealign_alloc: Likewise.
9618         * modules/unistd (Files): Remove lib/unistd_.h.
9619         (EXTRA_DIST): Remove.
9620         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9621         need unistd_.h.
9622         (MOSTLYCLEANFILES): Remove unistd.h-t.
9623
9624 2006-03-03  Simon Josefsson  <jas@extundo.com>
9625
9626         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9627
9628 2006-03-03  Simon Josefsson  <jas@extundo.com>
9629
9630         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9631         libidn and bison.
9632
9633 2006-03-03  Simon Josefsson  <jas@extundo.com>
9634
9635         * build-aux/maint.mk: Add indent target.
9636
9637 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9638
9639         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9640         our replacement poll.h in any case, to avoid a differing
9641         declaration from a system header.  Seen on AIX.
9642
9643 2006-03-01  Simon Josefsson  <jas@extundo.com>
9644
9645         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9646         <kasal@ucw.cz>.
9647
9648 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9649
9650         * modules/gettime (Depends-on): Add extensions module.
9651         * modules/nanosleep (Depends-on): Likewise.
9652         * modules/settime (Depends-on): Likewise.
9653
9654 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9655
9656         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9657         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9658         pedantically.
9659         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9660         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9661
9662         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9663         not "==".  Reported by Ralf Wildenhues.
9664
9665 2006-03-01  Karl Berry  <karl@gnu.org>
9666
9667         * doc/Copyright/request-*: new files, synced from gnuorg.
9668
9669 2006-03-01  Karl Berry  <karl@gnu.org>
9670
9671         * config/srclist.txt (Copyright/*): new entries.
9672
9673 2006-02-28  Simon Josefsson  <jas@extundo.com>
9674
9675         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9676
9677 2006-02-27  Simon Josefsson  <jas@extundo.com>
9678
9679         * lib/base64.h: Indent #define's.  From Jim Meyering
9680         <jim@meyering.net>.
9681
9682 2006-02-27  Jim Meyering  <jim@meyering.net>
9683
9684         Revert the change of 2006-02-24, so these files can continue
9685         to be sync'd from gettext.
9686         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9687         of `config.h'.
9688
9689 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9690
9691         * modules/intprops: New file.
9692         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9693         Add intprops.
9694         * modules/getloadavg (Files): Remove lib/intprops.h.
9695         (Depends-on): Add intprops.
9696         * modules/human: Likewise.
9697         * modules/inttostr: Likewise.
9698         * modules/openat: Likewise.
9699         * modules/sig2str: Likewise.
9700         * modules/userspec: Likewise.
9701         * modules/utimecmp: Likewise.
9702         * modules/xnanosleep: Likewise.
9703         * modules/xstrtol: Likewise.
9704
9705 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9706
9707         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9708         * modules/lock-tests (TESTS): Use $(EXEEXT).
9709         * modules/tls-tests: Likewise.
9710         * modules/argp-tests: Likewise.
9711         (check_PROGRAMS): New var, replacing...
9712         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9713
9714 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9715
9716         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9717         `config.h'.
9718
9719 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9720
9721         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9722
9723 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9724
9725         Sync from coreutils.
9726         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9727         gl_CHDIR_SAFER.
9728
9729 2006-02-22  Jim Meyering  <jim@meyering.net>
9730
9731         Sync from coreutils.
9732         * m4/chdir-safer.m4: New file.
9733
9734 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9735
9736         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9737         AT_FDCWD exceeds INT_MAX.
9738         * lib/openat.h (AT_FDCWD): Likewise.
9739
9740 2006-02-17  Eric Blake  <address@hidden>
9741
9742         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9743
9744 2006-02-16  Simon Josefsson  <jas@extundo.com>
9745
9746         * modules/getaddrinfo (Depends-on): Add sys_socket.
9747
9748 2006-02-15  Simon Josefsson  <jas@extundo.com>
9749
9750         * build-aux/maint.mk: Add dsyntax-check rule.
9751
9752 2006-02-15  Eric Blake  <ebb9@byu.net>
9753
9754         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9755         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9756         'present but cannot compile' warnings on cygwin.
9757         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9758         use ws2tcpip.h if sys/socket.h works.
9759         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9760         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9761
9762 2006-02-14  Simon Josefsson  <jas@extundo.com>
9763
9764         * modules/maintainer-makefile (Files): Rename.
9765
9766         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9767         and (the local) Makefile.cfg to maint-cfg.mk.
9768
9769         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9770         to the latter.
9771
9772         * modules/maintainer-makefile: New module.
9773
9774         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9775         severaly stripped to make it possible to build it up from scratch
9776         with reliable tests.
9777
9778         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9779         fixes to permit overriding the default actions when configure and
9780         makefile are not available.
9781
9782 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9783
9784         Sync from coreutils.
9785         * modules/lstat (Depends-on): Don't depend on xalloc.
9786         (License): Change from GPL to LGPL, since this is now simply a
9787         replacement for a libc function.
9788
9789 2006-02-14  Jim Meyering  <jim@meyering.net>
9790
9791         Sync from coreutils.
9792
9793         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9794         failure on deficient systems, and simplify gnulib lgpl dependencies.
9795         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9796         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9797
9798         * lib/xalloc-die.c: Remove unused definition of N_.
9799
9800 2006-02-14  Jim Meyering  <jim@meyering.net>
9801
9802         Sync from coreutils.
9803         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9804         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9805         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9806         double-quote uses of that variable, to accommodate the rare case in
9807         which getmntent is available in none of the libraries checked.  This
9808         happens at least on FreeBSD 5.0.
9809
9810 2006-02-13  Simon Josefsson  <jas@extundo.com>
9811
9812         * gnulib-tool (Usage): Fix --import, from
9813         karl@freefriends.org (Karl Berry).
9814
9815 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9816
9817         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9818
9819 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9820
9821         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9822         "autoupdate" on 2005-12-12.
9823
9824 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9825
9826         * modules/closeout (Depends-on): Remove atexit.
9827
9828 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9829
9830         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9831         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9832
9833 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9834
9835         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9836         __EXTENSIONS__ if this causes compilation to fail.  Problem
9837         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9838         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9839
9840 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9841
9842         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9843         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9844         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9845         All uses changed.
9846
9847 2006-01-26  Simon Josefsson  <jas@extundo.com>
9848
9849         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9850         prototype is visible on mingw32.
9851
9852         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9853         for mingw32.
9854
9855         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9856         mingw32).
9857
9858 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9859
9860         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9861         attempt to open for write; this always fails, at least on POSIX
9862         hosts.  This reinstates the 2006-01-09 change, which was
9863         inadvertently removed.
9864
9865 2006-01-26  Bruno Haible  <bruno@clisp.org>
9866
9867         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9868         Reported by Paul Eggert.
9869
9870 2006-01-26  Bruno Haible  <bruno@clisp.org>
9871             Paul Eggert  <eggert@cs.ucla.edu>
9872
9873         * lib/stdbool_.h (_Bool)
9874         [(! (defined __cplusplus || defined __BEOS__)
9875           && !defined __GNUC__
9876           && !(defined __HP_cc || defined __xlc__
9877                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9878                || defined __sgi))]:
9879         #define to signed char in these cases too; this simplifies
9880         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9881         etc., separately) and makes it more conservative.
9882
9883 2006-01-25  Simon Josefsson  <jas@extundo.com>
9884
9885         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9886         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9887         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9888
9889 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9890
9891         * lib/argp-namefrob.h: Bugfix. Remove stray #
9892
9893 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9894
9895         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9896         so that we test the test.
9897         Check for yet another HP-UX cc bug involving *bool |= bool.
9898
9899 2006-01-25  Karl Berry  <karl@gnu.org>
9900
9901         * config/srclist.txt (vasnprintf.c): sync lost.
9902
9903 2006-01-25  Jim Meyering  <jim@meyering.net>
9904
9905         Sync from the stable (b5) branch of coreutils:
9906
9907         * lib/fts.c (fts_children): Don't let close() clobber errno from
9908         failed fchdir().
9909
9910         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9911         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9912         a dangling symlink.  That can also happen at least for ELOOP.
9913         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9914         FYI, this bug predates the inclusion of fts.c in coreutils.
9915
9916         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9917         in their own block, so pre-c99 compilers don't object.
9918
9919         Avoid the double-free (first in fts_read, second in fts_close) that
9920         would occur when an `active' directory is made inaccessible (e.g.,
9921         via chmod a-x) during a traversal.
9922         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9923         before returning.  Reproduce this failure by
9924         mkdir -p a/b; cd a; chmod a-x . b
9925         Reported by Stavros Passas.
9926
9927 2006-01-25  Jim Meyering  <jim@meyering.net>
9928
9929         * lib/fileblocks.c: Remove more useless parentheses.
9930         * lib/readutmp.h: Likewise.
9931
9932 2006-01-25  Bruno Haible  <bruno@clisp.org>
9933
9934         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9935         warnings.
9936         Reported by Paul Eggert.
9937
9938 2006-01-25  Bruno Haible  <bruno@clisp.org>
9939
9940         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9941         rid of a trap command. For Solaris sh.
9942         Reported by Mark D. Baushke <mdb@gnu.org>.
9943
9944 2006-01-24  Simon Josefsson  <jas@extundo.com>
9945
9946         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9947         Bruno.
9948
9949 2006-01-24  Karl Berry  <karl@gnu.org>
9950
9951         * config/srclist.txt (argp-namefrob.h): sync lost.
9952
9953 2006-01-24  Jim Meyering  <jim@meyering.net>
9954
9955         * modules/openat (Files): Add lib/intprops.h.
9956         From Mark D. Baushke.
9957
9958 2006-01-24  Jim Meyering  <jim@meyering.net>
9959
9960         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9961         Reported by Mark D. Baushke.
9962
9963 2006-01-24  Jim Meyering  <jim@meyering.net>
9964
9965         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9966
9967 2006-01-24  Bruno Haible  <bruno@clisp.org>
9968
9969         * modules/strnlen (Maintainer): Change from glibc to all.
9970
9971 2006-01-24  Bruno Haible  <bruno@clisp.org>
9972
9973         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9974         Patch by Paul Eggert.
9975
9976 2006-01-24  Bruno Haible  <bruno@clisp.org>
9977
9978         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9979         already has it.
9980         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9981         2005-11-26.
9982
9983         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9984         'signed char' to avoid problems with the built-in _Bool type.
9985         Reported by Paul Eggert on 2005-11-26.
9986
9987 2006-01-24  Bruno Haible  <bruno@clisp.org>
9988
9989         * gnulib-tool (func_import): Avoid constructing complicated sed
9990         expressions inside backquote.
9991         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9992
9993 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9994
9995         These changes imported from libc.
9996         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9997         test and two separate function calls.
9998         * lib/strndup.c (__strndup): Add libc_hidden_def.
9999
10000 2006-01-23  Simon Josefsson  <jas@extundo.com>
10001
10002         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10003         Remove the test_*_SOURCES variable: automake infers it by default.
10004         * modules/tls-tests: Likewise.
10005
10006 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10007
10008         Work around porting bugs reported by Dieter in
10009         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10010         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10011         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10012         Include "getopt.h" first, to check interface.
10013         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10014         !HAVE_DECL_GETENV.
10015         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10016         (__strndup): Revert to K&R-style function dfns, the glibc style.
10017         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10018         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10019         Include strnlen.h first, to get prototype properly.
10020         (strnlen): Renamed from __strnlen.
10021         Remove weak alias.
10022
10023 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10024
10025         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10026
10027 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10028
10029         * config/srclist.txt: Adjust to reflect glibc reorganization.
10030         This affects only comments.
10031
10032 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10033
10034          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10035          Reported by Bruce Korb <bkorb@gnu.org>.
10036
10037 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10038
10039         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10040         to pacify gcc -Wswitch-default.
10041
10042 2006-01-22  Bruno Haible  <bruno@clisp.org>
10043
10044         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10045         temporary buffer for sprintf, take into account the precision also
10046         for 'd', 'i', 'u', 'o', 'x', 'X'.
10047
10048 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10049
10050         * modules/argp-tests: New module
10051         * tests/test-argp.c: New file
10052         * tests/test-argp-2.sh: New file
10053
10054 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10055
10056         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10057         (__argp_base_name): Removed
10058         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10059         typo.
10060         (__argp_base_name): Provide macro definition or extern declaration
10061         depending on the configuration
10062
10063 2006-01-20  Simon Josefsson  <jas@extundo.com>
10064
10065         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10066
10067 2006-01-20  Simon Josefsson  <jas@extundo.com>
10068
10069         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10070
10071 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10072
10073         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10074         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10075         Suggested by Bruno Haible.
10076
10077 2006-01-20  Karl Berry  <karl@gnu.org>
10078
10079         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10080         until changes propagate, I guess.
10081
10082 2006-01-19  Simon Josefsson  <jas@extundo.com>
10083
10084         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10085
10086 2006-01-19  Simon Josefsson  <jas@extundo.com>
10087
10088         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10089
10090 2006-01-19  Simon Josefsson  <jas@extundo.com>
10091
10092         * gnulib-tool: Set check_PROGRAMS.
10093
10094         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10095         modules/des-tests, modules/gc-arcfour-tests,
10096         modules/gc-arctwo-tests, modules/gc-des-tests,
10097         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10098         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10099         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10100         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10101         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10102         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10103         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10104         test_*_SOURCES.
10105
10106 2006-01-18  Simon Josefsson  <jas@extundo.com>
10107
10108         * modules/socklen (Depends-on): Depend on sys_socket.
10109
10110 2006-01-18  Simon Josefsson  <jas@extundo.com>
10111
10112         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10113         modules/des-tests, modules/gc-arcfour-tests,
10114         modules/gc-arctwo-tests, modules/gc-des-tests,
10115         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10116         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10117         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10118         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10119         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10120         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10121         $(EXEEXT) to automake TESTS variable, for mingw32.
10122
10123 2006-01-17  Simon Josefsson  <jas@extundo.com>
10124
10125         * modules/socklen (Include): Need sys/socket.h.
10126
10127 2006-01-17  Bruno Haible  <bruno@clisp.org>
10128
10129         * modules/ssize_t (Include): Add <sys/types.h>.
10130
10131 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10132
10133         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10134         it's not portable and it doesn't work with cross-compiles.
10135         Problem reported by Bruno Haible.  Fix missing-$ typo in
10136         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10137         -zignore from being used with Sun's C compiler.
10138
10139 2006-01-12  Simon Josefsson  <jas@extundo.com>
10140
10141         * lib/base64.c: Fix warning, reported by Bruno Haible
10142         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10143
10144 2006-01-12  Bruno Haible  <bruno@clisp.org>
10145
10146         * modules/ldd: New file.
10147         * build-aux/ldd.sh.in: New file.
10148         * MODULES.html.sh (Support for building libraries and executables): Add
10149         ldd.
10150
10151 2006-01-12  Bruno Haible  <bruno@clisp.org>
10152
10153         * m4/ldd.m4: New file.
10154
10155 2006-01-12  Bruno Haible  <bruno@clisp.org>
10156
10157         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10158         endless loop while replacing $auxdir with build-aux.
10159
10160 2006-01-11  Simon Josefsson  <jas@extundo.com>
10161
10162         * lib/stdint_.h (SIZE_MAX): Add missing (.
10163
10164 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10165
10166         Sync from coreutils.
10167         * lib/md5.c: Fix commentary typos.
10168         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10169         * lib/md5.h (__attribute__): Remove; unused.
10170         * lib/sha1.c: Fix commentary to match md5 better.
10171         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10172         so that we don't need to worry about alignment.  All uses changed.
10173         This merges the 2005-10-28 md5 change into sha1.
10174
10175 2006-01-11  Jim Meyering  <jim@meyering.net>
10176
10177         Sync from coreutils.
10178         * lib/md5.c (OP): Fix spacing.
10179
10180 2006-01-11  Bruno Haible  <bruno@clisp.org>
10181
10182         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10183         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10184         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10185
10186 2006-01-11  Bruno Haible  <bruno@clisp.org>
10187
10188         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10189         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10190         the "early" section as well.
10191
10192 2006-01-11  Bruno Haible  <bruno@clisp.org>
10193
10194         Avoid "ar: no archive members specified" error on MacOS X.
10195         * gnulib-tool (func_modules_add_dummy): New function.
10196         (func_import, func_create_testdir): Invoke it.
10197
10198 2006-01-11  Bruno Haible  <bruno@clisp.org>
10199
10200         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10201         with $auxdir in AC_CONFIG_FILES statements.
10202
10203 2006-01-11  Bruno Haible  <bruno@clisp.org>
10204
10205         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10206         Initialize also noinst_HEADERS to empty.
10207
10208 2006-01-11  Bruno Haible  <bruno@clisp.org>
10209
10210         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10211         variables.
10212         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10213         autoreconf.
10214
10215 2006-01-11  Bruno Haible  <bruno@clisp.org>
10216
10217         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10218         overridable by the user.
10219         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10220
10221 2006-01-10  Simon Josefsson  <jas@extundo.com>
10222
10223         * modules/sys_socket: New file.
10224
10225 2006-01-10  Simon Josefsson  <jas@extundo.com>
10226
10227         * m4/sys_socket_h.m4: New file.
10228
10229 2006-01-10  Simon Josefsson  <jas@extundo.com>
10230
10231         * lib/socket_.h: New file.
10232
10233 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10234
10235         * modules/readutmp (Maintainer): Add myself.
10236
10237 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10238
10239         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10240         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10241         People who are still concerned with buggy memcmp implementations
10242         can invoke gl_FUNC_MEMCMP themselves.
10243
10244 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10245
10246         * lib/regex_internal.h (BITSET_WORD_BITS):
10247         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10248         preprocessor mishandles large unsigned values as if they were signed.
10249         Problem reported by Claudio Fontana in
10250         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10251
10252 2006-01-10  Jim Meyering  <jim@meyering.net>
10253
10254         Avoid the double-free (first in fts_read, second in fts_close) that
10255         would occur when an `active' directory is made inaccessible (e.g.,
10256         via chmod a-x) during a traversal.
10257         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10258         before returning.  Reproduce this failure by
10259         mkdir -p a/b; cd a; chmod a-x . b
10260         Reported by Stavros Passas.
10261
10262         Sync from coreutils.
10263         * lib/sha1.c: Tweak grammar in a comment.
10264
10265 2006-01-10  Jim Meyering  <jim@meyering.net>
10266
10267         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10268         Patch by Joerg Sonnenberger.
10269
10270 2006-01-10  Bruno Haible  <bruno@clisp.org>
10271
10272         * modules/readutmp: Depend on module free.
10273         * modules/strtok_r: Depend on module restrict.
10274
10275 2006-01-10  Bruno Haible  <bruno@clisp.org>
10276
10277         * modules/gettext (configure.ac): Add an invocation of
10278         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10279
10280 2006-01-10  Bruno Haible  <bruno@clisp.org>
10281
10282         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10283         Reported by Werner Lemberg <wl@gnu.org>.
10284
10285 2006-01-10  Bruno Haible  <bruno@clisp.org>
10286
10287         * lib/localcharset.c: Update from GNU gettext.
10288
10289 2006-01-10  Bruno Haible  <bruno@clisp.org>
10290
10291         * lib/argp.h (__const): Remove macro. Use const instead.
10292         * lib/argp-fmtstream.h (__const): Likewise.
10293         * lib/glob_.h (__const): Remove macro.
10294         * lib/glob-libc.h: Use const instead of __const.
10295
10296 2006-01-10  Bruno Haible  <bruno@clisp.org>
10297
10298         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10299         variable.
10300         Needed to avoid an automake error regarding the 'gettext' module.
10301
10302 2006-01-09  Simon Josefsson  <jas@extundo.com>
10303
10304         * modules/inet_ntop (Depends-on): Add restrict.
10305
10306 2006-01-09  Simon Josefsson  <jas@extundo.com>
10307
10308         * modules/gc-rijndael-tests (License): Put under LGPL.
10309
10310         * modules/gc-des-tests (License): Likewise.
10311
10312         * modules/gc-arcfour-tests (License): Likewise.
10313
10314         * modules/gc-arctwo-tests (License): Likewise.
10315
10316         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10317
10318         * modules/gc-hmac-sha1-tests (Files): Likewise.
10319
10320         * modules/gc-hmac-md5-tests (License): Likewise.
10321
10322         * modules/gc-sha1-tests (License): Likewise.
10323
10324         * modules/gc-md5-tests (License): Likewise.
10325
10326         * modules/gc-md4-tests (License): Likewise.
10327
10328         * modules/gc-md2-tests (License): Likewise.
10329
10330         * modules/gc-tests (License): Likewise.
10331
10332         * modules/des-tests (License): Likewise.
10333
10334         * modules/md4-tests (License): Likewise.
10335
10336         * modules/md2-tests (License): Likewise.
10337
10338 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10339
10340         Sync from coreutils:
10341
10342         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10343         * modules/lib-ignore: New file.
10344         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10345         chdir-safer.m4, lchmod.m4.
10346         * modules/openat: Add mkdirat.c, openat-priv.h.
10347
10348 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10349
10350         Sync from coreutils.
10351         * m4/lib-ignore.m4: New file.
10352         * m4/lchmod.m4: New file.
10353
10354 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10355
10356         Sync from coreutils.
10357         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10358         for write access: POSIX says that must fail.
10359         * lib/fts.c (diropen): Likewise.
10360         * lib/save-cwd.c (save_cwd): Likewise.
10361         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10362         well, for minor improvements on hosts that lack O_DIRECTORY.
10363         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10364         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10365         Fall back on chown if open failed with EACCES.
10366
10367         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10368         Report an error at compile-time if only a 1-second nominal clock
10369         resolution is found.
10370
10371         * lib/lchmod.h: New file.
10372         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10373         (make_dir_parents): Use lchown rather than chown, and
10374         lchmod rather than chmod.
10375
10376         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10377         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10378         "proc" reported by n0dalus.
10379
10380         * lib/mountlist.c: Include <limits.h>.
10381         (dev_from_mount_options)
10382         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10383         New function.  It no longer assumes "dev=" has the System V meaning
10384         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10385         (read_file_system_list)
10386         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10387         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10388         dev= in that case.
10389
10390         * lib/posixtm.h (PDS_PRE_2000): New macro.
10391         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10392         allow_century.  All usages changed.  Reject dates outside the range
10393         1969-1999 if PDS_PRE_2000 is used.
10394
10395 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10396
10397         Sync from coreutils.
10398         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10399         (Time of day items): Mention the possibility of leap seconds.
10400         Problem reported by Dr. David Alan Gilbert.
10401
10402 2006-01-09  Jim Meyering  <jim@meyering.net>
10403
10404         Sync from coreutils.
10405
10406         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10407
10408         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10409
10410         * lib/modechange.c (mode_compile): Reject an invalid mode string
10411         that starts with an octal digit.  From Andreas Gruenbacher.
10412
10413         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10414         and dup to open_safer and dup_safer, respectively.
10415         (openat_permissive): Fix typo in comment.
10416
10417         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10418         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10419         (_): Remove; no longer needed.
10420         (openat): Renamed from rpl_openat; no need for rpl_openat
10421         since openat.h renames openat for us.
10422         Replace most of the body with a call to openat_permissive,
10423         to avoid duplicate code.
10424         Port to (probably hypothetical) environments were mode_t is
10425         wider than int.
10426         (openat_permissive): Require mode arg, so that we can check
10427         types better.  Put it just after flags.  Change cwd failure
10428         indicator from pointer-to-bool to pointer-to-errno-value.
10429         All callers changed.
10430         Invoke openat_save_fail and/or openat_restore_fail if
10431         cwd_errno is null, so that openat can call us.
10432         (openat_permissive, fdopendir, fstatat, unlinkat):
10433         Simplify errno handling to avoid some duplicate code,
10434         as it's OK to set errno on success.
10435         * lib/openat.h: Revamp code so that function macros depend on
10436         __OPENAT_PREFIX only, not also on AT_FDCWD.
10437         (openat_ro): Remove.  Caller changed to use openat_permissive.
10438         (openat_permissive): Now a macro, if not a function.
10439         (openat_restore_fail, openat_save_fail): Now always functions,
10440         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10441
10442         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10443         and openat.c.
10444         * lib/mkdirat.c: Include openat-priv.h.
10445         Remove definitions of macros defined therein.
10446         * lib/openat.c: Likewise.
10447
10448         * lib/mkdirat.c (mkdirat): New file and function.
10449         * lib/openat.h (mkdirat): Declare.
10450
10451         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10452
10453         * lib/openat.h (openat_permissive): Declare.
10454         (openat_ro): Define.
10455
10456         * lib/openat.c (EXPECTED_ERRNO): New macro.
10457         (openat_permissive): New function -- used in remove.c rewrite.
10458         (all functions): Set errno just before returning, only if there
10459         was an actual failure.
10460         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10461
10462         Emulate openat-family functions using Linux's procfs, if possible.
10463         Idea and some code based on Ulrich Drepper's glibc changes.
10464
10465         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10466         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10467         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10468         before falling back on save_cwd and restore_cwd.
10469         (fdopendir, fstatat, unlinkat): Likewise.
10470
10471         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10472         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10473
10474         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10475         as second argument to va_arg.  Otherwise, some versions of gcc
10476         warn that `if this code is reached, the program will abort'.
10477
10478 2006-01-09  Jim Meyering  <jim@meyering.net>
10479
10480         Sync from coreutils.
10481         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10482         Require openat-priv.h.
10483
10484 2006-01-09  Bruno Haible  <bruno@clisp.org>
10485
10486         * modules/strnlen (Include): Use strnlen.h.
10487
10488 2006-01-09  Bruno Haible  <bruno@clisp.org>
10489
10490         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10491
10492 2006-01-09  Bruno Haible  <bruno@clisp.org>
10493
10494         * lib/sysexit_.h (EX_OK): New macro.
10495         Suggested by Martin Lambers <marlam@marlam.de>.
10496
10497 2006-01-09  Bruno Haible  <bruno@clisp.org>
10498
10499         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10500         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10501
10502 2006-01-09  Bruno Haible  <bruno@clisp.org>
10503
10504         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10505         numbers.
10506
10507 2006-01-09  Bruno Haible  <bruno@clisp.org>
10508
10509         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10510         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10511         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10512         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10513
10514 2006-01-09  Bruno Haible  <bruno@clisp.org>
10515
10516         * build-aux/javacomp.sh.in: New file, moved from lib/.
10517         * modules/javacomp-script (Files): Update.
10518         (configure.ac): Add AC_CONFIG_FILES invocation.
10519         (EXTRA_DIST): Remove variable.
10520
10521         * build-aux/javaexec.sh.in: New file, moved from lib/.
10522         * modules/javaexec (Files): Update.
10523         (configure.ac): Add AC_CONFIG_FILES invocation.
10524         (EXTRA_DIST): Remove javaexec.sh.in.
10525
10526         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10527         * modules/csharpcomp-script (Files): Update.
10528         (configure.ac): Add AC_CONFIG_FILES invocation.
10529         (EXTRA_DIST): Remove variable.
10530
10531         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10532         * modules/csharpexec (Files): Update.
10533         (configure.ac): Add AC_CONFIG_FILES invocation.
10534         (EXTRA_DIST): Remove csharpexec.sh.in.
10535
10536 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10537
10538         Sync from coreutils.
10539
10540         Add POSIX ACL support
10541         * lib/acl.h (copy_acl, set_acl): Add declarations.
10542         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10543         systems other than Linux.
10544         (chmod_or_fchmod): New function: use fchmod when possible,
10545         and chmod otherwise.
10546         (file_has_acl): Add a POSIX ACL implementation, with a
10547         Linux-specific subcase.
10548         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10549         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10550         acls are unsupported.
10551         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10552         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10553         are unsupported.
10554
10555 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10556
10557         Sync from coreutils.
10558         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10559
10560 2006-01-07  Bruno Haible  <bruno@clisp.org>
10561
10562         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10563         gl_EARLY.
10564
10565 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10566
10567         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10568         Problem reported for Mingw by Mark Junker.
10569
10570 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10571
10572         * README: Gnulib normally doesn't generate a tarball.
10573
10574 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10575
10576         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10577         long int, not int, for nanosecond counts, so that people who are
10578         used to POSIX struct timespec won't be surprised.  Reported by Jim
10579         Meyering.
10580
10581 2005-12-28  Bruno Haible  <bruno@clisp.org>
10582
10583         * build-aux/config.rpath: Update from GNU gettext.
10584
10585 2005-12-16  Jim Meyering  <jim@meyering.net>
10586
10587         * modules/fprintftime: New module.
10588         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10589
10590 2005-12-16  Jim Meyering  <jim@meyering.net>
10591
10592         * m4/fprintftime.m4: New file.
10593
10594 2005-12-16  Jim Meyering  <jim@meyering.net>
10595
10596         * lib/fprintftime.c, lib/fprintftime.h: New files.
10597
10598 2005-12-15  Simon Josefsson  <jas@extundo.com>
10599
10600         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10601         new m4/socklen.m4.
10602
10603 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10604
10605         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10606         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10607
10608 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10609
10610         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10611         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10612         struct uparams is valid. Fall back to the default values if it is
10613         not.
10614
10615 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10616
10617         * modules/argp (Files): Add argp-pin.c
10618         (Depends-on): dirname
10619         (lib_SOURCES): Add argp-pin.c
10620
10621 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10622
10623         * m4/argp.m4:  Check if program_invocation_name and
10624         program_invocation_short_name are declared and define appropriate
10625         macros if they are not.
10626
10627 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10628
10629         * lib/argp-help.c (__argp_base_name): New function
10630         (__argp_short_program_name): Rewrite using __argp_base_name
10631         * lib/argp-namefrob.h: Define program_invocation_name and
10632         program_invocation_short_name if requested
10633         (__argp_base_name): Add prototype
10634         * lib/argp-parse.c (argp_def): Use gettext wrappers
10635         (argp_default_parser): Use __argp_base_name
10636         * lib/argp-pin.c: New file. Defines program_invocation_name and
10637         program_invocation_short_name on systems that lack them.
10638
10639 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10640
10641         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10642         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10643         porting problem reported by Georg Schwarz in
10644         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10645
10646 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10647
10648         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10649         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10650         porting problem reported by Georg Schwarz in
10651         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10652
10653 2005-12-05  Bruno Haible  <bruno@clisp.org>
10654
10655         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10656         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10657         Reported by Mark Junker <mjscod@gmx.de>.
10658
10659 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10660
10661         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10662         Use implementation from Albert Chin, with some
10663         comments/corrections by Stepan Kasal and myself.
10664
10665 2005-12-02  Bruno Haible  <bruno@clisp.org>
10666
10667         * gnulib-tool (func_import): Accept GPLed build tool modules when
10668         --lgpl is given.
10669         * modules/csharpcomp-script: New file.
10670         * modules/csharpcomp: Depend on it.
10671         * modules/javacomp-script: New file.
10672         * modules/javacomp: Depend on it.
10673         Suggested by Simon Josefsson.
10674
10675 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10676
10677         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10678         statement, to work around an HP-UX 10.20 compiler bug reported by
10679         Peter O'Gorman.
10680
10681 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10682
10683         * modules/savedir (Depends-on): Add openat.
10684
10685 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10686
10687         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10688         (uintmax_t) [defined uintmax_t]: Do not declare.
10689         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10690         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10691         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10692         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10693         sake of portability to weird hosts that C allows (though we don't
10694         know of any practical examples).
10695
10696         * lib/savedir.h (fdsavedir): New decl.
10697         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10698         contains most of the former guts of savedir.
10699         (savedir): Use savedirstream.
10700         Include "openat.h".
10701
10702 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10703
10704         * modules/obstack (Files): Add m4/ulonglong.m4.
10705         Problem reported by Davide Angelocola.
10706
10707 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10708
10709         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10710         coreutils no longer futzes with rounding modes.
10711
10712 2005-11-14  Jim Meyering  <jim@meyering.net>
10713
10714         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10715         replacement of mkstemp.
10716
10717 2005-11-10  Simon Josefsson  <jas@extundo.com>
10718
10719         * lib/readline.c: Remove EOL.
10720
10721 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10722
10723         * modules/gethrxtime (Depends-on): Add gettime.
10724
10725 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10726
10727         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10728         or gettimeofday; no longer needed.
10729
10730 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10731
10732         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10733         time business.
10734         (gethrxtime) [! (HAVE_NANOUPTIME
10735         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10736         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10737         our own approximation.
10738
10739 2005-11-08  Eric Blake  <ebb9@byu.net>
10740
10741         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10742
10743 2005-11-08  Eric Blake  <ebb9@byu.net>
10744
10745         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10746
10747 2005-11-04  Bruno Haible  <bruno@clisp.org>
10748
10749         * gnulib-tool: Implement --update mode.
10750
10751 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10752
10753         Fix porting problem reported by Theodoros V. Kalamatianos.
10754         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10755         Don't assume that futimes failing means we must fail.
10756
10757 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10758
10759         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10760         variables to suggest the intended function of the PATH_MAX check.
10761
10762 2005-10-30  Kean Johnston  <jkj@sco.com>
10763
10764         Trivial changes to support SCO systems.
10765         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10766         as PATH_MAX.
10767         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10768         where __ptr is null when no I/O is pending.
10769
10770 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10771
10772         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10773         leave errno alone.  Problem reported by Dmitry V. Levin.
10774
10775 2005-10-28  Simon Josefsson  <jas@extundo.com>
10776
10777         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10778         Test more.
10779
10780         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10781
10782         * modules/md2, modules/md2-tests: New files.
10783
10784 2005-10-28  Simon Josefsson  <jas@extundo.com>
10785
10786         * m4/inet_ntop.m4: More tests.
10787
10788         * m4/gc-md2.m4, md2.m4: New file.
10789
10790 2005-10-28  Simon Josefsson  <jas@extundo.com>
10791
10792         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10793         "restrict" keywords, as per POSIX.  Protect the function
10794         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10795         Don't use K&R prototypes.  Check the sprintf return values.
10796         Re-define EAFNOSUPPORT if not present.  Indent.
10797
10798         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10799         suggested by Bruno Haible <bruno@clisp.org>.
10800
10801         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10802
10803         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10804
10805         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10806         libgcrypt).
10807
10808         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10809
10810         * lib/md2.h, lib/md2.c: New files.
10811
10812 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10813
10814         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10815         errno alone.  Problem reported by Frederic Jolliton.
10816
10817 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10818
10819         * modules/verify (License): Change from GPL to LGPL.  This is a
10820         tiny module and there are apparently near-equivalents that are
10821         under the BSD license.
10822
10823 2005-10-24  Simon Josefsson  <jas@extundo.com>
10824
10825         * modules/sha1: Relicense to LGPL.
10826
10827 2005-10-24  Simon Josefsson  <jas@extundo.com>
10828
10829         * lib/md4.h: Shrink buffer size, now that we changed the type.
10830
10831 2005-10-23  Simon Josefsson  <jas@extundo.com>
10832
10833         * gnulib-tool (func_import): Fix --tests-base.
10834
10835 2005-10-22  Simon Josefsson  <jas@extundo.com>
10836
10837         * modules/arcfour (Depends-on): Need stdint.
10838
10839 2005-10-22  Simon Josefsson  <jas@extundo.com>
10840
10841         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10842         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10843
10844 2005-10-22  Simon Josefsson  <jas@extundo.com>
10845
10846         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10847         suggested by Bruno Haible <bruno@clisp.org>.
10848
10849 2005-10-22  Simon Josefsson  <jas@extundo.com>
10850
10851         * lib/crc.h: Include stddef.h, for size_t.
10852
10853 2005-10-22  Simon Josefsson  <jas@extundo.com>
10854
10855         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10856         arcfour_context struct (simplify test vector testing in GNU
10857         Shishi).
10858
10859 2005-10-21  Simon Josefsson  <jas@extundo.com>
10860
10861         * modules/des, modules/des-tests: New files.
10862
10863         * modules/gc-des, modules/gc-des-tests: New files.
10864
10865         * tests/test-des.c, tests/test-gc-des.c: New file.
10866
10867 2005-10-21  Simon Josefsson  <jas@extundo.com>
10868
10869         * modules/arctwo, modules/arctwo-tests: New files.
10870
10871         * tests/test-arctwo.c: New file.
10872
10873         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10874
10875         * tests/test-gc-arctwo.c: New file.
10876
10877 2005-10-21  Simon Josefsson  <jas@extundo.com>
10878
10879         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10880         Bruno Haible <bruno@clisp.org>.
10881
10882         * m4/gc-des.m4: New file.
10883
10884 2005-10-21  Simon Josefsson  <jas@extundo.com>
10885
10886         * m4/arctwo.m4: New file.
10887
10888         * m4/gc-arctwo.m4: New file.
10889
10890 2005-10-21  Simon Josefsson  <jas@extundo.com>
10891
10892         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10893         block.
10894
10895 2005-10-21  Simon Josefsson  <jas@extundo.com>
10896
10897         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10898         <bruno@clisp.org>.
10899
10900         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10901
10902         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10903         Bruno Haible <bruno@clisp.org>.
10904
10905         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10906         <bruno@clisp.org>.
10907
10908 2005-10-21  Simon Josefsson  <jas@extundo.com>
10909
10910         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10911
10912 2005-10-21  Simon Josefsson  <jas@extundo.com>
10913
10914         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10915
10916 2005-10-21  Simon Josefsson  <jas@extundo.com>
10917
10918         * lib/des.h, lib/des.c: New files.
10919
10920         * lib/gc-gnulib.c: Support DES.c
10921
10922 2005-10-21  Simon Josefsson  <jas@extundo.com>
10923
10924         * lib/arctwo.h, lib/arctwo.c: New files.
10925
10926         * lib/gc-gnulib.c: Support ARCTWO.
10927
10928 2005-10-21  Simon Josefsson  <jas@extundo.com>
10929
10930         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10931         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10932
10933 2005-10-21  Simon Josefsson  <jas@extundo.com>
10934
10935         * gnulib-tool (func_import, func_create_testdir): Define automake
10936         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10937         Makefile.am snippet),
10938         suggested by Bruno Haible <bruno@clisp.org>.
10939
10940         * modules/gc (Makefile.am): Use it.
10941
10942 2005-10-21  Bruno Haible  <bruno@clisp.org>
10943
10944         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10945         patch.
10946
10947 2005-10-19  Simon Josefsson  <jas@extundo.com>
10948
10949         * tests/test-gc-rijndael.c: New file.
10950
10951         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10952
10953 2005-10-19  Simon Josefsson  <jas@extundo.com>
10954
10955         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10956         interface too.
10957
10958 2005-10-19  Simon Josefsson  <jas@extundo.com>
10959
10960         * tests/test-gc-arcfour.c: New file.
10961
10962         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10963
10964 2005-10-19  Simon Josefsson  <jas@extundo.com>
10965
10966         * modules/gc-md4, modules/gc-md4-tests: New file.
10967
10968         * tests/test-gc-md4.c: New file.
10969
10970 2005-10-19  Simon Josefsson  <jas@extundo.com>
10971
10972         * m4/gc-md4.m4: New file.
10973
10974 2005-10-19  Simon Josefsson  <jas@extundo.com>
10975
10976         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10977         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10978         <kasal@ucw.cz>.
10979
10980 2005-10-19  Simon Josefsson  <jas@extundo.com>
10981
10982         * m4/gc-arcfour.m4: New file.
10983
10984         * m4/gc-rijndael.m4: New file.
10985
10986 2005-10-19  Simon Josefsson  <jas@extundo.com>
10987
10988         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10989
10990 2005-10-19  Simon Josefsson  <jas@extundo.com>
10991
10992         * lib/gc-gnulib.c: Support ARCFOUR.
10993
10994 2005-10-19  Simon Josefsson  <jas@extundo.com>
10995
10996         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10997         support.
10998
10999         * lib/gc.h: Add ECB enum type.
11000
11001         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11002
11003 2005-10-18  Simon Josefsson  <jas@extundo.com>
11004
11005         * tests/test-md5.c: New file.
11006
11007         * modules/md5-tests: New file.
11008
11009 2005-10-18  Simon Josefsson  <jas@extundo.com>
11010
11011         * tests/test-md4.c: New file.
11012
11013         * modules/md4, modules/md4-tests: New files.
11014
11015 2005-10-18  Simon Josefsson  <jas@extundo.com>
11016
11017         * m4/md4.m4: New file.
11018
11019 2005-10-18  Simon Josefsson  <jas@extundo.com>
11020
11021         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11022
11023 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11024
11025         * gnulib-tool (func_create_testdir): Omit the second check whether
11026         BUILT_SOURCES in nonempty.
11027
11028 2005-10-17  Simon Josefsson  <jas@extundo.com>
11029
11030         * tests/test-rijndael.c: New file.
11031
11032 2005-10-17  Simon Josefsson  <jas@extundo.com>
11033
11034         * modules/sha1: Depend on stdint instead of md5.
11035
11036         * modules/md5: Depend on stdint, remove uint32_t.
11037
11038 2005-10-17  Simon Josefsson  <jas@extundo.com>
11039
11040         * modules/gc-sha1-tests: New file.
11041
11042         * tests/test-gc-sha1.c: New file.
11043
11044 2005-10-17  Simon Josefsson  <jas@extundo.com>
11045
11046         * m4/md5.m4: Remove call to uint32_t.m4.
11047
11048 2005-10-17  Simon Josefsson  <jas@extundo.com>
11049
11050         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11051
11052         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11053         md5.h.
11054
11055         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11056
11057         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11058
11059 2005-10-17  Simon Josefsson  <jas@extundo.com>
11060
11061         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11062
11063 2005-10-17  Simon Josefsson  <jas@extundo.com>
11064
11065         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11066
11067 2005-10-17  Simon Josefsson  <jas@extundo.com>
11068
11069         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11070
11071         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11072
11073 2005-10-17  Bruno Haible  <bruno@clisp.org>
11074
11075         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11076         that it can also be used in a test.
11077
11078 2005-10-16  Bruno Haible  <bruno@clisp.org>
11079
11080         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11081         TESTS_ENVIRONMENT, so that individual tests can augment it.
11082
11083         * gnulib-tool (func_create_testdir): Use an intermediate target for
11084         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11085         macros, like $(ALLOCA_H), which cannot be passed through the command
11086         line.
11087
11088 2005-10-15  Simon Josefsson  <jas@extundo.com>
11089
11090         * modules/rijndael-tests: New file.
11091
11092         * modules/rijndael: New file.
11093
11094 2005-10-15  Simon Josefsson  <jas@extundo.com>
11095
11096         * m4/rijndael.m4: New file.
11097
11098 2005-10-15  Simon Josefsson  <jas@extundo.com>
11099
11100         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11101
11102         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11103
11104 2005-10-14  Simon Josefsson  <jas@extundo.com>
11105
11106         * tests/test-arcfour.c: New file.
11107
11108         * modules/arcfour, modules/arcfour-tests: New files.
11109
11110 2005-10-14  Simon Josefsson  <jas@extundo.com>
11111
11112         * m4/arcfour.m4: New file.
11113
11114 2005-10-14  Simon Josefsson  <jas@extundo.com>
11115
11116         * lib/arcfour.h, lib/arcfour.c: New files.
11117
11118 2005-10-14  Roland McGrath  <roland@redhat.com>
11119
11120         Import from libc.  [BZ #1331]
11121         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11122         macro argument.
11123         Reported by Matej Vela <vela@debian.org>.
11124
11125 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11126
11127         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11128         include <wchar.h>; no longer needed.
11129
11130 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11131
11132         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11133
11134 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11135         and  Ulrich Drepper  <drepper@redhat.com>
11136
11137         Import from libc.
11138         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11139         instead of inline stream orientation test and two separate
11140         function calls.  Pay no attention to USE_IN_LIBIO.
11141
11142 2005-10-13  Simon Josefsson  <jas@extundo.com>
11143
11144         * modules/gc-hmac-md5-tests: New file.
11145
11146         * tests/test-gc-hmac-sha1.c: New file.
11147
11148         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11149
11150         * modules/gc-hmac-md5-tests: New file.
11151
11152         * tests/test-gc-md5.c: New file.
11153
11154         * modules/gc-md5-tests: New file.
11155
11156 2005-10-13  Simon Josefsson  <jas@extundo.com>
11157
11158         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11159         Move memory allocation outside of loop.
11160
11161 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11162
11163         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11164         intermediate directory is in a read-only file system.  Problem
11165         reported by Eric Blake.
11166
11167 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11168
11169         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11170
11171 2005-10-12  Simon Josefsson  <jas@extundo.com>
11172
11173         * tests/test-hmac-sha1.c: New file.
11174
11175         * modules/hmac-sha1-tests: New file.
11176
11177         * modules/hmac-sha1: New file.
11178
11179 2005-10-12  Simon Josefsson  <jas@extundo.com>
11180
11181         * modules/gc-sha1: New file.
11182
11183 2005-10-12  Simon Josefsson  <jas@extundo.com>
11184
11185         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11186
11187         * tests/test-gc-pbkdf2-sha1.c: New file.
11188
11189 2005-10-12  Simon Josefsson  <jas@extundo.com>
11190
11191         * modules/gc-md5, modules/gc-hmac-md5: New files.
11192
11193         * modules/gc (Files): Remove md5, memxor and hmac files.
11194
11195 2005-10-12  Simon Josefsson  <jas@extundo.com>
11196
11197         * m4/gc-pbkdf2-sha1.m4: New file.
11198
11199         * m4/gc-hmac-sha1.m4: New file.
11200
11201         * m4/gc-sha1: New file.
11202
11203         * m4/hmac-sha1.m4: New file.
11204
11205 2005-10-12  Simon Josefsson  <jas@extundo.com>
11206
11207         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11208
11209         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11210
11211 2005-10-12  Simon Josefsson  <jas@extundo.com>
11212
11213         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11214         suggested by Bruno Haible <bruno@clisp.org>.
11215
11216 2005-10-12  Simon Josefsson  <jas@extundo.com>
11217
11218         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11219
11220 2005-10-12  Simon Josefsson  <jas@extundo.com>
11221
11222         * lib/gc-pbkdf2-sha1.c: New file.
11223
11224         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11225
11226 2005-10-12  Simon Josefsson  <jas@extundo.com>
11227
11228         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11229
11230         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11231
11232 2005-10-12  Simon Josefsson  <jas@extundo.com>
11233
11234         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11235         GC_USE_HMAC_MD5, respectively.
11236
11237         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11238         (gc_md5): Fix typo.
11239
11240         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11241
11242         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11243
11244         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11245
11246 2005-10-12  Bruno Haible  <bruno@clisp.org>
11247
11248         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11249         Reported by Stepan Kasal <kasal@ucw.cz>.
11250
11251 2005-10-11  Simon Josefsson  <jas@extundo.com>
11252
11253         * tests/test-crc.c: New file.
11254
11255         * modules/crc, modules/crc-tests: New files.
11256
11257 2005-10-11  Simon Josefsson  <jas@extundo.com>
11258
11259         * m4/crc.m4: New file.
11260
11261 2005-10-11  Simon Josefsson  <jas@extundo.com>
11262
11263         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11264
11265         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11266
11267         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11268
11269 2005-10-11  Simon Josefsson  <jas@extundo.com>
11270
11271         * lib/crc.h, lib/crc.c: New files.
11272
11273         * lib/gc.h (gc_hash_buffer): Add doc.
11274
11275 2005-10-11  Bruno Haible  <bruno@clisp.org>
11276
11277         * modules/c-strcasestr: New file.
11278         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11279
11280 2005-10-11  Bruno Haible  <bruno@clisp.org>
11281
11282         * modules/c-strcase: New file.
11283         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11284
11285 2005-10-11  Bruno Haible  <bruno@clisp.org>
11286
11287         * lib/strcasecmp.c: Include limits.h.
11288         (strcasecmp): Avoid integer overflow on exotic platforms.
11289         * lib/strncasecmp.c: Include limits.h.
11290         (strncasecmp): Avoid integer overflow on exotic platforms.
11291         Reported by Paul Eggert.
11292
11293 2005-10-11  Bruno Haible  <bruno@clisp.org>
11294
11295         * lib/c-strcasestr.h: New file, from GNU gettext.
11296         * lib/c-strcasestr.c: New file, from GNU gettext.
11297
11298 2005-10-11  Bruno Haible  <bruno@clisp.org>
11299
11300         * lib/c-strcase.h: New file, from GNU gettext.
11301         * lib/c-strcasecmp.c: New file, from GNU gettext.
11302         * lib/c-strncasecmp.c: New file, from GNU gettext.
11303
11304 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11305
11306         * modules/mempcpy (License): GPL -> LGPL.
11307         * modules/strchrnul (License): Likewise.
11308         * modules/sysexits (License): Likewise.
11309
11310 2005-10-08  Simon Josefsson  <jas@extundo.com>
11311
11312         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11313
11314 2005-10-07  Simon Josefsson  <jas@extundo.com>
11315
11316         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11317
11318 2005-10-06  Simon Josefsson  <jas@extundo.com>
11319
11320         * tests/test-hmac-md5.c: New file.
11321
11322         * modules/hmac-md5-tests: New file.
11323
11324         * modules/hmac-md5: New file.
11325
11326 2005-10-06  Simon Josefsson  <jas@extundo.com>
11327
11328         * m4/hmac-md5.m4: New file.
11329
11330         * m4/memxor.m4: Require gl_C_RESTRICT.
11331
11332 2005-10-06  Simon Josefsson  <jas@extundo.com>
11333
11334         * lib/memxor.c (memxor): Avoid casts and warnings.
11335
11336 2005-10-06  Simon Josefsson  <jas@extundo.com>
11337
11338         * lib/hmac-md5.c: New file.
11339
11340         * lib/hmac.h: New file.
11341
11342 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11343
11344         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11345         promotes to int, not unsigned int, to catch the AIX 5.3
11346         compiler bug.
11347
11348 2005-10-05  Simon Josefsson  <jas@extundo.com>
11349
11350         * modules/memxor: New file.
11351
11352         * modules/iconv (Files): Move config.rpath to havelib, it is used
11353         there.
11354
11355         * modules/havelib (Files): Add config.rpath.
11356
11357 2005-10-05  Simon Josefsson  <jas@extundo.com>
11358
11359         * m4/memxor.m4: New file.
11360
11361 2005-10-05  Simon Josefsson  <jas@extundo.com>
11362
11363         * lib/memxor.c (memxor): Fix compiler error.
11364
11365         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11366         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11367
11368         * lib/memxor.h, lib/memxor.c: New files.
11369
11370         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11371         we assume all systems have it, suggested by Jim Meyering
11372         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11373         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11374         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11375         same reasons.
11376
11377 2005-10-05  Simon Josefsson  <jas@extundo.com>
11378
11379         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11380
11381 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11382
11383         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11384         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11385         needed, since the source code now assumes these .h files.
11386
11387 2005-10-05  Derek Price  <derek@ximbiot.com>
11388
11389         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11390
11391 2005-10-05  Bruno Haible  <bruno@clisp.org>
11392
11393         * modules/stdint (License): Change to LGPL.
11394
11395 2005-10-04  Simon Josefsson  <jas@extundo.com>
11396
11397         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11398         D. Baushke" <mdb@gnu.org>.
11399
11400 2005-10-04  Bruno Haible  <bruno@clisp.org>
11401
11402         * lib/verify.h (verify_true): Provide alternative definition for C++.
11403
11404 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11405
11406         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11407         (SSIZE_MAX): New macro, if not already defined.
11408         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11409         than 2 GiB.
11410
11411 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11412
11413         Sync from coreutils.
11414         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11415         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11416         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11417         ULLONG_MAX doesn't work with 2.7.2.1.
11418
11419 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11420
11421         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11422         From Ben Pfaff.
11423
11424         * modules/exclude (Depends-on): Depend on verify.
11425         * modules/strtoimax (Depends-on): Likewise.
11426         * modules/utimecmp (Depends-on): Likewise.
11427
11428 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11429
11430         * lib/exclude.c: Include verify.h.
11431         (verify): Remove.  All callers changed to use verify.h's version.
11432         * lib/strtoimax.c: Likewise.
11433         * lib/utimecmp.c: Likewis.e
11434
11435         Sync from coreutils.
11436         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11437         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11438         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11439         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11440         bother returning ENOSYS if settimeofday or stime fails; just let
11441         them return whatever errno they want to return.
11442         * lib/utimens.c: Include unistd.h, for dup2.
11443         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11444         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11445
11446 2005-10-02  Jim Meyering  <jim@meyering.net>
11447
11448         Sync from coreutils.
11449         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11450         from glibc-2.2.5 that fails for read-only files.
11451
11452 2005-10-02  Jim Meyering  <jim@meyering.net>
11453
11454         Sync from coreutils.
11455         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11456         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11457         `#if HAVE_CONFIG_H'.
11458         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11459         Remove AT_FDCWD test.
11460         Do not consume the fd unless successful.
11461         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11462         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11463         block, so that we don't even try to compile it if settimeofday is
11464         available.  This works around a compilation failure on OSF1 V5.1,
11465         due to stime requiring a `long int*' while tv_sec is `int'.
11466
11467 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11468
11469         Sync from coreutils.
11470         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11471         against `yes', rather than just testing for nonempty.
11472
11473 2005-10-01  Simon Josefsson  <jas@extundo.com>
11474
11475         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11476         and Darwin.
11477
11478         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11479         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11480         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11481         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11482         Check if struct addrinfo is declared.
11483
11484 2005-10-01  Simon Josefsson  <jas@extundo.com>
11485
11486         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11487         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11488         AI_* and EAI_* definitions.  Protect function declarations.
11489
11490 2005-10-01  Jim Meyering  <jim@meyering.net>
11491
11492         Sync from coreutils.
11493
11494         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11495         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11496         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11497         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11498         in the inet and nsl libraries.  Required on Solaris 5.7.
11499
11500 2005-10-01  Jim Meyering  <jim@meyering.net>
11501
11502         Sync from coreutils.
11503         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11504         in the inet and nsl libraries.  Required on Solaris 5.7.
11505
11506 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11507
11508         * lib/getdelim.c (getdelim): Remove unused variables.
11509
11510 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11511
11512         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11513         so that the code works even with ancient cpp.  Portability problem
11514         with GCC 2.7.2.1 reported by Thomas M.Ott.
11515
11516 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11517
11518         * modules/regex (Depends-on): Add strcase.
11519
11520         * modules/gethostname (Licence): Change from GPL to LGPL, since
11521         gethostname.c is a trivial implementation of a standard library
11522         function.
11523         * modules/poll (License): Change from GPL to LGPL, since it's
11524         derived from LGPL code.
11525
11526 2005-09-27  Jim Meyering  <jim@meyering.net>
11527
11528         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11529         HAVE_CONFIG_H.
11530
11531         * lib/intprops.h (signed_type_or_expr__): Define.
11532         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11533         for unsigned types.
11534
11535 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11536
11537         * lib/verify.h (verify_expr): Remove, replacing with:
11538         (verify_true): New macro that returns true instead of void.
11539         (verify_type__): Remove.
11540         (verify): Use verify_true rather than verify_type__.
11541
11542 2005-09-26  Bruno Haible  <bruno@clisp.org>
11543
11544         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11545         is necessary.
11546         (lib_SOURCES): Remove mbchar.c.
11547         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11548         (Files): Add m4/mbrtowc.m4.
11549         * modules/mbiter: Likewise.
11550         * modules/mbuiter: Likewise.
11551
11552 2005-09-26  Bruno Haible  <bruno@clisp.org>
11553
11554         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11555         compile mbchar.c if they are not both present.
11556         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11557         * m4/mbiter.m4 (gl_MBITER): Likewise.
11558         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11559         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11560         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11561
11562 2005-09-25  Jim Meyering  <jim@meyering.net>
11563
11564         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11565         also uses socklen_t.
11566
11567 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11568
11569         * lib/utimens.c (ENOSYS): Define if not already defined.
11570         (futimens): Support having a null PATH if the file descriptor
11571         is nonnegative.
11572
11573         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11574         Remove.
11575         (__attribute): Define to empty unless GCC 3.1 or later.
11576         This works around a core dump on OpenBSD 3.4, which has GCC
11577         2.95.3, which dumps core when given __attribute__(()).  It also
11578         simplifies other tests, since we really don't want to bother with
11579         worrying about which ancient version of GCC supported what.
11580         Original problem reported by Yoann Vandoorselaere, with part of
11581         the fix suggested by Derek Price.
11582
11583 2005-09-24  Jim Meyering  <jim@meyering.net>
11584
11585         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11586         so we can once again use a positive bitfield width of 1 -- now we
11587         don't have to explain why we were using a bitfield width of 2.
11588
11589 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11590
11591         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11592         and similarly for the other external symbols.  Problem reported
11593         by James Gallager.
11594
11595         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11596         bug reported by Jim Meyering.
11597
11598         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11599         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11600         not needed, since socklen is a prerequisite module.
11601
11602 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11603
11604         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11605         Problem reported by Eric Blake.
11606         (getaddrinfo): Initialize se so that it's not garbage.
11607         Redo internal storage allocation so that it doesn't make unportable
11608         assumptions about alignment.
11609         Fix a memory leak.
11610
11611         * lib/utimens.c (futimens): Use futimesat if available.
11612         Prefer it to futimes since it doesn't have the futimes bug.
11613
11614         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11615         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11616         Instead, declare a function that returns a pointer to an array,
11617         and use verify_type__ to declare the size of the array.
11618         Problem and germ of a solution reported by Bruno Haible.
11619         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11620         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11621
11622 2005-09-23  Jim Meyering  <jim@meyering.net>
11623
11624         Sync from coreutils.
11625         Correct build failure (socklen_t not defined) on at least
11626         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11627         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11628
11629 2005-09-23  Jim Meyering  <jim@meyering.net>
11630
11631         * modules/getaddrinfo (Depends-on): Add socklen.
11632
11633 2005-09-23  Bruno Haible  <bruno@clisp.org>
11634
11635         * tests/test-verify.c: New file.
11636
11637 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11638
11639         Sync from coreutils.
11640
11641         * modules/argmatch (Depends-on): Add verify.
11642         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11643         unistd-safer.
11644         * modules/save-cwd (Depends-on): Likewise.
11645
11646         * modules/openat (Files): Add lib/openat-die.c.
11647         (Depends-on): Remove error, exitfail.
11648         Add dirname.
11649
11650         * modules/verify: New file.
11651         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11652         with "verify" module.
11653
11654 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11655
11656         Sync from coreutils.
11657
11658         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11659         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11660         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11661         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11662         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11663         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11664         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11665         Don't bother checking for string.h, stdlib.h, unistd.h.
11666         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11667         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11668         module's job.
11669         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11670         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11671
11672         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11673         (gl_GETDATE): Use it.
11674
11675         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11676
11677 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11678
11679         Sync from coreutils.
11680
11681         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11682         stat-time.h.
11683         * lib/argmatch.h: Include verify.h
11684         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11685         (ARGMATCH_ASSERT): Remove; unused.
11686         * lib/canonicalize.c: Assume STDC_HEADERS.
11687         * lib/exclude.c: Include "strcase.h".
11688         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11689         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11690         and stdio-safer.h.
11691         (getusershell): Call fopen, not fopen_safer.
11692         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11693         Do not include unistd-safer.h.
11694         (save_cwd): Don't call fd_safer; no longer needed
11695         now that we include fcntl--.h.
11696
11697         * lib/getdate.y (relative_time): New type.
11698         (RELATIVE_TIME_0): New constant.
11699         (parser_control): Use relative_time instead of doing it ourselves.
11700         (%union): Add new relative_time rel member.
11701         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11702         Now typeless.
11703         (relunit, relunit_snumber): Now of type rel.
11704         (zone, rel, relunit, get_date): Adjust to above changes.
11705
11706         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11707         Do not include unistd-safer.h.
11708         (getloadavg): Don't call fd_safer; no longer needed
11709         now that we include fcntl--.h.
11710
11711         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11712         (make_dir_parents): Treat ENOSYS like EEXIST.
11713
11714         Improve quality of diagnostics on restore_cwd failure.
11715         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11716         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11717         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11718         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11719         each time through the loop.  Do not diagnose restore_cwd failure;
11720         that is the caller's job (and perhaps the caller does not care).
11721
11722         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11723         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11724         If the file already exists but is not a directory, don't bother
11725         to try to make its parents.
11726         Close potential file descriptor leak if we can't chdir("/") (!).
11727         Don't always return true if chdir($PWD) fails; return true only
11728         if the requested action was done successfully (except for the
11729         chdir($PWD)).
11730         Don't log final directory unless we actually made it.
11731         Refactor to avoid duplicate code to fix up permissions.
11732         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11733
11734         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11735         to make it a bit faster and (I hope) clearer.
11736         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11737         Fix bug in formats like %2N.
11738
11739         * lib/verify.h: New file.
11740
11741 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11742
11743         Sync from coreutils.
11744         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11745
11746 2005-09-22  Jim Meyering  <jim@meyering.net>
11747
11748         Sync from coreutils.
11749
11750         * m4/lstat.m4 (gl_FUNC_LSTAT):
11751         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11752         Remove obsolete comment.
11753         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11754         * m4/xstrtod.m4: Likewise.
11755
11756         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11757
11758 2005-09-22  Jim Meyering  <jim@meyering.net>
11759
11760         Sync from coreutils.
11761
11762         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11763
11764         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11765         the .tm_year member, since otherwise gcc-4.0 would now warn about
11766         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11767
11768         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11769         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11770
11771         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11772         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11773         when run in a time zone for which daylight savings time is in effect
11774         for the starting date.
11775
11776         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11777         stop us from restricting permissions of just-created absolute-named
11778         directories.
11779         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11780         to restore initial working directory.
11781         * lib/mkdir-p.c (make_dir_parents): New parameter:
11782         different_working_dir, to tell caller if/when we change the working
11783         directory and are unable to return to the initial one.
11784         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11785         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11786         `return false'.  This fixes a bug introduced on 2004-07-30.
11787
11788         * lib/openat.c (fdopendir): Be sure to close the supplied
11789         file descriptor before returning.  This makes our replacement
11790         implementation a little closer to Solaris's, where fdopendir
11791         ties the file descriptor to the returned DIR* pointer.
11792         * lib/openat.c (unlinkat): New function.
11793         * lib/openat.h (unlinkat): Add prototype.
11794         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11795         (openat_restore_fail): Rename from openat_restore_die.
11796         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11797
11798         Provide an alternative to exiting immediately upon save_cwd or
11799         restore_cwd failure.  Now, an application can arrange e.g.,
11800         to perform a longjump in that case.
11801         * lib/openat.c: Include dirname.h.
11802         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11803         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11804         and openat_restore_die rather than calling error directly.
11805         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11806
11807         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11808         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11809         define.
11810
11811         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11812         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11813                             int utc, int nanoseconds);
11814         Background:
11815         date should not have to allocate a megabyte of virtual memory to
11816         handle a format argument like +%1048575T.  When implemented with
11817         strftime, it must allocate such a buffer, use strftime to fill it
11818         in, print it, then free it.
11819         With fprintftime, it simply prints everything and exits.
11820         With no need for memory allocation, that's one fewer way to fail.
11821         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11822         optional field width, not before, so we accept %9:z, not %:9z.
11823         (my_strftime): Be sure to use L_('x') for literals.
11824
11825         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11826         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11827         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11828         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11829         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11830         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11831         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11832         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11833         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11834         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11835         * lib/xgethostname.c, lib/xreadlink.c:
11836         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11837
11838         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11839         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11840         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11841         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11842         and don't include <sys/file.h>).
11843
11844 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11845
11846         Sync from coreutils.
11847
11848         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11849         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11850         [!LDAV_DONE]: Avoid unused variable warning.
11851
11852 2005-09-21  Bruno Haible  <bruno@clisp.org>
11853
11854         * lib/unicodeio.h (unicode_to_mb): New declaration.
11855
11856 2005-09-20  Derek Price  <derek@ximbiot.com>
11857
11858         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11859         getaddrinfo.h.
11860
11861 2005-09-20  Bruno Haible  <bruno@clisp.org>
11862
11863         * gnulib-tool: Remove trailing slashes from the values specified for
11864         --source-base, --m4-base, --tests-base, --aux-dir.
11865         Suggested by Simon Josefsson <jas@extundo.com>.
11866
11867 2005-09-20  Bruno Haible  <bruno@clisp.org>
11868
11869         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11870         func_modules_to_filelist, func_import, func_create_testdir): Make all
11871         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11872         change when gnulib-tool is invoked in a different locale.
11873
11874 2005-09-19  Simon Josefsson  <jas@extundo.com>
11875
11876         * m4/socklen.m4: Fix typo.
11877
11878 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11879
11880         Use a consistent style for including <config.h>.
11881         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11882         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11883         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11884         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11885         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11886         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11887         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11888         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11889         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11890         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11891         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11892         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11893         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11894         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11895         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11896         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11897         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11898         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11899         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11900         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11901         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11902         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11903         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11904         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11905         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11906         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11907         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11908         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11909         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11910         lib/xstrtoumax.c, lib/yesno.c:
11911         Standardize inclusion of config.h.
11912         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11913         lib/inttostr.h:  Removed inclusion of config.h from header files.
11914         * lib/inttostr.c:  Adjusted in-tree users.
11915         * lib/timespec.h: Remove superfluous warning to include config.h.
11916         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11917         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11918         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11919         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11920         config.h with HAVE_CONFIG_H.
11921
11922 2005-09-19  Jim Meyering  <jim@meyering.net>
11923
11924         * modules/pathmax (License): Change to LGPL.
11925
11926 2005-09-19  Derek Price  <derek@ximbiot.com>
11927
11928         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11929
11930 2005-09-19  Bruno Haible  <bruno@clisp.org>
11931
11932         * gnulib-tool (import): Provide default for --tests-base.
11933
11934 2005-09-19  Bruno Haible  <bruno@clisp.org>
11935
11936         * doc/quote.texi: New file, extracted from gnulib.texi.
11937         * doc/ctime.texi: New file, extracted from gnulib.texi.
11938         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11939         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11940         * doc/gnulib.texi: Include them.
11941
11942 2005-09-18  Bruno Haible  <bruno@clisp.org>
11943
11944         Portability fix.
11945         * gnulib-tool (func_readlink): New function.
11946         (func_ln_if_changed): Use it.
11947
11948 2005-09-18  Bruno Haible  <bruno@clisp.org>
11949
11950         * gnulib-tool: Support --with-tests also with --import.
11951         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11952         (func_import): Use variables $testsbase and $inctests. Emit a
11953         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11954         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11955         SUBDIRS += $testsdir.
11956         (func_create_testdir): Update.
11957
11958 2005-09-18  Bruno Haible  <bruno@clisp.org>
11959
11960         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11961         instead of $dry_run.
11962         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11963         (func_ln_if_changed): Don't handle dry-run here.
11964         (func_import): In dry-run mode, detect more precisely which actions
11965         would be performed, and don't use "...ing" verbs.
11966
11967 2005-09-18  Bruno Haible  <bruno@clisp.org>
11968
11969         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11970         (func_import): Use join on two temporary files instead of three nested
11971         loops, in order to determine which files are new or old.
11972
11973 2005-09-18  Bruno Haible  <bruno@clisp.org>
11974
11975         * gnulib-tool (func_import): Comment out code that spits out the
11976         new files with --dry-run.
11977
11978 2005-09-18  Bruno Haible  <bruno@clisp.org>
11979
11980         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11981
11982 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11983
11984         * lib/stat-time.h: New file.
11985         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11986         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11987         in a different way.
11988         (timespec_cmp): New function.
11989         * lib/utimecmp.c: Include stat-time.h.
11990         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11991         members exist, not on the obsolescent ST_MTIM_NSEC.
11992         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11993
11994 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11995
11996         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11997
11998 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11999
12000         * MODULES.html.sh (File system functions): Add stat-time.
12001         * modules/stat-time: New file.
12002         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12003         is now done in a different way, by the stat-time module.
12004         * modules/utimecmp (Depends-on): Add stat-time.
12005
12006 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12007
12008         * m4/st_mtim.m4: Remove.  Superseded by...
12009         * m4/stat-time.m4: New file.
12010         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12011         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12012
12013 2005-09-15  Derek Price  <derek@ximbiot.com>
12014
12015         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12016
12017 2005-09-15  Derek Price  <derek@ximbiot.com>
12018
12019         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12020         * lib/regex_internal.c: Ditto, using this...
12021         (__GNUC_PREREQ): ...new macro.
12022         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12023         using...
12024         (__GNUC_PREREQ): ...this new macro.
12025
12026         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12027
12028 2005-09-15  Derek Price  <derek@ximbiot.com>
12029             Paul Eggert  <eggert@cs.ucla.edu>
12030
12031         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12032         changes, consolidating in...
12033         * lib/regex_internal.h: ...this file.
12034
12035 2005-09-13  Jim Meyering  <jim@meyering.net>
12036
12037         * lib/canon-host.c: Filter through gnu indent and reword comments
12038         slightly.
12039         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12040
12041 2005-09-13  Derek Price  <derek@ximbiot.com>
12042
12043         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12044         failure.
12045         Reported by Jim Meyering  <jim@meyering.net>.
12046
12047 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12048
12049         * lib/base64.c: Typo.
12050         (base64_encode): Put b64str in initialized data section.
12051
12052 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12053
12054         Merge glibc and coreutils changes into gnulib, plus a few
12055         extra fixes.
12056         * lib/md5.c: Use #error rather than a string.
12057         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12058         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12059         (__attribute__): Define to empty for non recent-GCC.
12060         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12061         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12062         Renamed from their non-__ counterparts, with new macros replacing
12063         them if not _LIBC.  Add __THROW attribute.
12064         (rol): Remove.
12065         (struct md5_ctx): Align buffer if using GCC.
12066         * lib/sha1.h (struct sha1_ctx): Likewise.
12067         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12068         The old name was backwards.
12069         (NOTSWAP): Remove; not used.
12070         (rol): New macro, moved here from md5.h.
12071         (sha1_process_block): Remove a FIXME that doesn't make sense.
12072
12073 2005-09-12  Derek Price  <derek@ximbiot.com>
12074
12075         Return usable errors from canon-host.
12076         * lib/canon-host.h: New file.
12077         * lib/canon-host.c (canon_host): Wrap...
12078         (canon_host_r): ...this new function, which now relies exclusively on
12079         getaddrinfo.
12080         (ch_strerror): New function.
12081         (last_cherror): New global.
12082         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12083         interface.
12084         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12085         void *.
12086         (freeaddrinfo): Free ai->ai_canonname when set.
12087
12088 2005-09-12  Derek Price  <derek@ximbiot.com>
12089
12090         Make canon-host require getaddrinfo.
12091         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12092         AC_LIBSOURCE canon-host.h.  Call...
12093         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12094         gl_GETADDRINFO.
12095         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12096
12097 2005-09-12  Derek Price  <derek@ximbiot.com>
12098
12099         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12100         LGPL.
12101         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12102
12103 2005-09-12  Derek Price  <derek@ximbiot.com>
12104
12105         * lib/gai_strerror.c: Include config.h when available.  Include
12106         getaddrinfo.h before other headers to test interface.
12107         Reported by Larry Jones <lawrence.jones@ugs.com>.
12108
12109 2005-09-12  Derek Price  <derek@ximbiot.com>
12110             Paul Eggert  <eggert@cs.ucla.edu>
12111
12112         * modules/glob (Files): Add glob-libc.h.
12113
12114 2005-09-12  Derek Price  <derek@ximbiot.com>
12115             Paul Eggert  <eggert@cs.ucla.edu>
12116
12117         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12118         glob_.h, glob-libc.h.
12119         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12120
12121 2005-09-12  Derek Price  <derek@ximbiot.com>
12122             Paul Eggert  <eggert@cs.ucla.edu>
12123
12124         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12125         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12126         protecting things that should be done only in gnulib contexts.
12127         * lib/glob_.h: New file, containing only the glob things needed for
12128         gnulib.
12129         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12130         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12131         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12132         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12133         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12134         and to respect the namespace rules better.
12135
12136 2005-09-08  Simon Josefsson  <jas@extundo.com>
12137
12138         * modules/socklen: New file.
12139
12140 2005-09-08  Simon Josefsson  <jas@extundo.com>
12141
12142         * m4/socklen.m4: New file.
12143
12144 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12145
12146         * modules/utimens (Files): Add m4/utimbuf.m4, since
12147         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12148         Reported by Sergey Poznyakoff.
12149
12150 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12151
12152         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12153         definitions, since that's the preferred style in glibc.
12154         Fix a minor spacing issue, and update copyright notice to match
12155         glibc's.
12156
12157 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12158
12159         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12160
12161 2005-09-06  Simon Josefsson  <jas@extundo.com>
12162
12163         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12164         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12165
12166 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12167
12168         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12169         warning.
12170
12171 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12172
12173         * config/srclist.txt: Add glibc bug 1302.
12174
12175 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12176
12177         Change bitset word type from unsigned int to unsigned long int,
12178         as this has better performance on typical 64-bit hosts.
12179         Port bitset code to hosts with unusual word sizes.
12180         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12181         (build_collating_symbol):
12182         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12183         argument is a bitset.  This is merely a style issue, but it makes
12184         it clearer that an entire array is expected.
12185         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12186         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12187         Port to the case where bitset_word is not the same as unsigned int.
12188         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12189         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12190         Likewise.
12191         * lib/regexec.c (check_dst_limits_calc_pos_1,
12192         check_subexp_matching_top):
12193         (build_trtable, group_nodes_into_DFAstates):
12194         Likewise.
12195         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12196         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12197         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12198         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12199         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12200         * lib/regcomp.c (optimize_subexps, lower_subexp):
12201         Work even if bitset_word has holes in its bitwise representation.
12202         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12203         * lib/regexec.c (check_dst_limits_calc_pos_1,
12204         check_subexp_matching_top):
12205         Likewise.
12206         * lib/regex_internal.c (re_string_reconstruct):
12207         Don't assume UCHAR_MAX == 255.
12208         * lib/regex_internal.h (bitset_set_all): Likewise.
12209         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12210         All uses changed.
12211         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12212         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12213         All uses changed.
12214         (BITSET_WORD_MAX): New macro.
12215         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12216         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12217         (bitset_empty, bitset_copy):
12218         Prefer sizeof (bitset) to multiplying it out ourselves.
12219         (bitset_not_merge): Remove; unused.
12220         (bitset_contain): Return bool, not unsigned int with one bit on.
12221         All callers changed.
12222         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12223         alignment than re_node_set; do this by defining a new internal
12224         type struct dests_alloc and using it to allocate memory.
12225
12226 2005-09-05  Bruno Haible  <bruno@clisp.org>
12227
12228         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12229         links.
12230
12231 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12232
12233         * modules/size_max (Makefile.am): Add size_max.h
12234
12235 2005-09-04  Derek Price  <derek@ximbiot.com>
12236
12237         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12238
12239 2005-09-03  Simon Josefsson  <jas@extundo.com>
12240
12241         * gnulib-tool: Fix typo.
12242
12243 2005-09-03  Simon Josefsson  <jas@extundo.com>
12244
12245         * config/srclist.txt: Add glibc bug 1293.
12246
12247 2005-09-03  Derek Price  <derek@ximbiot.com>
12248
12249         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12250         From Larry Jones <lawrence.jones@ugs.com>.
12251
12252 2005-09-02  Simon Josefsson  <jas@extundo.com>
12253
12254         * modules/socklen: New file.
12255
12256 2005-09-02  Simon Josefsson  <jas@extundo.com>
12257
12258         * modules/havelib: New module.
12259
12260         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12261         Use havelib.
12262
12263 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12264
12265         Check for arithmetic overflow when calculating sizes, to prevent
12266         some buffer-overflow issues.  These patches are conservative, in the
12267         sense that when I couldn't determine whether an overflow was possible,
12268         I inserted a run-time check.
12269         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12270         macros.
12271         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12272         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12273         (re_xnrealloc, re_x2nrealloc): New inline functions.
12274         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12275         parse_bracket_exp):
12276         (build_equiv_class, build_charclass): Check for arithmetic overflow
12277         in size expression calculations.
12278         * lib/regex_internal.c (re_string_realloc_buffers):
12279         (build_wcs_upper_buffer, re_node_set_add_intersect):
12280         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12281         (re_dfa_add_node, register_state): Likewise.
12282         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12283         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12284         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12285         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12286
12287 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12288
12289         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12290         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12291
12292 2005-09-02  Bruno Haible  <bruno@clisp.org>
12293
12294         Support for lib vs. lib64 distinction on biarch platforms.
12295         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12296         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12297         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12298
12299 2005-09-02  Bruno Haible  <bruno@clisp.org>
12300
12301         * gnulib-tool (import): In the other first-use case, provide defaults
12302         as well.
12303
12304 2005-09-02  Bruno Haible  <bruno@clisp.org>
12305
12306         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12307         patches not yet found in the latest gettext release.
12308
12309 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12310
12311         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12312         to avoid a collision with bits/local_lim.h in glibc.
12313         All uses changed.  Problem reported by Dmitry V. Levin in
12314         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12315
12316         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12317         bugs in int versus size_t comparisons.
12318         (re_string_context_at): Fix bug where the code assumed that
12319         Idx is signed.
12320
12321         Use bool where appropriate.
12322         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12323         All callers changed.
12324         (calc_eclosure_iter): Likewise, for ROOT arg.
12325         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12326         (build_charclass_op): Likewise, for NON_MATCH arg.
12327         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12328         (re_string_construct_common): Likewise, for ICASE arg.
12329         * lib/regexec.c (re_search_2_stub, re_search_stub):
12330         Likewise, for RET_LEN arg.
12331         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12332         (set_regs): Likewise, for FL_BACKTRACK arg.
12333         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12334         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12335         (calc_eclosure_iter, parse_bracket_exp):
12336         Use bool for internal variables that are booleans.
12337         * lib/regexec.c (re_search_internal, check_matching,
12338         proceed_next_node):
12339         (set_regs, build_sifted_states, sift_states_bkref):
12340         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12341         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12342         (find_collation_sequence_value):
12343         Likewise.
12344         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12345         (re_node_set_compare):
12346         Return bool, not int. All callers changed.
12347         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12348         (build_trtable, check_node_accept): Likewise.
12349         * lib/regex_internal.h: Include stdbool.h.
12350
12351         Fix bugs uncovered when converting to bool.
12352         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12353         failure instead of charging ahead blindly.
12354         * lib/regex_internal.c (register_state): Likewise.
12355         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12356         for freeing internal storage.
12357         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12358         bitset pieces used as boolean, to avoid undefined behavior
12359         on hosts that do int overflow checking.
12360
12361 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12362
12363         * config/srclist.txt: Add glibc bugs 1285-1287.
12364
12365 2005-09-01  Jim Meyering  <jim@meyering.net>
12366
12367         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12368         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12369         Require gl_STAT_MACROS, too.
12370
12371 2005-09-01  Bruno Haible  <bruno@clisp.org>
12372
12373         * gnulib-tool (import): In the first-use case, provide defaults.
12374
12375 2005-09-01  Bruno Haible  <bruno@clisp.org>
12376
12377         * gnulib-tool (func_import): Remove the .tmp files.
12378
12379 2005-09-01  Bruno Haible  <bruno@clisp.org>
12380
12381         * gnulib-tool (func_import): Fix handling of symbolic links.
12382
12383 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12384
12385         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12386         old glibc regex code mishandles strings longer than 2**31 bytes.
12387         This patch fixes this when the regex code is used in gnulib
12388         (i.e., outside glibc).
12389
12390         This patch should not affect the use of the regex code inside
12391         glibc.  No doubt this problem also needs to be handled for glibc
12392         as well, but the result will be an incompatible change to the
12393         glibc ABI, and the old ABI will have to be supported too.  That
12394         can be the the subject for another patch.
12395
12396         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12397         governing whether the rest of this patch is active.  By default,
12398         the macro is disabled and the patch has no effect.
12399         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12400         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12401         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12402         (re_match_2, re_set_registers): Use the new types.
12403         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12404         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12405         New macros.
12406         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12407         (re_string_context_at, bin_tree_t, re_dfastate_t):
12408         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12409         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12410         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12411         (re_string_char_size_at, re_string_wchar_at):
12412         (re_string_elem_size_at):
12413         Use the new types and macros to port to 64-bit hosts.
12414         Use unsigned types for internal values, so that the code
12415         mostly works even for arrays larger than SSIZE_MAX.
12416         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12417         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12418         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12419         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12420         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12421         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12422         (calc_inveclosure, parse_dup_op, build_range_exp):
12423         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12424         (fetch_number, create_token_tree, mark_opt_subexp):
12425         Likewise.
12426         * lib/regex_internal.c (re_string_construct_common,
12427         create_ci_newstate):
12428         (create_cd_newstate, re_string_allocate, re_string_construct):
12429         (re_string_realloc_buffers, build_wcs_upper_buffer):
12430         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12431         (re_string_reconstruct, re_string_peek_byte_case):
12432         (re_string_fetch_byte_case, re_string_context_at):
12433         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12434         (re_node_set_init_copy, re_node_set_add_intersect):
12435         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12436         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12437         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12438         (re_acquire_state, re_acquire_state_context, register_state):
12439         Likewise.
12440         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12441         search_cur_bkref_entry):
12442         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12443         (re_search_internal, re_search_2_stub, re_search_stub)
12444         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12445         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12446         (update_cur_sifted_state, check_dst_limits):
12447         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12448         (check_subexp_limits, sift_states_bkref, merge_state_array):
12449         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12450         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12451         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12452         (expand_bkref_cache, check_node_accept_bytes):
12453         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12454         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12455         (acquire_init_state_context, check_halt_node_context):
12456         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12457         (sift_states_backward, clean_state_log_if_needed):
12458         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12459         (find_recover_state, transit_state_sb, transit_state_mb):
12460         (transit_state_bkref, build_trtable, match_ctx_clean):
12461         Likewise.
12462         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12463         to work around an assumption that REG_MISSING is negative.
12464
12465         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12466         (seek_collating_symbol_entry) [defined _LIBC]:
12467         (lookup_collation_sequence_value) [defined _LIBC]:
12468         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12469         Use prototypes rather than old-style function definitions.
12470         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12471         (transit_state_sb) [0]:
12472         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12473
12474         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12475         rm_eo.
12476
12477         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12478         (optimize_subexps, lower_subexp):
12479         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12480         since the signed shift might overflow.  Use 1u<<31 instead.
12481         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12482         Likewise.
12483         * lib/regexec.c (check_dst_limits_calc_pos_1,
12484         check_subexp_matching_top): Likewise.
12485
12486         * lib/regcomp.c (optimize_subexps, lower_subexp):
12487         Use CHAR_BIT rather than 8, for clarity.
12488         * lib/regexec.c (check_dst_limits_calc_pos_1):
12489         (check_subexp_matching_top): Likewise.
12490         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12491         have to worry about portability issues when shifting it left.
12492         Remove no-longer-needed test for table_size > 0.
12493         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12494         in a word, as the resulting behavior is undefined.
12495         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12496         in one case, a <= should have been an <, and in another case the
12497         whole test was missing.
12498         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12499         the standard name CHAR_BIT.
12500         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12501         this is not true on one's complement and signed-magnitude hosts.
12502
12503         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12504         next_last_offset.
12505         (struct re_dfa_t): Remove unused member states_alloc.
12506         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12507
12508 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12509
12510         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12511         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12512         and large-file glibc and in 32-bit large-file Solaris.
12513
12514 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12515
12516         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12517         lengths fit in regoff_t; this isn't true if regoff_t is the same
12518         width as size_t.
12519         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12520         (= START + RANGE) instead of RANGE.  This avoids overflow
12521         problems when regoff_t is the same width as size_t.
12522         All callers changed.
12523         (re_search_2_stub): Check for overflow when adding the
12524         sizes of the two strings.
12525         (re_search_stub): Check for overflow when adding START
12526         to RANGE; if it occurs, substitute the extreme value.
12527
12528 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12529
12530         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12531
12532 2005-08-31  Jim Meyering  <jim@meyering.net>
12533
12534         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12535         a pointer-to-const.
12536         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12537         (register_state): Likewise.
12538         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12539         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12540         (group_nodes_into_DFAstates): Likewise.
12541
12542 2005-08-31  Jim Meyering  <jim@meyering.net>
12543
12544         * check-module: Add a FIXME comment.
12545
12546 2005-08-31  Eric Blake  <ebb9@byu.net>
12547
12548         * modules/unistd-safer (Files): Add unistd--.h.
12549         * modules/stdio-safer (Files): Add stdio--.h.
12550
12551 2005-08-31  Derek Price  <derek@ximbiot.com>
12552
12553         * lib/getdelim.c (getdelim): Return EOF on EOF.
12554         Reported by Larry Jones <lawrence.jones@ugs.com>.
12555
12556 2005-08-31  Bruno Haible  <bruno@clisp.org>
12557
12558         Avoid unnecessary diffs in the generated lib/Makefile.am.
12559         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12560         the generated files.
12561         (func_import): Don't set cmd.
12562
12563 2005-08-31  Bruno Haible  <bruno@clisp.org>
12564
12565         * lib/strstr.c: Include <stddef.h>, for NULL.
12566         * lib/strcasestr.c: Likewise.
12567         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12568
12569 2005-08-31  Bruno Haible  <bruno@clisp.org>
12570
12571         * gnulib-tool: New option --macro-prefix.
12572         (func_import): Use macro_prefix.
12573         (import): Handle option --macro-prefix.
12574
12575 2005-08-31  Bruno Haible  <bruno@clisp.org>
12576
12577         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12578         Also use new variables cached_lgpl, cached_libtool.
12579
12580 2005-08-31  Bruno Haible  <bruno@clisp.org>
12581
12582         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12583         always instantiating them.
12584
12585 2005-08-31  Bruno Haible  <bruno@clisp.org>
12586
12587         * gnulib-tool (func_import): Read the previous cached settings
12588         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12589         earlier added by gnulib but are now dropped. Warn when a gnulib file
12590         overwrites a non-gnulib file.
12591
12592 2005-08-31  Bruno Haible  <bruno@clisp.org>
12593
12594         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12595         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12596         projects that don't keep autogenerated files in CVS. Put into
12597         actioncmd only the specified modules, not the transitive closure.
12598
12599 2005-08-31  Bruno Haible  <bruno@clisp.org>
12600
12601         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12602         Create directories that shall be filled.
12603         (import): Don't look for gl_* macros in configure.ac. Recurse across
12604         all directories containing a gnulib-cache.m4 files, if meaningful.
12605
12606 2005-08-31  Bruno Haible  <bruno@clisp.org>
12607
12608         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12609         (import): Set seen_libtool when we see gl_LIBTOOL.
12610
12611 2005-08-31  Bruno Haible  <bruno@clisp.org>
12612
12613         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12614         declaration macro definitions from generated gnulib.m4.
12615
12616 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12617
12618         * lib/iconvme.h: Add prototype for iconv_alloc.
12619
12620 2005-08-29  Simon Josefsson  <jas@extundo.com>
12621
12622         * lib/iconvme.c: Fix errno.
12623
12624 2005-08-29  Bruno Haible  <bruno@clisp.org>
12625
12626         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12627         that it works when the directory contains spaces.
12628
12629 2005-08-29  Bruno Haible  <bruno@clisp.org>
12630
12631         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12632
12633 2005-08-29  Bruno Haible  <bruno@clisp.org>
12634
12635         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12636         Emit more advice.
12637
12638 2005-08-29  Bruno Haible  <bruno@clisp.org>
12639         and Stepan Kasal  <kasal@ucw.cz>
12640
12641         * check-module: If more parameters are given, check each of them
12642         separately; add more exceptions, as noted by Jim Meyering.
12643         (check_module): New procedure.
12644         (%exempt_header): Now contains all exceptions.
12645
12646 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12647
12648         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12649
12650 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12651
12652         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12653
12654 2005-08-28  Bruno Haible  <bruno@clisp.org>
12655
12656         * m4/gnulib-tool.m4: New file.
12657
12658 2005-08-27  Jim Meyering  <jim@meyering.net>
12659
12660         * modules/unistd-safer (Files): Add pipe-safer.c.
12661         * modules/fcntl-safer (Files): Add creat-safer.c.
12662
12663 2005-08-27  Jim Meyering  <jim@meyering.net>
12664
12665         * m4/stdlib-safer.m4: New file.  From coreutils.
12666         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12667         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12668         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12669         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12670         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12671
12672 2005-08-27  Jim Meyering  <jim@meyering.net>
12673
12674         * lib/fopen-safer.c: Merge minor changes from coreutils.
12675         * lib/dup-safer.c: Likewise.
12676         * lib/fd-safer.c: Likewise.
12677
12678         Merge from coreutils.
12679         * lib/stdio--.h: New file.
12680         * lib/stdlib--.h: New file.
12681         * lib/mkstemp-safer.c: New file.
12682
12683         GNU tar needs these.
12684         * lib/pipe-safer.c: New file.
12685         * lib/creat-safer.c: New file.
12686         * lib/fcntl--.h (creat): Define to creat_safer.
12687         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12688         * lib/unistd--.h (pipe): Define to pipe_safer.
12689         * lib/unistd-safer.h: Declare pipe_safer.
12690
12691 2005-08-26  Simon Josefsson  <jas@extundo.com>
12692
12693         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12694         Haible <bruno@clisp.org>.
12695
12696 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12697
12698         * lib/regex_internal.h: Remove all references to
12699         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12700         or better.
12701         (bitset_not, bitset_merge, bitset_not_merge):
12702         (bitset_mask, re_string_allocate, re_string_construct):
12703         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12704         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12705         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12706         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12707         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12708         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12709         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12710         (re_acquire_state_context):
12711         Remove unnecessary forward decls.
12712         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12713         Put __attribute at function definition,
12714         now that the function decl has been removed.
12715         * lib/regex_internal.c (re_string_peek_byte_case):
12716         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12717         Likewise.
12718
12719 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12720
12721         * m4/regex.m4: Add AC_PREREQ(2.50).
12722         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12723
12724 2005-08-25  Simon Josefsson  <jas@extundo.com>
12725
12726         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12727         __fsetlocking.
12728
12729 2005-08-25  Simon Josefsson  <jas@extundo.com>
12730
12731         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12732         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12733         GLIBC specific code.
12734
12735 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12736
12737         Make regex safe for g++.  This fixes one real bug (an "err"
12738         that should have been "*err").  g++ problem reported by
12739         Sam Steingold.
12740         * lib/regex_internal.h (re_calloc): New macro, consistent with
12741         re_malloc etc.  All callers of calloc changed to use re_calloc.
12742         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12743         not int.  All callers changed.
12744         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12745         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12746         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12747         (find_recover_state): Change "err" to "*err"; this fixes what
12748         appears to be a real bug.
12749         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12750         versus int.
12751
12752 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12753
12754         * modules/regex (Depends-on): Add malloc, since the code
12755         assumes that !malloc(0) means failure.
12756
12757 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12758
12759         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12760
12761         alloca modernization/simplification for regex.
12762         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12763         needs to be at the start of the file, and can be moved into
12764         regex_internal.h and simplified.
12765         * lib/regex_internal.h: Include <alloca.h>.
12766         (__libc_use_alloca) [!defined _LIBC]: New macro.
12767         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12768         now works outside glibc.
12769
12770 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12771
12772         * config/srclist.txt: Add glibc bugs 1241, 1245.
12773
12774 2005-08-25  Jim Meyering  <jim@meyering.net>
12775
12776         * lib/open-safer.c: Include <config.h>.
12777         Otherwise, we'd lose LARGEFILE support in any file using
12778         e.g. "fcntl--.h"
12779
12780 2005-08-25  Bruno Haible  <bruno@clisp.org>
12781
12782         * m4/minmax.m4: Require autoconf 2.52.
12783         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12784         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12785         alternatives of translit over the alphabet.
12786         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12787
12788 2005-08-24  Simon Josefsson  <jas@extundo.com>
12789
12790         * tests/test-getpass.c: New file.
12791
12792 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12793
12794         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12795         for GNU regex features.
12796
12797 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12798
12799         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12800         * lib/regex.h (regerror): Likewise.
12801
12802         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12803         requires this.  (The code never needed it.)
12804
12805         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12806         All uses of recently-renamed identifiers changed to use the new,
12807         POSIX-compliant names.  The code will build and run just fine
12808         without these changes, but it's better to eat our own dog food
12809         and use the standard-conforming names.
12810
12811         * lib/regex.h: Fix a multitude of POSIX name space violations.
12812         These changes have an effect only for programs that define
12813         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12814         do not change anything for programs compiled in the normal way.
12815         Also, there is no effect on the ABI.
12816
12817         (_REGEX_SOURCE): New macro.
12818         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12819         defined and _GNU_SOURCE is not; this fixes a name space violation.
12820
12821         Rename the following macros to obey POSIX requirements.
12822         The old names are still visible as macros if _REGEX_SOURCE is defined.
12823         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12824         RE_BACKSLASH_ESCAPE_IN_LISTS.
12825         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12826         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12827         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12828         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12829         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12830         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12831         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12832         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12833         (REG_INTERVALS): renamed from RE_INTERVALS.
12834         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12835         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12836         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12837         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12838         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12839         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12840         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12841         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12842         RE_UNMATCHED_RIGHT_PAREN_ORD.
12843         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12844         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12845         (REG_DEBUG): renamed from RE_DEBUG.
12846         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12847         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12848         unusual, since we can't clash with the POSIX REG_ICASE.
12849         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12850         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12851         (REG_NO_SUB): renamed from RE_NO_SUB.
12852         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12853         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12854         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12855         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12856         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12857         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12858         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12859         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12860         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12861         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12862         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12863         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12864         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12865         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12866         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12867         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12868         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12869         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12870         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12871         (REG_FIXED): Renamed from REGS_FIXED.
12872         (REG_NREGS): Renamed from RE_NREGS.
12873
12874         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12875         of other REG_* macros, since POSIX says the user is allowed to
12876         #undef these macros selectively.
12877
12878         (reg_errcode_t): Update comment stating what other tables need
12879         to be consistent.
12880
12881         Rename the following enum values to obey POSIX requirements.
12882         The old names are still visible as macros.
12883         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12884         is not defined, since GNU is supposed to be a superset of POSIX as
12885         much as possible, and since we want reg_errcode_t to be a signed
12886         type for implementation consistency.
12887         (_REG_NOERROR): Renamed from REG_NOERROR.
12888         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12889         (_REG_BADPAT): Renamed from REG_BADPAT.
12890         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12891         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12892         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12893         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12894         (_REG_EBRACK): Renamed from REG_EBRACK.
12895         (_REG_EPAREN): Renamed from REG_EPAREN.
12896         (_REG_EBRACE): Renamed from REG_EBRACE.
12897         (_REG_BADBR): Renamed from REG_BADBR.
12898         (_REG_ERANGE): Renamed from REG_ERANGE.
12899         (_REG_ESPACE): Renamed from REG_ESPACE.
12900         (_REG_BADRPT): Renamed from REG_BADRPT.
12901         (_REG_EEND): Renamed from REG_EEND.
12902         (_REG_ESIZE): Renamed from REG_ESIZE.
12903         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12904         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12905         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12906         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12907         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12908
12909         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12910         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12911         changed.  But support the old name if the new one is not defined
12912         and if _REGEX_SOURCE.
12913
12914         Change the following member names in struct re_pattern_buffer.
12915         The old names are still supported if !_REGEX_SOURCE.
12916         The new names are always supported, regardless of _REGEX_SOURCE.
12917         (re_buffer): Renamed from buffer.
12918         (re_allocated): Renamed from allocated.
12919         (re_used): Renamed from used.
12920         (re_syntax): Renamed from syntax.
12921         (re_fastmap): Renamed from fastmap.
12922         (re_translate): Renamed from translate.
12923         (re_can_be_null): Renamed from can_be_null.
12924         (re_regs_allocated): Renamed from regs_allocated.
12925         (re_fastmap_accurate): Renamed from fastmap_accurate.
12926         (re_no_sub): Renamed from no_sub.
12927         (re_not_bol): Renamed from not_bol.
12928         (re_not_eol): Renamed from not_eol.
12929         (re_newline_anchor): Renamed from newline_anchor.
12930
12931         Change the following member names in struct re_registers.
12932         The old names are still supported if !_REGEX_SOURCE.
12933         The new names are always supported, regardless of _REGEX_SOURCE.
12934         (rm_num_regs): Renamed from num_regs.
12935         (rm_start): Renamed from start.
12936         (rm_end): Renamed from end.
12937
12938         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12939         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12940         Prepend __ to parameter names.
12941
12942         Undo yesterday's changes.
12943
12944 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12945
12946         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12947         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12948         lib/regex.c.
12949
12950 2005-08-24  Jim Meyering  <jim@meyering.net>
12951
12952         Sync from coreutils.
12953         * m4/fcntl-safer.m4: New file.
12954
12955         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12956         and object files for this module.
12957
12958 2005-08-24  Jim Meyering  <jim@meyering.net>
12959
12960         Sync from coreutils.
12961         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12962
12963 2005-08-24  Jim Meyering  <jim@meyering.net>
12964
12965         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12966         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12967
12968 2005-08-24  Jim Meyering  <jim@meyering.net>
12969
12970         * modules/fcntl-safer: New module.
12971         * modules/fts (Depends-on): Add fcntl-safer.
12972         * MODULES.html.sh (File descriptor based Input/Output):
12973         Add fcntl-safer.
12974
12975 2005-08-24  Bruno Haible  <bruno@clisp.org>
12976
12977         Support for unit test modules.
12978         * modules/README: Mention tests modules.
12979         * modules/TEMPLATE-TESTS: New file.
12980         * gnulib-tool: New options --extract-tests-module, --with-tests and
12981         --tests-base (unused for the moment).
12982         (testsbase, inctests): New variables.
12983         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12984         (func_verify_module): Exclude TEMPLATE-TESTS.
12985         (func_verify_nontests_module, func_verify_tests_module): New functions.
12986         (func_get_dependencies): Add implicit dependency for tests modules.
12987         (func_get_tests_module): New function.
12988         (func_modules_transitive_closure): When --with-tests was specified,
12989         include the unit tests as well, unless explicitly avoided.
12990         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12991         (func_emit_tests_Makefile_am): New function.
12992         (func_create_testdir): When --with-tests was specified, emit a
12993         tests/ directory.
12994         * MODULES.html.sh (Future developments): Update.
12995
12996 2005-08-24  Bruno Haible  <bruno@clisp.org>
12997
12998         * modules/tls-tests: New file.
12999         * tests/test-tls.c: New file, from GNU gettext.
13000
13001 2005-08-24  Bruno Haible  <bruno@clisp.org>
13002
13003         * modules/lock-tests: New file.
13004         * tests/test-lock.c: New file, from GNU gettext.
13005
13006 2005-08-24  Bruno Haible  <bruno@clisp.org>
13007
13008         * lib/lock.h: Add multiple inclusion guard.
13009         * lib/tls.h: Add multiple inclusion guard.
13010
13011 2005-08-24  Bruno Haible  <bruno@clisp.org>
13012
13013         * gnulib-tool: Add support for the --aux-dir option to
13014         --create-testdir, --create-megatestdir, --test, --megatest.
13015         (func_create_testdir, func_create_megatestdir): Optionally emit a
13016         AC_CONFIG_AUX_DIR directive.
13017         (create-testdir, create-megatestdir, test, megatest): Provide a
13018         default value for $auxdir.
13019
13020 2005-08-24  Bruno Haible  <bruno@clisp.org>
13021
13022         * gnulib-tool (import): Use compound statement instead of subshell
13023         where possible.
13024
13025 2005-08-24  Bruno Haible  <bruno@clisp.org>
13026
13027         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13028
13029 2005-08-24  Bruno Haible  <bruno@clisp.org>
13030
13031         * gnulib-tool (func_version): Update.
13032
13033 2005-08-24  Bruno Haible  <bruno@clisp.org>
13034
13035         * gnulib-tool (func_import, func_create_testdir,
13036         func_create_megatestdir): Quote all autoconf macro arguments.
13037
13038 2005-08-24  Bruno Haible  <bruno@clisp.org>
13039
13040         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13041         option --force, because --force causes the aclocal.m4 of each
13042         subdirectory to be newer than the corresponding config.h.in.
13043
13044 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13045
13046         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13047         All contents moved to gl_REGEX.
13048         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13049         assume that it does.
13050
13051 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13052
13053         * lib/regex.h (REG_NOSYS)
13054         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13055         Define, since POSIX requires it as of 2001.
13056         (_REG_ENOSYS)
13057         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13058         New private symbol, used to keep the enum signed in all cases.
13059         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13060         Youngman in
13061         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13062
13063         * lib/regex_internal.c (re_string_skip_chars, register_state):
13064         (calc_state_hash):
13065         Remove forward decls; no longer needed now that we use prototypes.
13066         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13067         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13068         (clean_state_log_if_needed): Likewise.
13069
13070 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13071
13072         * config/srclist.txt: Add glibc bugs 1231-1233.
13073
13074 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13075
13076         Fix problems reported by Sam Steingold in
13077         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13078         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13079         assumed that reg_errcode_t is a signed type, which is not
13080         necessarily true if _XOPEN_SOURCE is not defined.
13081         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13082         since some compilers warn about it otherwise.
13083
13084 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13085
13086         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13087         (init_word_char, create_initial_state, duplicate_node_closure):
13088         (fetch_token, peek_token_bracket, build_range_exp):
13089         (build_collating_symbol): Remove forward decls; no longer needed
13090         now that we use prototypes.
13091
13092         * lib/regcomp.c:
13093         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13094         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13095         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13096         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13097         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13098         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13099         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13100         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13101         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13102         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13103         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13104         (build_charclass, build_charclass_op, fetch_number, create_tree):
13105         (create_token_tree, mark_opt_subexp, duplicate_tree):
13106         Use prototypes rather than old-style definitions.
13107
13108         * lib/regex_internal.c:
13109         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13110         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13111         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13112         (re_string_reconstruct, re_string_peek_byte_case):
13113         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13114         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13115         (re_node_set_init_copy, re_node_set_add_intersect):
13116         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13117         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13118         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13119         (re_acquire_state, re_acquire_state_context, register_state):
13120         (create_ci_newstate, create_cd_newstate, free_state):
13121         Likewise.
13122         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13123         re_search_2):
13124         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13125         (re_search_internal, prune_impossible_nodes):
13126         (acquire_init_state_context, check_matching, static):
13127         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13128         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13129         (update_regs, sift_states_backward, build_sifted_states):
13130         (clean_state_log_if_needed, merge_state_array):
13131         (update_cur_sifted_state, add_epsilon_src_nodes):
13132         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13133         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13134         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13135         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13136         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13137         (check_arrival, check_arrival_add_next_nodes):
13138         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13139         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13140         (check_node_accept_bytes, check_node_accept, extend_buffers):
13141         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13142         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13143         (sift_ctx_init):
13144         Likewise.
13145
13146         * lib/regex_internal.h:
13147         (re_string_allocate, re_string_construct, re_string_reconstruct):
13148         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13149         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13150         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13151         (re_string_context_at, re_string_peek_byte_case):
13152         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13153         is defined, since we now use prototypes always.
13154
13155         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13156         C89 or better.  All uses removed.
13157
13158 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13159
13160         * config/srclist.txt: Add glibc bugs 1220-1227.
13161
13162 2005-08-20  Jim Meyering  <jim@meyering.net>
13163
13164         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13165         of unused local, dfa.
13166
13167 2005-08-20  Bruno Haible  <bruno@clisp.org>
13168
13169         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13170
13171 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13172
13173         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13174         (re_node_set_insert_last, re_dfa_add_node):
13175         Rename local variables to avoid GCC shadowing warnings.
13176
13177 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13178
13179         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13180         [defined lint]: Suppress bogus uninitialized-variable warnings.
13181
13182         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13183         and let the caller return REG_ESPACE if out of space.  This
13184         removes an uninitialied-variable warning with GCC 4.0.1, and also
13185         avoids taking the address of a local variable.  All callers
13186         changed.
13187
13188 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13189
13190         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13191         $LIBCSRC/posix/regexec.c.
13192         Add glibc bug 1217 for regcomp.c.
13193
13194 2005-08-19  Jim Meyering  <jim@meyering.net>
13195
13196         * lib/regexec.c (proceed_next_node): Redo local variables to
13197         avoid GCC shadowing warnings.
13198
13199 2005-08-18  Bruno Haible  <bruno@clisp.org>
13200
13201         * lib/strstr.c (strstr): Fix return value in multibyte case.
13202         * lib/strcasestr.c (strcasestr): Likewise.
13203
13204 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13205
13206         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13207
13208 2005-08-17  Jim Meyering  <jim@meyering.net>
13209
13210         Make the %s format (seconds since the epoch) work for a negative
13211         number and when used with a zero-padded field width, e.g. %015s.
13212
13213         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13214         label so that it precedes the code to set `digits'.  Otherwise,
13215         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13216         print `00-22'.  Now, it prints `-0022', as it should.
13217
13218 2005-08-17  Bruno Haible  <bruno@clisp.org>
13219
13220         * modules/strstr (Files): Add m4/mbrtowc.m4.
13221         (Depends-on): Add mbuiter.
13222
13223 2005-08-17  Bruno Haible  <bruno@clisp.org>
13224
13225         * modules/strcasestr: New file.
13226         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13227         strcasestr.
13228
13229 2005-08-17  Bruno Haible  <bruno@clisp.org>
13230
13231         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13232
13233 2005-08-17  Bruno Haible  <bruno@clisp.org>
13234
13235         * modules/mbuiter: New file.
13236         * MODULES.html.sh (Extended multibyte and wide character utilities):
13237         Add mbuiter.
13238
13239 2005-08-17  Bruno Haible  <bruno@clisp.org>
13240
13241         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13242         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13243
13244 2005-08-17  Bruno Haible  <bruno@clisp.org>
13245
13246         * m4/strcasestr.m4: New file.
13247
13248 2005-08-17  Bruno Haible  <bruno@clisp.org>
13249
13250         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13251         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13252
13253 2005-08-17  Bruno Haible  <bruno@clisp.org>
13254
13255         * lib/strcasestr.h: New file.
13256         * lib/strcasestr.c: New file.
13257
13258 2005-08-17  Bruno Haible  <bruno@clisp.org>
13259
13260         * lib/strcasecmp.c: Use mbuiter.h.
13261
13262 2005-08-17  Bruno Haible  <bruno@clisp.org>
13263
13264         * lib/mbuiter.h: New file.
13265
13266 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13267
13268         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13269         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13270         and gl_GETOPT are both invoked via different paths (as happens
13271         with GNU tar CVS because it uses both argp and getopt), the former
13272         wins.
13273
13274 2005-08-16  Bruno Haible  <bruno@clisp.org>
13275
13276         * modules/tls: New file.
13277         * MODULES.html.sh (Multithreading): Add tls.
13278
13279 2005-08-16  Bruno Haible  <bruno@clisp.org>
13280
13281         * modules/strnlen1: New file.
13282         * MODULES.html.sh (String handling): Add strnlen1.
13283
13284 2005-08-16  Bruno Haible  <bruno@clisp.org>
13285
13286         * modules/strcase (Files): Add m4/mbrtowc.m4.
13287         (Depends-on): Add strnlen1, mbchar.
13288
13289 2005-08-16  Bruno Haible  <bruno@clisp.org>
13290
13291         * modules/mbiter: New file.
13292         * MODULES.html.sh (Extended multibyte and wide character utilities):
13293         Add mbiter.
13294
13295 2005-08-16  Bruno Haible  <bruno@clisp.org>
13296
13297         * modules/mbfile: New file.
13298         * MODULES.html.sh (Extended multibyte and wide character utilities):
13299         Add mbfile.
13300
13301 2005-08-16  Bruno Haible  <bruno@clisp.org>
13302
13303         * modules/mbchar: New file.
13304         * MODULES.html.sh (Extended multibyte and wide character utilities):
13305         New section.
13306
13307 2005-08-16  Bruno Haible  <bruno@clisp.org>
13308
13309         * m4/tls.m4: New file, from GNU gettext.
13310
13311 2005-08-16  Bruno Haible  <bruno@clisp.org>
13312
13313         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13314         always.
13315         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13316
13317 2005-08-16  Bruno Haible  <bruno@clisp.org>
13318
13319         * m4/mbiter.m4: New file.
13320
13321 2005-08-16  Bruno Haible  <bruno@clisp.org>
13322
13323         * m4/mbfile.m4: New file.
13324
13325 2005-08-16  Bruno Haible  <bruno@clisp.org>
13326
13327         * m4/mbchar.m4: New file.
13328
13329 2005-08-16  Bruno Haible  <bruno@clisp.org>
13330
13331         * lib/tls.h: New file, from GNU gettext.
13332         * lib/tls.c: New file, from GNU gettext.
13333
13334 2005-08-16  Bruno Haible  <bruno@clisp.org>
13335
13336         * lib/strnlen1.h: New file.
13337         * lib/strnlen1.c: New file.
13338
13339 2005-08-16  Bruno Haible  <bruno@clisp.org>
13340
13341         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13342         (mbi_init): Update.
13343         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13344         NUL byte, not after it.
13345
13346 2005-08-16  Bruno Haible  <bruno@clisp.org>
13347
13348         * lib/strcase.h (strcasecmp): Add note in comments.
13349         * lib/strncasecmp.c: Use code from strcasecmp.c.
13350         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13351         (strcasecmp): Work correctly in multibyte locales.
13352
13353 2005-08-16  Bruno Haible  <bruno@clisp.org>
13354
13355         * lib/mbiter.h: New file.
13356
13357 2005-08-16  Bruno Haible  <bruno@clisp.org>
13358
13359         * lib/mbfile.h: New file.
13360
13361 2005-08-16  Bruno Haible  <bruno@clisp.org>
13362
13363         * lib/mbchar.h: New file.
13364         * lib/mbchar.c: New file.
13365
13366 2005-08-16  Bruno Haible  <bruno@clisp.org>
13367
13368         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13369         the valid ones. Makes the comparison operations transitive:
13370         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13371         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13372
13373 2005-08-15  Simon Josefsson  <jas@extundo.com>
13374
13375         * modules/ssize_t (License): Change to 'unlimited'.
13376
13377         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13378
13379 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13380
13381         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13382         Add comments for each pending glibc patch.
13383
13384 2005-08-15  Bruno Haible  <bruno@clisp.org>
13385
13386         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13387         __cplusplus is defined.
13388
13389 2005-08-14  Jim Meyering  <jim@meyering.net>
13390
13391         Sync from coreutils.
13392
13393         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13394         Use the hash-table-based cycle-detection code not just when
13395         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13396         Reported by James Youngman in
13397         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13398         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13399         FTS_TIGHT_CYCLE_CHECK.
13400         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13401         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13402         once again.
13403         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13404         * lib/fts.c (fd_safer): Remove decl.
13405         Include fcntl--.h rather than unistd-safer.h
13406         (fts_safe_changedir): Don't call fd_safer; no longer needed
13407         now that we include fcntl--.h.
13408
13409 2005-08-12  Simon Josefsson  <jas@extundo.com>
13410
13411         * modules/getndelim2: Use ssize_t module.
13412         * modules/getnline: Likewise.
13413         * modules/safe-read: Likewise.
13414         * modules/xreadlink: Likewise.
13415
13416         * modules/ssize_t: New file.
13417
13418 2005-08-12  Simon Josefsson  <jas@extundo.com>
13419
13420         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13421
13422 2005-08-12  Simon Josefsson  <jas@extundo.com>
13423
13424         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13425         ssize_t.
13426
13427 2005-08-12  Simon Josefsson  <jas@extundo.com>
13428
13429         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13430         readline, getdelim and check_version.
13431         (Support for systems lacking ISO C 99: Sizes of integer types):
13432         Add size_max.
13433
13434 2005-08-12  Bruno Haible  <bruno@clisp.org>
13435
13436         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13437
13438 2005-08-11  Simon Josefsson  <jas@extundo.com>
13439
13440         * modules/readline: New file.
13441
13442         * modules/strnlen (Files): Add strnlen.h.
13443
13444 2005-08-11  Simon Josefsson  <jas@extundo.com>
13445
13446         * m4/readline.m4: New file.
13447
13448 2005-08-11  Simon Josefsson  <jas@extundo.com>
13449
13450         * lib/readline.h, readline.c: New file.
13451
13452 2005-08-11  Simon Josefsson  <jas@extundo.com>
13453
13454         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13455         gl_AVOID.
13456
13457 2005-08-11  Bruno Haible  <bruno@clisp.org>
13458
13459         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13460
13461 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13462
13463         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13464
13465 2005-08-10  Simon Josefsson  <jas@extundo.com>
13466
13467         * tests/test-iconvme.c: New file.
13468
13469 2005-08-10  Simon Josefsson  <jas@extundo.com>
13470
13471         * m4/strnlen.m4: New file.
13472
13473         * m4/strndup.m4: Don't check for strnlen declaration, done in
13474         strnlen.m4.
13475
13476 2005-08-10  Simon Josefsson  <jas@extundo.com>
13477
13478         * lib/strndup.c: Use strnlen.h.
13479
13480         * lib/strnlen.h: New file.
13481
13482 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13483
13484         * README: Typos.
13485
13486 2005-08-02  Simon Josefsson  <jas@extundo.com>
13487
13488         * modules/readline: New file.
13489
13490 2005-08-02  Simon Josefsson  <jas@extundo.com>
13491
13492         * modules/getdelim: New file.
13493
13494         * modules/getline: Rewrite, don't use getndelim2.
13495
13496 2005-08-02  Simon Josefsson  <jas@extundo.com>
13497
13498         * m4/getline.m4: Separate out getdelim stuff into separate module.
13499
13500         * m4/getdelim.m4: New file.
13501
13502 2005-08-02  Simon Josefsson  <jas@extundo.com>
13503
13504         * lib/getline.h, getline.c: Rewrite.
13505
13506         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13507
13508 2005-07-31  Bruno Haible  <bruno@clisp.org>
13509
13510         * lib/lock.h (gl_lock_initializer): New macro.
13511         (gl_lock_define_initialized): Use it.
13512         (gl_rwlock_initializer): New macro.
13513         (gl_rwlock_define_initialized): Use it.
13514         (gl_recursive_lock_initializer): New macro.
13515         (gl_recursive_lock_define_initialized): Use it.
13516
13517 2005-07-30  Karl Berry  <karl@gnu.org>
13518
13519         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13520         Report from Ben Pfaff, regarding getopt.
13521
13522 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13523
13524         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13525         normal way.
13526         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13527         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13528         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13529         (gl_GETOPT): Use the new macros.  Most of the implementation
13530         is moved to the new macros.  This is for programs like Emacs
13531         that don't want all the functionality of gl_GETOPT.
13532
13533 2005-07-26  Bruno Haible  <bruno@clisp.org>
13534
13535         * m4/lock.m4: Update from GNU gettext.
13536
13537 2005-07-26  Bruno Haible  <bruno@clisp.org>
13538
13539         * lib/lock.h: Update from GNU gettext.
13540         * lib/lock.c: Update from GNU gettext.
13541
13542 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13543
13544         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13545         obsolescent AC_TRY_RUN.  Include the default includes files, for
13546         'exit'.
13547
13548 2005-07-24  Bruno Haible  <bruno@clisp.org>
13549
13550         * modules/visibility: New file.
13551         * MODULES.html.sh (Misc): Add visibility.
13552
13553 2005-07-24  Bruno Haible  <bruno@clisp.org>
13554
13555         * m4/visibility.m4: New file.
13556
13557 2005-07-24  Bruno Haible  <bruno@clisp.org>
13558
13559         * doc/visibility.texi: New file.
13560
13561 2005-07-22  Bruno Haible  <bruno@clisp.org>
13562
13563         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13564         $(ALLOCA_H), redundant through BUILT_SOURCES.
13565         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13566         redundant through BUILT_SOURCES.
13567         * modules/byteswap (Makefile.am): Remove explicit dependency on
13568         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13569         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13570         $(FNMATCH_H), redundant through BUILT_SOURCES.
13571         * modules/getopt (Makefile.am): Remove explicit dependency on
13572         $(GETOPT_H), redundant through BUILT_SOURCES.
13573         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13574         redundant through BUILT_SOURCES.
13575         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13576         redundant through BUILT_SOURCES.
13577         * modules/stdbool (Makefile.am): Remove explicit dependency on
13578         $(STDBOOL_H), redundant through BUILT_SOURCES.
13579         * modules/stdint (Makefile.am): Remove explicit dependency on
13580         $(STDINT_H), redundant through BUILT_SOURCES.
13581         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13582         Remove explicit dependency on $(SYSEXITS_H).
13583         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13584
13585 2005-07-18  Simon Josefsson  <jas@extundo.com>
13586
13587         * lib/check-version.c (check_version): Accept identical versions too.
13588
13589 2005-07-18  Bruno Haible  <bruno@clisp.org>
13590
13591         * modules/lock: New file.
13592         * MODULES.html.sh (Multithreading): New section.
13593
13594 2005-07-18  Bruno Haible  <bruno@clisp.org>
13595
13596         * m4/lock.m4: New file, from GNU gettext.
13597
13598 2005-07-18  Bruno Haible  <bruno@clisp.org>
13599
13600         * lib/lock.h: New file, from GNU gettext.
13601         * lib/lock.c: New file, from GNU gettext.
13602
13603 2005-07-18  Bruno Haible  <bruno@clisp.org>
13604
13605         * lib/lock.h (gl_once_t): New type.
13606         (gl_once_define, gl_once): New macros.
13607         * lib/lock.c (fresh_once): New variable.
13608         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13609         functions.
13610
13611 2005-07-16  Simon Josefsson  <jas@extundo.com>
13612
13613         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13614         workaround, suggested by Bruno.
13615
13616 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13617
13618         * modules/xalloc (Depends-on): Add xalloc-die.
13619         * modules/xvasprintf (Depends-on): Add xalloc-die.
13620
13621 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13622
13623         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13624         with a minor change.
13625
13626 2005-07-15  Bruno Haible  <bruno@clisp.org>
13627
13628         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13629         When using lib/poll.c, define poll as rpl_poll.
13630
13631 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13632
13633         * modules/argp (Depends-on): Remove unlocked-io.
13634
13635 2005-07-14  Derek Price  <derek@ximbiot.com>
13636
13637         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13638         for glob symlink bug.
13639
13640 2005-07-14  Bruno Haible  <bruno@clisp.org>
13641
13642         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13643         Instead, test for *_unlocked function declarations directly.
13644
13645 2005-07-11  Simon Josefsson  <jas@extundo.com>
13646
13647         * modules/size_max: New file.
13648
13649         * modules/xsize: Depend on size_max module for size_max.m4.
13650
13651 2005-07-11  Simon Josefsson  <jas@extundo.com>
13652
13653         * lib/size_max.h: New file.
13654
13655 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13656
13657         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13658         copyright symbol and the year.
13659         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13660         (version_etc_va): Use parameterized copyright notice.
13661         Reword to conform to the current GNU coding standards.
13662
13663 2005-07-11  Karl Berry  <karl@gnu.org>
13664
13665         * doc/gnulib.texi (Quoting): new node.
13666         (Initial import): more info, from Patrice.
13667
13668 2005-07-11  Bruno Haible  <bruno@clisp.org>
13669
13670         * gnulib-tool (func_usage): Document option --avoid.
13671         (Command line options): Handle --avoid.
13672         (func_acceptable): New function.
13673         (func_modules_transitive_closure): Use it.
13674
13675 2005-07-11  Bruno Haible  <bruno@clisp.org>
13676
13677         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13678         Reported by Jim Meyering.
13679
13680 2005-07-10  Bruno Haible  <bruno@clisp.org>
13681
13682         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13683         Needed when size_t is smaller than 'unsigned int'.
13684         Reported by Paul Eggert.
13685
13686 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13687
13688         * modules/argp (Depends-on): Add unlocked-io
13689
13690 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13691
13692         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13693         block of defines.
13694
13695 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13696
13697         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13698         fix now.
13699
13700 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13701         and Paul Eggert  <eggert@cs.ucla.edu>
13702
13703         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13704         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13705
13706 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13707
13708         * modules/regex (Files): Add lib/regex_internal.c,
13709         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13710         (Depends-on): Add extensions.
13711         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13712
13713 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13714
13715         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13716         pathconf.
13717         * m4/same.m4 (gl_SAME): Likewise.
13718         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13719
13720         * m4/regex.m4: Adjust to new libc regex implementation.
13721         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13722         all the .c and .h parts of (the new) regex.
13723         Quote the m4 stuff better.
13724         Check for RE_ICASE bug of old gnulib.
13725         Check for REG_STARTEND of recent libc.
13726         Rename local variables from jm_* to gl_*.
13727         Quote operand of "test -f".
13728         Say "recent enough" version of libc, not "version 2".
13729         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13730         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13731         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13732         Remove check for btowc, isascii.
13733         Require AM_LANGINFO_CODESET.
13734
13735 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13736
13737         * lib/regex.c, regex.h: Sync from libc.
13738         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13739         * lib/regexec.c:
13740         New files, synced from libc, except that regex_internal.h
13741         currently has a small porting fix.
13742
13743 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13744
13745         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13746         regex_internal.c, regexec.c.
13747         Add regex_internal.h too, but as a comment, since the libc version
13748         is currently broken in gnulib mode.
13749
13750 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13751
13752         Support programs like Emacs that use gnulib but not gettext.
13753         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13754         * modules/gettext-h: New file.
13755         * modules/gettext (Files): Remove lib/gettext.h.
13756         (Depends-on): Add gettext-h.
13757         (Makefile.am): Remove lib_SOURCES.
13758         * modules/argmatch, modules/c-stack, modules/closeout:
13759         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13760         * modules/execute, modules/file-type, modules/getaddrinfo:
13761         * modules/getopt, modules/human, modules/javacomp:
13762         * modules/javaexec, modules/mkdir-p, modules/obstack:
13763         * modules/openat, modules/pagealign_alloc, modules/pipe:
13764         * modules/quotearg, modules/regex, modules/rpmatch:
13765         * modules/unicodeio, modules/userspec, modules/version-etc:
13766         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13767         * modules/xsetenv:
13768         Depend on gettext-h, not gettext.
13769
13770 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13771
13772         * gnulib-tool (func_import): Add support for 'public domain' license.
13773         * modules/alloca, modules/atexit, modules/memmove:
13774         Now public domain, not GPL.
13775         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13776         * modules/realloc, modules/strerror, modules/strtod:
13777         Now LGPL, not GPL.
13778
13779 2005-07-05  Bruno Haible  <bruno@clisp.org>
13780
13781         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13782         autoconf CVS. Needed for mingw.
13783
13784 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13785
13786         Remove the dependency of the strftime module on the tzset module.
13787         * modules/strftime (Depends-on): Remove dependency on tzset.
13788
13789 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13790
13791         Remove the dependency of the strftime module on the tzset module.
13792         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13793         gl_FUNC_TZSET_CLOBBER.
13794
13795 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13796
13797         Remove the dependency of the strftime module on the tzset module.
13798         * lib/strftime.c (my_strftime)
13799         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13800         Copy the input structure, to work around some of the bug with
13801         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13802         Solaris releases, you should also use the tzset module, but we won't
13803         require it as a dependency any more since we don't want LGPLed code
13804         to depend on GPLed code.
13805
13806 2005-07-02  Jim Meyering  <jim@meyering.net>
13807
13808         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13809         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13810         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13811         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13812
13813 2005-07-02  Jim Meyering  <jim@meyering.net>
13814
13815         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13816
13817 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13818
13819         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13820         declares only 'struct timespec;' (!).
13821
13822 2005-07-01  Jim Meyering  <jim@meyering.net>
13823
13824         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13825         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13826         * lib/save-cwd.c, tempname.c:
13827         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13828         and don't include <sys/file.h>).
13829
13830 2005-06-29  Jim Meyering  <jim@meyering.net>
13831
13832         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13833         type name.  Use the variable name instead.
13834         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13835         Likewise.
13836
13837 2005-06-28  Simon Josefsson  <jas@extundo.com>
13838
13839         * modules/check-version (Files): Add check-version.m4.
13840
13841 2005-06-28  Simon Josefsson  <jas@extundo.com>
13842
13843         * m4/check-version.m4: New file, suggested by Jim Meyering
13844         <jim@meyering.net>.
13845
13846 2005-06-28  Simon Josefsson  <jas@extundo.com>
13847
13848         * lib/check-version.h, lib/check-version.c: New files.
13849
13850 2005-06-28  Simon Josefsson  <jas@extundo.com>
13851
13852         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13853         collision with global variable.  Better indentation.  Don't
13854         increment buffer pointer beyond buffer end.  Based on comments
13855         from Paul Eggert <eggert@cs.ucla.edu>.
13856
13857         * lib/base64.h: Indent.
13858
13859 2005-06-28  Simon Josefsson  <jas@extundo.com>
13860
13861         * doc/gnulib.texi (Library version handling): New section.
13862
13863 2005-06-28  Jim Meyering  <jim@meyering.net>
13864
13865         * check-module (find_included_lib_files): Hard-code another
13866         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13867         but modules/fts-lgpl (correctly) does not list those files.
13868
13869         * modules/canonicalize (Files): Add lib/pathmax.h.
13870
13871 2005-06-25  Simon Josefsson  <jas@extundo.com>
13872
13873         * modules/check-version: New file.
13874
13875 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13876
13877         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13878         initializer of struct addrinfo, as an indication that we don't
13879         care how many members the structure has.
13880
13881 2005-06-24  Derek Price  <derek@ximbiot.com>
13882         and Bruno Haible  <bruno@clisp.org>
13883
13884         Remove stat module & update lstat.
13885         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13886         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13887         * m4/stat.m4: Remove this file.
13888
13889 2005-06-24  Derek Price  <derek@ximbiot.com>
13890         and Bruno Haible  <bruno@clisp.org>
13891
13892         Remove stat module & update lstat.
13893         * lib/stat.c: Remove this file...
13894         (slash_aware_lstat): ...moving this content and its support...
13895         * lib/lstat.c (rpl_lstat): ...into here.
13896         * lib/lstat.h: New file.
13897
13898 2005-06-24  Derek Price  <derek@ximbiot.com>
13899         and Bruno Haible  <bruno@clisp.org>
13900
13901         Remove stat module & update lstat.
13902         * config/srclist.txt (libc sources): Remove stat.
13903
13904 2005-06-24  Derek Price  <derek@ximbiot.com>
13905         and Bruno Haible  <bruno@clisp.org>
13906
13907         Remove stat module & update lstat.
13908         * MODULES.html.sh (stat): Remove.
13909         * MODULES.html: Regenerated.
13910         * modules/lstat (Description): Correct function name.
13911         (Files): Add "lstat.h".
13912         (Depends-on): Remove stat, add xalloc, stat-macros.
13913         * modules/stat: Remove this file.
13914         (Include): Add "lstat.h", remove <sys/stat.h>.
13915
13916 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13917
13918         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13919         (ranged_convert): Don't save conversion in a temporary struct.
13920         This causes a warning with GCC 4.0.0, and anyway in the typical
13921         case it's not worth the extra 100 bytes or so of code.
13922         (ranged_convert, __mktime_internal): When calling a function via a
13923         pointer P, use P () rather than (*P) (), as we now assume C89 or
13924         better.
13925
13926 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13927
13928         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13929         "who -r" failed to give output.  Problem reported by Tim Waugh.
13930
13931         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13932         (xcalloc): Use it to avoid needless tests.
13933         Problem reported by Jim Meyering.
13934
13935 2005-06-20  Derek Price  <derek@ximbiot.com>
13936
13937         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13938         unnecessary for Autoconfs > 2.59c.
13939
13940 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13941
13942         * lib/argp.h (__option_is_short): Check upper limit of
13943         __key. Isprint() requires its argument to have the value
13944         of an unsigned char or EOF.
13945
13946 2005-06-16  Jim Meyering  <jim@meyering.net>
13947
13948         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13949         when either N or S is zero.
13950
13951 2005-06-16  Derek Price  <derek@ximbiot.com>
13952
13953         * m4/bison.m4: Declare YACC & YFLAGS precious.
13954
13955 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13956
13957         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13958         multibyte string or pattern, fall back on unibyte matching.
13959         Problem reported by James Youngman.
13960
13961 2005-06-08  Bruno Haible  <bruno@clisp.org>
13962
13963         * modules/csharpcomp: New file.
13964         * MODULES.html.sh (C#): Add csharpcomp.
13965
13966 2005-06-08  Bruno Haible  <bruno@clisp.org>
13967
13968         * m4/csharpcomp.m4: New file, from GNU gettext.
13969
13970 2005-06-08  Bruno Haible  <bruno@clisp.org>
13971
13972         * lib/csharpcomp.h: New file, from GNU gettext.
13973         * lib/csharpcomp.c: New file, from GNU gettext.
13974         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13975
13976 2005-06-08  Bruno Haible  <bruno@clisp.org>
13977
13978         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13979         warning on mingw.
13980
13981 2005-06-07  Derek Price  <derek@ximbiot.com>
13982
13983         Sync from CVS.
13984         * lib/glob_.h: Indent nested #ifdef.
13985
13986 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13987
13988         Sync from coreutils.
13989         Use "file name" when talking about file names, instead of "filename"
13990         or "path", as per the GNU coding standards.
13991         * lib/mkdir-p.c: Renamed from makepath.c.
13992         (make_dir_parents): Renamed from make_path.  All callers changed.
13993         * lib/mkdir-p.h: Likewise.  All includers changed.
13994         * lib/filenamecat.c: Renamed from path-concat.c.
13995         (file_name_concat): Renamed from path_concat.  All callers changed.
13996         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13997         * lib/filenamecat.h: Likewise.  All includers changed.
13998         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13999         in comments or local variable names.
14000         * lib/basename.c: Likewise.
14001         * lib/canonicalize.c, canonicalize.h: Likewise.
14002         * lib/dirname.c, dirname.h: Likewise.
14003         * lib/euidaccess.c: Likewise.
14004         * lib/exclude.c: Likewise
14005         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14006         * lib/fsusage.c, fsuage.h: Likewise.
14007         * lib/fts.c, fts_.h: Likewise.
14008         * lib/getcwd.c: Likewise.
14009         * lib/getloadavg.c: Likewise.
14010         * lib/mkstemp.c: Likewise.
14011         * lib/mountlist.c, mountlist.h: Likewise.
14012         * lib/openat.c, openat.h: Likewise.
14013         * lib/readlink-stub.c: Likewise.
14014         * lib/readutmp.c, readutmp.h: Likewise.
14015         * lib/rename.c: Likewise.
14016         * lib/rmdir.c: Likewise.
14017         * lib/same.c: Likewise.
14018         * lib/savedir.c: Likewise.
14019         * lib/stripslash.c: Likewise.
14020         * lib/tempname.c: Likewise.
14021         * lib/xreadlink.c: Likewise.
14022         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14023         All uses changed.
14024         * lib/exclude.h: Likewise.
14025
14026         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14027         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14028         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14029         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14030         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14031         files have been getting away with it for years (MORE/BSD 4.3
14032         is extinct now).
14033         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14034         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14035
14036         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14037         Define to 256, not 255, as per modern POSIX.
14038
14039 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14040
14041         Sync from coreutils.
14042         Use "file name" when talking about file names, instead of "filename"
14043         or "path", as per the GNU coding standards.
14044         * MODULES.html.sh: mkdir-p renamed from makepath.
14045         filenamecat renamed from path-concat.
14046         * modules/filenamecat: Renamed from modules/path-concat.
14047         (Files): filenamecat.h and filenamecat.c renamed from
14048         path-concat.h and path-concat.c.
14049         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14050         (Include): filenamecat.h, not path-concat.h.
14051         * modules/mkdir-p: Renamed from modules/makepath.
14052         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14053         makepath.c.
14054         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14055         (Include): mkdir-p.h, not makepath.h.
14056
14057 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14058
14059         Sync from coreutils.
14060         * m4/mkdir-p.m4: Renamed from makepath.m4.
14061         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14062         Rename files from makepath.c to mkdir-p.c, and from
14063         makepath.h to mkdir-p.h.
14064         * m4/filenamecat.m4: Renamed from path-concat.m4.
14065         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14066         Rename files from path-concat.c to filenamecat.c,
14067         and from path-concat.h to filenamecat.h.
14068         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14069         "file name" in local variables or comments.
14070         * m4/rename.m4: Likewise.
14071
14072 2005-06-01  Bruno Haible  <bruno@clisp.org>
14073
14074         * modules/csharpexec: New file.
14075         * MODULES.html.sh (C#): New section.
14076
14077 2005-06-01  Bruno Haible  <bruno@clisp.org>
14078
14079         * m4/csharp.m4: New file, from GNU gettext.
14080         * m4/csharpexec.m4: New file, from GNU gettext.
14081
14082 2005-06-01  Bruno Haible  <bruno@clisp.org>
14083
14084         * lib/csharpexec.h: New file, from GNU gettext.
14085         * lib/csharpexec.c: New file, from GNU gettext.
14086         * lib/csharpexec.sh.in: New file, from GNU gettext.
14087
14088 2005-05-31  Derek Price  <derek@ximbiot.com>
14089             Paul Eggert  <eggert@cs.ucla.edu>
14090
14091         Sync from cvs.
14092         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14093
14094 2005-05-31  Derek Price  <derek@ximbiot.com>
14095             Paul Eggert  <eggert@cs.ucla.edu>
14096
14097         Sync from cvs.
14098         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14099
14100 2005-05-29  Derek Price  <derek@ximbiot.com>
14101
14102         * config/srclist.txt (glob_.h, glob.c): Add these files.
14103
14104 2005-05-29  Derek Price  <derek@ximbiot.com>
14105
14106         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14107         * modules/glob: New file.
14108         * modules/getlogin_r: Add link to POSIX spec in description.
14109
14110 2005-05-29  Derek Price  <derek@ximbiot.com>
14111             Paul Eggert  <eggert@cs.ucla.edu>
14112
14113         * m4/glob.m4: New file.
14114
14115 2005-05-29  Derek Price  <derek@ximbiot.com>
14116             Paul Eggert  <eggert@cs.ucla.edu>
14117
14118         * lib/glob_.h, lib/glob.c: New files.
14119
14120 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14121
14122         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14123         * modules/fts-lgpl (Depends-on): Remove gettext.
14124
14125 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14126
14127         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14128         and don't require gt_INTTYPES_PRI.
14129
14130 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14131
14132         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14133
14134         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14135         the configuration hassle isn't worth it.
14136         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14137         (LONGEST_MODIFIER, PRIuMAX): Remove.
14138
14139 2005-05-27  Bruno Haible  <bruno@clisp.org>
14140
14141         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14142
14143 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14144
14145         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14146         _POSIX_PTHREAD_SEMANTICS for Solaris.
14147
14148 2005-05-25  Derek Price  <derek@ximbiot.com>
14149
14150         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14151
14152 2005-05-25  Derek Price  <derek@ximbiot.com>
14153             Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14156         * lib/getlogin_r.c, getlogin_r.h: New files.
14157
14158 2005-05-25  Bruno Haible  <bruno@clisp.org>
14159             Derek Price  <derek@ximbiot.com>
14160
14161         * lib/getlogin_r.h: Simplify API documentation.
14162
14163 2005-05-23  Derek Price  <derek@ximbiot.com>
14164
14165         * modules/minmax (Files): Add m4/minmax.m4.
14166         (configure.ac): Add gl_MINMAX.
14167
14168 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14169
14170         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14171         so that unistd-safer.h (GPL'ed code) need not be included.
14172
14173 2005-05-22  Bruno Haible  <bruno@clisp.org>
14174
14175         * m4/minmax.m4: New file.
14176         Based on a patch by Derek Price <derek@ximbiot.com>.
14177
14178 2005-05-22  Bruno Haible  <bruno@clisp.org>
14179
14180         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14181         (INT64_MIN): Fix definition.
14182         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14183
14184         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14185         NEED_SIGNED_INT_TYPES.
14186
14187         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14188         HAVE_SYSTEM_INTTYPES.
14189
14190 2005-05-22  Bruno Haible  <bruno@clisp.org>
14191
14192         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14193         Also include <sys/param.h> if it defines MIN, MAX.
14194         Based on a patch by Derek Price <derek@ximbiot.com>.
14195
14196 2005-05-21  Jim Meyering  <jim@meyering.net>
14197
14198         * modules/fts (Files): Add m4/inttypes-pri.m4.
14199         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14200
14201 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14202
14203         New fts module.
14204         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14205         (setup_dir, free_dir): New functions.
14206         (enter_dir, leave_dir): Define trivial
14207         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14208         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14209         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14210         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14211         Move to fts-cycle.c.
14212         (fts_open): Use setup_dir.
14213         (fts_close): Use free_dir.
14214         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14215         This adds a label and some gotos, but the alternatives were messier.
14216         Check for memory allocation failure when entering a dir.
14217         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14218         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14219         (FTS): New member fts_cycle, that is a union that contains the
14220         old active_dir_ht and cycle_state.  All uses changed to mention
14221         fts_cycle.ht and fts_cycle.state.
14222         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14223         fts.c, with the following changes:
14224         (setup_dir, free_dir): New functions.
14225         (enter_dir): Now returns bool.  Return true if successful, false
14226         if memory exhausted.  All callers changed.
14227         Do not bother partly cleaning up on
14228         memory allocation failure; that is free_dir's job.
14229         However, free ad if hash_insert fails, to avoid memory leak.
14230         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14231         fts->fts_options to see which union member to use.
14232
14233 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14234
14235         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14236         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14237
14238 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14239
14240         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14241
14242 2005-05-20  Jim Meyering  <jim@meyering.net>
14243
14244         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14245         Now a macro, to pacify GCC.
14246
14247 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14248
14249         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14250         of -1.
14251
14252 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14253
14254         * lib/chown.c (rpl_chown): Return -1 on failure.
14255
14256 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14257
14258         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14259         Don't check for stddef.h.
14260         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14261         don't use its results.
14262         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14263         since we include them unconditionally.  Don't require
14264         AM_STDBOOL_H, since stdbool is a prerequisite.
14265         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14266         since we assume C89 or better.
14267         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14268         as we don't use their results.
14269         Don't check for fchdir, memmove, memset, strrchr, as we use
14270         them unconditionally.
14271         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14272         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14273
14274 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14275
14276         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14277         Include <stddef.h> unconditionally, since we assume C89 now.
14278         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14279         * lib/fts.c: Include fts_.h first, to check interface.
14280         Do not include intprops.h; no longer needed.
14281         Include cycle-check.h and hash.h, since fts_.h no longer does.
14282         Remove unnecessary casts of closedir to void.
14283         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14284         decide whether to decrement nlinks.
14285         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14286         (FTS): Use struct hash_table * instead of Hash_table, so that
14287         we no longer need to include hash.h here.
14288
14289 2005-05-18  Jim Meyering  <jim@meyering.net>
14290
14291         * modules/dirfd (License): Change to LGPL.  Most of the code
14292         is already in the public domain.
14293
14294 2005-05-18  Jim Meyering  <jim@meyering.net>
14295
14296         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14297         Reported by Yoann Vandoorselaere.
14298
14299 2005-05-17  Jim Meyering  <jim@meyering.net>
14300
14301         * m4/fts.m4: New file, from coreutils.
14302
14303 2005-05-17  Jim Meyering  <jim@meyering.net>
14304
14305         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14306
14307 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14308
14309         Sync from coreutils.
14310         * m4/unlinkdir.m4: New file.
14311
14312 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14313
14314         Sync from coreutils.
14315         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14316         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14317         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14318         White space changes only.
14319         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14320         special.
14321         * lib/yesno.c: Include getline.h, not ctype.h.
14322         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14323         Use getline to remove arbitrary restriction on response length.
14324
14325 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14326
14327         * config/srclist-update: Spell out "Street" in FSF postal
14328         mail address; this is the style the FSF seems to prefer.
14329
14330         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14331         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14332         this updates FSF postal mail address.
14333
14334         Sync from coreutils.
14335         * modules/unlinkdir: New file.
14336         * modules/yesno (Depends-on): Add getline.
14337         * MODULES.html.sh (File system functions): Add unlinkdir.
14338
14339 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14340
14341         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14342         lib/strsep.h:
14343         Change the initial comment to refer to GPL, not LGPL.
14344         gnulib-tool will change it to LGPL as needed.
14345
14346         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14347         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14348         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14349         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14350         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14351         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14352         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14353         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14354         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14355         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14356         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14357         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14358         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14359         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14360         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14361         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14362         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14363         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14364         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14365         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14366         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14367         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14368         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14369         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14370         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14371         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14372         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14373         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14374         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14375         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14376         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14377         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14378         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14379         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14380         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14381         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14382         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14383         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14384         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14385         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14386         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14387         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14388         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14389         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14390         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14391         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14392         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14393         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14394         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14395         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14396         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14397         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14398         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14399         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14400         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14401         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14402         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14403         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14404         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14405         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14406         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14407         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14408         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14409         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14410         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14411         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14412         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14413         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14414         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14415         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14416         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14417         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14418         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14419         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14420         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14421         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14422         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14423         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14424         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14425         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14426         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14427         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14428         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14429         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14430         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14431         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14432         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14433         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14434         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14435         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14436         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14437         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14438         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14439         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14440         lib/yesno.c, lib/yesno.h:
14441         Update FSF postal mail address.
14442
14443 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14444
14445         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14446         tests/test-memmem.c, tests/test-stpncpy.c:
14447         Update FSF postal mail address.
14448
14449 2005-05-13  Bruno Haible  <bruno@clisp.org>
14450
14451         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14452         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14453         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14454         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14455         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14456         Add support for 64-bit integers in the MSVC compiler.
14457
14458 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14459
14460         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14461
14462 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14463
14464         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14465
14466 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14467
14468         * doc/getdate.texi (General date syntax): Don't say that date
14469         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14470         Problem reported by Nic Ferrier.
14471
14472 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14473
14474         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14475         specified in ai_socktype. Fix invalid ai_protocol
14476         check. ai_protocol is usually set to 0 or depending on
14477         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14478         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14479         ai_socktype / ai_protocol in the returned addrinfo structure.
14480
14481 2005-05-10  Simon Josefsson  <jas@extundo.com>
14482
14483         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14484         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14485
14486 2005-05-10  Karl Berry  <karl@gnu.org>
14487
14488         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14489         (from http://www.gnu.org/licenses).
14490         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14491         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14492         fdl.texi suffices.
14493
14494 2005-05-10  Karl Berry  <karl@gnu.org>
14495
14496         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14497         (COPYING.DOC): remove.
14498
14499         * config/srclist-update: new FSF address.
14500
14501 2005-05-10  Derek Price  <derek@ximbiot.com>
14502
14503         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14504         possible.
14505
14506 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14507             Bruno Haible  <bruno@clisp.org>
14508
14509         * modules/inet_ntop: New file.
14510         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14511         inet_ntop.
14512
14513 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14514             Bruno Haible  <bruno@clisp.org>
14515
14516         * m4/inet_ntop.m4: New file.
14517
14518 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14519             Bruno Haible  <bruno@clisp.org>
14520
14521         * lib/inet_ntop.h: New file.
14522         * lib/inet_ntop.c: New file, from glibc with modifications.
14523
14524 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14525
14526         * modules/time_r (License): Change to LGPL.
14527         * modules/extensions (License): Change to LGPL.  Actually,
14528         the license is more permissive than that, but currently gnulib-tool
14529         doesn't know how to handle more-permissive licenses.
14530
14531         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14532         Problem reported by Dave Love.
14533
14534 2005-05-08  Jim Meyering  <jim@meyering.net>
14535
14536         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14537         blank.
14538
14539 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14540
14541         * modules/argmatch (Depends-on): Add stdbool.
14542         * modules/backupfile (Depends-on): Likewise.
14543         * modules/chdir-long (Depends-on): Likewise.
14544         * modules/closeout (Depends-on): Likewise.
14545         * modules/cycle-check (Depends-on): Likewise.
14546         * modules/dirname (Depends-on): Likewise.
14547         * modules/fnmatch (Depends-on): Likewise.
14548         * modules/fsusage (Depends-on): Likewise.
14549         * modules/fwriteerror (Depends-on): Likewise.
14550         * modules/getcwd (Depends-on): Likewise.
14551         * modules/getloadavg (Depends-on): Likewise.
14552         * modules/hard-locale (Depends-on): Likewise.
14553         * modules/makepath (Depends-on): Likewise.
14554         * modules/mountlist (Depends-on): Likewise.
14555         * modules/nanosleep (Depends-on): Likewise.
14556         * modules/posixtm (Depends-on): Likewise.
14557         * modules/quotearg (Depends-on): Likewise.
14558         * modules/readtokens (Depends-on): Likewise.
14559         * modules/readtokens0 (Depends-on): Likewise.
14560         * modules/readutmp (Depends-on): Likewise.
14561         * modules/save-cwd (Depends-on): Likewise.
14562         * modules/strftime (Depends-on): Likewise.
14563         * modules/userspec (Depends-on): Likewise.
14564         * modules/utimecmp (Depends-on): Likewise.
14565         * modules/xgetcwd (Depends-on): Likewise.
14566         * modules/xnanosleep (Depends-on): Likewise.
14567         * modules/xstrtod (Depends-on): Likewise.
14568         * modules/yesno (Depends-on): Likewise.
14569
14570 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14571
14572         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14573         needless checks.
14574
14575 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14576
14577         Merge from coreutils.  Among other things,
14578         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14579         * lib/fd-safer.c: New file.
14580         * lib/fcntl-safer.h, open-safer.c: Remove.
14581         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14582         * lib/dup-safer.c: Include unistd-safer.h first.
14583         Don't include errno.h.
14584         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14585         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14586         * lib/file-type.c: Rely on file-type.h change.
14587         * lib/getloadavg.c: Include unistd-safer.h.
14588         (getloadavg): Use safer open.
14589         * lib/getusershell.c: Include "stdio-safer.h".
14590         (getusershell): Use safer fopen.
14591         * lib/long-options.c (long_options): Use NULL rather than 0.
14592         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14593         'free'.
14594         * lib/modechange.c: Likewise.
14595         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14596         (MODE_DONE): New constant.
14597         (struct mode_change): Remove 'next' member.
14598         (make_node_op_equals): New function; like the old one of the
14599         same name, except it allocates an array.
14600         (mode_compile, mode_create_from_ref): Use it.
14601         (mode_compile): Allocate result as an array, not a linked list.
14602         Parse octal string ourself, so that we catch mistakes like "+0".
14603         (mode_adjust): Arg is an array, not a linked list.
14604         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14605         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14606         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14607         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14608         Remove.  This is now stat-macros.h's job.
14609         (talloc): Remove.  All callers replaced by xalloc, so that
14610         our invokers don't have to worry about reporting memory failures.
14611         (make_node_op_equals): Remove.
14612         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14613         New constants.
14614         (struct mode_change): Moved here from modechange.h.
14615         (mode_append_entry): Remove.
14616         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14617         apps to have incorrect behavior.  Use simpler algorithm for head
14618         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14619         Detect more invalid usages rather than having somewhat-random behavior.
14620         Don't insert an "a=" action, as that leads to incorrect behavior.
14621         (mode_compile, mode_create_from_ref): Return NULL on error instead
14622         of an enum, since now there's only one way to have an error.  All
14623         callers changed.
14624         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14625         at the correct time.  Simplify calculation of "+u" and its ilk.
14626         Don't mishandle "+X".
14627         (mode_free): Remove "register" and localize decls.
14628         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14629         (struct mode_change): Move to modechange.c; callers don't
14630         need to see this stuff.
14631         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14632         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14633         (mode_change, mode_adjust): Reflect the new signatures noted above.
14634         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14635         that might redefine system include files.
14636         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14637         (my_usleep): Use NULL rather than (void *) 0.
14638         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14639         Use siginterrupt to specify that system calls should be interrupted.
14640         (rpl_nanosleep): Move initialization of suspended closer to call of
14641         my_usleep.
14642         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14643         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14644         (desirable_utmp_entry): New function.
14645         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14646         using x2nrealloc, to simplify logic.
14647         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14648         size calculation.  Do not assume utmp file is a regular file.
14649         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14650         (READ_UTMP_CHECK_PIDS): New constant.
14651         * lib/save-cwd.c: Include unistd-safer.h.
14652         (save_cwd): Use fd_safer.
14653         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14654         [!_LIBC] Include "stat-macros.h" instead.
14655         * lib/unistd-safer.h (fd_safer): New decl.
14656
14657 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14658
14659         * modules/getloadavg (Depends-on): Add unistd-safer.
14660         * modules/getusershell (Depends-on): Add stdio-safer.
14661         * modules/lstat (Depends-on): Remove xalloc.
14662         * modules/mkstemp (Depends-on): Add stat-macros.
14663         * modules/modechange (Depends-on): Remove xstrtol.
14664         Add stat-macros, xalloc.
14665         * modules/save-cwd (Depends-on): Add unistd-safer.
14666         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14667         * modules/unistd-safer (Files): Add lib/fd-safer.c
14668         (Makefile.am): Remove lib_SOURCES.
14669
14670         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14671         Remove fcntl-safer; unistd-safer supersedes it.
14672
14673 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14674
14675         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14676         AC_HEADER_STAT.
14677         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14678         (gl_PREREQ_CHOWN): Remove.
14679         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14680         it.  Don't require AC_HEADER_STAT.
14681         (gl_PREREQ_LSTAT): Remove.
14682         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14683         Don't require AC_HEADER_STAT.
14684         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14685         (gl_PREREQ_RMDIR): Remove.
14686         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14687         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14688         the stat-macros module a prerequisite.
14689         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14690         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14691         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14692         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14693         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14694         variable names.
14695         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14696         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14697         variable prefixes.
14698         * m4/fcntl-safer.m4: Remove.
14699         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14700         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14701         Invoke gl_PREREQ_FD_SAFER.
14702         (gl_PREREQ_FD_SAFER): New macro.
14703         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14704         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14705         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14706         Remove duplicate call to AC_LIBOBJ(readutmp).
14707         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14708
14709         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14710         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14711
14712 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14713
14714         * MODULES.html.sh (Misc): Add byteswap.
14715
14716 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14717
14718         * modules/getcwd (Depends-on): Add extensions.
14719         * modules/openat (Depends-on): Likewise.
14720
14721 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14722
14723         * modules/byteswap: New file.
14724
14725 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14726
14727         * m4/byteswap.m4: New file.
14728
14729 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14730
14731         * lib/byteswap_.h: New file.
14732
14733 2005-04-25  Karl Berry  <karl@gnu.org>
14734
14735         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14736
14737 2005-04-25  Albert Chin  <china@thewrittenword.com>
14738
14739         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14740         Toolkit C bug.
14741
14742 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14743
14744         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14745         (func_ln_if_changed) Remove forcibly for no error message
14746         in case file does not exist.
14747
14748 2005-04-19  Simon Josefsson  <jas@extundo.com>
14749
14750         * gnulib-tool (Options): Make --symlink mean --symbolic.
14751
14752 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14753
14754         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14755
14756 2005-04-16  Simon Josefsson  <jas@extundo.com>
14757
14758         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14759
14760 2005-04-15  Simon Josefsson  <jas@extundo.com>
14761
14762         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14763
14764 2005-04-15  Simon Josefsson  <jas@extundo.com>
14765
14766         * gnulib-tool: Rename --symlink to --symbolic.
14767
14768 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14769
14770         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14771         symbolic links to files instead of copying/moving.  Add --aux-dir,
14772         specifying directory relative --dir where auxiliary build tools
14773         are placed.
14774
14775 2005-04-14  Bruno Haible  <bruno@clisp.org>
14776
14777         * modules/allocsa (License): Change to LGPL.
14778         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14779
14780 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14781
14782         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14783         that "UTC +1 second" continues to work.  Problem reported
14784         by Dmitry V. Levin.
14785         (relunit_snumber): New rule.
14786         (relunit): Use it.
14787
14788 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14789
14790         * lib/getdate.y (universal_time_zone_table): New constant.
14791         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14792         universal_time_zone_table.
14793         (lookup_zone): Prefer universal_time_zone_table to
14794         local_time_zone_table, so that "GMT" time stamps are allowed in
14795         London during the summer.  Problem reported by Ian Abbott.
14796
14797 2005-04-12  Jim Meyering  <jim@meyering.net>
14798
14799         * lib/human.c (humblock): Set *options even when returning due to
14800         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14801         warning from gcc-4.
14802
14803 2005-04-09  Jim Meyering  <jim@meyering.net>
14804
14805         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14806         -Wuninitialized: initialize tm0.tm_year.
14807
14808 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14811         count, since there's no maximum.  All uses changed.
14812         Add member dsts_seen.
14813         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14814         not being INT_MAX.
14815         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14816         Use pc_rels_seen to decide whther a date is absolute.
14817
14818         * lib/getdate.y (number): Don't overwrite year.
14819         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14820         check.
14821
14822 2005-04-02  Simon Josefsson  <jas@extundo.com>
14823
14824         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14825         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14826
14827 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14828
14829         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14830         where no absolute path name can be longer than PATH_MAX.
14831
14832 2005-03-27  Jim Meyering  <jim@meyering.net>
14833
14834         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14835
14836 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14837
14838         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14839         "one's complement" -> "ones' complement" in comment, as per Knuth.
14840         "value of type" -> "type or expression" in comment.
14841         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14842
14843 2005-03-26  Jim Meyering  <jim@meyering.net>
14844
14845         Comment nits.
14846         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14847         Correct typos: s/or/of/.
14848
14849 2005-03-26  Jim Meyering  <jim@meyering.net>
14850
14851         * modules/check-include-files: Move to ../ and rename to...
14852         * check-module: ...this.
14853
14854 2005-03-25  Jim Meyering  <jim@meyering.net>
14855
14856         * modules/xvasprintf (Files): Add xalloc.h.
14857
14858 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14859
14860         * modules/gettext (Files): config/config.rpath ->
14861         build-aux/config.rpath
14862         * modules/iconv (Files): Likewise.
14863         Problem reported by Oskar Liljeblad.
14864
14865 2005-03-23  Jim Meyering  <jim@meyering.net>
14866
14867         * modules/check-include-files: New script to check for
14868         missing dependencies, multiple includes, etc.
14869
14870         * modules/c-strtold (Depends-on): Add xalloc.
14871         * modules/c-strtod (Depends-on): Add xalloc.
14872         * modules/hash (Depends-on): Add xalloc.
14873         (Files): Remove lib/xalloc.h.
14874
14875         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14876         * modules/userspec (Files): Add lib/inttostr.h.
14877
14878 2005-03-23  Jim Meyering  <jim@meyering.net>
14879
14880         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14881
14882 2005-03-22  Jim Meyering  <jim@meyering.net>
14883
14884         * modules/stat-macros: New module.
14885         * modules/canonicalize, modules/euidaccess, modules/file-type,
14886         * modules/filemode, modules/lchown, modules/makepath,
14887         * modules/rmdir, modules/stat: Depend on new stat-macros module
14888         rather than listing lib/stat-macros.h manually.
14889         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14890
14891 2005-03-22  Jim Meyering  <jim@meyering.net>
14892
14893         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14894
14895 2005-03-22  Bruno Haible  <bruno@clisp.org>
14896
14897         * config/srclist.txt: Replace target directory 'config' with
14898         'build-aux'.
14899         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14900         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14901         ../build-aux/.
14902
14903 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * modules/chdir-long (Depends-on): Add mempcpy.
14906
14907         * modules/acl, modules/backupfile, modules/c-strtod,
14908         modules/c-strtold, modules/canon-host, modules/canonicalize,
14909         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14910         modules/exclude, modules/exitfail, modules/file-type,
14911         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14912         modules/getdate, modules/getline, modules/getpagesize,
14913         modules/getpass, modules/getugroups, modules/group-member,
14914         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14915         modules/inttostr, modules/long-options, modules/makepath,
14916         modules/md5, modules/memcasecmp, modules/memcoll,
14917         modules/modechange, modules/mountlist, modules/path-concat,
14918         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14919         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14920         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14921         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14922         modules/strftime, modules/strndup, modules/strverscmp,
14923         modules/timespec, modules/unlocked-io, modules/userspec,
14924         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14925         modules/yesno:
14926         Remove lib_SOURCES line from Makefile.am section, as this is now
14927         done automatically by the corresponding Autoconf macro.
14928
14929 2005-03-21  Jim Meyering  <jim@meyering.net>
14930
14931         Changes imported from coreutils.
14932
14933         * lib/cycle-check.c: Don't include xalloc.h.
14934
14935         * lib/path-concat.c: Don't include assert.h.
14936         (path_concat): Remove assertion that would have triggered
14937         for ABASE starting with more than one slash.
14938         Reported by Andreas Schwab.
14939
14940         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14941         properly when ABASE is an absolute file name.
14942         Correct the description of this function.
14943         Include <assert.h>.
14944         Add an assertion and a test driver.
14945         This fixes a bug introduced on 2004-07-02.
14946         Andreas Schwab reported the resulting failure of cp --parents:
14947         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14948
14949 2005-03-21  Jim Meyering  <jim@meyering.net>
14950
14951         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14952         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14953
14954 2005-03-21  Jim Meyering  <jim@meyering.net>
14955         and  Paul Eggert  <eggert@cs.ucla.edu>
14956
14957         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14958         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14959         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14960         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14961         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14962         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14963         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14964         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14965         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14966         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14967         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14968         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14969         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14970         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14971         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14972         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14973         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14974         for these modules.
14975
14976 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14977
14978         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14979         (which shouldn't happen), generate nothing instead of returning 0
14980         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14981
14982 2005-03-16  Bruno Haible  <bruno@clisp.org>
14983
14984         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14985         HAVE_LONGLONG_64BIT.
14986
14987 2005-03-16  Bruno Haible  <bruno@clisp.org>
14988
14989         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14990         HAVE_LONGLONG_64BIT.
14991
14992 2005-03-16  Bruno Haible  <bruno@clisp.org>
14993
14994         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14995         HAVE_LONGLONG_64BIT.
14996
14997 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14998
14999         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15000         reliably distinguish strftime failure from empty output on POSIX
15001         hosts.
15002
15003 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15004
15005         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15006         (iconv_string): Don't guess a size-zero buffer, as that might cause
15007         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15008         result would be 'too large', where 'too large' is (heuristically)
15009         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15010         overflow concerns.  This will prevent some unwanted malloc failures
15011         when the inputs are very large.
15012
15013 2005-03-15  Karl Berry  <karl@gnu.org>
15014
15015         * config/srclist.txt (config.rpath): from gettext.
15016         * config/config.rpath: update.
15017
15018 2005-03-15  Bruno Haible  <bruno@clisp.org>
15019
15020         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15021         to 'negate'.
15022
15023         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15024         variable.
15025
15026         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15027         results.
15028
15029 2005-03-14  Simon Josefsson  <jas@extundo.com>
15030
15031         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15032         <fx@gnu.org>.
15033
15034 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15035
15036         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15037         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15038         intprops.h.
15039         * lib/strtol.c: Likewise.
15040
15041 2005-03-14  Jim Meyering  <jim@meyering.net>
15042
15043         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15044         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15045         to be nonzero so that we (and caller) can detect the difference
15046         between a valid zero-length expansion and an error return, even
15047         when the underlying strftime fails before writing anything into
15048         that location.
15049
15050 2005-03-14  Bruno Haible  <bruno@clisp.org>
15051
15052         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15053         Update from GNU gettext 0.14.3.
15054
15055 2005-03-10  Jim Meyering  <jim@meyering.net>
15056
15057         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15058
15059 2005-03-10  Jim Meyering  <jim@meyering.net>
15060
15061         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15062         so that this module works on systems without fchdir.
15063
15064 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15065
15066         Factor int-properties macros into a single file, except for
15067         glibc-related files.
15068         * lib/intprops.h: New file.
15069         * lib/getloadavg.c: Include it instead of limits.h.
15070         (INT_STRLEN_BOUND): Remove.
15071         * lib/human.c: Include intprops.h.
15072         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15073         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15074         302/1000.
15075         * lib/inttostr.h: Include intprops.h instead of limits.h.
15076         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15077         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15078         for consistency with intprops.h.
15079         (time_t_is_integer, twos_complement_arithmetic): Use them.
15080         * lib/sig2str.h: Include <signal.h>, intprops.h.
15081         (INT_STRLEN_BOUND): Remove.
15082         * lib/strftime.c (TYPE_SIGNED): Remove.
15083         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15084         * lib/strtol.c: Adjust comments to match intprops.h.
15085         * lib/userspec.c: Include intprops.h.
15086         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15087         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15088         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15089         instead of rolling our own expressions.
15090         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15091
15092         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15093         instead of int.
15094         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15095         the right thing even if adding 1900 would overflow.  Similarly
15096         for tm_mon + 1 and tm_yday + 1.
15097         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15098         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15099         (DO_SIGNED_NUMBER): New macro.
15100         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15101
15102 2005-03-07  Bruno Haible  <bruno@clisp.org>
15103
15104         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15105
15106 2005-03-07  Bruno Haible  <bruno@clisp.org>
15107
15108         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15109
15110 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15111
15112         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15113         (func_import): Only replace files via --import when they have actually
15114         changed.
15115
15116 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15117
15118         * m4/mmap-anon.m4: New file.
15119         * m4/pagealign_alloc.m4: New file.
15120
15121 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15122             Bruno Haible  <bruno@clisp.org>
15123
15124         * modules/pagealign_alloc: New file.
15125         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15126
15127 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15128             Bruno Haible  <bruno@clisp.org>
15129
15130         * lib/pagealign_alloc.h: New file.
15131         * lib/pagealign_alloc.c: New file.
15132
15133 2005-03-03  Bruno Haible  <bruno@clisp.org>
15134
15135         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15136         Use an all-permissive copyright notice, recommended by RMS.
15137
15138 2005-03-02  Bruno Haible  <bruno@clisp.org>
15139
15140         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15141         of AIX, the replacement has to be done only after <string.h> is
15142         included, therefore not in config.h. stpncpy.h does the replacement,
15143         and stpncpy.c uses it.
15144
15145 2005-03-02  Bruno Haible  <bruno@clisp.org>
15146
15147         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15148         stpncpy.c uses it.
15149
15150 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15151
15152         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15153         The workaround isn't strictly needed for POSIX conformance, and
15154         it's too much of a pain to configure and maintain.  We'll ask
15155         people to fix their kernels instead.
15156         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15157         (NANOSLEEP_BUG_WORKAROUND): Remove.
15158         (xnanosleep): Remove the workaround.
15159
15160 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15161
15162         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15163         Reported by Derek Price.
15164         (Include): Add "timespec.h".
15165
15166         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15167
15168 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15169
15170         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15171         to detect nanosleep bug.
15172
15173 2005-03-01  Bruno Haible  <bruno@clisp.org>
15174
15175         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15176
15177 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15178
15179         * modules/gethrxtime: New file.
15180         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15181         (Depends-on): Add gethrxtime.
15182         (configure.ac): Add gl_XNANOSLEEP.
15183         (Makefile.am): Remove lib_SOURCES line.
15184
15185 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15188         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15189
15190 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15191
15192         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15193         * lib/timespec.h (gettime): Return void, since it always
15194         succeeds now.  All uses changed.
15195         * lib/gettime.c (gettime) Likewise.
15196         [HAVE_NANOTIME]: Prefer nanotime.
15197         Assume gettimeofday succeeds, as POSIX requires.
15198         Assime time () succeeds, since other code already does.
15199         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15200         (timespec_subtract): Remove.
15201         (NANOSLEEP_BUG_WORKAROUND): New constant.
15202         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15203         things considerably.  Use it only on GNU/Linux hosts, since the
15204         workaround shouldn't be needed elsewhere.
15205
15206 2005-02-24  Bruno Haible  <bruno@clisp.org>
15207
15208         * modules/gettext (Files): Add m4/glibc2.m4.
15209
15210 2005-02-24  Bruno Haible  <bruno@clisp.org>
15211
15212         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15213         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15214         * m4/progtest.m4:
15215         Update from GNU gettext 0.14.2.
15216         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15217
15218 2005-02-24  Bruno Haible  <bruno@clisp.org>
15219
15220         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15221         * lib/config.charset: Update from GNU gettext 0.14.2.
15222
15223 2005-02-24  Bruno Haible  <bruno@clisp.org>
15224
15225         * lib/gettext.h: Update from GNU gettext 0.14.2.
15226
15227 2005-02-23  Simon Josefsson  <jas@extundo.com>
15228
15229         * m4/iconvme.m4: New file.
15230
15231 2005-02-23  Jim Meyering  <jim@meyering.net>
15232
15233         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15234         change.
15235         Thanks to Bruno Haible for catching it.
15236
15237 2005-02-22  Simon Josefsson  <jas@extundo.com>
15238
15239         * modules/iconvme: New file.
15240
15241         * MODULES.html.sh: Add iconvme.
15242
15243 2005-02-22  Simon Josefsson  <jas@extundo.com>
15244
15245         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15246
15247 2005-02-22  Simon Josefsson  <jas@extundo.com>
15248
15249         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15250
15251 2005-02-22  Jim Meyering  <jim@meyering.net>
15252
15253         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15254         s/ifndef/ifdef/.
15255
15256 2005-02-20  Neil Conway  <neilc@samurai.com>
15257
15258         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15259         returned by OSX/Darwin if the specified buffer is not large
15260         enough for the hostname.
15261
15262 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15263
15264         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15265         pass it to _help, otherwise the latter coredumps trying to
15266         dereference state.root_argp.
15267
15268 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         * modules/chdir-long (Depends-on): Add memrchr.
15271         * modules/memrchr (Files): Add lib/memrchr.h.
15272         (Include): "memrchr.h".
15273
15274 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15275
15276         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15277
15278 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15279
15280         * lib/memrchr.h: New file.
15281         * lib/chdir-long.c: Include it.
15282         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15283         Don't bother including stddef.h.
15284
15285 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15286
15287         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15288         inclusion.
15289         Include <sys/types.h>, for dev_t.
15290         (ME_DUMMY, ME_REMOTE): Move from here....
15291         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15292         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15293         Dmitry V. Levin.
15294         Include mountlist.h first, to test the interface.
15295
15296 2005-01-29  Bruno Haible  <bruno@clisp.org>
15297
15298         * lib/progname.c (program_name): Initialize.
15299         Needed when linking statically on MacOS X.
15300
15301 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15302
15303         Sync from coreutils.
15304         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15305         (Depends-on): Add c-strtod.
15306         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15307
15308 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15309
15310         Sync from coreutils.
15311         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15312
15313         Remove files that are specific to coreutils.
15314         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15315
15316 2005-01-28  Bruno Haible  <bruno@clisp.org>
15317
15318         * modules/javacomp: New file.
15319         * MODULES.html.sh (Java): Add javacomp.
15320
15321 2005-01-28  Bruno Haible  <bruno@clisp.org>
15322
15323         * m4/javacomp.m4: New file, from GNU gettext.
15324
15325 2005-01-28  Bruno Haible  <bruno@clisp.org>
15326
15327         * lib/javacomp.sh.in: New file, from GNU gettext.
15328         * lib/javacomp.h: New file, from GNU gettext.
15329         * lib/javacomp.c: New file, from GNU gettext.
15330
15331 2005-01-26  Simon Josefsson  <jas@extundo.com>
15332
15333         * lib/gai_strerror.c: Use GPL in header.
15334
15335 2005-01-26  Bruno Haible  <bruno@clisp.org>
15336
15337         * modules/javaexec: New file.
15338         * MODULES.html.sh (Java): Add javaexec.
15339
15340 2005-01-26  Bruno Haible  <bruno@clisp.org>
15341
15342         * m4/javaexec.m4: New file, from GNU gettext.
15343
15344 2005-01-26  Bruno Haible  <bruno@clisp.org>
15345
15346         * lib/javaexec.sh.in: New file, from GNU gettext.
15347         * lib/javaexec.h: New file, from GNU gettext.
15348         * lib/javaexec.c: New file, from GNU gettext.
15349
15350 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15351
15352         * modules/lchown (Depends-on): Remove lchown.h
15353
15354 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15355
15356         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15357         must be defined if the header file was not found, in order
15358         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15359
15360 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15361
15362         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15363         initializers for struct pentry_state.
15364         (__argp_error): Check return value of __asprintf
15365         (__argp_failure): Translate error message
15366
15367         * lib/argp-parse.c: Removed braces around the expansion of N_()
15368
15369 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15370
15371         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15372         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15373         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15374         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15375         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15376         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15377         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15378         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15379         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15380         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15381         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15382         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15383         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15384         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15385         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15386         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15387         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15388         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15389         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15390         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15391         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15392         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15393         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15394         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15395         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15396         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15397         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15398         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15399         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15400         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15401         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15402         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15403         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15404         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15405         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15406         Use an all-permissive copyright notice, recommended by RMS.
15407
15408 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15409
15410         * modules/chdir-long (Depends-on): Remove mempcpy.
15411
15412 2005-01-21  Jim Meyering  <jim@meyering.net>
15413
15414         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15415         same value as for Solaris 9.
15416
15417         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15418         component length.  This included changing the parameter to be
15419         of type `char *' rather than `char const *'.
15420         * lib/chdir-long.h (chdir_long): Update prototype.
15421
15422         * lib/openat.c (fdopendir, fstatat): New functions.
15423         * lib/openat.h: Include headers required for use of DIR and struct
15424         stat.
15425         [AT_SYMLINK_NOFOLLOW]: Define.
15426         (fdopendir, fstatat): Add prototypes.
15427
15428 2005-01-21  Bruno Haible  <bruno@clisp.org>
15429
15430         * modules/classpath: New file.
15431         * MODULES.html.sh (Java): Add classpath.
15432
15433 2005-01-21  Bruno Haible  <bruno@clisp.org>
15434
15435         * lib/classpath.h: New file, from GNU gettext.
15436         * lib/classpath.c: New file, from GNU gettext.
15437
15438 2005-01-20  Simon Josefsson  <jas@extundo.com>
15439
15440         * modules/version-etc-fsf: New file.
15441
15442 2005-01-20  Simon Josefsson  <jas@extundo.com>
15443
15444         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15445         * lib/version-etc.c: Remove version_etc_copyright.
15446         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15447         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15448
15449 2005-01-20  Simon Josefsson  <jas@extundo.com>
15450
15451         * lib/base64.h (isbase64): Add.
15452
15453         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15454         using a unsigned prototype, don't inline.
15455         (base64_decode): Use it.
15456
15457 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15458
15459         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15460         it.
15461
15462 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15463
15464         * lib/save-cwd.c (save_cwd): Remove code to support the case
15465         where fchdir is missing or flaky.
15466
15467 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15468
15469         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15470
15471 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15472
15473         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15474         AC_LIBSOURCES now does this.
15475         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15476         with new ullong_max module.
15477
15478 2005-01-19  Bruno Haible  <bruno@clisp.org>
15479
15480         * modules/sh-quote: New file.
15481         * MODULES.html.sh (Executing programs): Add sh-quote.
15482
15483 2005-01-19  Bruno Haible  <bruno@clisp.org>
15484
15485         * lib/sh-quote.h: New file, from GNU gettext.
15486         * lib/sh-quote.c: New file, from GNU gettext.
15487
15488 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15489
15490         Merge from coreutils.
15491         * m4/ullong_max.m4: New file.
15492         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15493         (gl_MACROS): Assume localeconv exists.
15494
15495 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15496
15497         Merge changes from coreutils, as described below in several
15498         changelogs dated today.
15499
15500         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15501         (O_DIRECTORY): Remove; not needed here, since "." must be
15502         a directory.  All uses removed.
15503         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15504         universal on Suns, and we also need to test for IRIX.
15505         Revamp code to use 'if' rather than '#if'.
15506         Avoid unnecessary comparison of cwd->desc to 0.
15507
15508         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15509         for known valid error numbers rather than observed invalid ones.
15510
15511 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15512
15513         * modules/ullong_max: New file.
15514
15515         * modules/chdir-long, modules/openat: New files.
15516         * modules/save-cwd (Depends-on): Depend on chdir-long.
15517         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15518
15519 2005-01-18  Jim Meyering  <jim@meyering.net>
15520
15521         Merge from coreutils.
15522         * m4/chdir-long.m4, m4/openat.m4: New files.
15523         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15524         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15525         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15526         is sane and DOES follow symlinks.  Besides, testing 20 different
15527         systems found no broken chown implementations.
15528         Prompted by a change in rsync's copy of this macro.
15529         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15530
15531         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15532
15533         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15534         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15535         NULL-means-set-to-current-time semantics.
15536         Remove temporary file immediately, rather than waiting
15537         for configure's at-exit trap code to do it.
15538
15539 2005-01-18  Jim Meyering  <jim@meyering.net>
15540
15541         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15542
15543         * lib/utimens.c (futimens): Account for the fact that futimes
15544         can also fail with errno == ENOSYS or errno == ENOENT.
15545         Patch from Dmitry V. Levin.
15546
15547         Change the name of the robust chdir function from chdir to chdir_long.
15548         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15549         (restore_cwd): Use chdir_long, not chdir.
15550         * lib/chdir-long.c: Renamed from chdir.c.
15551         * lib/chdir-long.h: Renamed from chdir.h.
15552         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15553         Hurd.
15554
15555 2005-01-18  Bruno Haible  <bruno@clisp.org>
15556
15557         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15558         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15559         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15560         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15561         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15562         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15563         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15564         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15565         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15566         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15567         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15568         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15569         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15570         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15571         Use an all-permissive copyright notice, recommended by RMS.
15572
15573 2005-01-18  Bob Proulx  <bob@proulx.com>
15574
15575         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15576         simplify offsetof() macro construct to avoid compile failure with
15577         native HP-UX 11.0 ANSI C compiler.
15578
15579 2005-01-17  Bruno Haible  <bruno@clisp.org>
15580
15581         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15582         redundant because stpncpy.m4 takes care of it.
15583
15584 2005-01-17  Bruno Haible  <bruno@clisp.org>
15585
15586         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15587
15588 2005-01-17  Bruno Haible  <bruno@clisp.org>
15589
15590         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15591         used.
15592
15593 2005-01-17  Bruno Haible  <bruno@clisp.org>
15594
15595         * lib/fwriteerror.h (fwriteerror): Change specification to include
15596         fclose.
15597         * lib/fwriteerror.c: Include <stdbool.h>.
15598         (fwriteerror): At the end, close the file stream. Record whether
15599         stdout was already closed.
15600
15601 2005-01-17  Bruno Haible  <bruno@clisp.org>
15602
15603         * lib/execute.c (environ): Declare if needed.
15604         * lib/pipe.c (environ): Likewise.
15605         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15606
15607 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15608
15609         * modules/argp: Depend on vsnprintf
15610
15611 2005-01-10  Jim Meyering  <jim@meyering.net>
15612
15613         * modules/closeout (Depends-on): Add atexit.
15614
15615 2005-01-06  Bruno Haible  <bruno@clisp.org>
15616
15617         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15618
15619 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15620
15621         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15622         definitions to be after all include files, to avoid collisions.
15623         Problem reported by Bob Proulx.
15624
15625 2005-01-04  Jim Meyering  <jim@meyering.net>
15626
15627         Changes imported from coreutils.
15628         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15629         as the mkstemp template, use a temporary directory and an
15630         8.3-friendly template to avoid trouble on systems like DJGPP.
15631         Reported by Juan M. Guerrero via Stepan Kasal.
15632         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15633         close. Remove the temporary directory right away, rather than waiting
15634         for configure's at-exit trap code to do it.
15635         Suggestion from Stepan Kasal.
15636
15637 2005-01-01  Simon Josefsson  <jas@extundo.com>
15638
15639         * gnulib-tool: Print #include directives when --import'ing.
15640
15641 2004-12-28  Simon Josefsson  <jas@extundo.com>
15642
15643         * tests/test-base64.c: Include required header files.  Remove
15644         unused variables.
15645
15646 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15647
15648         * modules/error (Depends-on): Remove gettext.
15649
15650 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15651
15652         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15653         not needed.  This removes a dependency on the gettext module.
15654         [defined _LIBC]: Do not include <libintl.h>; not needed.
15655
15656 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15657
15658         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15659         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15660
15661 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15664         HAVE_DECL_STRTOLD.
15665
15666 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         * modules/getdate (Depends-on): Remove alloca-opt.
15669
15670 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15671
15672         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15673
15674 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15675
15676         * lib/argp-parse.c: Include <stddef.h>.
15677         (alignof, alignto): New macros.
15678         (parser_init): Don't assume that void * is aligned sufficiently
15679         for struct option.
15680
15681         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15682         need to extend the stack.
15683         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15684         large.
15685
15686 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15687
15688         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15689
15690 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15691
15692         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15693         (2004-10-24) change.  Apparently this was a false alarm.
15694
15695         * modules/getdate: Depend on alloca-opt, not alloca.
15696
15697 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15698
15699         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15700         Remove now-obsolete comment about AIX.
15701         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15702         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15703         (YYMAXDEPTH): New macro.
15704
15705 2004-12-18  Simon Josefsson  <jas@extundo.com>
15706
15707         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15708
15709 2004-12-18  Bruno Haible  <bruno@clisp.org>
15710
15711         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15712
15713 2004-12-18  Bruno Haible  <bruno@clisp.org>
15714
15715         * lib/fatal-signal.c (fatal_signals): Make non-const.
15716         (init_fatal_signals): New function.
15717         (uninstall_handlers, install_handlers): Ignore signals that were set to
15718         SIG_IGN.
15719         (at_fatal_signal): Call init_fatal_signals.
15720         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15721         SIG_IGN.
15722         Reported by Paul Eggert.
15723
15724 2004-12-18  Bruno Haible  <bruno@clisp.org>
15725
15726         * doc/alloca.texi: New file.
15727         * doc/alloca-opt.texi: New file.
15728
15729 2004-12-17  Jim Meyering  <jim@meyering.net>
15730
15731         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15732         Otherwise, install-sh could exit with improper exit status when
15733         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15734
15735 2004-12-16  Simon Josefsson  <jas@extundo.com>
15736
15737         * tests/test-base64.c: Add license.
15738
15739 2004-12-15  Stepan Kasal  <address@hidden>
15740
15741         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15742
15743 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15744
15745         * modules/getcwd (Files): Add m4/d-ino.m4.
15746         Suggested by Mark D. Baushke.
15747
15748 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15749
15750         * lib/getdate.y (textint): New member "negative".
15751         (time_zone_hhmm): New function.
15752         Expect 14 shift-reduce conflicts, not 13.
15753         (o_colon_minutes): New rule.
15754         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15755         (yylex): Set the "negative" member of signed numbers.
15756
15757 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15758
15759         * doc/getdate.texi (Time of day items, Time zone items):
15760         Describe new formats +00:00, UTC+00:00.
15761
15762 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15763
15764         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15765         spurious "-l"s.  Problem reported by Stepan Kasal.
15766
15767 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15768
15769         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15770         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15771
15772 2004-12-04  Simon Josefsson  <jas@extundo.com>
15773
15774         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15775         Vandoorselaere <yoann@prelude-ids.org>.
15776
15777 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15778
15779         Changes imported from coreutils.
15780         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15781         exist.
15782         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15783
15784 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15785
15786         Changes imported from coreutils.
15787         * lib/hard-locale.c: Assume <locale.h> exists.
15788         Include "strdup.h".
15789         (GLIBC_VERSION): New macro.
15790         (hard_locale): Assume setlocale exists.
15791         Rewrite to avoid #ifdef.
15792         Use strdup rather than malloc + strcpy.
15793         * lib/human.c: Assume <locale.h> exists.
15794         (human_readable): Assume localeconv exists.
15795
15796 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15797
15798         * modules/hard-locale (Depends-on): Add strdup.
15799
15800 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15801
15802         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15803         convert T2, not T.  (Imported from libc.)
15804
15805 2004-11-30  Simon Josefsson  <jas@extundo.com>
15806
15807         * modules/restrict (License): Change to LGPL.
15808
15809 2004-11-30  Simon Josefsson  <jas@extundo.com>
15810
15811         * m4/restrict.m4: Add copyright and copying conditions.
15812
15813 2004-11-30  Simon Josefsson  <jas@extundo.com>
15814
15815         * m4/base64.m4: New file.
15816
15817 2004-11-30  Simon Josefsson  <jas@extundo.com>
15818
15819         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15820         base64.
15821
15822         * tests/test-base64.c: New file.
15823
15824         * modules/base64: New file.
15825
15826 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15827
15828         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15829         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15830
15831         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15832
15833 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15834
15835         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15836         (__getcwd.c): Don't restore errno; glibc doesn't.
15837         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15838         first, falling back to our code only if its results look suspicious.
15839         Ensure that the resulting buffer is only as large as necessary.
15840
15841         * lib/readutmp.c: Include readutmp.h first.
15842         Include <errno.h>, since readutmp.h no longer does that.
15843         * lib/readutmp.h: Don't include <errno.h>,
15844         <sys/param.h>, <time.h>; not needed to establish interface.
15845         (errno): Remove decl.
15846         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15847         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15848         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15849
15850 2004-11-28  Simon Josefsson  <jas@extundo.com>
15851
15852         * lib/base64.h, base64.c: New file.
15853
15854 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15855
15856         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15857
15858 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15859
15860         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15861         (Depends-on): Remove pathmax, same.  Add mempcpy.
15862         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15863         (Makefile.am): Append getcwd.h to lib_SOURCES.
15864         (Include): Add getcwd.h.
15865         (Maintainer): Change from Jim Meyering to "all, glibc",
15866         since getdate now uses intended-for-glibc code.
15867         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15868         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15869
15870 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15871
15872         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15873         HP's ANSI C compiler.
15874         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15875         Declaring int functions causes warnings on some modern systems and
15876         shouldn't be needed to compile on ancient ones.
15877         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15878         defined.
15879
15880         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15881         with the following changes.
15882         (__set_errno): Parenthesize properly.
15883         Include <stdbool.h>.
15884         (MIN, MAX, MATCHING_INO): New macros.
15885         (__getcwd): Define with prototype, not K&R form.
15886         Use heuristics to allocate default buffer on stack if possible.
15887         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15888         behavior, and to avoid the PATH_MAX limit when computing
15889         ../../../../...
15890         Use MATCHING_INO to compare inode number to file.
15891         Check for arithmetic overflow in size calculations.
15892         Fix bug in reallocation of dot array that caused getcwd to fail
15893         on directories nested deeper than 75.
15894         Be more careful about saving errno on error.
15895         Do not use realloc; use only free+malloc, as this is a bit
15896         more flexible and avoids a needless copy operation.
15897         Do not inspect st_dev and st_ino for symbolic links; POSIX
15898         doesn't specify the latter.
15899         Check for closedir errors.
15900         Avoid needless casts.
15901         Use "#ifdef weak_alias" around weak_alias, to be like other
15902         glibc code.
15903         The following changes to getcwd.c have effect only when used in
15904         gnulib; they have no effect inside glibc proper.
15905         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15906         as alloca isn't used.
15907         (alloca, __alloca): Likewise.
15908         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15909         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15910         unconditionally, as gnulib assumes C89 or better.
15911         Do not include <sys/param.h>.
15912         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15913         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15914         better.
15915         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15916         Include <dirent.h> in a way that is compatible with modern Autoconf.
15917         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15918         New macros, if not already defined.
15919         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15920         Use "_LIBC", not "defined _LIBC", for consistency.
15921         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15922         a mempcpy module.
15923         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15924         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15925         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15926         credit only to Jim Meyering and adjust the copyright dates.
15927         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15928         <stdlib.h>, <unistd.h>, "pathmax.h".
15929         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15930         (INITIAL_BUFFER_SIZE): Remove.
15931         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15932
15933 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15934
15935         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15936         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15937         Use the _ONCE methods, for efficiency.
15938         Check for fcntl.h.  In test program, include <errno.h>
15939         and <fcntl.h> if available.  Remove old K&R cruft from
15940         test program.  Check for common errors in GNU/Linux,
15941         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15942         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15943         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15944         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15945         name accordingly.
15946         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15947         accommodate new getcwd.c.
15948         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15949         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15950         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15951         that's all we need now.
15952
15953 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15954
15955         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15956         argp-parse.c depends on getopt internals, that means we should
15957         always use our getopt, to be on the safe side.
15958         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15959         order not to spoil the result of an eventual previous invocation
15960         of gl_GETOPT_SUBSTITUTE.
15961
15962 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15963
15964         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15965         redefinition warnings. To avoid them, include the defines
15966         in `#if !defined __need_getopt ... #endif'. The only place
15967         where __getopt_argv_const is used is in definitions
15968         of getopt_long and getopt_long_only below, which are as well
15969         protected by `#ifndef __need_getopt'.
15970         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15971         __need_getopt after including <stdio.h> and <unistd.h> These
15972         headers might have defined it.
15973
15974 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15975
15976         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15977
15978 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15979
15980         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15981         (futimens): New function, which uses futimes if available.
15982         (futimens, utimens): Support timespec==NULL, with same semantics
15983         as utime and utimens.
15984         * lib/utimens.h (futimens): New decl.
15985
15986 2004-11-23  Jim Meyering  <jim@meyering.net>
15987
15988         * lib/getopt_.h: Remove trailing blanks.
15989
15990 2004-11-23  Jim Meyering  <jim@meyering.net>
15991
15992         * lib/__fpending.c: Add comment.
15993
15994 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15995
15996         * modules/canonicalize (Depends-on): Add xreadlink.
15997         Problem reported by James Youngman.
15998
15999 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16000
16001         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16002         New macros.
16003         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16004         optopt): Use them instead of invoking ## directly; otherwise, the
16005         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16006
16007 2004-11-19  Bruno Haible  <bruno@clisp.org>
16008
16009         * lib/strtok_r.c: Move comments from here...
16010         * lib/strtok_r.h: ... to here.
16011
16012 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16013
16014         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16015         implementations that mishandle size_t overflow.
16016
16017 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16018
16019         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16020         might fail.  Problem reported by Yoann Vandoorselaere.
16021         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16022         implementations that mishandle size_t overflow.
16023
16024 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16025
16026         * modules/canon-host (Depends-on): Add strdup.
16027
16028 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16029
16030         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16031
16032 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16033
16034         * lib/canon-host.c: Include "strdup.h".
16035         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16036         Use strdup instead of malloc/strcpy to duplicate strings.
16037
16038         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16039         (human_space_before_unit): New constant.
16040         * lib/human.c (human_readable): Support it.
16041
16042         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16043         (xgetcwd): Set errno correctly when failing.
16044         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16045         the failure is actually due to a PATH_MAX problem.
16046
16047         Further getopt changes to make it more likely that glibc will
16048         buy the changes back.
16049         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16050         (getopt): Use it, so to preserve glibc semantic
16051         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16052         when compiling for libc.
16053         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16054         (getopt_long, getopt_long_only): Use it.
16055
16056         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16057         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16058         (getopt): Argv is now char * const *, as per standard.
16059         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16060         not char *__getopt_argv_const *.
16061         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16062         _getopt_long_only_r): Likewise.
16063         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16064         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16065         _getopt_long_r, _getopt_long_only_r): Likewise.
16066         * lib/getopt_.h (__getopt_argv_const): Remove.
16067         (getopt): Argv is now char * const *, as per standard.
16068
16069         * lib/getdate.y (tORDINAL): New token.
16070         (day, relunit): Allow it for relative times.
16071         (relative_time_table): Use tORDINAL for ordinals.
16072
16073 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16074
16075         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16076         Document that "second" isn't allowed as an ordinal number.
16077
16078 2004-11-16  Jim Meyering  <jim@meyering.net>
16079
16080         * modules/closeout (Depends-on): Add fpending.
16081
16082 2004-11-15  Jim Meyering  <jim@meyering.net>
16083
16084         * lib/closeout.c: Include "__fpending.h" once again.
16085         Include <stdbool.h>.
16086         (close_stdout): Don't fail just because stdout was closed initially,
16087         since some programs don't write to stdout in the normal course of
16088         operation (other than --version and --help), and we don't want this
16089         function to make e.g. `touch file >&-' fail.
16090         But do fail if it was closed and someone has tried to write to it.
16091         E.g., `printf foo >&-' must fail.
16092
16093 2004-11-13  Jim Meyering  <jim@meyering.net>
16094
16095         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16096
16097 2004-11-12  Simon Josefsson  <jas@extundo.com>
16098
16099         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16100         small doc fix is still pending.
16101
16102 2004-11-11  Simon Josefsson  <jas@extundo.com>
16103
16104         * modules/strtok_r: New file.
16105
16106         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16107         strtok_r.
16108
16109 2004-11-11  Simon Josefsson  <jas@extundo.com>
16110
16111         * m4/strtok_r.m4: New file.
16112
16113         * m4/getopt.m4: Replace opterr.
16114
16115 2004-11-11  Simon Josefsson  <jas@extundo.com>
16116
16117         * lib/strtok_r.h, strtok_r.c: New file.
16118
16119 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16120
16121         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16122         of replacing opterr, getopt, etc.  This should handle the
16123         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16124
16125 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16126
16127         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16128         we can stop lying to compilers about the constness of argv when we
16129         are compiled outside glibc.
16130         (getopt, getopt_long, getopt_long_only): Use it.
16131         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16132         _getopt_internal, getopt): Likewise.
16133         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16134         _getopt_long_only_r): Likewise.
16135         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16136         _getopt_long_r, _getopt_long_only_r): Likewise.
16137
16138         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16139         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16140         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16141         the other external symbols.
16142         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16143         declaration, since the above renaming now works around collisions.
16144
16145 2004-11-11  Jim Meyering  <jim@meyering.net>
16146
16147         * lib/linebreak.c: Remove trailing blanks.
16148         * lib/alloca_.h: Likewise.
16149         * lib/acosl.c: Likewise.
16150         * lib/euidaccess.c: Likewise.
16151         * lib/allocsa.h: Likewise.
16152
16153 2004-11-10  Simon Josefsson  <jas@extundo.com>
16154
16155         * m4/getaddrinfo.m4: New file.
16156
16157 2004-11-10  Simon Josefsson  <jas@extundo.com>
16158
16159         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16160
16161 2004-11-10  Simon Josefsson  <jas@extundo.com>
16162
16163         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16164         getaddrinfo.
16165
16166         * modules/getaddrinfo: New file.
16167
16168 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16169
16170         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16171
16172 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * lib/mktime.c (SHR): New macro, which is a portable
16175         substitute for >> that should work even on Crays.
16176         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16177         Problem reported by Mark D. Baushke in
16178         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16179         * lib/getdate.y (SHR): Likewise.
16180         (tm_diff): Use it.
16181         * lib/strftime.c (SHR): Likewise.
16182         (tm_diff): Use it.
16183         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16184         quote_these_too, so that right shifts are well defined.  All uses
16185         changed.
16186
16187 2004-11-10  Jim Meyering  <jim@meyering.net>
16188
16189         Ensure that no close failure goes unreported.
16190         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16191         return early when it seems there's nothing to flush.
16192         Don't include __fpending.h.
16193
16194 2004-11-10  Jim Meyering  <jim@meyering.net>
16195
16196         * modules/closeout (Depends-on): Remove fpending.
16197
16198 2004-11-10  Jim Meyering  <jim@meyering.net>
16199
16200         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16201
16202 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16203
16204         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16205         gl_FUNC_STRFTIME.
16206         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16207         and AC_REQUIRE when possible, to avoid duplicate checks.
16208         Check for <wchar.h>.
16209
16210 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16211
16212         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16213
16214 2004-11-09  Bruno Haible  <bruno@clisp.org>
16215
16216         * m4/sockpfaf.m4: New file.
16217
16218 2004-11-05  Bruno Haible  <bruno@clisp.org>
16219
16220         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16221         Reported by Mark D. Baushke <mdb@cvshome.org>.
16222
16223 2004-11-04  Bruno Haible  <bruno@clisp.org>
16224
16225         2004-09-11  Bruno Haible  <bruno@clisp.org>
16226                 * allocsa.valgrind: New file.
16227         2004-02-06  Bruno Haible  <bruno@clisp.org>
16228                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16229                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16230                 Reported by Christopher Seip <chris.seip@hp.com>.
16231
16232 2004-11-04  Bruno Haible  <bruno@clisp.org>
16233
16234         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16235         (Makefile.am): Distribute it.
16236
16237 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16238
16239         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16240         with errno == ERANGE if the buffer is too small.
16241         Problem reported by Mark D. Baushke.
16242
16243 2004-11-03  Albert Chin  <china@thewrittenword.com>
16244             Paul Eggert  <eggert@cs.ucla.edu>
16245
16246         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16247         equivalent, substitute $ac_type for equivalent type rather than
16248         blindly using uint32_t *always* which won't work if uint32_t is not
16249         available.  Define _UINT32_T to work around typedef of uint32_t if
16250         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16251         2.5.1.
16252
16253 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16254
16255         * m4/jm-macros.m4: Sync from coreutils.
16256         (gl_MACROS): Check for mbrlen, for pathchk.
16257         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16258
16259 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16260
16261         * lib/xreadlink.c (MAXSIZE): New macro.
16262         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16263         size does not exceed MAXSIZE.  Avoid cast.
16264         As suggested by Mark D. Baushke in
16265         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16266         if readlink fails with buffer size just under MAXSIZE, try again
16267         with MAXSIZE.
16268
16269 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16270
16271         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16272
16273 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16274         and  Paul Eggert  <eggert@cs.ucla.edu>
16275
16276         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16277         (get_date): Overparenthesize to avoid GCC warning.
16278
16279 2004-11-02  Bruno Haible  <bruno@clisp.org>
16280
16281         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16282         returns void.
16283
16284 2004-11-02  Bruno Haible  <bruno@clisp.org>
16285
16286         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16287         function returns void.
16288
16289 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16290
16291         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16292         fflush_unlocked, flockfile, funlockfile, funlockfile,
16293         fputs_unlocked, putc_unlocked.
16294
16295 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16296
16297         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16298         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16299         already declared.
16300
16301 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16302
16303         * modules/getdate (Files): Add doc/getdate.texi.
16304         (Depends-on): Add setenv, xalloc.
16305
16306 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16307
16308         * lib/getdate.y: Add support for TZ="foo" within a date string.
16309         Fix some bugs near time_t boundaries.  Reject dates with
16310         out-of-range components, e.g., "Sept 31".
16311         Include <stdlib.h>, "setenv.h", "xalloc.h".
16312         (ISDIGIT_LOCALE): Remove; unused.
16313         Note that the TZ and time functions used here are not reentrant.
16314         (mktime_ok, get_tz): New functions.
16315         (TZBUFSIZE): New constant.
16316         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16317         This requires that we sometimes generate our own TZ="XXX..." setting.
16318
16319 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16320
16321         * doc/getdate.texi: New file, from coreutils with modifications for
16322         the new TZ parsing.
16323
16324 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16325
16326         * lib/mktime.c (not_equal_tm): Remove redundant check.
16327
16328 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16329
16330         * modules/regex (lib_SOURCES): Add regex.c.
16331         Reported by James Youngman in
16332         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16333
16334 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16335
16336         * lib/getdate.y: Use Bison 1.875 features, and some minor
16337         code cleanups.  This change does not affect semantics.
16338         Don't include <stdlib.h>; no longer needed.
16339         Don't include unlocked-io.h; only the "#if TEST" code uses
16340         stdio, and performance isn't crucial there.
16341         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16342         Bison 1.875 features as described below.
16343         All uses of "PC." replaced by "pc->".
16344         (YYSTYPE): Add a forward declaration.
16345         (yylex, yyerror): Use full prototypes in forward decls.
16346         Use "%pure-parser" rather than obsolescent "%pure_parser".
16347         Use %parse-param and %lex-param instead of obsolescent
16348         YYPARSE_PARAM and YYLEX_PARAM.
16349         (meridian_table, month_and_day_table, time_units_table,
16350         relative_time_table, time_zone_table, military_table,
16351         lookup_zone, lookup_word, get_date):
16352         Use NULL instead of 0 where appropriate.
16353         (to_hour): Avoid abort (), to avoid a dependency on
16354         stdlib.h.
16355         (yyerror, yylex): Now accepts parser_control * arg.
16356         (main) [TEST]: Use '\0' rather than 0 for char.
16357
16358 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16359
16360         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16361
16362 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16363
16364         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16365         It's now the caller's responsibility to handle the case where
16366         !HAVE_GETPAGESIZE && !defined getpagesize.
16367
16368         * lib/mktime.c (leapyear): Arg is long int, not int.
16369
16370 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16371
16372         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16373
16374 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16375
16376         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16377         missing.  Problem reported by James Youngman.
16378
16379 2004-10-16  Simon Josefsson  <jas@extundo.com>
16380
16381         * gnulib-tool: Fix comments.  Fix parse problem.
16382         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16383
16384 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16385
16386         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16387         implementation of getopt_long.  Problem reported by Alexander Taler in:
16388         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16389
16390 2004-10-15  Bruno Haible  <bruno@clisp.org>
16391
16392         * gnulib-tool: Untabify. Initialize supplied_libname.
16393         (func_usage): More homogenous output.
16394         (func_modules_transitive_closure, func_modules_to_filelist,
16395         func_emit_lib_Makefile_am): New functions.
16396         (func_import): New function, extracted from big case statement. Use
16397         func_get_license, func_modules_transitive_closure,
16398         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16399         opt_lgpl. Don't use test -a, as it's not portable.
16400         (func_create_testdir): Use func_modules_transitive_closure,
16401         func_modules_to_filelist, func_emit_lib_Makefile_am.
16402
16403 2004-10-15  Bruno Haible  <bruno@clisp.org>
16404
16405         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16406
16407 2004-10-15  Bruno Haible  <bruno@clisp.org>
16408
16409         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16410         the portions belonging to each module.
16411         Suggested by Derek Robert Price <derek@ximbiot.com>.
16412
16413 2004-10-12  Simon Josefsson  <jas@extundo.com>
16414
16415         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16416         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16417         to real functions.
16418
16419 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16420
16421         * modules/vsnprintf: New file.
16422
16423 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16424
16425         * m4/vsnprintf.m4: New file.
16426
16427 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16428
16429         * lib/vsnprintf.h: New file.
16430         * lib/vsnprintf.c: New file.
16431
16432 2004-10-11  Bruno Haible  <bruno@clisp.org>
16433
16434         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16435         vsnprintf.
16436
16437 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16438
16439         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16440
16441 2004-10-07  Bruno Haible  <bruno@clisp.org>
16442
16443         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16444         fits into the provided buffer.
16445
16446 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16447
16448         * lib/diacrit.c, diacrit.h: Add GPL notice.
16449
16450         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16451         notice.
16452         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16453         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16454         This avoids a potential constant-folding bug.
16455
16456 2004-10-05  Bruno Haible  <bruno@clisp.org>
16457
16458         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16459         for the declaration of strsep.
16460
16461 2004-10-05  Bruno Haible  <bruno@clisp.org>
16462
16463         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16464
16465 2004-10-04  Simon Josefsson  <jas@extundo.com>
16466
16467         * modules/memmem: New file.
16468         * tests/test-memmem.c: New file.
16469         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16470
16471 2004-10-04  Simon Josefsson  <jas@extundo.com>
16472
16473         * m4/memmem.m4: New file.
16474
16475 2004-10-04  Simon Josefsson  <jas@extundo.com>
16476
16477         * lib/memmem.h: New file.
16478         * lib/memmem.c: New file, taken from glibc.
16479
16480 2004-10-04  Simon Josefsson  <jas@extundo.com>
16481
16482         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16483         '#ifdef USE_UNLOCKED_IO'.
16484
16485 2004-10-04  Simon Josefsson  <jas@extundo.com>
16486
16487         * config/srclist.txt: Add memmem from glibc.
16488
16489 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16490
16491         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16492
16493         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16494         modules/exclude, modules/getdate, modules/getline,
16495         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16496         modules/getusershell, modules/linebuffer, modules/md5,
16497         modules/mountlist, modules/posixtm, modules/readtokens,
16498         modules/readutmp, modules/regex, modules/sha1,
16499         modules/version-etc, modules/yesno:
16500         Remove dependency on unlocked-io.
16501
16502 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16503
16504         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16505
16506         * m4/unlocked-io.m4: Add copyright notice.
16507         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16508
16509 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16510
16511         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16512         * lib/xmalloc.c (xmemdup): Likewise.
16513         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16514         XFREE): Remove these long-obsolescent macros.
16515         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16516         * lib/xstrdup.c: Remove.
16517
16518         * lib/regex.c (re_comp): Cast gettext return value to char *,
16519         Problem reported by Martin Neitzel via Mark D. Baushke.
16520
16521 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16522
16523         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16524         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16525         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16526         regex.c, sha1.c, version-etc.c, yesno.c:
16527         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16528         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16529         the includer's responsibility.
16530
16531         Sync from coreutils.
16532
16533         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16534         points to the start of a string, as the C Standard says the
16535         resulting behavior is undefined.
16536
16537         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16538         simple -> simple_backups, numbered_existing ->
16539         numbered_existing_backups, numbered -> numbered_backups
16540         to avoid shadowing problems.  All uses changed.
16541         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16542         * lib/backupfile.c (check_extension, numbered_backup):
16543         Rename locals to avoid shadowing 'basename'.
16544         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16545         once.
16546
16547         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16548         * lib/.cvsignore: Add getopt.h.
16549
16550 2004-10-04  Bruno Haible  <bruno@clisp.org>
16551
16552         * modules/README: New file.
16553         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16554         not a module.
16555
16556 2004-10-02  Jim Meyering  <jim@meyering.net>
16557
16558         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16559
16560 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16561
16562         * modules/strsep: New file.
16563
16564 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16565
16566         * m4/strsep.m4: New file.
16567
16568 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16569
16570         * lib/strsep.h: New file.
16571         * lib/strsep.c: New file.
16572
16573 2004-10-01  Simon Josefsson  <jas@extundo.com>
16574
16575         * lib/snprintf.c (snprintf): Handle size==0.
16576
16577 2004-10-01  Simon Josefsson  <jas@extundo.com>
16578             Bruno Haible  <bruno@clisp.org>
16579
16580         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16581         (snprintf): Declare 'args'.
16582
16583 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16584
16585         * lib/snprintf.c: Remove comments as to why each header is needed.
16586
16587 2004-10-01  Bruno Haible  <bruno@clisp.org>
16588
16589         * MODULES.html.sh: Add strsep.
16590
16591 2004-09-30  Simon Josefsson  <jas@extundo.com>
16592
16593         * modules/snprintf: New file.
16594
16595 2004-09-30  Simon Josefsson  <jas@extundo.com>
16596
16597         * m4/snprintf.m4: New file.
16598
16599 2004-09-30  Simon Josefsson  <jas@extundo.com>
16600
16601         * lib/snprintf.h, lib/snprintf.c: New files.
16602
16603 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16604
16605         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16606         (hol_entry_help): Never translate an empty string.
16607         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16608         * lib/argp.h (OPTION_NO_TRANS): New option.
16609
16610 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16611
16612         * modules/argp (Maintainer): Replace Simon Josefsson
16613         by Sergey Poznyakoff.
16614
16615 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16616
16617         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16618         changes merged back into glibc.
16619
16620 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16621
16622         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16623
16624 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16625
16626         * lib/xvasprintf.c: Include xalloc.h.
16627         (xvasprintf): Use xalloc_die, not xmalloc_die.
16628
16629 2004-09-29  Bruno Haible  <bruno@clisp.org>
16630
16631         * modules/alloca-opt: New file, derived from modules/alloca.
16632         * modules/allocsa: Depend on alloca-opt instead of alloca.
16633         * modules/setenv: Likewise.
16634         * modules/vasnprintf: Likewise.
16635         * MODULES.html.sh: Add alloca-opt.
16636
16637 2004-09-28  Simon Josefsson  <jas@extundo.com>
16638
16639         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16640         LGPL, and to replace license template from GPL to LGPL.
16641
16642 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16643
16644         * modules/dummy: Change license to LGPL.
16645
16646 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16647
16648         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16649
16650 2004-09-24  Simon Josefsson  <jas@extundo.com>
16651
16652         * modules/minmax (License): Change from GPL to LGPL.
16653
16654 2004-09-23  Simon Josefsson  <jas@extundo.com>
16655
16656         * gnulib-tool (--import): Typo.
16657
16658 2004-09-23  Simon Josefsson  <jas@extundo.com>
16659
16660         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16661
16662 2004-09-22  Bruno Haible  <bruno@clisp.org>
16663
16664         * modules/*: Add 'License' field.
16665         * gnulib-tool: Accept --extract-license option.
16666         (func_get_license): New function.
16667
16668 2004-09-21  Bruno Haible  <bruno@clisp.org>
16669
16670         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16671         Reported by Simon Josefsson.
16672
16673 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16674
16675         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16676         gl_AC_TYPE_LONG_LONG.
16677
16678 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16679
16680         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16681
16682 2004-09-18  Simon Josefsson  <jas@extundo.com>
16683         and  Paul Eggert  <eggert@cs.ucla.edu>
16684
16685         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16686         calls with autoreconf.  Define GL_LIB.
16687
16688 2004-09-14  Karl Berry  <karl@gnu.org>
16689
16690         * config/srclist.txt: unsync setenv.c, sigh.
16691
16692 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16693
16694         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16695         Problem reported by Bruno Haible in:
16696         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16697
16698 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16699
16700         * config/srclist.txt: Comment out argp-pvh.c.
16701
16702 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16703
16704         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16705         in case some system header has #define'd it.  Problem reported by
16706         Soeren D. Schulze in
16707         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16708
16709 2004-09-09  Karl Berry  <karl@gnu.org>
16710
16711         * regex.[ch]: delete from the root.  These were supposed to be
16712                 synced with emacs cvs, but this has not happened for about
16713                 a year, and anyway nothing else uses emacs regex.[ch].
16714                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16715                 lib/regex[.ch] is untouched.
16716
16717 2004-09-09  Bruno Haible  <bruno@clisp.org>
16718
16719         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16720
16721 2004-09-09  Bruno Haible  <bruno@clisp.org>
16722
16723         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16724         modifications.
16725         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16726
16727 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16728
16729         * modules/xvasprintf: New file.
16730         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16731
16732 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16733
16734         * lib/xvasprintf.h: New file.
16735         * lib/xvasprintf.c: New file.
16736         * lib/xasprintf.c: New file.
16737
16738 2004-09-08  Bruno Haible  <bruno@clisp.org>
16739
16740         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16741
16742 2004-09-08  Bruno Haible  <bruno@clisp.org>
16743
16744         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16745         length is > INT_MAX.
16746         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16747         more.
16748
16749 2004-09-08  Bruno Haible  <bruno@clisp.org>
16750
16751         * lib/stdint_.h: New file, taken from GNU clisp.
16752
16753 2004-09-08  Bruno Haible  <bruno@clisp.org>
16754             Oskar Liljeblad  <oskar@osk.mine.nu>
16755
16756         * modules/stdint: New file.
16757         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16758
16759 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16760
16761         Import from coreutils.
16762         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16763         strings on unbounded length.  alloca's performance benefits aren't
16764         that important here.
16765         (V_STRDUP): Remove.
16766         (parse_with_separator): New function, with most of the internals
16767         of the old parse_user_spec.  Allow user to omit both user and group,
16768         for compatibility with FreeBSD.
16769         Clone only the user name, not the entire spec.
16770         Do not set *uid, *gid unless entirely successful.
16771         Avoid memory leak in some failing cases.
16772         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16773         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16774         (parse_user_spec): Rewrite to use parse_with_separator.
16775
16776 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16777
16778         * modules/userspec: Don't depend on alloca.
16779
16780 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16781
16782         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16783
16784 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16785
16786         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16787         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16788         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16789
16790 2004-08-16  Simon Josefsson  <jas@extundo.com>
16791
16792         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16793         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16794         Add --dry-run for --import.
16795         Let user provided command line parameters override configure.ac
16796         settings.
16797
16798 2004-08-12  Simon Josefsson  <jas@extundo.com>
16799
16800         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16801         as discussed with Paul Eggert in threads rooted at
16802         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16803         and
16804         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16805         Before, the test was empty, and relied on ELIDE_CODE in source
16806         code.)
16807         (gl_PREREQ_GETOPT): New macro.
16808         (gl_GETOPT): Use them.
16809
16810 2004-08-12  Simon Josefsson  <jas@extundo.com>
16811
16812         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16813         * lib/getopt_.h: Renamed from getopt.h.
16814
16815 2004-08-12  Simon Josefsson  <jas@extundo.com>
16816
16817         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16818         Change default library name from libfoo to libgnu.
16819         Now, if you have a configure.ac that says:
16820                 gl_SOURCE_BASE(gl)
16821                 gl_M4_BASE(gl/m4)
16822                 gl_MODULES(error getopt etcetera)
16823                 gl_INIT
16824         you can import all you need by running:
16825                 ../gnulib/gnulib-tool --import
16826
16827         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16828         (Makefile.am): Rewrite, use logic from argz.
16829         (Include): Use <getopt.h> instead of "getopt.h".
16830
16831 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16832
16833         * modules/argp (Files): Add m4/unlocked-io.m4.
16834         (Depends-on): Add extensions.
16835
16836 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16837
16838         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16839         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16840         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16841         Check for program_invocation_name, program_invocation_short_name,
16842         flockfile, funlockfile, features.h, _getopt_long_only_r.
16843
16844 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16845
16846         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16847         its complicated substitute.
16848         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16849         and program_invocation_name.
16850         (__argp_basename) [!_LIBC]: Remove; the only use was
16851         replaced by its body.
16852         (__argp_short_program_name): Change condition from
16853         !defined __argp_short_program_name to
16854         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16855         to match argp-namefrob.h.
16856         (__argp_failure): Don't assume strerror_r returns char *.
16857         * lib/argp-parse.c (N_): Define unconditionally.
16858         (argp_default_options): Fill out initializers with 0 to avoid
16859         gcc warnings.
16860
16861 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16862
16863         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16864         getopt1.c.
16865
16866 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16867
16868         Merge from coreutils.
16869
16870         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16871
16872         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16873         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16874
16875 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16876
16877         Merge from coreutils.
16878
16879         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16880         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16881         for Reliant Unix 5.43.
16882
16883         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16884         (union fooround): Use uintmax_t, not long int.
16885         The rest is a merge from libc:
16886         [defined _LIBC]: Include <shlib-compat.h>.
16887         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16888
16889         * lib/settime.c (settime): Recode to avoid warning with
16890         Sun Forte C 6U2.
16891
16892         * lib/strverscmp.c: Convert to UTF-8.
16893
16894 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16895
16896         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16897         m4/uintmax_t.m4.
16898
16899 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16900
16901         * modules/xalloc-die: New file.
16902         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16903
16904         * modules/md5 (Files): Add m4/uint32_t.m4.
16905         * modules/sha1: Renamed from modules/sha.
16906         (Files):
16907         Rename lib/sha.h to lib/sha1.h.
16908         Rename lib/sha.c to lib/sha1.c.
16909         Rename m4/sha.m4 to m4/sha1.m4.
16910         (lib_SOURCES): Likewise.
16911         (configure.ac): Rename gl_SHA to gl_SHA1.
16912         (Include): sha.h -> sha1.h.
16913
16914 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16915
16916         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16917         * m4/sha1.m4: Renamed from sha.m4.
16918         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16919
16920 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16921
16922         * lib/obstack.h (obstack_empty_p):
16923         Don't assume that chunk->contents is suitably aligned.
16924         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16925         Likewise. Problem reported by Benno in
16926         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16927
16928         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16929         readable.  This could be improved further but it'd take some work.
16930
16931 2004-08-08  Simon Josefsson  <jas@extundo.com>
16932
16933         * modules/xgethostname (Depends-on): Remove exit and error (not
16934         used).
16935
16936         * modules/getpass-gnu: Add getpass.h.
16937         (Depends-on): Add stdbool.
16938         * modules/getpass: Add getpass.h.
16939
16940 2004-08-08  Simon Josefsson  <jas@extundo.com>
16941
16942         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16943         Check getpass declaration.
16944
16945 2004-08-08  Simon Josefsson  <jas@extundo.com>
16946
16947         * lib/xgethostname.c: Don't include error.h (not used).
16948
16949         * lib/getpass.h: Add.
16950         * lib/getpass.c: Include getpass.h first.
16951
16952 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16953
16954         * lib/xalloc-die.c: New file.
16955         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16956         All uses removed.
16957         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16958         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16959         xalloc-die.c.
16960         (_, N_, xalloc_die): Move to xalloc-die.c.
16961         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16962         so that we needn't mess with xalloc_msg_memory_exhausted.
16963
16964         * lib/sha1.h: Renamed from sha.h.
16965         (SHA1_H): Renamed from _SHA_H.
16966         (sha1_ctx): Renamed from sha_ctx.
16967         (sha1_init_ctx): Renamed from sha_init_ctx.
16968         (sha1_process_block): Renamed from sha_process_block.
16969         (sha1_process_bytes): Renamed from sha_process_bytes.
16970         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16971         (sha1_read_ctx): Renamed from sha_read_ctx.
16972         (sha1_stream): Renamed from sha_stream.
16973         (sha1_buffer): Renamed from sha_buffer.
16974         * lib/sha1.c: Likewise; renamed from sha.c.
16975         Do not include <sys/types.h>.
16976         Include <stddef.h> rather than <stdlib.h>.
16977
16978 2004-08-08  Bruno Haible  <bruno@clisp.org>
16979
16980         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16981         FILESYSTEM_PREFIX_LEN.
16982         * lib/progreloc.c: Likewise.
16983         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16984
16985 2004-08-06  Simon Josefsson  <jas@extundo.com>
16986
16987         * modules/progname (Depends-on): Don't depend on stdbool.
16988
16989 2004-08-06  Simon Josefsson  <jas@extundo.com>
16990
16991         * modules/getsubopt: New file.
16992         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16993         getsubopt.
16994
16995 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16996
16997         More merge from coreutils.
16998
16999         * m4/utimens.m4, m4/utimecmp.m4: New files.
17000         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17001         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17002         prereq.m4, sha.m4: Import changes from coreutils.
17003
17004 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17005
17006         More merge from coreutils.
17007         * modules/raise, modules/readtokens0, modules/utimens:
17008         * modules/utimecmp, module/xnanosleep: New files.
17009         * modules/strftime: Add lib/strftime.h.
17010         Change include from <time.h> to "strftime.h".
17011         * modules/yesno: Add lib/yesno.h.
17012         * modules/backupfile: Remove lib/addext.c.
17013         * modules/euidaccess: Add stat-macros.h.
17014         * modules/canonicalize, modules/euidaccess,
17015         modules/filemode, modules/lchown, modules/makepath,
17016         modules/rmdir, modules/stat: Likewise.
17017
17018 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17019
17020         Merge from tar.
17021         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17022         SIZE_MAX is a valid preprocessor constant.
17023         (__argp_basename): Change from "#ifndef _LIBC"
17024         to "#ifndef __argp_short_program_name", so that
17025         we don't compile these functions for tar.
17026
17027         More merges from coreutils.
17028         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17029         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17030         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17031         * lib/addext.c: Remove; no longer needed.
17032         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17033         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17034         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17035         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17036         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17037         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17038         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17039         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17040         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17041         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17042         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17043         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17044         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17045         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17046         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17047         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17048         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17049         Import changes from coreutils.
17050
17051 2004-08-05  Simon Josefsson  <jas@extundo.com>
17052
17053         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17054
17055 2004-08-05  Simon Josefsson  <jas@extundo.com>
17056
17057         * m4/getsubopt.m4: New file.
17058
17059 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17060
17061         Merge from coreutils.
17062
17063         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17064         * m4/getcwd-path-max.m4: New files.
17065
17066         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17067         FILESYSTEM_PREFIX_LEN ->
17068         FILE_SYSTEM_PREFIX_LEN.
17069         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17070         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17071         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17072         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17073
17074         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17075         prerequisite modules now handle the DOS stuff.
17076         Don't check for unistd.h.
17077
17078 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17079
17080         Merge from coreutils.
17081
17082         * lib/.gdb-history: Remove; this doesn't belong here.
17083
17084         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17085         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17086         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17087         * lib/getcwd.c: New files.
17088
17089         * lib/dirname.h: Include <stdbool.h>.
17090         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17091         for consistency with POSIX terminology.  All uses changed.
17092         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17093         (strip_trailing_slashes): Use bool for booleans.
17094         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17095
17096         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17097         sometimes returns a positive errno value even when it succeeds.
17098         (print_errno_message) [!LIBC]: Fall back on strerror if
17099         __strerror_r fails.
17100
17101         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17102         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17103         (longest_relative_suffix): New function.
17104         (path_concat): Use it.  Assume first argument is not NULL.
17105         Port to DOS.  Omit redundant separators.
17106         Report an error instead of returning NULL.
17107         Use mempcpy instead of memcpy.
17108         (xpath_concat): Remove: not declared or used.
17109
17110         * lib/same.h: Include <stdbool.h>
17111         (same_name): Return bool, not int.
17112         * lib/same.c (same_name): Likewise.
17113         (errno): Don't declare; we assume C89 or better now.
17114
17115         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17116         if not already defined.
17117
17118         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17119         * lib/dup-safer.c (errno): Likewise.
17120
17121 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17122
17123         Merge from coreutils.
17124         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17125         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17126         * modules/path-concat: Don't depend on strdup.
17127
17128 2004-08-03  Simon Josefsson  <jas@extundo.com>
17129
17130         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17131         * lib/progname.h: Don't include stdbool.h.
17132
17133 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17134
17135         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17136         * MODULES.html.sh (func_all_modules): Remove fatal.
17137
17138 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17139
17140         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17141
17142 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17143
17144         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17145         working.
17146
17147 2004-08-02  Simon Josefsson  <jas@extundo.com>
17148
17149         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17150         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17151         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17152
17153 2004-08-01  Simon Josefsson  <jas@extundo.com>
17154
17155         * lib/xgetdomainname.c: Include stdlib.h, for free().
17156
17157 2004-07-19  Bruno Haible  <bruno@clisp.org>
17158
17159         * MODULES.html.sh (func_all_modules): Add dummy.
17160
17161 2004-07-16  Simon Josefsson  <jas@extundo.com>
17162
17163         * modules/dummy: New file.
17164
17165 2004-07-16  Simon Josefsson  <jas@extundo.com>
17166
17167         * lib/dummy.c: New file.
17168
17169 2004-07-16  Bruno Haible  <bruno@clisp.org>
17170
17171         * lib/backupfile.h: Add extern "C" for C++.
17172         * lib/closeout.h: Likewise.
17173         * lib/copy-file.h: Likewise.
17174         * lib/findprog.h: Likewise.
17175         * lib/full-write.h: Likewise.
17176         * lib/pathname.h: Likewise.
17177         * lib/progname.h: Likewise.
17178         * lib/stpcpy.h: Likewise.
17179         * lib/stpncpy.h: Likewise.
17180         * lib/strcase.h: Likewise.
17181         * lib/strstr.h: Likewise.
17182         * lib/xalloc.h: Likewise.
17183
17184         * lib/mbswidth.h: Add extern "C" for C++.
17185         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17186
17187 2004-07-13  Robert Millan  <robertmh@gnu.org>
17188
17189         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17190
17191 2004-07-09  Simon Josefsson  <jas@extundo.com>
17192
17193         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17194         failed without this.)
17195
17196 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17197
17198         * modules/chown (Files): Add lib/fchown-stub.c, since
17199         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17200
17201 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17202
17203         * lib/fchown-stub.c: New file.
17204
17205 2004-06-24  Jim Meyering  <jim@meyering.net>
17206
17207         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17208
17209 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17210
17211         * modules/argz: Omit "#include".
17212
17213         * MODULES.html.sh (func_all_modules): Add calloc, to match
17214         2004-06-01 addition of calloc module.
17215
17216 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17217
17218         * m4/argz.m4: New file, which is autoupdated from libtool.
17219
17220 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17221
17222         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17223         libtool.
17224
17225 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17226
17227         * config/srclist-update: Don't insist on "USA." before the
17228         close-comment, as libtool omits the period and puts the */ on a
17229         separate line.
17230         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17231         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17232
17233 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17234
17235         * modules/argz: New file.
17236         * MODULES.html.sh (func_all_modules): Add argz.
17237
17238 2004-06-12  Jim Meyering  <jim@meyering.net>
17239         and  Paul Eggert  <eggert@cs.ucla.edu>
17240
17241         * modules/hash (Files): Add lib/xalloc.h.
17242         * modules/pipe (Depends-on): Add wait-process.
17243         * modules/stat (Depends-on): Add xalloc.
17244         * modules/userspec (Files): Add lib/userspec.h.
17245         * modules/xstrto
17246
17247         Upgrade from gettext-0.13.
17248         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17249         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17250         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17251
17252 2004-06-10  Jim Meyering  <jim@meyering.net>
17253
17254         * lib/calloc.c: New file.
17255
17256 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         * lib/getdate.y (yylex): Allow space between sign and number.
17259         Problem reported by Dan Jacobson.
17260
17261 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17262
17263         Merge from coreutils CVS.
17264
17265         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17266         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17267         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17268         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17269         xstrtol.m4: Fix copyright date and/or serial number.
17270
17271         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17272         See if we need an fchown replacement.
17273         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17274         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17275         and use the replacement function if we detect either defect.
17276
17277         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17278         gl_UTIMECMP.
17279
17280 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17281         and  Jim Meyering  <jim@meyering.net>
17282
17283         Merge from coreutils CVS.
17284
17285         * lib/stat-macros.h: New file, with contents from file-type.h
17286         and coreutils' system.h.
17287         * lib/file-type.c: Include "stat-macros.h".
17288         * lib/file-type.h (file_type): Move all macro definitions to new file,
17289         stat-macros.h.
17290
17291         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17292         Wrap old code with this conditional.
17293         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17294         function that does not dereference symlinks.
17295         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17296
17297         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17298         dependency problems.
17299         (xreadlink): Accept new arg SIZE, for efficiency.
17300         All decls and uses changed.
17301         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17302
17303         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17304         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17305
17306         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17307         sysexits.h.
17308
17309 2004-06-01  Jim Meyering  <jim@meyering.net>
17310
17311         * m4/calloc.m4: New file.
17312
17313 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17314
17315         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17316         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17317         Also, fix a typo in a diagnostic.
17318
17319 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17320
17321         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17322         or AC_FUNC_REALLOC.
17323
17324 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17325
17326         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17327         macros to be defined.
17328         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17329         the allocator returns NULL because the requested size is zero.
17330
17331 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17332
17333         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17334         var.  Add comment explaining why libc still defines it.  This
17335         merges the following patch from glibc:
17336         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17337
17338 2004-05-20  Andreas Schwab  <schwab@suse.de>
17339
17340         * m4/free.m4: Replace free if it not known to work, not the other
17341         way round.
17342
17343 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17344
17345         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17346         present in glibc since revision 1.1 of this file.
17347         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17348         obstack_alignment_mask, obstack_alloc, obstack_base,
17349         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17350         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17351         obstack_grow0, obstack_init, obstack_int_grow,
17352         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17353         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17354         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17355         nonexistent functions.
17356
17357 2004-05-18  Karl Berry  <karl@gnu.org>
17358
17359         * config/srclist.txt: break link for vasnprintf.c.
17360
17361 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17362
17363         Port obstack to the AS/400, where pointers are 16 bytes wide and
17364         you cannot cast an integer to a valid pointer.  This patch is
17365         currently waiting to be integrated into glibc; see
17366         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17367
17368         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17369         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17370         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17371         (struct obstack): temp member is now a union of a pointer and
17372         an integer, instead of an integer.  All integer uses changed.
17373         This does not affect the physical layout of struct obstack,
17374         except on hosts (like the AS/400) where the size or alignment of
17375         void * is greater than that of ptrdiff_t.
17376         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17377         __STDC__)]: Store temporary in pointer member of union, not
17378         integer member.
17379         * lib/obstack.c: Include <stddef.h>, for offsetof.
17380         (struct fooalign): Remove; it doesn't need a name.
17381         (union fooround): Change double to long double, and add void *.
17382         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17383         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17384         not a macro.  Hence the values are always int; so remove all
17385         casts-to-int in uses.
17386
17387 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17388
17389         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17390         we can get this patch merged into glibc.
17391
17392 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17393             Paul Eggert  <eggert@cs.ucla.edu>
17394
17395         * m4/argp: Depend on alloca.
17396
17397 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17398             Paul Eggert  <eggert@cs.ucla.edu>
17399
17400         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17401         freecoding.
17402
17403 2004-05-17  Bruno Haible  <bruno@clisp.org>
17404
17405         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17406         precision that consists of a '.' followed by an empty digit string.
17407         Patch by Tor Lillqvist <tml@iki.fi>.
17408
17409 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17410
17411         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17412         for backward compatibility with older code.  We need our own
17413         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17414         it under some other name, and our alloca.h will define it.
17415
17416 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17417             Derek Price  <derek@ximbiot.com>
17418
17419         * lib/alloca.c: Include <alloca.h>, to get our interface.
17420         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17421         include <alloca.h> first.  Use C89 prototype for alloca; this
17422         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17423         Use #elif for simplicity, since we can assume C89 now.
17424         Don't try to source the system alloca.h since it will not be found
17425         and to prevent recursively including its replacement.
17426         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17427         * lib/regex.c: Likewise.
17428
17429 2004-05-16  Derek Price  <derek@ximbiot.com>
17430             Paul Eggert  <eggert@cs.ucla.edu>
17431
17432         getline cleanup.  This changes the getndelim2 API: both order of
17433         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17434         no delimiter).
17435
17436         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17437         interface does that.
17438         (getline): Always use getdelim, so that we don't have two
17439         copies of this code.
17440         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17441         if available.
17442         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17443         (GETNDELIM2_MAXIMUM): New macro.
17444         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17445         instead of the old practice of delim2==0.  All callers changed.
17446         Return -1 on overflow, instead of returning junk.
17447         Do not set *linesize unless allocation succeeds.
17448         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17449         that we include sys/types.h.
17450         * lib/getnline.h: Likewise.
17451         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17452         (getndelim2): Reorder arguments.
17453         * lib/getnline.c (getnline, getndelim):
17454         Don't discard the NMAX argument.
17455         (getnline): Invoke getndelim, to avoid code duplication.
17456         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17457         of (size_t) -1 by callers of the getnline family.
17458
17459 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17460
17461         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17462         Check for gettimeofday.
17463         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17464         Check for settimeofday, stime.
17465
17466 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17467
17468         * lib/nanosleep.c (suspended): Change its type from int to
17469         sig_atomic_t volatile.
17470         (first_call): Make it private to rpl_nanosleep, and have it
17471         be zero initially as that's a bit faster.
17472         (my_usleep): Round up fractional times instead of truncating them,
17473         as this is the usual meaning for 'sleep'.
17474
17475         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17476         doesn't work.
17477         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17478         (ENOSYS): Define if not defined.
17479         (settime): Fall back on stime if it exists and settimeofday fails.
17480         But don't bother with fallbacks if a method fails with errno == EPERM.
17481
17482 2004-05-11  Jim Meyering  <jim@meyering.net>
17483
17484         Prior to this change, the save_cwd caller required read access to the
17485         current directory on most systems (ones with the fchdir function).
17486
17487         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17488         fails, try write-only, and finally, resort to using xgetcwd.
17489
17490 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17491
17492         * lib/obstack.c, obstack.h: Import changes from libc.
17493
17494 2004-04-28  Bruno Haible  <bruno@clisp.org>
17495
17496         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17497         also implicitly appends .exe to executables.
17498         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17499         accepts Windows pathnames.
17500         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17501         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17502         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17503         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17504         Reported by Derek Robert Price <derek@ximbiot.com>.
17505
17506 2004-04-21  Karl Berry  <karl@gnu.org>
17507
17508         * config/srclist.txt (localcharset.c): break sync.
17509
17510 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17511
17512         * m4/host-os.m4: Add a copyright notice.
17513
17514 2004-04-20  Jim Meyering  <jim@meyering.net>
17515
17516         Change UTILS_ to gl_ in AC_DEFINE'd names.
17517         Change utils_- and jm_-prefixed variables, too.
17518         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17519         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17520         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17521
17522         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17523         Don't emit trailing blanks.
17524         Also rename jm_-prefixed variables to have gl_ prefix.
17525
17526         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17527         Also rename jm_-prefixed variables to have gl_ prefix.
17528
17529         * m4/jm-macros.m4: Reflect the renamings.
17530         * m4/prereq.m4: Likewise.
17531
17532 2004-04-20  Jim Meyering  <jim@meyering.net>
17533
17534         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17535         memory.
17536
17537 2004-04-20  Jim Meyering  <jim@meyering.net>
17538             Bruno Haible  <bruno@clisp.org>
17539
17540         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17541         memory when realloc fails.
17542
17543 2004-04-19  Jim Meyering  <jim@meyering.net>
17544
17545         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17546         now that readutmp.c may call `free (0)'.
17547
17548 2004-04-19  Bruno Haible  <bruno@clisp.org>
17549
17550         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17551         * m4/inttypes_h.m4: Likewise.
17552         * m4/stdint_h.m4: Likewise.
17553         * m4/intmax_t.m4: Likewise.
17554         * m4/uintmax_t.m4: Likewise.
17555
17556 2004-04-18  Jim Meyering  <jim@meyering.net>
17557
17558         * m4/prereq.m4: Don't forbid jm_ prefix.
17559
17560         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17561         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17562         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17563         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17564         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17565         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17566         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17567         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17568         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17569         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17570         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17571         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17572         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17573         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17574         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17575         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17576         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17577         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17578         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17579
17580 2004-04-18  Jim Meyering  <jim@meyering.net>
17581
17582         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17583         failure, don't leak memory and do call END_UTMP_ENT.
17584
17585 2004-04-16  Jim Meyering  <jim@meyering.net>
17586
17587         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17588         coreutils' stat program.
17589         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17590
17591 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17592
17593         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17594         C89.
17595         (CHAR_BIT): Remove, since we assume C89.
17596         Include <stdint.h> if available, as per current Autoconf CVS advice.
17597
17598 2004-03-31  Jim Meyering  <jim@meyering.net>
17599
17600         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17601         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17602         * m4/xalloc.m4: Likewise.
17603
17604 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17605
17606         Merge from coreutils.
17607
17608         * m4/inttostr.m4: New file.
17609         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17610         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17611         Require gl_CLOCK_TIME.
17612         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17613
17614 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17615
17616         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17617         not bool, to be more consistent with Unix conventions.
17618         Suggested by Bruno Haible.
17619
17620         Merge from coreutils.
17621
17622         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17623         * lib/umaxtostr.c: New files.
17624
17625         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17626         the usual <time.h> dance.
17627         (get_date): Change signature to support fractional time stamps.
17628         All callers changed.
17629         * lib/getdate.y: Include "getdate.h" first, as we can now
17630         assume C89 and don't need to worry about 'const'.
17631         Similarly, include "unlocked-io.h" near start, not in middle.
17632         Include <limits.h>.
17633         (textint.value): Use long int rather than int.
17634         (textint.digits): Use size_t rather than int.
17635         (BILLION, LOG10_BILLION): New constants.
17636         (parser_control): New member rel_ns.  Members day_ordinal,
17637         time_zone, month, day, hour, minutes, rel_year, rel_month,
17638         rel_day, rel_hour, rel_minutes, rel_seconds
17639         are now long int, not int.  Member seconds is now struct timespec,
17640         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17641         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17642         not int.
17643         (%union.intval): Now long int, not int.
17644         New member timespec.
17645         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17646         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17647         (spec): Now is a timespec or an item list.
17648         (timespec, items): New nonterminals.
17649         (time, rel, relunit, number, get_date):
17650         Add support for fractional seconds.
17651         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17652         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17653         (to_hour): First arg is now long int, not int.
17654         (to_year): Returns long int, not int.
17655         Don't treat year -70 like 70.
17656         (tm_diff): Returns long int, not int.
17657         (lookup_word): Use bool instead of int when appropriate.
17658         (yylex): Use size_t for count, not int.
17659         Detect overflow when parsing large integer constants.
17660         Add support for fractions.
17661         (get_date): Make pointers 'const' if possible.
17662         Use more-portable code to detect integer overflow.
17663         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17664         Don't use ctime; it's not reliable if the year has >4 digits.
17665
17666         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17667         This is for compatibility with BSD.
17668
17669         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17670         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17671         From coreutils' system.h.
17672
17673         * lib/userspec.c: Don't include "posixver.h".
17674         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17675         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17676         compatible extension.  Simplify code by removing a boolean int
17677         that was always nonzero if a string was nonnull.
17678
17679 2004-03-30  Jim Meyering  <jim@meyering.net>
17680
17681         Merge from coreutils.
17682
17683         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17684         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17685         on some systems one must include <grp.h> before it.
17686         Reported by Christian Krackowizer.
17687
17688 2004-03-30  Jim Meyering  <jim@meyering.net>
17689
17690         Merge from coreutils.
17691
17692         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17693
17694         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17695         an empty input stream.
17696
17697         * lib/readtokens.c: Include <stdbool.h>.
17698         (readtoken): Use `size_t' rather than int/long.
17699         All callers adjusted.
17700         Use `bool' rather than `int' where appropriate.
17701         Use memset rather than an explicit loop.
17702         Use x2nrealloc rather than xrealloc.
17703         Allow the use of `\0' as a delimiter.
17704         (readtokens): Likewise.
17705         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17706
17707 2004-03-30  Jim Meyering  <jim@meyering.net>
17708
17709         * m4/realloc.m4: Remove file, since now it does no more than
17710         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17711         the `configure.ac' section of module/realloc.
17712         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17713
17714 2004-03-30  Bruno Haible  <bruno@clisp.org>
17715
17716         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17717         nonnull.
17718
17719 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17720
17721         Merge changes to getloadavg.c from coreutils and Emacs.
17722
17723         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17724         Define to an expression, not to the empty string.
17725         Include cloexec.h and xalloc.h.
17726         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17727         Use set_cloexec_flag rather than rolling our own.
17728         * lib/cloexec.c, lib/cloexec.h: New files.
17729
17730 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17731
17732         * m4/cloexec.m4: New file.
17733
17734 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17735
17736         * lib/getopt.h: Sync with libc CVS.
17737
17738 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17739             Bruno Haible  <bruno@clisp.org>
17740
17741         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17742         mbswidth.
17743
17744 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17745             Bruno Haible  <bruno@clisp.org>
17746
17747         * lib/mbswidth.h: Include <wchar.h> only if
17748         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17749         <wchar.h>.
17750         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17751
17752 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17753
17754         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17755         Sync with libc CVS.
17756         * lib/getopt_int.h: New file, also synced from libc.
17757
17758 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17759
17760         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17761         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17762         Bring back getopt.c, getopt.h, getopt1.c.
17763
17764 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17765
17766         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17767         All uses changed.  Check for sa_sigaction member; this fixes
17768         a bug first reported by Jason Andrade in
17769         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17770
17771 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17772
17773         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17774         '#if' expressions.  Unlike the code it replaces, it does not
17775         depend on (defined _SC_PAGESIZE).  However, it does depend on
17776         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17777         first reported by Jason Andrade in
17778         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17779
17780 2004-02-25  Simon Josefsson  <jas@extundo.com>
17781
17782         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17783
17784 2004-02-25  Simon Josefsson  <jas@extundo.com>
17785
17786         * lib/strdup.h: New file.
17787         * lib/strdup.c: Include it.
17788         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17789         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17790
17791 2004-02-23  Karl Berry  <karl@gnu.org>
17792
17793         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17794         (from fencepost.gnu.org:/gd/gnuorg).
17795
17796 2004-02-23  Karl Berry  <karl@gnu.org>
17797
17798         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17799         * config/srclist.txt: add maintain/standards documents.
17800
17801 2004-02-18  Bruno Haible  <bruno@clisp.org>
17802
17803         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17804         Reported by Derek Robert Price <derek@ximbiot.com>.
17805
17806 2004-02-16  Karl Berry  <karl@gnu.org>
17807
17808         * config/mkinstalldirs, install-sh: update from automake.
17809
17810 2004-02-06  Karl Berry  <karl@gnu.org>
17811
17812         * m4/po.m4: update from gettext 0.14.1.
17813
17814 2004-02-06  Karl Berry  <karl@gnu.org>
17815
17816         * lib/config.charset: update from gettext 0.14.1.
17817
17818 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17819
17820         Add comments and code, prompted by suggestions from Bruno Haible
17821         for sh-quote.
17822         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17823         describing the enum quoting_style values.
17824         * lib/quotearg.c (quotearg_alloc): New function.
17825         (quotearg_buffer_restyled): Treat lone { and } as special.
17826         Treat = as special.  Work around bug with older shells
17827         that "see" a '\' that is really the 2nd byte of a multibyte char.
17828         Quote empty string with shell_quoting_style.
17829
17830 2004-02-03  Bruno Haible  <bruno@clisp.org>
17831
17832         * m4/pipe.m4: New file, from GNU gettext.
17833
17834 2004-02-03  Bruno Haible  <bruno@clisp.org>
17835
17836         * lib/pipe.h: New file, from GNU gettext.
17837         * lib/pipe.c: New file, from GNU gettext.
17838
17839 2004-01-27  Bruno Haible  <bruno@clisp.org>
17840
17841         * m4/execute.m4: New file, from GNU gettext.
17842
17843 2004-01-27  Bruno Haible  <bruno@clisp.org>
17844
17845         * lib/execute.h: New file, from GNU gettext.
17846         * lib/execute.c: New file, from GNU gettext.
17847         * lib/w32spawn.h: New file, from GNU gettext.
17848
17849 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17850
17851         Merge from diffutils.
17852
17853         * lib/file-type.c (file_type): Add typed memory objects.
17854         * lib/file-type.h (S_TYPEISTMO): New macro.
17855
17856         * lib/c-stack.h (c_stack_action): Remove argv argument.
17857         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17858         (die): Don't calculate message unless segv_action returns.
17859         (get_stack_location, min_address_from_argv, max_address_from_argv,
17860         volatile stack_base, volatile_stack_size): Remove.
17861         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17862         that every segmentation violation is a stack overflow.  (Ouch!)
17863         See Debian bug 136249 (still outstanding) for more info about why
17864         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17865
17866 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17867
17868         Exit-status fix from coreutils.
17869
17870         Use exit_failure consistently in place of EXIT_FAILURE,
17871         so that program exit statuses are consistent on failure.
17872
17873         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17874         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17875         * lib/argmatch.h: Comment fix to match the above.
17876         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17877         Now a macro referring to exit_failure, instead of a separate
17878         variable.  Include "exitfail.h" to get it.
17879         * lib/xstrtol.h: Include "exitfail.h".
17880         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17881
17882         * lib/long-options.c (parse_long_options): Use prototype
17883         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17884         for clarity.
17885
17886 2004-01-21  Jim Meyering  <jim@meyering.net>
17887
17888         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17889         so as not to conflict with a different-sized __mktime_internal
17890         function in GNU libc.
17891         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17892         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17893
17894 2004-01-20  Karl Berry  <karl@gnu.org>
17895
17896         * config/config.guess: update from config.
17897
17898         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17899
17900 2004-01-20  Bruno Haible  <bruno@clisp.org>
17901
17902         Safer stack allocation.
17903         * lib/setenv.c: Include allocsa.h.
17904         (alloca): Remove fallback definition.
17905         (freea): Remove macro.
17906         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17907         instead of freea.
17908
17909 2004-01-20  Bruno Haible  <bruno@clisp.org>
17910
17911         * m4/eealloc.m4: New file, from GNU gettext.
17912
17913 2004-01-20  Bruno Haible  <bruno@clisp.org>
17914
17915         * m4/allocsa.m4: New file, from GNU gettext.
17916
17917 2004-01-20  Bruno Haible  <bruno@clisp.org>
17918
17919         * lib/xallocsa.h: New file, from GNU gettext.
17920         * lib/xallocsa.c: New file, from GNU gettext.
17921
17922 2004-01-20  Bruno Haible  <bruno@clisp.org>
17923
17924         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17925
17926 2004-01-20  Bruno Haible  <bruno@clisp.org>
17927
17928         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17929         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17930         specially.
17931
17932 2004-01-20  Bruno Haible  <bruno@clisp.org>
17933
17934         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17935         patch.
17936
17937 2004-01-20  Bruno Haible  <bruno@clisp.org>
17938
17939         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17940
17941 2004-01-20  Bruno Haible  <bruno@clisp.org>
17942
17943         * lib/eealloc.h: New file.
17944
17945 2004-01-20  Bruno Haible  <bruno@clisp.org>
17946
17947         * lib/binary-io.h: Avoid warnings on Cygwin.
17948
17949 2004-01-20  Bruno Haible  <bruno@clisp.org>
17950
17951         * lib/allocsa.h: New file, from GNU gettext.
17952         * lib/allocsa.c: New file, from GNU gettext.
17953
17954 2004-01-18  Karl Berry  <karl@gnu.org>
17955
17956         * doc/gpl.texi, doc/lgpl.texi: new files.
17957
17958 2004-01-18  Karl Berry  <karl@gnu.org>
17959
17960         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17961         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17962
17963 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17964
17965         Merge from coreutils.
17966
17967         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17968         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17969         (gl_DEFAULT_POSIX2_VERSION): Move
17970         the documentation from 'configure' into 'config.hin',
17971         so that 'configure --help' isn't burdened by it and
17972         we don't have to worry about its formatting there.
17973         Reword the documentation so that it's more succinct
17974         and can be run together into a single paragraph.
17975         * m4/same.m4 (gl_SAME): Check for pathconf.
17976
17977 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17978
17979         Merge from coreutils.
17980
17981         * lib/posixver.c: Include posixver.h.
17982
17983         * lib/same.c: Include <stdbool.h>, <limits.h>.
17984         (_POSIX_NAME_MAX): Define if not defined.
17985         (MIN): New macro.
17986         (same_name): If file names are silently truncated, report
17987         that the file names are the same if they are the same after
17988         the silent truncation.
17989
17990         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17991         conversion function.
17992         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17993         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17994         longer needed.
17995
17996 2004-01-15  Jim Meyering  <jim@meyering.net>
17997
17998         Merge from coreutils.
17999
18000         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18001         if no library is required.
18002         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18003         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18004         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18005         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18006         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18007         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18008         value, $ac_cv_search_crypt, if it's "none required".
18009         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18010         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18011         not gl_FUNC_GETLOADAVG.
18012         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18013         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18014
18015 2004-01-15  Jim Meyering  <jim@meyering.net>
18016
18017         Merge from coreutils.
18018
18019         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18020         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18021         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18022
18023         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18024         optional configure-time default.
18025
18026         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18027
18028         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18029
18030 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18031
18032         Merge from coreutils.
18033
18034         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18035         value, $ac_cv_search_nanosleep, if it's "none required".
18036
18037 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18038
18039         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18040         with like-named macro in fnmatch.c.
18041         (EXT): Use an internal constant instead.
18042
18043         Merge fnmatch patches from glibc.
18044         * lib/fnmatch.c (mbsinit): Remove define.
18045         Add libc_hidden_ver (__fnmatch, fnmatch).
18046         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18047         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18048
18049 2004-01-14  Karl Berry  <karl@gnu.org>
18050
18051         * config/install-sh: update from automake.
18052
18053 2004-01-13  Karl Berry  <karl@gnu.org>
18054
18055         * config/install-sh: update from automake.
18056
18057 2004-01-09  Karl Berry  <karl@gnu.org>
18058
18059         * config/install-sh: update from automake.
18060
18061 2004-01-05  Karl Berry  <karl@gnu.org>
18062
18063         * config/config.{sub,guess}: update from config.
18064
18065 2003-12-31  Karl Berry  <karl@gnu.org>
18066
18067         * config/depcomp: update from automake.
18068
18069 2003-12-14  Karl Berry  <karl@gnu.org>
18070
18071         * lib/config.charset: update from gettext-runtime.
18072
18073 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18074
18075         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18076         Bug reported by Alfred M. Szmidt.
18077
18078 2003-12-03  Bruno Haible  <bruno@clisp.org>
18079
18080         * m4/gettext.m4: Upgrade from gettext-0.13.
18081         * m4/po.m4: Upgrade from gettext-0.13.
18082         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18083         * m4/intmax.m4: New file, from gettext-0.13.
18084         * m4/printf-posix.m4: New file, from gettext-0.13.
18085
18086 2003-11-29  Karl Berry  <karl@gnu.org>
18087
18088         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18089
18090 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18091             Bruno Haible  <bruno@clisp.org>
18092
18093         * lib/printf-parse.h: Don't include sys/types.h.
18094         (ARG_NONE): New macro.
18095         (char_directive): Change type of *arg_index fields to size_t.
18096         * lib/printf-parse.c: Don't include sys/types.h.
18097         (SSIZE_MAX): Remove macro.
18098         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18099         Remove unnecessary overflow check.
18100         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18101         fields.
18102
18103 2003-11-25  Bruno Haible  <bruno@clisp.org>
18104
18105         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18106
18107 2003-11-25  Bruno Haible  <bruno@clisp.org>
18108
18109         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18110         gt_TYPE_SSIZE_T.
18111
18112 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18113
18114         * modules/alloca: Remove dependency on xalloc.
18115
18116 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18117
18118         * lib/alloca.c: Remove dependency on xalloc module.
18119         (xalloc_die): Remove.
18120         (memory_full) [!defined emacs]: New macro.
18121         [!defined emacs]: Don't include xalloc.h.
18122         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18123         address arithmetic overflows.  Change datatypes a bit to avoid
18124         unnecessary casts.
18125
18126 2003-11-22  Jim Meyering  <jim@meyering.net>
18127
18128         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18129         s/size/size_t/.
18130
18131 2003-11-21  Karl Berry  <karl@gnu.org>
18132
18133         * config/config.{sub,guess}: update from config.
18134
18135 2003-11-18  Karl Berry  <karl@gnu.org>
18136
18137         * config/config.{sub,guess}: update from config.
18138
18139         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18140
18141 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18142
18143         * README: Mention that S+T cannot overflow if S is the size of
18144         an existing object and T is sufficiently small.
18145
18146 2003-11-17  Jim Meyering  <jim@meyering.net>
18147
18148         On systems without utime and without a utimes function capable of
18149         dealing with a NULL struct utimbuf* argument, this utime replacement
18150         could -- in unusual circumstances -- leak a file descriptor.
18151         * lib/utime.c: Include <unistd.h> and <errno.h>.
18152         (utime_null): Be sure to close `fd' and to preserve errno.
18153         Reported by Geoff Collyer via Arnold Robbins.
18154
18155 2003-11-17  Bruno Haible  <bruno@clisp.org>
18156
18157         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18158         (Depends-on): Add xsize.
18159
18160 2003-11-17  Bruno Haible  <bruno@clisp.org>
18161
18162         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18163
18164 2003-11-17  Bruno Haible  <bruno@clisp.org>
18165
18166         * lib/vasnprintf.c (alloca): Remove fallback definition.
18167         (freea): Remove definition.
18168         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18169         Reported by Paul Eggert.
18170
18171 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18172             Bruno Haible  <bruno@clisp.org>
18173
18174         Protect against address arithmetic overflow.
18175         * lib/printf-args.h: Include stddef.h.
18176         (arguments): Change type of field 'count' to size_t.
18177         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18178         'unsigned int' where appropriate.
18179         * lib/printf-parse.h: Include sys/types.h.
18180         (char_directive): Change type of *arg_index fields to ssize_t.
18181         (char_directives): Change type of fields 'count', max_*_length to
18182         size_t.
18183         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18184         (SSIZE_MAX): Define fallback value.
18185         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18186         instead of 'int' where appropriate. Check a_allocated, d_allocated
18187         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18188         * lib/vasnprintf.c: Include xsize.h.
18189         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18190         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18191         overflow. Avoid wraparound when converting a width or precision from
18192         decimal to binary.
18193
18194 2003-11-16  Bruno Haible  <bruno@clisp.org>
18195
18196         Update from GNU gettext.
18197         * lib/printf-parse.c: Generalize to it can be compiled for wide
18198         strings.
18199         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18200         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18201         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18202         SNPRINTF): New macros.
18203         Don't include <alloca.h> if the file is used inside libintl.
18204         (local_wcslen): New function, for Solaris 2.5.1.
18205         (VASNPRINTF): Use it instead of wcslen.
18206
18207 2003-11-16  Bruno Haible  <bruno@clisp.org>
18208
18209         * lib/xsize.h (xmax): New function.
18210         (xsum, xsum3, xsum4): Declare as "pure" functions.
18211
18212 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18213
18214         * modules/xalloc (Files): Undo latest change, since xalloc.h
18215         no longer needs SIZE_MAX or PTRDIFF_MAX.
18216
18217 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18218
18219         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18220         gl_PTRDIFF_MAX.
18221
18222 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18223
18224         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18225         "return", to pacify some unknown compiler.  Problem reported
18226         by Joerg Schilling.
18227
18228 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18229
18230         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18231         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18232         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18233         heuristic is just as accurate as far as we know, and it removes a
18234         dependency on size_max.m4 and ptrdiff_max.m4.
18235
18236 2003-11-11  Bruno Haible  <bruno@clisp.org>
18237
18238         * modules/xsize (Files): Add m4/size_max.m4.
18239         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18240
18241 2003-11-11  Bruno Haible  <bruno@clisp.org>
18242
18243         * m4/size_max.m4: New file.
18244         * m4/ptrdiff_max.m4: New file.
18245         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18246         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18247         (gl_XALLOC): Invoke it.
18248
18249 2003-11-11  Bruno Haible  <bruno@clisp.org>
18250
18251         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18252         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18253         defined.
18254
18255 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18256
18257         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18258         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18259         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18260         From Bruno Haible.
18261         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18262         not (size_t) -1, since it's defined here.
18263
18264 2003-11-09  Karl Berry  <karl@gnu.org>
18265
18266         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18267
18268 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18269
18270         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18271         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18272         Reject sizes of exactly SIZE_MAX bytes.
18273         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18274         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18275
18276 2003-11-05  Bruno Haible  <bruno@clisp.org>
18277
18278         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18279         SIZE_MAX defined in <limits.h> on Solaris.
18280
18281 2003-11-04  Jim Meyering  <jim@meyering.net>
18282
18283         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18284         variable names, rather than @VAR@.
18285         * modules/poll: Likewise.
18286
18287 2003-11-04  Bruno Haible  <bruno@clisp.org>
18288
18289         * modules/xsize: New file.
18290         * modules/linebreak: Depend on xsize.
18291         * MODULES.html.sh (func_all_modules): Add xsize.
18292
18293 2003-11-04  Bruno Haible  <bruno@clisp.org>
18294
18295         * m4/xsize.m4: New file.
18296
18297 2003-11-04  Bruno Haible  <bruno@clisp.org>
18298
18299         * lib/xsize.h: New file.
18300         * lib/linebreak.c: Include xsize.h.
18301         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18302         argument for overflow.
18303         Suggested by Paul Eggert.
18304
18305 2003-11-03  Karl Berry  <karl@gnu.org>
18306
18307         * config/config.{guess,sub}: update from config.
18308
18309 2003-11-03  Jim Meyering  <jim@meyering.net>
18310
18311         * modules/userspec (lib_SOURCES): Add userspec.h.
18312         (Include): Add "userspec.h".
18313         Improve description.
18314
18315 2003-11-03  Jim Meyering  <jim@meyering.net>
18316
18317         * lib/userspec.c: Include "userspec.h".
18318         * lib/userspec.h: New file.
18319
18320 2003-11-03  Bruno Haible  <bruno@clisp.org>
18321
18322         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18323
18324 2003-11-03  Bruno Haible  <bruno@clisp.org>
18325
18326         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18327         available, to avoid (extremely rare) race condition.
18328         Suggested by Paul Eggert.
18329
18330 2003-11-02  Karl Berry  <karl@gnu.org>
18331
18332         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18333
18334 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18335
18336         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18337         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18338         (read_filesystem_list): Set and use me_type_malloced.
18339         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18340         whatever the type happens to be), for brevity and consistency.
18341         Check for size calculation overflow on Alphas running OSF/1.
18342
18343 2003-10-31  Jim Meyering  <jim@meyering.net>
18344
18345         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18346
18347         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18348
18349 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18350             Bruno Haible  <bruno@clisp.org>
18351
18352         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18353         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18354
18355 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18356
18357         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18358         netbsd*-gnu*.  Suggested by Robert Millan.
18359
18360 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18361
18362         * modules/group-member: Depend on stdbool.
18363
18364 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18365
18366         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18367
18368 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18369
18370         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18371         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18372         after the 'gnu' in these cases.  This fixes some bugs in the
18373         previous change, and is based on suggestions by Robert Millan.
18374
18375 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18376
18377         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18378         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18379         no longer needed.
18380         * lib/quotearg.c (quotearg_n_options): Use it.
18381         * lib/group-member.c: Include <stdbool.h>.
18382         (free_group_info): Arg is now const *; don't free arg.
18383         (get_group_info): Now returns bool and accepts struct group_info *,
18384         rather than returning a malloc'ed struct group_info *.
18385         All uses changed.  Check for overflow in internal size calculation.
18386
18387         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18388         rather than xmalloc/xrealloc.
18389         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18390         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18391         conformance bug: the old code used a pointer after freeing the
18392         storage that it addressed.
18393         * lib/hash.c (hash_initialize): Simplify the code by using
18394         xalloc_oversized rather than doing it by hand.
18395         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18396         the buffer preserved.  Use free and xmalloc instead.
18397         * lib/quotearg.c (quotearg_n_options): Likewise.
18398         Use a simpler test for size overflow.  Don't use xalloc_oversized
18399         because unsigned int might be wider than size_t (!); this suggests
18400         that we should switch from unsigned int to size_t for slot numbers.
18401
18402 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18403
18404         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18405         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18406         NetBSD kernels.  Requested by Richard Stallman.
18407
18408 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18409
18410         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18411         to allocate the returned structure.  Do not allocate a subarray,
18412         as x2nrealloc will do that.
18413         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18414         instead of xnrealloc.
18415         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18416
18417 2003-10-27  Bruno Haible  <bruno@clisp.org>
18418
18419         * lib/stdbool_.h: Better support for BeOS.
18420
18421 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18422
18423         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18424         now uses inline.
18425
18426 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18427
18428         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18429         callers that want to do their own size-overflow checking.  Include
18430         <stdbool.h>, since xalloc_oversized returns bool.
18431         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18432         to use xalloc_oversized.
18433
18434         Add two functions x2realloc, x2nrealloc, for programs that grow
18435         arrays dynamically by doubling their sizes.
18436         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18437         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18438         New functions.
18439
18440         Port to C99 semantics for 'inline' of external functions.
18441         Bug reported by Bruno Haible.
18442         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18443         with the old contents of xnmalloc.
18444         (xnmalloc, xmalloc): Use it.
18445         (xnrealloc_inline): New static inline function,
18446         with the old contents of xnrealloc.
18447         (xnrealloc, xrealloc): Use it.
18448
18449         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18450         that.
18451
18452 2003-10-26  Karl Berry  <karl@gnu.org>
18453
18454         * config/srclist.txt (COPYING.DOC): no longer available from
18455         /gd/gnuorg; don't know where the ultimate source is.
18456
18457 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18458
18459         Fix several address-calculation bugs in the hash modules,
18460         plus some minor code cleanup.
18461
18462         * lib/hash.h: Include <stdbool.h>, for bool.
18463         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18464         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18465         hash_get_n_entries, hash_get_max_bucket_length,
18466         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18467         hash_rehash): Use size_t rather than unsigned.
18468         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18469         hash_get_n_buckets_used, hash_get_n_entries,
18470         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18471         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18472         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18473         Likewise.
18474         (SIZE_MAX): Define if not defined.
18475         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18476         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18477         hash_print):
18478         Use const * when possible.
18479         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18480         (check_tuning): Fix bug: if tuning parameters were very close to
18481         0 or 1, rounding errors could have caused subscript violations.
18482         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18483         (hash_initialize): Add 'fail:' label
18484         to free table and return NULL, and use it to simplify code.
18485         Use calloc rather than clearing the storage ourself.
18486         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18487         buffer size calculations.
18488         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18489         Include <stddef.h>, for size_t.
18490         * lib/hash-pjw.c (hash_pjw): Likewise.
18491         Switch to method described by Bruno Haible.
18492         Include <limits.h>, for CHAR_BIT.
18493         (SIZE_BITS): New macro.
18494
18495 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18496
18497         * m4/getline.m4 (AM_FUNC_GETLINE):
18498         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18499         hosts.  Problem reported by Derek Robert Price in
18500         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18501         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18502         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18503
18504 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18505
18506         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18507         ceiling the allocation at NMAX bytes rather than silently
18508         discarding input bytes before NMAX is reached.  This makes
18509         a difference only if NMAX exceeds SIZE_MAX / 2.
18510
18511         * lib/obstack.c: Merge from glibc.
18512         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18513         Add libc_hidden_def (_obstack_newchunk).
18514         (_obstack_free) [! defined _LIBC]: Remove.
18515         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18516         a clone of the function body.
18517         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18518         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18519
18520         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18521         glibc.
18522         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18523         arg to memcpy.
18524
18525         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18526         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18527         Don't use lvalue casts, as GCC plans to remove support for them
18528         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18529         was also present in the non-GCC version, indicating that this
18530         code had always been buggy and had never been widely used.
18531         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18532         Use the fast variant of each macro, rather than copying the
18533         definiens of the fast variant; that way, we'll be more likely to
18534         catch future bugs in the fast variants.
18535
18536 2003-10-20  Bruno Haible  <bruno@clisp.org>
18537
18538         * modules/wait-process: New file.
18539         * MODULES.html.sh (func_all_modules): Add wait-process.
18540
18541 2003-10-20  Bruno Haible  <bruno@clisp.org>
18542
18543         * m4/wait-process.m4: New file.
18544
18545 2003-10-20  Bruno Haible  <bruno@clisp.org>
18546
18547         * lib/wait-process.h: New file, from GNU gettext.
18548         * lib/wait-process.c: New file, from GNU gettext.
18549
18550 2003-10-19  Jim Meyering  <jim@meyering.net>
18551
18552         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18553         HPUX 10.20.
18554
18555 2003-10-18  Karl Berry  <karl@gnu.org>
18556
18557         * config/config.guess: update from config.
18558
18559 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18560
18561         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18562         (getgroups): First arg is int, not size_t.
18563         Don't let 'free' mangle errno.
18564
18565 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18566
18567         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18568
18569 2003-10-16  Karl Berry  <karl@gnu.org>
18570
18571         * config/config.{guess,sub}: update from config.
18572
18573 2003-10-16  Jim Meyering  <jim@meyering.net>
18574
18575         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18576         memcpy.
18577
18578 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18579
18580         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18581         (SIZE_MAX): Remove.
18582         (new_exclude, add_exclude_file): Initial size no longer needs to
18583         be a power of 2.
18584         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18585         our own address arithmetic overflow checking.
18586
18587         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18588         (fnmatch): Do not alloca more than 2000 wide characters;
18589         instead, use malloc for large buffers.
18590         Check for address arithmetic overflow, and return -1
18591         with errno set to ENOMEM in that case.
18592         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18593         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18594         instead, return -1.  Check for address arithmetic overflow.
18595
18596 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18597
18598         Handle invalid suffixes and overflow independently, so that
18599         callers can treat them independently as needed.  Fix some bugs in
18600         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18601         suffix for a human-readable blocksize.  The major caller-visible
18602         change is the addition of a new
18603         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18604         that both overflow and suffix chars were found.
18605
18606         * lib/human.c (humblock): Don't check separately for invalid suffix
18607         char; that is xstrtoumax's job (now that its bug is fixed).
18608         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18609         INTMAX_MAX]: New macros.
18610         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18611         TYPE_MAXIMUM): New macros.
18612         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18613         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18614         if overflow occurs, as it's what __strtol does and it's more useful
18615         in practice.
18616         (__xstrtol): If __strtol reports some error other than ERANGE,
18617         reflect it to the caller as LONGINT_INVALID.  If it reports
18618         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18619         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18620         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18621         value.
18622         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18623         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18624         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18625         [defined UINTMAX_MAX]: New macros.
18626
18627 2003-10-14  Bruno Haible  <bruno@clisp.org>
18628
18629         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18630
18631 2003-10-14  Bruno Haible  <bruno@clisp.org>
18632
18633         * m4/sig_atomic_t: New file, from GNU gettext.
18634         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18635
18636 2003-10-14  Bruno Haible  <bruno@clisp.org>
18637
18638         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18639         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18640         Also use volatile where needed.
18641
18642 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18643
18644         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18645         Change maintainer from Bruno Haible to 'all'.
18646
18647 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18648
18649         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18650
18651 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18652
18653         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18654         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18655         and define in terms of the other primitives.
18656         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18657         (SIZE_MAX): Define if not already defined.
18658         (array_size_overflow): New function.
18659         (xalloc_die): Abort instead of exiting if 'error' returns.
18660         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18661         (xmalloc, xrealloc): Use them.
18662         (xcalloc): Check for address arithmetic overflow.
18663         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18664         a bit faster than strcpy.
18665
18666 2003-10-10  Simon Josefsson  <jas@extundo.com>
18667
18668         * modules/argp (Depends-on): Add restrict and strcase.
18669
18670 2003-10-10  Simon Josefsson  <jas@extundo.com>
18671
18672         * m4/argp.m4: Add AC_C_INLINE.
18673
18674 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18675
18676         Merge getpass from libc, plus a few fixes.
18677
18678         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18679         Include <stdbool.h>.
18680         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18681         __fsetlocking to empty.
18682         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18683         do include <bits/libc-lock.h>.
18684         Do not include <fcntl.h>; not needed.
18685         [_LIBC]: Include <wchar.h>.
18686         (NOTCANCEL_MODE): New macro.
18687         (flockfile, funlockfile) [_LIBC]: New macros.
18688         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18689         [!_LIBC]: New macros.
18690         (call_fclose): New function.
18691         (getpass): Use it.  Save tty stream separately; this simplifies the
18692         code and makes it more reliable if stdin happens to equal stdout.
18693         Invoke __fsetlocking on tty.
18694         Handle thread cancellation if needed.
18695         Namespace cleanup (use __tcgetattr, __getline).
18696         Use bool for Booleans.
18697         [USE_IN_LIBIO]: Handle wide streams.
18698         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18699         stream might go where.
18700
18701         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18702         doesn't have to include <stdio.h> before us.
18703         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18704         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18705         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18706         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18707         if not declared, so that we can use getpass.c code from libc without
18708         rewriting it.
18709         (flockfile, ftrylockfile, funlockfile): New macros.
18710
18711 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18712
18713         * modules/getpass: Depend on stdbool.
18714
18715 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18716
18717         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18718
18719 2003-10-07  Karl Berry  <karl@gnu.org>
18720
18721         * config/config.{guess,sub}: update from config.
18722
18723 2003-10-06  Jim Meyering  <jim@meyering.net>
18724             Bruno Haible  <bruno@clisp.org>
18725
18726         This lets translators provide better translations for the
18727         "Written by ..." part of --version output.
18728         * lib/version-etc.h: Include stdarg.h.
18729         (version_etc_copyright): Declare as readonly.
18730         (version_etc): Make this function variadic with a NULL-terminated list
18731         of author name strings.
18732         (version_etc_va): New declaration.
18733         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18734         (version_etc_copyright): Declare as readonly.
18735         (version_etc_va): New function. Provide a different translatable string
18736         for each possible number of authors < 10. Abbreviate when there are 10
18737         authors or more.
18738         (version_etc): Make this function variadic. Call version_etc_va.
18739         Suggestion from Gary V. Vaughan.
18740
18741         * lib/long-options.h (parse_long_options): Change prototype: the
18742         authors string is moved to the end and becomes variadic.
18743         * lib/long-options.c: Include stdarg.h.
18744         (parse_long_options): Make this function variadic, too.
18745         Call version_etc_va, not version_etc.
18746
18747 2003-10-06  Bruno Haible  <bruno@clisp.org>
18748
18749         * modules/version-etc-2: Remove file.
18750         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18751
18752 2003-10-06  Bruno Haible  <bruno@clisp.org>
18753
18754         * modules/fatal-signal: New file.
18755         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18756
18757 2003-10-06  Bruno Haible  <bruno@clisp.org>
18758
18759         * m4/fatal-signal.m4: New file.
18760         * m4/signalblocking.m4: New file, from GNU gettext.
18761
18762 2003-10-06  Bruno Haible  <bruno@clisp.org>
18763
18764         * lib/version-etc-2.h: Remove file.
18765         * lib/version-etc-2.c: Remove file.
18766
18767 2003-10-06  Bruno Haible  <bruno@clisp.org>
18768
18769         * lib/fatal-signal.h: New file, from GNU gettext.
18770         * lib/fatal-signal.c: New file, from GNU gettext.
18771
18772 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18773
18774         * README: Rework advice for preventing empty .o files.
18775         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18776         not <sys/types.h>.
18777
18778 2003-10-04  Karl Berry  <karl@gnu.org>
18779
18780         * lib/argp*: update from libc.
18781
18782 2003-10-04  Karl Berry  <karl@gnu.org>
18783
18784         * config/config.{guess,sub}: update from config.
18785
18786 2003-10-02  Bruno Haible  <bruno@clisp.org>
18787
18788         * modules/lchown (Include): Add lchown.h.
18789         * modules/time_r (Include): Use "..." syntax.
18790         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18791
18792 2003-10-01  Simon Josefsson  <jas@extundo.com>
18793
18794         * MODULES.html.sh (func_all_modules): Move gethostname from section
18795         'based on' to section 'lacking' POSIX:2001.
18796
18797 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18798
18799         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18800         to output mode on the same stream.
18801
18802 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18803
18804         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18805         Fix arg typo in previous patch.
18806
18807 2003-09-28  Jim Meyering  <jim@meyering.net>
18808
18809         * lib/error.c: Correct cpp indentation.
18810
18811 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18812
18813         * modules/free: New file.
18814
18815 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18816
18817         * m4/free.m4: New file.
18818
18819 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18820
18821         * lib/minmax.h (MIN, MAX)
18822         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18823         Omit the special code that used __typeof__, since we worry that
18824         it could be more trouble than it's worth.  See:
18825         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18826         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18827
18828         * lib/free.c: New file.
18829
18830 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18831
18832         Trivial fixes to Makefile.am parts of module listings.
18833         * modules/strstr: Append strstr.h to lib_SOURCES.
18834         * modules/strcase: Likewise, for strcase.h.
18835
18836 2003-09-27  Karl Berry  <karl@gnu.org>
18837
18838         * config/mkinstalldirs: update from automake.
18839
18840 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18841
18842         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18843         (error_tail): Do not loop, reallocating temporary buffer, since
18844         the output cannot contain more wide characters than the input
18845         contains bytes, the size must be big enough already.  This avoids
18846         one potential size overflow calculation.  Check for size overflow
18847         when calculating temporary buffer size.  Free temporary buffer
18848         when done, if it was allocated with malloc; this plugs a memory
18849         leak.  Remove casts from void * to pointers, that are no longer
18850         needed now that we're assuming C89 or better.
18851
18852         Merge error changes from glibc.
18853
18854         * lib/error.c, error.h: Update copyright notice header to match glibc.
18855         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18856         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18857         Disable cancellation while printing error.
18858         * lib/error.h: Prepend __ to parameter names.
18859
18860 2003-09-26  Jim Meyering  <jim@meyering.net>
18861
18862         * lib/error.c (error_tail): Move some declarations
18863         into inner scope where the local variables are used.
18864
18865 2003-09-26  Bruno Haible  <bruno@clisp.org>
18866
18867         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18868         stpncpy().
18869         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18870
18871 2003-09-26  Bruno Haible  <bruno@clisp.org>
18872
18873         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18874         (stpncpy): Define as alias for gnu_stpncpy.
18875         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18876
18877 2003-09-25  Simon Josefsson  <jas@extundo.com>
18878
18879         * lib/xgetdomainname.h: New file.
18880         * lib/xgetdomainname.c: New file.
18881
18882 2003-09-25  Simon Josefsson  <jas@extundo.com>
18883             Bruno Haible  <bruno@clisp.org>
18884
18885         * modules/getdomainname: New file.
18886         * modules/xgetdomainname: New file.
18887         * MODULES.html.sh (func_all_modules): Add getdomainname,
18888         xgetdomainname.
18889
18890 2003-09-25  Simon Josefsson  <jas@extundo.com>
18891             Bruno Haible  <bruno@clisp.org>
18892
18893         * m4/getdomainname.m4: New file.
18894
18895 2003-09-25  Simon Josefsson  <jas@extundo.com>
18896             Bruno Haible  <bruno@clisp.org>
18897
18898         * lib/getdomainname.h: New file.
18899         * lib/getdomainname.c: New file.
18900
18901 2003-09-25  Karl Berry  <karl@gnu.org>
18902
18903         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18904
18905 2003-09-25  Karl Berry  <karl@gnu.org>
18906
18907         * config/install-sh: update from automake.
18908
18909 2003-09-25  Bruno Haible  <bruno@clisp.org>
18910
18911         * modules/version-etc-2: New file, from modules/version-etc with
18912         modifications.
18913         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18914
18915 2003-09-25  Bruno Haible  <bruno@clisp.org>
18916
18917         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18918         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18919
18920 2003-09-24  Simon Josefsson  <jas@extundo.com>
18921
18922         * modules/xgethostname: Add xgethostname.h.
18923
18924 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18925
18926         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18927         the buffer associated with the argument.  Bug reported by
18928         Simon Josefsson.
18929
18930 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18931
18932         * README: Document assumptions that 'int' is at least 32 bits
18933         wide, that integer arithmetic is 2's complement without overflow,
18934         that there are no holes in integer values, that adding sizes of
18935         two nonoverlapping objects can't overflow, and that all-bits-zero
18936         yields scalar zero.  Fix spelling and capitalization typos.
18937
18938 2003-09-19  Karl Berry  <karl@gnu.org>
18939
18940         * lib/argp.h: update from libc.
18941
18942 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18943
18944         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18945         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18946         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18947
18948 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18949
18950         * gnulib-tool: Use "test -h", not "test -L", for portability
18951         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18952         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18953         (sed_extract_prog): Issue s commands one-by-one, rather than
18954         using \| in one s command.
18955
18956 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18957
18958         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18959         input error, instead of returning NULL the next time we are called
18960         (and therefore losing track of errno).
18961
18962 2003-09-16  Bruno Haible  <bruno@clisp.org>
18963
18964         * gnulib-tool (func_create_testdir): Warn about duplicated
18965         dependencies.
18966
18967 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18968
18969         * modules/argmatch, modules/fatal, modules/obstack,
18970         modules/xalloc, modules/xgethostname: Sort dependencies by
18971         importance, not alphabetically.
18972
18973 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18974
18975         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18976         fails, so that the caller gets the proper errno.
18977
18978         * lib/readutmp.c (read_utmp): Likewise.
18979         Check for fstat error.  Close stream and free storage
18980         when failing.
18981
18982 2003-09-14  Karl Berry  <karl@gnu.org>
18983
18984         * config/srclist.txt (strdup.c): disable for c89 changes.
18985
18986 2003-09-14  Jim Meyering  <jim@meyering.net>
18987
18988         * lib/getloadavg.c: Correct cpp indentation.
18989         * lib/strdup.c: Likewise.
18990         * lib/vasnprintf.c: Likewise.
18991
18992 2003-09-14  Bruno Haible  <bruno@clisp.org>
18993
18994         * modules/fwriteerror: New file.
18995         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18996
18997 2003-09-14  Bruno Haible  <bruno@clisp.org>
18998
18999         * lib/fwriteerror.h: New file.
19000         * lib/fwriteerror.c: New file.
19001
19002 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19003
19004         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19005         modules/xgethostname, modules/xalloc: Depend on exit.
19006
19007 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19008
19009         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19010
19011         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19012         and AC_MINIX, too, so that their extensions are available.
19013
19014         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19015         This macro has been superseded by gl_BACKUPFILE.
19016
19017         More patches to assume C89 or better.
19018
19019         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19020
19021         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19022         unconditionally.
19023         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19024         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19025         Include <string.h>, <stdlib.h> unconditionally.
19026         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19027         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19028         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19029         headers or for string.h.
19030         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19031         or strtoul.
19032
19033         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19034         headers.
19035         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19036         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19037         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19038         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19039         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19040         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19041         memcpy, memset.
19042         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19043         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19044         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19045         strtol.
19046         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19047         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19048         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19049         strtoul.
19050
19051 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19052
19053         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19054         * lib/obstack.c [!defined _LIBC]: Likewise.
19055         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19056         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19057         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19058
19059         More changes to assume C89 or better.
19060
19061         * lib/error.c (error_tail): Assume vprintf.
19062
19063         * lib/argmatch.c (getenv): Remove decl.
19064         * lib/progreloc.c (get_full_program_name): Define via prototype.
19065         * lib/setenv.c (clearenv): Likewise.
19066         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19067         needed.
19068         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19069         (malloc, memcpy): Remove decls.
19070         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19071         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19072         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19073         (memcpy): Remove macro.
19074         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19075         (__P): Remove.  All uses removed.
19076         (PTR): Remove.  All uses changed to void *.
19077         (CHAR_BIT, NULL): Remove.
19078         (spaces, zeros, memset_space, memset_zero)
19079         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19080         Remove.
19081         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19082         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19083         Define with prototype.
19084         Remove now-unnecessary prototype decl.
19085         (extra_args_spec): Assume ANSI C.  All uses changed.
19086         (extra_args_spec_iso): Remove.
19087         (my_strftime, emacs_strftimeu): Define via prototype.
19088         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19089         unconditionally.
19090         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19091         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19092         (strtoul, strtol): Remove decls.
19093         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19094         LONG_MAX): Remove.
19095         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19096         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19097         (LOCALE_PARAM_PROTO): New macro.
19098         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19099         (INTERNAL (strtol), strtol): Define with a prototype.
19100         (PARAMS): Remove.  All uses removed.
19101         * lib/tempname.c: Include <string.h> unconditionally.
19102         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19103         * lib/xgethostname.c (main): Define with a prototype.
19104         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19105         Include <stdlib.h> unconditionally.
19106         (calloc, malloc, realloc, free): Remove decls.
19107         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19108         Include <stdlib.h> unconditionally.  Sort include file names.
19109         (strtod): Remove.
19110         (xstrtod): Define with a prototype.
19111         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19112         (strtol, strtoul): Remove decls.
19113
19114 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19115
19116         More patches to assume C89 or better.
19117         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19118         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19119         string.h, memchr, STDC_HEADERS.
19120
19121 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19122
19123         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19124         Include <stdlib.h>, <string.h> unconditionally.
19125         Remove now-unnecessary cast to char *.
19126         * lib/strnlen.c: Include <string.h> unconditionally.
19127         * lib/yesno.c (yesno): Define with a prototype.
19128
19129 2003-09-11  Bruno Haible  <bruno@clisp.org>
19130
19131         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19132
19133 2003-09-10  Jim Meyering  <jim@meyering.net>
19134
19135         * lib/error.c: Correct indentation of cpp directives.
19136
19137 2003-09-10  Bruno Haible  <bruno@clisp.org>
19138
19139         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19140         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19141         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19142         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19143         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19144         <stdlib.h> and <string.h> checks.
19145         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19146         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19147
19148 2003-09-10  Bruno Haible  <bruno@clisp.org>
19149
19150         * lib/strcspn.c: Include <string.h> unconditionally.
19151         * lib/strpbrk.c: Include <string.h> unconditionally.
19152         * lib/strstr.c: Include <string.h> unconditionally.
19153         * lib/unicodeio.c: Include <string.h> unconditionally.
19154         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19155         * lib/unsetenv.c: Likewise.
19156         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19157         * lib/yesno.c: Include <stdlib.h> unconditionally.
19158         (rpmatch): Add prototype.
19159
19160 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19161
19162         More patches to assume C89 or better.
19163         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19164         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19165         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19166         or for string.h.
19167         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19168         stdlib.h.
19169         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19170         C headers.
19171         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19172         string.h.
19173         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19174         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19175         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19176         or for string.h.
19177         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19178         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19179         C headers.
19180         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19181         memcpy.
19182         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19183         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19184         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19185         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19186         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19187         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19188         string.h, free.
19189         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19190         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19191         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19192         C headers, or for string.h.
19193         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19194         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19195         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19196         headers, memory.h, stdlib.h, string.h, strings.h.
19197         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19198         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19199         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19200         strchr.
19201         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19202         headers, memory.h, string.h.
19203         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19204         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19205         free.
19206         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19207         headers.
19208         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19209         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19210         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19211         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19212         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19213
19214 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19215
19216         More K&R removal.
19217
19218         * lib/acosl.c (main): Use a prototype.
19219         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19220         tanl.c: Likewise.
19221
19222         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19223
19224         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19225         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19226         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19227         with a prototype.
19228         * lib/getopt.c (const): Remove macro.
19229         Include <string.h> unconditionally.
19230         (my_index): Remove; all uses changed to strchr.
19231         (strlen): Remove decl.
19232         (exchange): Remove forward decl; no longer needed.
19233         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19234         Define with prototype.
19235         * lib/getopt1.c (const): Remove macro.
19236         (getopt_long, getopt_long_only, main): Define with prototype.
19237
19238         * lib/getugroups.c: Include <string.h> unconditionally.
19239
19240         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19241         (getusershell, setusershell, endusershell, readname, main):
19242         Define with prototypes.
19243
19244         * lib/group-member.c: Include group-member.h first.
19245         Include <stdlib.h> unconditionally.
19246
19247         * lib/hard-locale.c: Include hard-locale.h first.
19248         Include <stdlib.h>, <string.h> unconditionally.
19249
19250         * lib/hash.c (free, malloc): Remove decls.
19251         Include <stdlib.h> unconditionally.
19252
19253         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19254         (getenv): Do not declare.
19255
19256         * lib/idcache.c: Include <string.h> unconditionally.
19257
19258         * lib/long-options.c: Include long-options.h first, to test interface.
19259         Include <stdlib.h> unconditionally.
19260
19261         * lib/makepath.c: Include makepath.h first, to test interface.
19262         Include <stdlib.h> and <string.h> unconditionally.
19263
19264         * lib/linebuffer.c: Include <stdlib.h>.
19265         (free): Remove decl.
19266
19267         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19268         stddef.h. rpl_malloc returns void *, not char *.
19269         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19270         prototype.
19271
19272         * lib/md5.h: Include <limits.h> unconditionally.
19273         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19274         (__P): Remove; all uses removed.
19275         * lib/md5.c: Include "md5.h" first.
19276         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19277         md5_buffer, md5_process_bytes, md5_process_block):
19278         Define with prototypes.
19279         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19280         * lib/sha.c: Include "sha.h" first.
19281         Include <stdlib.h>, <string.h> unconditionally.
19282
19283         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19284         * lib/memcmp.c (__ptr_t): Likewise.
19285         * lib/memrchr.c (__ptr_t): Likewise.
19286         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19287         Include <string.h> unconditionally.
19288         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19289         * lib/memchr.c: Include <stdlib.h> unconditionally.
19290         * lib/memchr.c (LONG_MAX): Remove.
19291         * lib/memrchr.c (LONG_MAX): Likewise.
19292         * lib/memchr.c (__memchr): Define via a prototype.
19293         * lib/memrchr.c (__memrchr): Likewise.
19294         * lib/memcmp.c (__P): Remove, and remove all uses.
19295         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19296         Remove forward decls; no longer needed.
19297         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19298         Use types required by C89 in prototype.
19299
19300         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19301         * lib/savedir.c: Likewise.
19302         * lib/mkdir.c (free): Remove decl.
19303         * lib/rmdir.c (rmdir): Define with a prototype.
19304         * lib/savedir.c: Include savedir.h first, to test interface.
19305
19306         * lib/mktime.c (STDC_HEADERS): Remove.
19307         Include <stdlib.h>, <string.h> unconditionally.
19308
19309         * lib/modechange.c: Include <stdlib.h> unconditionally.
19310         (malloc): Remove decl.
19311
19312         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19313         (free): Remove decl.
19314
19315         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19316         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19317         (This type really should be intptr_t, but that's a C99ism.)
19318         (_obstack_memcpy): Remove: all uses changed to memcpy.
19319         Include <string.h> unconditionally.
19320         (struct obstack): Assume __STDC__ for types of members
19321         chunkfun, freefun, extra_arg.
19322         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19323         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19324         obstack_begin, obstack_specify_allocation,
19325         obstack_specify_allocation_with_arg, obstack_chunkfun,
19326         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19327         Remove unprototyped decls and the macros that use them.
19328         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19329         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19330         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19331         (defined __STDC__ && __STDC__)]:
19332         Remove nonprototyped code.
19333         Include <stdlib.h> unconditionally.
19334         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19335         _obstack_allocated_p, _obstack_free, obstack_free,
19336         _obstack_memory_used, print_and_abort):
19337         Define using prototypes.
19338         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19339         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19340         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19341         obstack_next_free, obstack_object_size, obstack_room) [0]:
19342         Remove unused, unprototyped code.
19343
19344         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19345
19346         * lib/physmem.c (physmem_total, physmem_available, main): Define
19347         with prototypes.
19348
19349         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19350         (main): Define with a prototype.
19351
19352         * lib/posixver.c (getenv): Remove decl.
19353
19354         * lib/putenv.c (malloc): Returns void *, not char *.
19355         Include <string.h> unconditionally.
19356         (strchr, memcpy, NULL): Do not define.
19357
19358         * lib/readtokens.c: Include readtokens.h first, to test interface.
19359         Include <stdlib.h>, <string.h> unconditionally.
19360         (init_tokenbuffer): Define with a prototype.
19361
19362         * lib/regex.c (PARAMS): Remove.  All uses removed.
19363         All uses of _RE_ARGS removed, too.
19364         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19365         unconditionally.
19366         (bzero): Assume memset exists.
19367         (memcmp, memcpy, NULL): Remove.
19368         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19369         char, or assignments to local vars of type signed char.
19370         (init_syntax_once, PREFIX(extract_number_and_incr),
19371         PREFIX(print_partial_compiled_pattern),
19372         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19373         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19374         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19375         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19376         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19377         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19378         wcs_compile_range, byte_compile_range, truncate_wchar,
19379         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19380         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19381         count_mbs_length, wcs_re_match_2_internal,
19382         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19383         PREFIX(alt_match_null_string_p),
19384         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19385         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19386         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19387         now-unnecessary declaration, if any.
19388         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19389         regcomp, regexec):
19390         Remove now-unnecessary casts among pointer types.
19391         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19392
19393         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19394         (free): Remove decl.
19395
19396         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19397
19398         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19399         (free): Remove decl.
19400
19401         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19402         * lib/xgetcwd.c: Likewise.
19403
19404         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19405         (free): Remove decl.
19406
19407         * lib/strchrnul.c (strchrnul): Define with a prototype.
19408         Fix bug: c_in was not converted to char before searching.
19409
19410         The following changes are not K&R related:
19411
19412         * lib/group-member.h: Include <sys/types.h>, so that this file is
19413         self-contained.
19414         * lib/makepath.h: Likewise.
19415
19416         * lib/getusershell.c (readname, default_index, line_size, readname):
19417         Use size_t, not int, for sizes.
19418         (readname): If the size overflows, report an error instead of
19419         looping forever.
19420
19421 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19422
19423         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19424         libc.
19425
19426 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19427
19428         * README: New section: portability guidelines.
19429
19430 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19431
19432         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19433         C89 spec.
19434
19435 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19436
19437         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19438
19439 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19440
19441         Assume C89 or better; remove K&R cruft.
19442         A few of these changes were first proposed by Derek Robert Price
19443         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19444
19445         * lib/addext.c: Include <string.h> unconditionally.
19446         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19447         Don't declare getenv or malloc.
19448
19449         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19450         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19451         (NULL): Remove.
19452         (find_stack_direction, alloca): Use prototypes.
19453
19454         * lib/atexit.c (atexit): Define using a prototype.
19455
19456         * lib/basename.c, dirname.c, stripslash.c:
19457         Include <string.h> unconditionally.
19458
19459         * lib/bcopy.c: Include <stddef.h>.
19460         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19461
19462         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19463
19464         * lib/error.h (error, error_at_line, error_print_progname)
19465         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19466         * lib/error.c: Include error.h first, to check interface.
19467         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19468         (VA_START): Remove; all uses changeed to va_start.
19469         (exit, strerror): Remove decls.
19470         (error_print_progname): Prototype uncondionally.
19471         Don't include <errno.h>; no longer needed.
19472         (private_strerror): Remove.
19473         (error_tail): Always define.
19474         (error, error_at_line): Assume C89 or better; always use prototypes.
19475         * lib/fatal.c: Include "fatal.h" first, to test interface.
19476         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19477         (VA_START): Remove; all uses changed to va_start.
19478         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19479         this case.
19480         (exit): Remove decl.
19481         (fatal): Prototype unconditionally.  Assume va_start works.
19482         Abort at end, to pacify gcc.
19483
19484         * lib/euidaccess.c (main): Define with a prototype.
19485
19486         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19487
19488         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19489
19490         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19491         prototypes.
19492         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19493         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19494         (getenv): Remove decl.
19495         (fnmatch): Define using a prototype.
19496         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19497         (FCT): Define using a prototype.
19498
19499         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19500
19501         * lib/gethostname.c: Include <stddef.h>.
19502         (gethostname): Define with prototype.  Length is size_t, not int.
19503
19504 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19505
19506         Assume C89 or better; remove K&R cruft.
19507         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19508         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19509         string.h, getenv, malloc.
19510         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19511         headers.
19512         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19513         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19514         do not check for strerror.
19515         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19516         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19517         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19518         do not check for doprnt or vprintf.
19519         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19520         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19521
19522 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19523
19524         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19525         getversion.c should have been removed then, but was accidentally
19526         preserved.
19527
19528         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19529         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19530
19531 2003-09-08  Karl Berry  <karl@gnu.org>
19532
19533         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19534                 config, forget about prep.
19535
19536         * config/depcomp, missing: update from automake.
19537
19538 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19539
19540         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19541         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19542
19543 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19544
19545         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19546         copy_tm_result.  Bug reported by Simon Josefsson in
19547         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19548
19549 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19550
19551         * m4/time_r.m4: New file.
19552         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19553         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19554         is. Check for timegm declaration.
19555         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19556         Do not check for gmtime_r.
19557         Replace mktime if __mktime_internal does not exist and if mktime
19558         hasn't been replaced already.
19559
19560 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19561
19562         * lib/time_r.c, lib/time_r.h: New files.
19563
19564         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19565         __localtime_r.
19566         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19567         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19568
19569         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19570         __gmtime_r.
19571         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19572         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19573         Include <time_r.h>.
19574
19575         * lib/timegm.c: Switch to glibc implementation, with the following
19576         changes:
19577         [defined HAVE_CONFIG_H]: Include <config.h>.
19578         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19579         (__mktime_internal) [!defined _LIBC]: New decl.
19580         (__gmtime_r) [!defined _LIBC]: New macro and function.
19581         (timegm): Use a prototype, since gnulib assumes C89.
19582         Do not bother declaring tmp to be const, as it's not really usefu.
19583         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19584         (timegm): Declare only if HAVE_DECL_TIMEGM.
19585
19586 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19587
19588         * MODULES.html.sh (func_all_modules): Add time_r.
19589         * modules/time_r: New file.
19590         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19591         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19592
19593 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19594
19595         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19596         Bug reported by Lute Kamstra in
19597         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19598
19599         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19600         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19601         course with correspondingly smaller numbers for tomorrow and
19602         yesterday.  From Tadayoshi Funaba.  Originally installed into
19603         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19604         coreutils merge?).
19605
19606 2003-08-31  Simon Josefsson  <jas@extundo.com>
19607
19608         * modules/timegm: New file.
19609         * MODULES.html.sh (func_all_modules): Add timegm.
19610
19611 2003-08-31  Simon Josefsson  <jas@extundo.com>
19612
19613         * m4/timegm.m4: New file.
19614
19615 2003-08-31  Simon Josefsson  <jas@extundo.com>
19616
19617         * lib/timegm.h: New file.
19618         * lib/timegm.c: New file.  Based on
19619         wget-1.8.2/src/http.c:mktime_from_utc.
19620
19621 2003-08-31  Karl Berry  <karl@gnu.org>
19622
19623         * lib/argp.h: update from libc.
19624
19625 2003-08-28  Bruno Haible  <bruno@clisp.org>
19626
19627         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19628         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19629         followed by '#define fnmatch fnmatch_posix' gives an error.
19630
19631 2003-08-28  Bruno Haible  <bruno@clisp.org>
19632
19633         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19634         warning on QNX, which defines O_BINARY to 000000.
19635
19636 2003-08-27  Jim Meyering  <jim@meyering.net>
19637
19638         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19639         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19640         would fail after 32.  Reported by Danny Levinson.  Details here:
19641         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19642
19643 2003-08-24  Bruno Haible  <bruno@clisp.org>
19644
19645         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19646         MSVC7 <stdio.h> is included later.
19647
19648 2003-08-22  Simon Josefsson  <jas@extundo.com>
19649
19650         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19651
19652 2003-08-20  Karl Berry  <karl@gnu.org>
19653
19654         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19655
19656 2003-08-20  Bruno Haible  <bruno@clisp.org>
19657
19658         * modules/progname: New file.
19659         * MODULES.html.sh (func_all_modules): Add progname.
19660
19661 2003-08-20  Bruno Haible  <bruno@clisp.org>
19662
19663         * lib/progname.h: New file, from GNU gettext.
19664         * lib/progname.c: New file, from GNU gettext.
19665         * lib/progreloc.c: New file, from GNU gettext.
19666
19667 2003-08-19  Jim Meyering  <jim@meyering.net>
19668
19669         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19670         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19671
19672 2003-08-19  Bruno Haible  <bruno@clisp.org>
19673
19674         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19675         more.
19676
19677 2003-08-19  Bruno Haible  <bruno@clisp.org>
19678
19679         * lib/xstrdup.c: Assume <string.h> exists.
19680
19681 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19682
19683         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19684         in makefile rules.
19685
19686 2003-08-18  Jim Meyering  <jim@meyering.net>
19687
19688         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19689         * m4/lib-ld.m4: Likewise.
19690
19691 2003-08-18  Jim Meyering  <jim@meyering.net>
19692
19693         * lib/setenv.h: Indent nested cpp directive.
19694         * lib/vasnprintf.c: Remove trailing blanks.
19695
19696 2003-08-17  Simon Josefsson  <jas@extundo.com>
19697
19698         * modules/xstrndup: New file.
19699         * MODULES.html.sh (func_all_modules): Add xstrndup.
19700
19701 2003-08-17  Simon Josefsson  <jas@extundo.com>
19702
19703         * modules/argp: Fix autoconf macro name. Add more dependencies.
19704
19705 2003-08-17  Simon Josefsson  <jas@extundo.com>
19706
19707         * m4/xstrndup.m4: New file.
19708
19709 2003-08-17  Simon Josefsson  <jas@extundo.com>
19710
19711         * m4/argp.m4: New file.
19712
19713 2003-08-17  Simon Josefsson  <jas@extundo.com>
19714             Bruno Haible  <bruno@clisp.org>
19715
19716         * lib/xstrndup.h: New file.
19717         * lib/xstrndup.c: New file.
19718
19719 2003-08-17  Bruno Haible  <bruno@clisp.org>
19720
19721         * modules/strndup (Files, Include): Add lib/strndup.h.
19722
19723 2003-08-17  Bruno Haible  <bruno@clisp.org>
19724
19725         * modules/euidaccess (Files): Add lib/euidaccess.h.
19726
19727 2003-08-17  Bruno Haible  <bruno@clisp.org>
19728
19729         * lib/strndup.h: New file.
19730
19731 2003-08-17  Bruno Haible  <bruno@clisp.org>
19732
19733         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19734         like AC_GNU_SOURCE.
19735         * modules/extensions (configure.ac): Comment out the invocation of
19736         gl_USE_SYSTEM_EXTENSIONS.
19737
19738 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19739
19740         Merges from coreutils, etc.
19741         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19742         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19743         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19744         fixing a typo.
19745         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19746         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19747
19748 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19749
19750         Document merge from coreutils.
19751         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19752         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19753         * modules/utime: Add m4/utimes-null.m4.
19754
19755 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19756
19757         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19758         space, undoing this 2003-08-12 change:
19759         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19760
19761 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19762
19763         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19764         strtoul.c from libc, undoing this 2003-08-12 change:
19765         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19766
19767 2003-08-16  Jim Meyering  <jim@meyering.net>
19768
19769         Merges from coreutils.
19770         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19771         prefix.  Adjust cache variables similarly.  Create 500 rather than
19772         just 300 files, to exercise bug on Darwin6.5, too.
19773         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19774         $missing_dir.
19775         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19776         AM_SYS_POSIX_TERMIOS.
19777         Reported by mkc@mathdogs.com.
19778         Also change use of $am_cv_sys_posix_termios
19779         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19780         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19781         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19782         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19783         in /proc/mounts until it finds one with matching device number.  This
19784         is unnecessary when the FILE argument *is* a mount point.  No stat call
19785         is necessary in that case.  So, disable the statvfs-testing code on
19786         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19787         as RedHat bug# 84846.
19788         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19789         to 1MB, so as not to render systems with no stack size limit (e.g.,
19790         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19791         Include <unistd.h>.  On some systems,
19792         it is required for the definition of _SC_PAGESIZE.
19793
19794 2003-08-16  Jim Meyering  <jim@meyering.net>
19795
19796         Merge from coreutils.
19797         * lib/xstrtoimax.c: #else #if -> #elif.
19798         * lib/xstrtoumax.c: Likewise.
19799
19800 2003-08-16  Jim Meyering  <jim@meyering.net>
19801
19802         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19803         * m4/utimes.m4: Removed.
19804         * m4/utimes-null.m4: Renamed from utimes.m4.
19805
19806         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19807         to 1MB, so as not to render systems with no stack size limit (e.g.,
19808         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19809         Include <unistd.h>.  On some systems,
19810         it is required for the definition of _SC_PAGESIZE.
19811
19812 2003-08-16  Jim Meyering  <jim@meyering.net>
19813         and Paul Eggert  <eggert@cs.ucla.edu>
19814
19815         Merges from coreutils, etc.
19816
19817         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19818         using the latest version from cvs.  This avoids problems with #line
19819         directives using a vendor (Sun) compiler.
19820         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19821         Don't set GETGROUPS_LIB here; now it's
19822         done via getgroups.m4's wrapper function.
19823         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19824         rather than just in sh-util/configure.in, so that the
19825         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19826         same.
19827         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19828         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19829         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19830         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19831         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19832         Remove code that is now done by the newly-required macros.
19833         Append $(EXEEXT) to DF_PROG.
19834         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19835         Do not invoke or require the following here,
19836         since prereq.m4 or some gnulib .m4 now does this for us:
19837         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19838         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19839         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19840         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19841         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19842         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19843         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19844         AC_FUNC_OBSTACK.
19845         Do not replace the following functions, as this is now the job
19846         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19847         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19848         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19849         atexit getpass, strdup, getpagesize.
19850         Replace 'raise'.
19851         Do not check for the following functions, as this is now the job
19852         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19853         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19854         setregid.
19855         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19856         Check for sys/sysctl.h.
19857         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19858         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19859         of checking for ssize_t ourselves.
19860
19861         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19862         Require every macro that gnulib/modules/* suggests for us.
19863         (jm_PREREQ_ADDEXT): New macro.
19864         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19865         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19866
19867         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19868         (gl_PHYSMEM): Use it.
19869         Also check for `table' function.
19870         Check for new headers and functions.
19871         Add check for sys/sysmp.h.
19872         With suggestions from Kaveh Ghazi.
19873         Ignore headers that are present but cannot be compiled.  This
19874         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19875         C 5.4.
19876
19877 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19878
19879         Document merge from coreutils.
19880         * modules/userspec: Depend on posixver.
19881         * modules/strftime: Depend on tzset.
19882
19883 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19884
19885         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19886         rather than tab, after '#' in shell-script copyright notices.
19887         Suggested by Bruno Haible.
19888
19889 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19890
19891         * config/srclist-update: Use three spaces, rather than tab, after '#'
19892         in shell-script copyright notices.  Suggested by Bruno Haible.
19893         Remove unnecessary parenthesization in regular expression.
19894
19895 2003-08-15  Jim Meyering  <jim@meyering.net>
19896
19897         Merge from coreutils.
19898         * lib/xgethostname.c: Include <stdlib.h>.
19899         (xghostname): Don't exit for anything other than memory-related
19900         failure; just return NULL.
19901         * lib/userspec.c: Include "posixver.h".
19902         (parse_user_spec): Accept `.' as a separator only
19903         in pre-POSIX-200112 mode.
19904         * lib/strtoimax.c: Use #elif rather than #else #if.
19905         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19906         Remove function, now that we can rely on a working tzset function.
19907         [!_LIBC]: Ensure that the required autoconf test has been run.
19908         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19909         Use underlying_strftime for %r.
19910         * lib/sha.c: Merge in some clean-up and optimization changes from
19911         glibc.
19912         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19913         Ensure that it is a multiple of 64.
19914         Rearrange loop exit tests so as to avoid performing an
19915         additional fread after encountering an error or EOF.
19916         * lib/realloc.c: Update copyright date.
19917
19918 2003-08-15  Jim Meyering  <jim@meyering.net>
19919         and Paul Eggert  <eggert@twinsun.com>
19920
19921         Merge from coreutils.
19922         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19923         member but strut utmpx does not.  Needed for AIX 4.3.3.
19924         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19925
19926 2003-08-15  Jim Meyering  <jim@meyering.net>
19927         and Paul Eggert  <eggert@cs.ucla.edu>
19928
19929         Merges from coreutils, etc.
19930         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19931         Require gl_FUNC_TZSET_CLOBBER.
19932         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19933         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19934         members.
19935
19936 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19937
19938         Help the merge from coreutils.
19939         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19940         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19941         * m4/tzset.m4: Use it too.
19942
19943 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19944
19945         * modules/tzset: New file.
19946
19947 2003-08-14  Jim Meyering  <jim@meyering.net>
19948
19949         Merges from coreutils.
19950         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19951         variable names, rather than @FNMATCH_H@.
19952         * modules/alloca: Likewise for $(ALLOCA_H).
19953
19954         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19955         the three copies of the literal target, `fnmatch.h'.
19956         * modules/alloca (alloca.h): Likewise.
19957
19958 2003-08-14  Jim Meyering  <jim@meyering.net>
19959
19960         Merge from coreutils.
19961         * m4/tzset.m4: New file.
19962         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19963         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19964         otherwise, AIX 5.1 systems would end up using the latter.
19965         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19966         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19967         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19968         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19969
19970 2003-08-14  Jim Meyering  <jim@meyering.net>
19971
19972         Merge from coreutils.
19973         * lib/obstack.h: Whitespace changes.
19974         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19975         and xcalloc return values.
19976         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19977         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19978         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19979         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19980         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19981         error from mntctl.
19982         Use mntctl's return value to drive the entry-processing loop, since
19983         we can't rely on the value of the vmt_length member in the last
19984         entry.  On some systems doing so could result in exhausting
19985         virtual memory.  Based in part on a patch from Mike Jetzer.
19986
19987 2003-08-14  Jim Meyering  <jim@meyering.net>
19988         and Paul Eggert  <eggert@twinsun.com>
19989
19990         Merges from coreutils, plus other fixes.
19991         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19992         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19993         for credits and details.  Thanks to Kaveh Ghazi for helping
19994         to keep these files in sync.
19995         (ARRAY_SIZE): Define it.
19996         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19997         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19998         (memcasecmp): Don't assume size_t fits in unsigned int.
19999         Remove casts and duplicate code.
20000         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20001         (memcpy): Remove definition.
20002         Merge in some clean-up and optimization changes from glibc.
20003         [BLOCKSIZE]: Move definition to top of file.
20004         Ensure that it is a multiple of 64.
20005         Rearrange loop exit tests so as to avoid performing an
20006         additional fread after encountering an error or EOF.
20007         * lib/md5.h (md5_uintptr): Define.
20008         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20009         return to the initial working directory.  Preserve errno
20010         for caller.
20011         * lib/idcache.c: Include "xalloc.h".
20012         (xmalloc, xrealloc): Remove decls.
20013         (getuser): Remove casts no longer required in C89.
20014         * lib/human.c: Include stdio.h, for sprintf.
20015         * lib/group-member.c: Include "xalloc.h".
20016         (xmalloc, xrealloc): Remove decls.
20017         (get_group_info): Remove casts no longer required in C89.
20018         * lib/getusershell.c (readname): Remove casts no longer required in
20019         C89.
20020         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20021         * lib/getline.c: Whitespace fix, from coreutils.
20022
20023 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20024
20025         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20026         Check for isascii.
20027
20028         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20029         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20030         Undo previous (whitespace-only) change.
20031
20032 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20033
20034         * lib/exclude.c: Include <ctype.h>
20035         (IN_CTYPE_DOMAIN): New macro.
20036         (is_space): New fn.
20037         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20038         and empty lines.
20039
20040         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20041         Undo previous (whitespace-only) change.
20042
20043 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20044
20045         * config/srclist-update: Change update back to the old behavior,
20046         leaving whitespace alone.  Use one 'sed' command rather than a
20047         pipeline.
20048         (fixlicense): Now a variable, not a function.
20049         (remove_trailing_blanks): Remove.
20050         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20051         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20052         Undo previous (whitespace-only) change.
20053
20054 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20055
20056         Merge from coreutils.
20057         * modules/euidaccess: Add lib_SOURCES, include for new
20058         file euidaccess.h
20059
20060 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20061
20062         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20063         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20064         Normalize leading white space and remove trailing white space.
20065
20066         Merge from coreutils
20067         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20068
20069         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20070         0.12.1.  These files are now being upgraded automatically by
20071         ../config/srclist-update.
20072
20073 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20074
20075         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20076         Normalize leading white space and remove trailing white space.
20077         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20078         notice, as per ../config/srclist-update.
20079
20080         Merge from coreutils.
20081         * lib/euidaccess.h: New file.
20082         * lib/euidaccess.c: Include it.
20083         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20084         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20085         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20086
20087 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20088
20089         * config/srclist-update: Add copyright notice.
20090         (remove_id_lines, remove_trailing_blanks): New constants.
20091         (fixfile): Use them to normalize spacing a bit in copied files.
20092         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20093         Normalize leading white space and remove trailing white space.
20094
20095         * config/texinfo.tex: Sync with texinfo.
20096
20097         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20098         strtoul.c from libc, to merge coreutils whitespace changes.
20099
20100         * config/srclist.txt: Get the following m4 files from gettext:
20101         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20102         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20103         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20104         wint_t.m4.
20105
20106 2003-08-12  Karl Berry  <karl@gnu.org>
20107
20108         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20109         been made.
20110
20111 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20112
20113         * modules/gnu-source, m4/gnu-source.m4:
20114         Remove; we're assuming Autoconf 2.54 or later now.
20115         Suggested by Bruno Haible.
20116         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20117
20118 2003-08-11  Bruno Haible  <bruno@clisp.org>
20119
20120         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20121
20122 2003-08-11  Bruno Haible  <bruno@clisp.org>
20123
20124         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20125         (vasnprintf): Use it instead of wcslen.
20126
20127 2003-08-11  Bruno Haible  <bruno@clisp.org>
20128
20129         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20130         value to ensure that _Bool promotes to int. Use #define for _Bool when
20131         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20132
20133 2003-08-10  Karl Berry  <karl@gnu.org>
20134
20135         * lib/regex.h: update from libc (whitespace fix).
20136
20137 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20138
20139         Merge some files from coreutils.  These changes were
20140         originally made by Jim Meyering.
20141         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20142         many older Unixes require this.
20143         * lib/alloca.c (alloca): Remove cast to argument of free;
20144         no longer needed in C89.
20145         * lib/alloca_.h, regex.h: Fix white space to match
20146         what GNU indent does.
20147
20148 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20149
20150         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20151         apparently Emacs's Unicode mode got confused before my 2003-08-05
20152         checkin.
20153
20154 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20155
20156         * m4/extensions.m4: New file.
20157         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20158         Require gl_USE_SYSTEM_EXTENSIONS.
20159         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20160         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20161
20162 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20163
20164         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20165         * modules/extensions, modules/gnu-source: New files.
20166         * modules/timespec, modules/unlocked-io: Depend on extensions.
20167
20168 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20169
20170         * modules/restrict: New file.
20171         * MODULES.html.sh (func_all_modules): Add restrict.
20172         * modules/regex: Depend on restrict.
20173
20174 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20175
20176         * m4/restrict.m4: New file.
20177         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20178
20179 2003-08-07  Bruno Haible  <bruno@clisp.org>
20180
20181         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20182         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20183
20184 2003-08-07  Bruno Haible  <bruno@clisp.org>
20185
20186         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20187         makes the module 'getndelim2' compatible with the module 'getline'.
20188
20189 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20190
20191         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20192         byte with "\201" to avoid glitches when editing that source file
20193         with multi-gnome-terminal.
20194
20195 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20196
20197         * lib/bumpalloc.h: Remove.
20198
20199 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20200
20201         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20202         * modules/bumpalloc: Remove.
20203
20204 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20205
20206         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20207         GNU coding style.
20208
20209         Merge from coreutils.
20210         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20211         1. From glibc.
20212         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20213         from Karl Berry, implemented by Jim Meyering.
20214         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20215         from Dmitry V. Levin.
20216         Remove anachronistic cast of xrealloc.
20217         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20218         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20219         type. Otherwise, it wouldn't compile with at least /bin/cc on
20220         ymp-cray-unicos9.0.2.X.
20221         Combine two mostly-identical uses of alloca into one.
20222         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20223
20224 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20225
20226         [From Emacs.]
20227
20228         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20229         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20230         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20231         obsolete NLIST_NAME_UNION.
20232         [__GNU__]: Undef BSD and FSCALE.
20233         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20234
20235 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20236
20237         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20238         an enum type, so that it's guaranteed to promote to int.  See:
20239         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20240
20241 2003-08-03  Karl Berry  <karl@gnu.org>
20242
20243         * config/depcomp: update from automake.
20244
20245 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20246
20247         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20248         (strerror): Don't assume that a printable int fits in 14 bytes.
20249
20250 2003-07-31  Bruno Haible  <bruno@clisp.org>
20251
20252         * modules/getpass-gnu: New file.
20253         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20254
20255 2003-07-31  Bruno Haible  <bruno@clisp.org>
20256
20257         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20258
20259 2003-07-24  Karl Berry  <karl@gnu.org>
20260
20261         * config/missing: update from automake.
20262
20263 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20264             Bruno Haible  <bruno@clisp.org>
20265
20266         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20267         * lib/getline.c (getline, getdelim): Likewise.
20268         Remove _GNU_SOURCE define; now it's defined in config.h through
20269         m4/getline.m4.
20270
20271 2003-07-23  Karl Berry  <karl@gnu.org>
20272
20273         * config/config.sub: update from prep.
20274
20275 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20276
20277         * modules/xalloc (Depends-on): Add exitfail.
20278         * modules/xmemcoll: Likewise.
20279
20280 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20281
20282         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20283         over-parenthesization in macros.
20284
20285         Sync with coreutils.
20286
20287         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20288         required by C99.
20289
20290         Use `exit_failure' for xalloc and xmemcoll instead of their own
20291         private exit-failure variables.
20292         * lib/xalloc.h (xalloc_exit_failure): Remove.
20293         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20294         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20295         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20296         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20297         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20298
20299 2003-07-20  Jim Meyering  <jim@meyering.net>
20300
20301         * modules/closeout (Depends-on): Add exitfail.
20302         Suggestion from Bruno Haible.
20303
20304 2003-07-19  Karl Berry  <karl@gnu.org>
20305
20306         * config/config.sub: update from prep.
20307
20308 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20309
20310         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20311         Remove.
20312         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20313         to test that it can stand by itself.  Include "exitfail.h".
20314         Clients should set exit_failure instead.
20315         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20316
20317 2003-07-18  Bruno Haible  <bruno@clisp.org>
20318
20319         * modules/getndelim2: New file.
20320         * modules/getline: Share files with module getndelim2.
20321         * modules/getnline: Depend on getndelim2 instead of sharing files with
20322         it. Add getnline.c to lib_SOURCES.
20323         * MODULES.html.sh (func_all_modules): Add getndelim2.
20324
20325 2003-07-18  Bruno Haible  <bruno@clisp.org>
20326
20327         * m4/getndelim2.m4: New file.
20328         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20329         invoke gl_PREREQ_GETNDELIM2.
20330         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20331         gl_PREREQ_GETNDELIM2.
20332         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20333         gl_GETNDELIM2.
20334
20335 2003-07-18  Bruno Haible  <bruno@clisp.org>
20336
20337         * lib/getndelim2.h: New file.
20338         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20339         getndelim2.h.
20340         (getndelim2): Make non-static. Change return type to ssize_t.
20341         * lib/getline.h: Change argument names.
20342         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20343         * lib/getnline.c: Include getndelim2.h.
20344
20345 2003-07-18  Andreas Schwab  <schwab@suse.de>
20346
20347         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20348
20349 2003-07-17  Karl Berry  <karl@gnu.org>
20350
20351         * config/config.sub: update from prep.
20352
20353 2003-07-17  Bruno Haible  <bruno@clisp.org>
20354
20355         * modules/getnline: New file.
20356         * modules/getline: Add lib/getndelim2.c to source file list.
20357         * MODULES.html.sh (func_all_modules): Add getnline.
20358
20359 2003-07-17  Bruno Haible  <bruno@clisp.org>
20360
20361         * m4/getnline.m4: New file.
20362
20363 2003-07-17  Bruno Haible  <bruno@clisp.org>
20364
20365         * m4/Makefile.am.in: Remove file.
20366         * m4/Makefile.am: Remove file.
20367         * m4/Makefile.in: Remove file.
20368
20369 2003-07-17  Bruno Haible  <bruno@clisp.org>
20370
20371         * lib/getnline.h: New file.
20372         * lib/getnline.c: New file.
20373         * lib/getndelim2.c: New file, extracted from getline.c.
20374         (getndelim2): Renamed from getdelim2, with added nmax argument.
20375         * lib/getline.c: Include getndelim2.c.
20376         (getdelim2): Moved out to getndelim2.c.
20377         (getline, getdelim): Update.
20378
20379 2003-07-17  Bruno Haible  <bruno@clisp.org>
20380
20381         * lib/Makefile.am: Remove file.
20382         * lib/Makefile.in: Remove file.
20383
20384 2003-07-17  Bruno Haible  <bruno@clisp.org>
20385
20386         * configure.in: Remove file.
20387         * Makefile.in: Remove file.
20388
20389 2003-07-17  Bruno Haible  <bruno@clisp.org>
20390
20391         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20392
20393 2003-07-16  Karl Berry  <karl@gnu.org>
20394
20395         * config/srclist-update: was running fixlicense twice, which caused
20396                 texinfo.tex to be nullified for some reason.  Simplify,
20397                 $gplsrc is no longer needed as far as I can see?
20398
20399 2003-07-16  Jim Meyering  <jim@meyering.net>
20400
20401         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20402
20403 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20404
20405         * config/srclist.txt: Get the following files from gettext-runtime/intl
20406         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20407         ref-del.sin.  From Bruno Haible.
20408         * config/srclist-update (fixfile): Change grep pattern again, since the
20409         previous fix didn't work (there was another trailing $).  Use
20410         '[$]' to escape the $s.
20411
20412 2003-07-15  Karl Berry  <karl@gnu.org>
20413
20414         * lib/vasnprintf.c: update from gettext.
20415
20416 2003-07-15  Karl Berry  <karl@gnu.org>
20417
20418         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20419         gets expanded when surrounded by '$'.
20420
20421 2003-07-15  Jim Meyering  <jim@meyering.net>
20422
20423         * modules/save-cwd: Don't depend on error.  From Derek Price.
20424
20425 2003-07-15  Jim Meyering  <jim@meyering.net>
20426
20427         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20428
20429 2003-07-14  Simon Josefsson  <jas@extundo.com>
20430
20431         * modules/mempcpy: New file.
20432         * MODULES.html.sh (func_all_modules): Add mempcpy.
20433
20434 2003-07-14  Simon Josefsson  <jas@extundo.com>
20435
20436         * m4/mempcpy.m4: New file.
20437
20438 2003-07-14  Simon Josefsson  <jas@extundo.com>
20439
20440         * lib/mempcpy.h: New file.
20441         * lib/mempcpy.c: New file.
20442
20443 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20444
20445         * modules/getdate, modules/posixtm: Depend on mktime.
20446
20447 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20448
20449         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20450         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20451         unicodeio.c, unicodeio.h, unlocked-io.h:
20452         Switch from LGPL to GPL.
20453
20454 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20455
20456         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20457         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20458         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20459         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20460         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20461         updated automatically by ../config/srclist-update.  This changes
20462         their license from LPGL to GPL.
20463
20464 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20465
20466         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20467         assumed to refer to the root of the most recent stable gettext version.
20468         * config/srclistvars.sh: Add defaults for eggert.
20469         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20470         Match "This program" as well as "The program".  This is needed
20471         for gettext.
20472
20473 2003-07-14  Jim Meyering  <jim@meyering.net>
20474
20475         Don't emit diagnostics.  Let callers do that.
20476         * lib/save-cwd.c: Don't include "error.h".
20477         (save_cwd): Don't call error.  Ensure that errno is valid
20478         when returning nonzero.
20479
20480         * lib/save-cwd.h (restore_cwd): Update prototype.
20481         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20482         Simplify.  Don't call error upon failure.  Let callers do that.
20483         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20484         when auditing is enabled.  But don't bother updating the #if.
20485
20486 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20487
20488         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20489         it breaks C++ compilation.
20490         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20491
20492 2003-07-10  Simon Josefsson  <jas@extundo.com>
20493
20494         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20495
20496 2003-07-10  Jim Meyering  <jim@meyering.net>
20497
20498         * m4/clock_time.m4: Remove trailing blank.
20499         * m4/intmax_t.m4: Likewise.
20500
20501 2003-07-10  Jim Meyering  <jim@meyering.net>
20502
20503         * lib/vasnprintf.c: Remove trailing blanks.
20504         Make cpp indentation consistent.
20505
20506 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20507
20508         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20509         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20510         Switch from LGPL to GPL.
20511
20512 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20513
20514         * config/srclist.txt: Sort sublists.  Add
20515         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20516         that differ from gnulib for one reason or another; we'd like this list
20517         to be smaller but for now let's document what we have.
20518
20519 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20520
20521         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20522         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20523         and sweeter "eval x=$x".
20524         * config/srclist.txt: Get lib/argp* from glibc.
20525
20526 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20527
20528         * lib/mktime.c: Fix some boundary cases and remove need for floating
20529         point.
20530
20531         Issue a compile-time diagnostic if time_t is floating point, or if
20532         two's complement arithmetic is not in effect, or if arithmetic
20533         right shift does not propagate the sign.  These assumptions were
20534         all in the original code but they weren't checked.
20535
20536         (TIME_T_MIDPOINT, verify): New macros.
20537         (__isleap): Remove; it has integer overflow problems.
20538         (leapyear): New function, without those problems.
20539         (ydhms_tm_diff): Remove; splitting into two parts.
20540         (ydhms_diff): New function, containing the arithmetic part of
20541         the old ydhms_tm_diff function.  Issue a compile-time
20542         diagnostic if we are not using C99 integer division.
20543         Avoid casts when possible.
20544         (guess_time_tm): New function, containing the checking part of
20545         the old ydhms_tm_diff function.  Return the new value, rather than
20546         the difference between it and the old.  Accept a new argument T
20547         so that *T specifies the old value.  Check for overflow in the result.
20548
20549         (__mktime_internal): Use a time_t offset, not a long int offset.
20550         This undoes the 2003-06-04 change, which is no longer needed now
20551         that we have better overflow checking.
20552         (localtime_offset): Likewise.
20553
20554         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20555         and long are 64-bit but int is only 32-bit.
20556         (ydhms_diff): Use long int to store year1 and yday1.
20557         Issue a compile-time diagnostic if long int is not wide enough.
20558
20559         (__mktime_internal): Use long int to store adjusted year and yday.
20560         Use plain C rather than preprocessor commands, if that doesn't
20561         affect efficiency.
20562         Check for overflow (and try to repair) after each probe
20563         rather than checking only at the very end.  This avoids some bugs
20564         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20565         does not equal GMT offset at maximum time).
20566         Use integer to check for overflow rather than floating point; this
20567         is more portable to non-IEEE hosts, and is a tad faster.
20568         When we detect that we are oscillating between two values,
20569         don't check whether tm_isdst has the requested value, since
20570         we already know the answer.  When tm_isdst has the wrong value,
20571         use a different heuristic to find the right one, based on the
20572         extreme values actually observed in practice in tz2003a,
20573         rather than the (overly optimistic) "previous 3 calendar quarters".
20574
20575         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20576         "T const" to accommodate glibc style.
20577         (check_result): Use less-confusing report format.  "long" -> "long int.
20578         (main): Likewise.
20579         Don't loop if the iteration overflows time_t.
20580         Allow a negative step in the iteration.
20581
20582 2003-07-06  Karl Berry  <karl@gnu.org>
20583
20584         * config/depcomp: update from automake.
20585         * config/config.sub: update from prep.
20586
20587 2003-07-03  Karl Berry  <karl@gnu.org>
20588
20589         * config/config.guess: update from prep.
20590
20591 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20592
20593         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20594         xreadlink.c now includes it unconditionally.
20595
20596 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20597
20598         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20599         having it depend on HAVE_SYS_TYPES_H.
20600
20601 2003-07-01  Bruno Haible  <bruno@clisp.org>
20602
20603         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20604         <sys/types.h> should be sufficient.
20605         Reported by Paul Eggert.
20606
20607 2003-06-26  Karl Berry  <karl@gnu.org>
20608
20609         * config/depcomp: update from automake.
20610
20611 2003-06-26  Bruno Haible  <bruno@clisp.org>
20612
20613         * modules/human: Depend on module stdbool.
20614
20615 2003-06-25  Bruno Haible  <bruno@clisp.org>
20616
20617         * modules/readlink: New file.
20618         * modules/xreadlink: Depend on it.
20619         * MODULES.html.sh (func_all_modules): Add readlink.
20620
20621 2003-06-25  Bruno Haible  <bruno@clisp.org>
20622
20623         * m4/readlink.m4: New file.
20624
20625 2003-06-25  Bruno Haible  <bruno@clisp.org>
20626
20627         * lib/readlink.c: New file.
20628
20629 2003-06-22  Karl Berry  <karl@gnu.org>
20630
20631         * config/srclist.txt: update mkinstalldirs from automake.
20632         * config/mkinstalldirs: update.
20633
20634 2003-06-22  Bruno Haible  <bruno@clisp.org>
20635
20636         Portability to mingw32.
20637         * m4/ssize_t.m4: New file, from GNU gettext.
20638         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20639         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20640
20641 2003-06-22  Bruno Haible  <bruno@clisp.org>
20642
20643         * modules/safe-read: Add m4/ssize_t.m4.
20644         * modules/xreadlink: Add m4/ssize_t.m4.
20645
20646 2003-06-20  Bruno Haible  <bruno@clisp.org>
20647
20648         Assume C89, so PARAMS isn't needed.
20649         * lib/unicodeio.h (PARAMS): Remove.
20650         * lib/unicodeio.c: Don't use PARAMS.
20651
20652 2003-06-18  Karl Berry  <karl@gnu.org>
20653
20654         * config/config.{guess,sub}: update from prep.
20655
20656 2003-06-18  Jim Meyering  <jim@meyering.net>
20657
20658         Merge changes from coreutils.
20659         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20660         Remove explicit declarations of xmalloc and realloc.
20661         Include xalloc.h.
20662         (read_utmp): Remove anachronistic cast of xmalloc.
20663
20664 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20665
20666         Assume C89, so PARAMS isn't needed.
20667         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20668         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20669         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20670         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20671         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20672         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20673         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20674         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20675         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20676         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20677         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20678         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20679         no longer needed. Anyway, config.h should always be included before any
20680         other file.
20681
20682 2003-06-11  Simon Josefsson  <jas@extundo.com>
20683
20684         * modules/sysexits: New file.
20685         * MODULES.html.sh (func_all_modules): Add sysexits.
20686
20687 2003-06-11  Simon Josefsson  <jas@extundo.com>
20688
20689         * lib/sysexit_.h: New file.
20690
20691 2003-06-11  Derek Price  <derek@ximbiot.com>
20692
20693         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20694         necessary.
20695
20696 2003-06-11  Bruno Haible  <bruno@clisp.org>
20697
20698         * m4/sysexits.m4: New file.
20699
20700 2003-06-10  Simon Josefsson  <jas@extundo.com>
20701
20702         * lib/argp.h: New file, from glibc.
20703         * lib/argp-ba.c: New file, from glibc.
20704         * lib/argp-eexst.c: New file, from glibc.
20705         * lib/argp-fmtstream.c: New file, from glibc.
20706         * lib/argp-fmtstream.h: New file, from glibc.
20707         * lib/argp-fs-xinl.c: New file, from glibc.
20708         * lib/argp-help.c: New file, from glibc.
20709         * lib/argp-namefrob.h: New file, from glibc.
20710         * lib/argp-parse.c: New file, from glibc.
20711         * lib/argp-pv.c: New file, from glibc.
20712         * lib/argp-pvh.c: New file, from glibc.
20713         * lib/argp-xinl.c: New file, from glibc.
20714
20715 2003-06-10  Simon Josefsson  <jas@extundo.com>
20716
20717         * modules/strchrnul: New file.
20718
20719 2003-06-10  Simon Josefsson  <jas@extundo.com>
20720
20721         * modules/argp: New file.
20722
20723 2003-06-10  Simon Josefsson  <jas@extundo.com>
20724
20725         * m4/strchrnul.m4: New file.
20726
20727 2003-06-10  Simon Josefsson  <jas@extundo.com>
20728
20729         * lib/strchrnul.h: New file.
20730         * lib/strchrnul.c: New file.
20731
20732 2003-06-10  Bruno Haible  <bruno@clisp.org>
20733
20734         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20735
20736 2003-06-07  Karl Berry  <karl@gnu.org>
20737
20738         * config/config.{guess,sub}: update from prep.
20739
20740 2003-06-07  Jim Meyering  <jim@meyering.net>
20741
20742         * modules/strtod: Use $(...) notation, not @...@ for
20743         AC_REPLACE'd variables.
20744         * modules/localcharset: Likewise.
20745
20746 2003-06-07  Jim Meyering  <jim@meyering.net>
20747
20748         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20749         in place of my name in the copyright comment.
20750         Remove definition and uses of __P.
20751
20752         From coreutils.
20753         * lib/stat.c: Don't declare xmalloc explicitly.
20754         Instead, include "xalloc.h".
20755         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20756         xrealloc, and xcalloc return values.
20757         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20758         Improve comment.
20759         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20760
20761 2003-06-07  Bruno Haible  <bruno@clisp.org>
20762
20763         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20764         avoid AC_CONFIG_LINKS.
20765         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20766         fnmatch.h, to avoid AC_CONFIG_LINKS.
20767         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20768
20769 2003-06-07  Bruno Haible  <bruno@clisp.org>
20770
20771         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20772         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20773         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20774         directory.
20775         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20776         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20777         directory.
20778
20779 2003-06-06  Jim Meyering  <jim@meyering.net>
20780
20781         Merge from coreutils.
20782         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20783         Consolidate declarations and initializations of *_base* locals.
20784
20785         Merge from coreutils.
20786         This avoids a core dump on systems without GNU putenv,
20787         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20788         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20789         (unsetenv): New static function, from GNU libc.
20790         (rpl_putenv): Use it.
20791
20792         * lib/modechange.c: Remove trailing blanks.
20793
20794         Merge from coreutils.
20795         * lib/fsusage.c: Remove declaration of statfs.
20796         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20797
20798         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20799
20800 2003-06-06  Jim Meyering  <jim@meyering.net>
20801
20802         * lib/stdbool_.h: Renamed from stdbool.h.in.
20803
20804 2003-06-06  Jim Meyering  <jim@meyering.net>
20805             Bruno Haible  <bruno@clisp.org>
20806
20807         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20808         Adjust Makefile.am snippet not to redirect directly to target.
20809         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20810
20811 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20812
20813         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20814         mismatch, look in future quarters as well as past.  This fixes a
20815         bug when processing fall-backwards gaps immediately after a long
20816         period of daylight-saving time.
20817
20818         * lib/mktime.c: Assume freestanding C89 or better.
20819         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20820         (__P): Remove; not used.
20821         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20822         (mktime, not_equal_tm, print_tm, check_result,
20823         main): Use prototypes.  Use const * where appropriate.
20824         (main): Fix typo in testing code that uncovered by above changes.
20825         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20826
20827 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20828
20829         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20830         locale.h, localeconv.  This merges changes from coreutils.
20831
20832         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20833         It can be removed after the next Autoconf is released.
20834         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20835         needed.
20836
20837 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20838
20839         * lib/mktime.c: Fix Debian bug 177940
20840         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20841         (localtime_offset): Now long int, not time_t, because we want it
20842         to be guaranteed to be signed.  All uses changed.
20843         (__mktime_internal): If overflow would occur when adding offset,
20844         don't add it.
20845
20846         Merge 'human' changes from coreutils.  Rewrite to support
20847         locale-specific notations like thousands separators.
20848         * lib/human.c: Simplify authorship notice.
20849         Include human.h immediately after config.h.
20850         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20851         <limits.h>: Do not include, since human.h does.
20852         (SIZE_MAX, UINTMAX_MAX): New macros.
20853         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20854         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20855         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20856         (power_letter): Renamed from suffixes.
20857         (generate_suffix_backwards): Remove.
20858         (adjust_value): Now takes int style (because of human.h changes)
20859         and long double value (for greater precision on some platforms).
20860         (group_number): New function.
20861         (human_readable): Use it.  Use integer options, not enum.
20862         Put the options before the sizes in the arg list.
20863         Support all the new options.
20864         The old human_readable function has been removed;
20865         use inttostr.h instead.
20866         (human_readable, default_block_size, humblock):
20867         Use uintmax_t, not int, for block sizes.
20868         (human_readable_inexact, block_size_types): Remove.
20869         (block_size_opts): New constant.
20870         (human_options): Renamed from human_block_size, with new signature
20871         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20872         * lib/human.h: Add copyright and authorship notice.
20873         Include <limits.h> and <stdbool.h> unconditionally.
20874         (PARAMS): Remove.  All uses removed.
20875         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20876         (enum human_inexact_style): Remove tag; now a nameless enum.
20877         (human_floor, human_ceiling, human_round_to_even): Now have
20878         values 2, 0, 1 rather than -1, 1, 0.
20879         (human_group_digits, human_suppress_point_zero, human_autoscale,
20880         human_base_1024, human_SI, human_B): New constants.
20881         (human_readable_inexact, human_block_size): Remove.
20882         (human_readable): Size args are now uintmax_t, not int.
20883         (human_options): New decl.
20884
20885         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20886         unnecessary now that we assume C89 or better.  This change
20887         imported from coreutils.
20888
20889         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20890         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20891         in the 2003-05-30 sync from glibc.
20892
20893         .h files should stand alone, but we shouldn't include <sys/types.h>
20894         if we can get away with just <stddef.h>.
20895
20896         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20897         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20898         rather than <sys/types.h>, as we merely need size_t.
20899         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20900         to get size_t.
20901         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20902         Include <stdio.h>, to get FILE.
20903         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20904         memcasecmp.h has included <stddef.h> and all we need is size_t.
20905         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20906         our interface, instead of including <sys/types.h>
20907
20908 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20909
20910         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20911         now, as glibc mktime is buggy on non-glibc systems.
20912
20913 2003-06-03  Karl Berry  <karl@gnu.org>
20914
20915         * config/config.sub: update from prep.
20916
20917 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20918
20919         [from coreutils]
20920         Fix some minor time-related bugs with POSIX time arguments.
20921         Some valid time stamps were being rejected (notably -1, and
20922         time stamps before 1900 on 64-bit hosts).  And some invalid
20923         time stamps were being accepted, e.g. September 31.
20924
20925         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20926         that we can return (time_t) -1 successfully.
20927         * lib/posixtm.c: Likewise.
20928         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20929         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20930         (t): Remove static var.
20931         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20932         of static var.  All uses changed.
20933         (year): Do not reject years before 1900; they can occur with
20934         64-bit time_t.
20935         (posix_time_parse): Do not check for out-of-range components;
20936         that is now the caller's responsibility, since our checks were
20937         only approximations.
20938         (posixtime): Use mktime to check for out-of-range components,
20939         since it knows them exactly.
20940         If mktime returns (time_t) -1, check whether an error actually occurred
20941         by invoking localtime on -1.
20942         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20943         posixtime failures better.
20944         Improve the test data (in comments only).
20945
20946 2003-06-02  Karl Berry  <karl@gnu.org>
20947
20948         * config/mkinstalldirs (version): new variable.
20949         (--version): new option.
20950         (usage): improve message.
20951
20952 2003-05-30  Karl Berry  <karl@gnu.org>
20953
20954         * lib/mktime.c: update from libc.
20955
20956 2003-05-30  Bruno Haible  <bruno@clisp.org>
20957
20958         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20959         * config/config.rpath: Upgrade to gettext-0.12.1.
20960
20961 2003-05-30  Bruno Haible  <bruno@clisp.org>
20962
20963         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20964         * m4/nls.m4: New file, from gettext-0.12.1.
20965         * m4/po.m4: New file, from gettext-0.12.1.
20966         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20967
20968 2003-05-30  Bruno Haible  <bruno@clisp.org>
20969
20970         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20971         * lib/localcharset.h: Likewise.
20972         * lib/localcharset.c: Likewise.
20973
20974 2003-05-29  Karl Berry  <karl@gnu.org>
20975
20976         * config/config.rpath: update from gettext.
20977
20978 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20979
20980         Assume the headers required for C89 freestanding compilers.
20981         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20982         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20983         * m4/human.m4 (gl_HUMAN): Likewise.
20984         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20985         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20986         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20987         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20988         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20989         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20990
20991 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20992
20993         Assume the headers required for C89 freestanding compilers.
20994         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20995         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20996         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20997         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20998         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20999         define, since <limits.h> is guaranteed to do that.
21000         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21001         * lib/exclude.c: Include <stdbool.h> unconditionally.
21002         * lib/tempname.c: Include <stddef.h> unconditionally.
21003         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21004         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21005         <stddef.h> does that.
21006         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21007         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21008         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21009         needed.
21010         * lib/xstrtol.c: Likewise.
21011         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21012         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21013
21014         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21015         warnings on some platforms.
21016
21017         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21018         arbitrarily.
21019
21020 2003-05-26  Jim Meyering  <jim@meyering.net>
21021
21022         Merge in a change from coreutils:
21023         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21024         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21025         that condition, rather than `-1' which is slightly misleading.
21026         Change the name of the cache variable to have the gl_ prefix.
21027         Prompted by a patch from Richard Dawe for DJGPP.
21028
21029 2003-05-24  Karl Berry  <karl@gnu.org>
21030
21031         * config/config.guess: update from prep.
21032
21033 2003-05-22  Karl Berry  <karl@gnu.org>
21034
21035         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21036
21037 2003-05-20  Karl Berry  <karl@gnu.org>
21038
21039         * config/config.guess: update from prep.
21040
21041 2003-05-18  Karl Berry  <karl@gnu.org>
21042
21043         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21044         might actually be set by the user.
21045
21046         * config/depcomp, install-sh, mdate-sh: update from automake.
21047
21048 2003-05-17  Bruno Haible  <bruno@clisp.org>
21049
21050         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21051         invalid expansion for AC_EGREP_CPP.
21052         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21053         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21054         Suggested by Akim Demaille <akim@epita.fr> in
21055         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21056
21057 2003-05-12  Jim Meyering  <jim@meyering.net>
21058
21059         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21060         the space-padded-by-default conversion specifiers, %e, %k, %l.
21061
21062 2003-05-12  Bruno Haible  <bruno@clisp.org>
21063
21064         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21065         the string is longer than 4 KB.
21066
21067 2003-05-11  Karl Berry  <karl@gnu.org>
21068
21069         * config/config.{guess,sub}: update from prep.
21070
21071 2003-05-09  Bruno Haible  <bruno@clisp.org>
21072
21073         * modules/error: Add m4/strerror_r.m4 to file list.
21074
21075 2003-05-03  Bruno Haible  <bruno@clisp.org>
21076
21077         Upgrade to Unicode-4.0.
21078         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21079         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21080         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21081         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21082         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21083         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21084         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21085         Change width of U+E0100..U+E01EF from 1 to 0.
21086
21087 2003-04-25  Jim Meyering  <jim@meyering.net>
21088
21089         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21090         of type size_t, not int.
21091
21092 2003-04-25  Bruno Haible  <bruno@clisp.org>
21093
21094         * lib/copy-file.c: Include <stddef.h>, for size_t.
21095
21096 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21097
21098         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21099         code which expansion is under static control.  Patch imported from
21100         Akim Demaille's patch to Bison; see
21101         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21102
21103 2003-04-14  Bruno Haible  <bruno@clisp.org>
21104
21105         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21106
21107 2003-04-11  Jim Meyering  <jim@meyering.net>
21108
21109         Merge changes from Coreutils.
21110
21111         2003-03-22  Jim Meyering  <jim@meyering.net>
21112
21113         * lib/strftime.c (widen): Cast alloca return value to proper type.
21114
21115         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21116
21117         From GNU libc.
21118         * lib/strftime.c (my_strftime): Handle very large width
21119         specifications for numeric values correctly.  Improve checks for
21120         overflow.
21121
21122         2003-01-19  Jim Meyering  <jim@meyering.net>
21123
21124         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21125         definitions.
21126         (nl_get_alt_digit) [! defined my_strftime]: Define.
21127         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21128         _nl_get_alt_digit and _nl_get_walt_digit.
21129
21130         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21131         libc. These changes have no effect outside of _LIBC.
21132
21133 2003-04-10  Bruno Haible  <bruno@clisp.org>
21134
21135         * modules/findprog: New file.
21136         * MODULES.html.sh (func_all_modules): Add it.
21137
21138 2003-04-10  Bruno Haible  <bruno@clisp.org>
21139
21140         * m4/findprog.m4: New file.
21141         * m4/eaccess.m4: New file.
21142
21143 2003-04-10  Bruno Haible  <bruno@clisp.org>
21144
21145         * lib/findprog.h: New file, from GNU gettext.
21146         * lib/findprog.c: New file, from GNU gettext.
21147
21148 2003-04-05  Jim Meyering  <jim@meyering.net>
21149
21150         Merge changes from Coreutils.
21151
21152         * lib/exclude.h (PARAMS): Remove definition and uses.
21153         * lib/exclude.c: Remove uses of `PARAMS'.
21154
21155         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21156         Add test-cases for DOS filenames. Declare program_name.
21157         (main): Set up program_name.  Patch by Rich Dawe.
21158
21159         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21160         error from mntctl.
21161         Use mntctl's return value to drive the entry-processing loop, since
21162         we can't rely on the value of the vmt_length member in the last
21163         entry.  On some systems doing so could result in exhausting
21164         virtual memory.  Based in part on a patch from Mike Jetzer.
21165
21166 2003-04-04  Bruno Haible  <bruno@clisp.org>
21167
21168         * modules/linebreak: New file.
21169         * MODULES.html.sh (func_all_modules): Add it.
21170
21171 2003-04-04  Bruno Haible  <bruno@clisp.org>
21172
21173         * m4/linebreak.m4: New file.
21174
21175 2003-04-04  Bruno Haible  <bruno@clisp.org>
21176
21177         * lib/linebreak.h: New file, from GNU gettext.
21178         * lib/linebreak.c: New file, from GNU gettext with slight
21179         modifications.
21180         * lib/lbrkprop.h: New file, from GNU gettext.
21181
21182 2003-04-03  Bruno Haible  <bruno@clisp.org>
21183
21184         * modules/utf8-ucs4: New file.
21185         * modules/utf16-ucs4: New file.
21186         * modules/ucs4-utf8: New file.
21187         * modules/ucs4-utf16: New file.
21188         * MODULES.html.sh (func_all_modules): Add them.
21189
21190 2003-04-03  Bruno Haible  <bruno@clisp.org>
21191
21192         * m4/utf-ucs4.m4: New file.
21193         * m4/ucs4-utf.m4: New file.
21194
21195 2003-04-03  Bruno Haible  <bruno@clisp.org>
21196
21197         * lib/utf8-ucs4.h: New file, from GNU gettext.
21198         * lib/utf16-ucs4.h: New file, from GNU gettext.
21199         * lib/ucs4-utf8.h: New file, from GNU gettext.
21200         * lib/ucs4-utf16.h: New file, from GNU gettext.
21201
21202 2003-04-02  Bruno Haible  <bruno@clisp.org>
21203
21204         * modules/binary-io: New file.
21205         * MODULES.html.sh (func_all_modules): Add it.
21206
21207 2003-04-02  Bruno Haible  <bruno@clisp.org>
21208
21209         * lib/binary-io.h: New file, from GNU gettext.
21210
21211 2003-04-01  Bruno Haible  <bruno@clisp.org>
21212
21213         * modules/pathname: New file.
21214         * MODULES.html.sh (func_all_modules): Add it.
21215
21216 2003-04-01  Bruno Haible  <bruno@clisp.org>
21217
21218         * lib/pathname.h: New file, from GNU gettext.
21219         * lib/concatpath.c: New file, from GNU gettext.
21220
21221 2003-03-30  Bruno Haible  <bruno@clisp.org>
21222
21223         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21224
21225 2003-03-30  Bruno Haible  <bruno@clisp.org>
21226
21227         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21228         function chown() doesn't exist.
21229
21230 2003-03-28  Bruno Haible  <bruno@clisp.org>
21231
21232         * modules/copy-file: New file.
21233         * MODULES.html.sh (func_all_modules): Add it.
21234
21235 2003-03-28  Bruno Haible  <bruno@clisp.org>
21236
21237         * m4/copy-file.m4: New file.
21238
21239 2003-03-28  Bruno Haible  <bruno@clisp.org>
21240
21241         * lib/copy-file.h: New file, from GNU gettext.
21242         * lib/copy-file.c: New file, from GNU gettext.
21243
21244 2003-03-18  Jim Meyering  <jim@meyering.net>
21245
21246         * lib/quote.c (quote_n): Fix typo in comment.
21247
21248 2003-03-18  Bruno Haible  <bruno@clisp.org>
21249
21250         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21251         checking.
21252         * m4/onceonly_2_57.m4: Likewise.
21253
21254 2003-03-17  Bruno Haible  <bruno@clisp.org>
21255
21256         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21257         (m4_quote): Remove macro.
21258         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21259
21260 2003-03-14  Jim Meyering  <jim@meyering.net>
21261
21262         Merge changes from Coreutils.
21263         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21264         to be const, in order to avoid warnings.
21265         (obstack_room): Likewise.
21266         (obstack_empty_p): Likewise.
21267
21268 2003-03-14  Bruno Haible  <bruno@clisp.org>
21269
21270         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21271         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21272
21273 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21274
21275         Merge changes from Bison.
21276         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21277         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21278         when compiling Bison 1.875's `bitset bset = obstack_alloc
21279         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21280         * lib/hash.c: Include <stdbool.h> unconditionally.
21281
21282 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21283
21284         * m4/onceonly.m4 (m4_quote): New macro.
21285         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21286         Quote AC_FOREACH variable-expansions properly.
21287
21288 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21289
21290         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21291
21292 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21293
21294         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21295         Reported by Bruce Becker; see:
21296         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21297
21298 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21299             Bruno Haible  <bruno@clisp.org>
21300
21301         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21302         Reported by John Hughes, see
21303         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21304
21305 2003-02-20  Bruno Haible  <bruno@clisp.org>
21306
21307         * MODULES.html.sh (func_all_modules): Add poll.
21308
21309 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21310
21311         * modules/poll: New file.
21312
21313 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21314
21315         * lib/poll_.h: New file.
21316         * lib/poll.c: New file.
21317
21318 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21319
21320         * m4/poll.m4: New file.
21321
21322 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21323
21324         * modules/mathl: New file.
21325
21326 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21327
21328         * lib/mathl.h: New file.
21329         * lib/acosl.c: New file.
21330         * lib/asinl.c: New file.
21331         * lib/atanl.c: New file.
21332         * lib/ceill.c: New file.
21333         * lib/cosl.c: New file.
21334         * lib/expl.c: New file.
21335         * lib/floorl.c: New file.
21336         * lib/frexpl.c: New file.
21337         * lib/ldexpl.c: New file.
21338         * lib/logl.c: New file.
21339         * lib/sincosl.c: New file.
21340         * lib/sinl.c: New file.
21341         * lib/sqrtl.c: New file.
21342         * lib/tanl.c: New file.
21343         * lib/trigl.c: New file.
21344         * lib/trigl.h: New file.
21345
21346 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21347
21348         * m4/mathl.m4: New file.
21349
21350 2003-02-18  Bruno Haible  <bruno@clisp.org>
21351
21352         * MODULES.html.sh (func_all_modules): Add mathl.
21353
21354 2003-02-17  Bruno Haible  <bruno@clisp.org>
21355
21356         * modules/mkdtemp: New module.
21357         * MODULES.html.sh (func_all_modules): Add it.
21358
21359 2003-02-17  Bruno Haible  <bruno@clisp.org>
21360
21361         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21362
21363 2003-02-17  Bruno Haible  <bruno@clisp.org>
21364
21365         * lib/mkdtemp.h: New file, from GNU gettext.
21366         * lib/mkdtemp.c: New file, from GNU gettext.
21367
21368 2003-02-02  Jim Meyering  <jim@meyering.net>
21369
21370         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21371         e.g. glibc-2.2.93.
21372
21373 2003-01-31  Bruno Haible  <bruno@clisp.org>
21374
21375         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21376         'rpl_rename'.
21377         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21378         'rpl_strnlen'.
21379         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21380         'rpl_strtod'.
21381         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21382         'rpl_utime'.
21383
21384 2003-01-31  Bruno Haible  <bruno@clisp.org>
21385
21386         * lib/rename.c: #undef rename before defining rpl_rename.
21387         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21388
21389 2003-01-30  Bruno Haible  <bruno@clisp.org>
21390
21391         * modules/vasnprintf, modules/vasprintf: New modules.
21392         * MODULES.html.sh (func_all_modules): Add them.
21393
21394 2003-01-30  Bruno Haible  <bruno@clisp.org>
21395
21396         * m4/signed.m4: New file, from GNU gettext.
21397         * m4/longdouble.m4: New file, from GNU gettext.
21398         * m4/wchar_t.m4: New file, from GNU gettext.
21399         * m4/wint_t.m4: New file, from GNU gettext.
21400         * m4/vasnprintf.m4: New file.
21401         * m4/vasprintf.m4: New file.
21402
21403 2003-01-30  Bruno Haible  <bruno@clisp.org>
21404
21405         * lib/printf-args.h: New file, from GNU gettext.
21406         * lib/printf-args.c: New file, from GNU gettext.
21407         * lib/printf-parse.h: New file, from GNU gettext.
21408         * lib/printf-parse.c: New file, from GNU gettext.
21409         * lib/vasnprintf.h: New file, from GNU gettext.
21410         * lib/vasnprintf.c: New file, from GNU gettext.
21411         * lib/asnprintf.c: New file, from GNU gettext.
21412         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21413         * lib/vasprintf.c: New file, from GNU gettext.
21414         * lib/asprintf.c: New file, from GNU gettext.
21415
21416 2003-01-29  Bruno Haible  <bruno@clisp.org>
21417
21418         * modules/stpncpy: New module.
21419         * MODULES.html.sh (func_all_modules): Add it.
21420
21421 2003-01-29  Bruno Haible  <bruno@clisp.org>
21422
21423         * m4/stpncpy.m4: New file.
21424
21425 2003-01-29  Bruno Haible  <bruno@clisp.org>
21426
21427         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21428         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21429
21430 2003-01-28  Bruno Haible  <bruno@clisp.org>
21431
21432         * modules/c-ctype: New module.
21433         * MODULES.html.sh (func_all_modules): Add it.
21434
21435 2003-01-28  Bruno Haible  <bruno@clisp.org>
21436
21437         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21438         Paul Eggert.
21439         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21440         Paul Eggert.
21441
21442 2003-01-27  Bruno Haible  <bruno@clisp.org>
21443
21444         * modules/xsetenv: New module.
21445         * MODULES.html.sh (func_all_modules): Add it.
21446
21447 2003-01-27  Bruno Haible  <bruno@clisp.org>
21448
21449         * lib/xsetenv.h: New file, from GNU gettext.
21450         * lib/xsetenv.c: New file, from GNU gettext.
21451
21452 2003-01-23  Jim Meyering  <jim@meyering.net>
21453
21454         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21455         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21456
21457 2003-01-23  Bruno Haible  <bruno@clisp.org>
21458
21459         * modules/minmax: New module.
21460         * MODULES.html.sh (func_all_modules): Add it.
21461
21462 2003-01-23  Bruno Haible  <bruno@clisp.org>
21463
21464         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21465         Eggert.
21466
21467 2003-01-22  Bruno Haible  <bruno@clisp.org>
21468
21469         * modules/exit: New module.
21470         * MODULES.html.sh (func_all_modules): Add it.
21471
21472 2003-01-22  Bruno Haible  <bruno@clisp.org>
21473
21474         * lib/exit.h: New file, from GNU gettext.
21475
21476 2003-01-19  Bruno Haible  <bruno@clisp.org>
21477
21478         * gnulib-tool: Recognize option --extract-maintainer.
21479         (func_get_maintainer): New function.
21480         * modules/*: Add Maintainer entry.
21481
21482 2003-01-16  Jim Meyering  <jim@meyering.net>
21483
21484         * m4/regex.m4: The `regex' struct is both input and output.
21485         Initialize it before each use.  Patch by Tim Waugh.
21486
21487 2003-01-16  Bruno Haible  <bruno@clisp.org>
21488
21489         * MODULES.html.sh: Add a table of contents. Add the module name as
21490         leftmost column. Add hyperlinks.
21491
21492 2003-01-15  Bruno Haible  <bruno@clisp.org>
21493
21494         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21495
21496 2003-01-15  Bruno Haible  <bruno@clisp.org>
21497
21498         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21499         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21500         suffix.
21501
21502 2003-01-15  Bruno Haible  <bruno@clisp.org>
21503
21504         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21505
21506 2003-01-15  Bruno Haible  <bruno@clisp.org>
21507
21508         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21509         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21510
21511 2003-01-14  Jim Meyering  <jim@meyering.net>
21512
21513         * lib/same.c (same_name): Tweak a comment.
21514
21515 2003-01-14  Bruno Haible  <bruno@clisp.org>
21516
21517         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21518         when a string comparison is sufficient.
21519
21520 2003-01-14  Bruno Haible  <bruno@clisp.org>
21521
21522         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21523         'unsigned int'.
21524
21525 2003-01-14  Bruno Haible  <bruno@clisp.org>
21526
21527         * lib/hash-pjw.c: Add comment about low quality of this function.
21528
21529 2003-01-13  Bruno Haible  <bruno@clisp.org>
21530
21531         * modules/stpcpy: Distribute lib/stpcpy.h.
21532         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21533
21534 2003-01-13  Bruno Haible  <bruno@clisp.org>
21535
21536         * modules/*: Add a description.
21537         * modules/strpbrk: Fix Makefile.am snippet.
21538         * modules/strtoimax: Fix dependencies.
21539         * modules/strtoumax: Likewise.
21540
21541 2003-01-13  Bruno Haible  <bruno@clisp.org>
21542
21543         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21544         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21545         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21546
21547 2003-01-13  Bruno Haible  <bruno@clisp.org>
21548
21549         * gnulib-tool (func_create_testdir): Store config/* files in the main
21550         directory.
21551         * config.rpath: Move to ...
21552         * config/config.rpath: ... here.
21553         * modules/gettext: Contains config/config.rpath, not config.rpath.
21554         * modules/iconv: Likewise.
21555
21556 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21557
21558         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21559         to avoid collisions with libcurses and libreadline.
21560
21561         * m4/getstr.m4: Remove.
21562         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21563
21564 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21565
21566         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21567         to avoid collisions with libcurses and libreadline.
21568
21569         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21570         * lib/getstr.h, getstr.c: Remove.
21571         * lib/getline.c: Include "getline.h", to check interface.
21572         Move body of old getstr.c here: this defines MIN_CHUNK and
21573         declares getdelim2, which is renamed from getstr.
21574         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21575
21576         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21577         All uses changed.
21578         * lib/linebuffer.h: Likewise.
21579         (readline): Remove backward-compatibility macro.
21580
21581 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21582
21583         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21584         to avoid collisions with libcurses and libreadline.
21585         * getstr: Remove.
21586         * MODULES.html.sh: Remove getstr.
21587         * modules/getline: Depend on unlocked-io, not getstr.
21588
21589 2003-01-12  Jim Meyering  <jim@meyering.net>
21590
21591         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21592
21593 2003-01-10  Bruno Haible  <bruno@clisp.org>
21594
21595         * modules/alloca: Change Makefile.am requirements. Simplify Include
21596         requirements. Add lib/alloca_.h to file list.
21597
21598 2003-01-10  Bruno Haible  <bruno@clisp.org>
21599
21600         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21601
21602 2003-01-10  Bruno Haible  <bruno@clisp.org>
21603
21604         * lib/alloca_.h: New file.
21605         * lib/getdate.y: Unconditionally include alloca.h.
21606         * lib/makepath.c: Likewise.
21607         * lib/setenv.c: Likewise.
21608         * lib/userspec.c: Likewise.
21609
21610 2003-01-09  Karl Berry  <karl@gnu.org>
21611
21612         * MODULES.html.sh: include `dirname $0` in PATH, to find
21613         gnulib-tool.
21614
21615 2003-01-09  Bruno Haible  <bruno@clisp.org>
21616
21617         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21618         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21619
21620 2003-01-09  Bruno Haible  <bruno@clisp.org>
21621
21622         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21623
21624 2003-01-09  Bruno Haible  <bruno@clisp.org>
21625
21626         * lib/stdbool.h.in: New file.
21627
21628 2003-01-09  Bruno Haible  <bruno@clisp.org>
21629
21630         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21631         * MODULES.html.sh: Likewise.
21632
21633 2003-01-08  Jim Meyering  <jim@meyering.net>
21634
21635         * lib/full-write.c: Undefine and define-away `const' after inclusion
21636         of errno.h, not before.  Suggestion from Bruno Haible.
21637
21638 2003-01-08  Bruno Haible  <bruno@clisp.org>
21639
21640         * modules/full-read: Depend on full-write.
21641
21642 2003-01-08  Bruno Haible  <bruno@clisp.org>
21643
21644         * lib/safe-read.c: Include specification header first, to ensure its
21645         selfcontainedness.
21646         * lib/full-write.c: Likewise.
21647
21648 2003-01-07  Jim Meyering  <jim@meyering.net>
21649
21650         * lib/full-write.c: Rework so that it may serve to define full_read,
21651         too.
21652         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21653
21654 2003-01-07  Bruno Haible  <bruno@clisp.org>
21655
21656         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21657         <inttypes.h>.
21658         * lib/xstrtol.h: Likewise.
21659         * lib/xstrtoimax.c: Likewise.
21660         * lib/xstrtoumax.c: Likewise.
21661         * lib/human.h: Likewise.
21662
21663         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21664         on systems that have <inttypes.h> but not <stdint.h>.
21665
21666 2003-01-07  Bruno Haible  <bruno@clisp.org>
21667
21668         * MODULES.html.sh: Add copyright notice.
21669         (missed_files): Omit CVS directory entries.
21670         (func_module): Make it work with sed-3.02.
21671         * MODULES.txt: Remove file.
21672
21673 2003-01-06  Jim Meyering  <jim@meyering.net>
21674
21675         * lib/version-etc.c: Update year in translatable copyright string.
21676
21677 2003-01-03  Karl Berry  <karl@gnu.org>
21678
21679         * config/config.{guess,sub}: update from prep.
21680
21681 2003-01-02  Karl Berry  <karl@gnu.org>
21682
21683         * doc/COPYING.DOC: belatedly updated to 1.2.
21684
21685 2003-01-01  Karl Berry  <karl@gnu.org>
21686
21687         * gnulib-tool (func_verify_module): report module name $module in
21688         error message, not $1.
21689         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21690         be created, only if it doesn't exist.
21691         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21692
21693 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21694
21695         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21696
21697 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21698
21699         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21700         memcmp if strcoll doesn't work.
21701
21702 2002-12-31  Bruno Haible  <bruno@clisp.org>
21703
21704         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21705         nonempty.
21706
21707 2002-12-31  Bruno Haible  <bruno@clisp.org>
21708
21709         * lib/memcoll.c (STRCOLL): New macro.
21710         (memcoll): Use it.
21711
21712 2002-12-31  Bruno Haible  <bruno@clisp.org>
21713
21714         * lib/localcharset.h: New file.
21715         * lib/localcharset.c: Include it.
21716         * lib/unicodeio.c: Likewise.
21717
21718 2002-12-31  Bruno Haible  <bruno@clisp.org>
21719
21720         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21721         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21722
21723 2002-12-31  Bruno Haible  <bruno@clisp.org>
21724
21725         * lib/getline.h: Include <stddef.h>, for size_t.
21726
21727         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21728         * lib/unicodeio.c: Don't include <stddef.h>.
21729
21730 2002-12-31  Bruno Haible  <bruno@clisp.org>
21731
21732         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21733         HAVE_TM_ZONE.
21734
21735 2002-12-24  Karl Berry  <karl@gnu.org>
21736
21737         * config/config.guess: update from prep.
21738
21739 2002-12-24  Bruno Haible  <bruno@clisp.org>
21740
21741         General infrasructure.
21742         * m4/README: Rewritten.
21743         * m4/onceonly.m4: New file.
21744         * m4/onceonly_2_57.m4: New file.
21745
21746         Module atexit.
21747         * m4/atexit.m4: New file.
21748
21749         Module strtod.
21750         * m4/strtod.m4: New file.
21751
21752         Module strtol.
21753         * m4/strtol.m4: New file.
21754
21755         Module strtoul.
21756         * m4/strtoul.m4: New file.
21757
21758         Module memchr.
21759         * m4/memchr.m4: New file.
21760
21761         Module memcmp.
21762         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21763         (jm_FUNC_MEMCMP): Invoke it.
21764
21765         Module memcpy.
21766         * m4/memcpy.m4: New file.
21767
21768         Module memmove.
21769         * m4/memmove.m4: New file.
21770
21771         Module memset.
21772         * m4/memset.m4: New file.
21773
21774         Module strcspn.
21775         * m4/strcspn.m4: New file.
21776
21777         Module strpbrk.
21778         * m4/strpbrk.m4: New file.
21779
21780         Module strstr.
21781         * m4/strstr.m4: New file.
21782
21783         Module strerror.
21784         * m4/strerror.m4: New file.
21785
21786         Module mktime.
21787         * m4/mktime.m4: Renamed from jm-mktime.m4.
21788         (gl_PREREQ_MKTIME): New macro.
21789         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21790
21791         Module malloc.
21792         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21793         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21794         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21795
21796         Module realloc.
21797         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21798         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21799         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21800
21801         Module strftime.
21802         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21803         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21804         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21805         gl_TM_GMTOFF.
21806         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21807
21808         Module xalloc.
21809         * m4/xalloc.m4: New file.
21810
21811         Module alloca.
21812         * m4/alloca.m4: New file.
21813
21814         Module putenv.
21815         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21816         (jm_FUNC_PUTENV): Invoke it.
21817
21818         Module setenv.
21819         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21820         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21821         when invoked twice.
21822         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21823         gt_FUNC_SETENV.
21824
21825         Module memrchr.
21826         * m4/memrchr.m4: New file.
21827
21828         Module stpcpy.
21829         * m4/stpcpy.m4: New file.
21830
21831         Module strcase.
21832         * m4/strcase.m4: New file.
21833
21834         Module strdup.
21835         * m4/strdup.m4: New file.
21836
21837         Module strnlen.
21838         * m4/strnlen.m4: New file.
21839
21840         Module strndup.
21841         * m4/strndup.m4: New file.
21842
21843         Module xstrtod.
21844         * m4/xstrtod.m4: New file.
21845
21846         Module xstrtol.
21847         * m4/xstrtol.m4: New file.
21848
21849         Module getdate.
21850         * m4/getdate.m4: New file.
21851
21852         Module unlocked-io.
21853         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21854         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21855         * m4/jm-glibc-io.m4n: Remove file.
21856
21857         Module long-options.
21858         * m4/long-options.m4: New file.
21859
21860         Module md5.
21861         * m4/md5.m4: New file.
21862
21863         Module sha.
21864         * m4/sha.m4: New file.
21865
21866         Module getstr.
21867         * m4/getstr.m4: New file.
21868
21869         Module getline.
21870         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21871         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21872         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21873         simply getline. Infoke gl_PREREQ_GETLINE.
21874
21875         Module obstack.
21876         * m4/obstack.m4: New file.
21877
21878         Module hash.
21879         * m4/hash.m4: New file.
21880
21881         Module readtokens.
21882         * m4/readtokens.m4: New file.
21883
21884         Module strverscmp.
21885         * m4/strverscmp.m4: New file.
21886
21887         Module stdbool.
21888         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21889         OSF/1.
21890
21891         Module strtoll.
21892         * m4/strtoll.m4: New file.
21893
21894         Module strtoull.
21895         * m4/strtoull.m4: New file.
21896
21897         Module strtoimax.
21898         * m4/strtoimax.m4: New file.
21899
21900         Module strtoumax.
21901         * m4/strtoumax.m4: New file.
21902
21903         Module xstrtoimax.
21904         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21905         jm_AC_PREREQ_XSTRTOIMAX.
21906         Moved the strtol prerequisites to strtol.m4.
21907         Moved the strtoll prerequisites to strtoll.m4.
21908         Moved the strtoimax prerequisites to strtoimax.m4.
21909
21910         Module xstrtoumax.
21911         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21912         jm_AC_PREREQ_XSTRTOUMAX.
21913         Moved the strtoul prerequisites to strtoul.m4.
21914         Moved the strtoull prerequisites to strtoull.m4.
21915         Moved the strtoumax prerequisites to strtoumax.m4.
21916
21917         Module chown.
21918         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21919         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21920
21921         Module dup2.
21922         * m4/dup2.m4: New file.
21923
21924         Module ftruncate.
21925         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21926         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21927
21928         Module getgroups.
21929         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21930         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21931
21932         Module gettimeofday.
21933         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21934         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21935         gl_PREREQ_GETTIMEOFDAY.
21936
21937         Module mkdir.
21938         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21939         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21940
21941         Module mkstemp.
21942         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21943         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21944         jm_AC_TYPE_UINTMAX_T.
21945         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21946
21947         Module stat.
21948         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21949         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21950
21951         Module lstat.
21952         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21953         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21954
21955         Module timespec.
21956         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21957         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21958         * m4/st_mtim.m4: Indentation.
21959
21960         Module nanosleep.
21961         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21962         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21963         gl_PREREQ_NANOSLEEP.
21964
21965         Module regex.
21966         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21967         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21968         (gl_REGEX): New macro.
21969
21970         Module rename.
21971         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21972         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21973
21974         Module rmdir.
21975         * m4/rmdir.m4: New file.
21976
21977         Module utime.
21978         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21979         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21980         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21981
21982         Module dirname.
21983         * m4/dirname.m4: New file.
21984
21985         Module getopt.
21986         * m4/getopt.m4: New file.
21987
21988         Module unistd-safer.
21989         * m4/unistd-safer.m4: New file.
21990
21991         Module fnmatch.
21992         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21993         declaration.
21994         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21995         (gl_FUNC_FNMATCH_POSIX): New macro.
21996         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21997         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21998         simply fnmatch.
21999
22000         Module exclude.
22001         * m4/exclude.m4: New file.
22002
22003         Module human.
22004         * m4/human.m4: New file.
22005
22006         Module acl.
22007         * m4/acl.m4: Nop.
22008
22009         Module backupfile.
22010         * m4/backupfile.m4: New file.
22011         * m4/d-ino.m4: Indentation.
22012
22013         Module fsusage.
22014         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22015         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22016         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22017
22018         Module dirfd.
22019         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22020         requirements.
22021
22022         Module euidaccess.
22023         * m4/euidaccess.m4: New file.
22024
22025         Module file-type.
22026         * m4/file-type.m4: New file.
22027
22028         Module fileblocks.
22029         * m4/fileblocks.m4: New file.
22030
22031         Module filemode.
22032         * m4/filemode.m4: New file.
22033
22034         Module isdir.
22035         * m4/isdir.m4: New file.
22036
22037         Module lchown.
22038         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22039         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22040
22041         Module makepath.
22042         * m4/makepath.m4: New file.
22043
22044         Module modechange.
22045         * m4/modechange.m4: New file.
22046
22047         Module mountlist.
22048         * m4/mountlist.m4: New file.
22049         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22050         Indentation.
22051
22052         Module path-concat.
22053         * m4/path-concat.m4: New file.
22054
22055         Module pathmax.
22056         * m4/pathmax.m4: New file.
22057
22058         Module same.
22059         * m4/same.m4: New file.
22060
22061         Module save-cwd.
22062         * m4/save-cwd.m4: New file.
22063
22064         Module savedir.
22065         * m4/savedir.m4: New file.
22066
22067         Module xgetcwd.
22068         * m4/xgetcwd.m4: New file.
22069         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22070
22071         Module xreadlink.
22072         * m4/xreadlink.m4: New file.
22073
22074         Module safe-read.
22075         * m4/safe-read.m4: New file.
22076
22077         Module safe-write.
22078         * m4/safe-write.m4: New file.
22079
22080         Module closeout.
22081         * m4/closeout.m4: New file.
22082
22083         Module stdio-safer.
22084         * m4/stdio-safer.m4: New file.
22085
22086         Module getpass.
22087         * m4/getpass.m4: New file.
22088
22089         Module getugroups.
22090         * m4/getugroups.m4: New file.
22091
22092         Module group-member.
22093         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22094         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22095
22096         Module idcache.
22097         * m4/idcache.m4: New file.
22098
22099         Module userspec.
22100         * m4/userspec.m4: New file.
22101
22102         Module gettime.
22103         * m4/clock_time.m4: New file.
22104         * m4/gettime.m4: New file.
22105
22106         Module settime.
22107         * m4/settime.m4: New file.
22108
22109         Module posixtm.
22110         * m4/posixtm.m4: New file.
22111
22112         Module gethostname.
22113         * m4/gethostname.m4: New file.
22114
22115         Module canon-host.
22116         * m4/canon-host.m4: New file.
22117
22118         Module gettext.
22119         * m4/codeset.m4: New file, from gettext-0.11.5.
22120         * m4/gettext.m4: New file, from gettext-0.11.5.
22121         * m4/glibc21.m4: New file, from gettext-0.11.5.
22122         * m4/iconv.m4: New file, from gettext-0.11.5.
22123         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22124         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22125         * m4/inttypes.m4: New file, from gettext-0.11.5.
22126         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22127         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22128         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22129         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22130         * m4/lib-link.m4: New file, from gettext-0.11.5.
22131         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22132         * m4/progtest.m4: New file, from gettext-0.11.5.
22133         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22134         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22135         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22136
22137         Module localcharset.
22138         * m4/localcharset.m4: New file.
22139
22140         Module hard-locale.
22141         * m4/hard-locale.m4: New file.
22142
22143         Module mbswidth.
22144         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22145         onceonly macros.
22146         * m4/mbrtowc.m4: Add comment.
22147
22148         Module memcasecmp.
22149         * m4/memcasecmp.m4: New file.
22150
22151         Module memcoll.
22152         * m4/memcoll.m4: New file.
22153
22154         Module unicodeio.
22155         * m4/unicodeio.m4: New file.
22156
22157         Module rpmatch.
22158         * m4/rpmatch.m4: New file.
22159
22160         Module yesno.
22161         * m4/yesno.m4: New file.
22162
22163         Module exitfail.
22164         * m4/exitfail.m4: New file.
22165
22166         Module c-stack.
22167         * m4/c-stack.m4 (gl_C_STACK): New macro.
22168         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22169
22170         Module error.
22171         * m4/error.m4 (gl_ERROR): New macro.
22172         (jm_PREREQ_ERROR): Use onceonly macros.
22173
22174         Module fatal.
22175         * m4/fatal.m4: New file.
22176
22177         Module getloadavg.
22178         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22179         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22180
22181         Module getpagesize.
22182         * m4/getpagesize.m4: New file.
22183
22184         Module getusershell.
22185         * m4/getusershell.m4: New file.
22186
22187         Module physmem.
22188         * m4/physmem.m4: New file.
22189
22190         Module posixver.
22191         * m4/posixver.m4: New file.
22192
22193         Module quotearg.
22194         * m4/quotearg.m4: New file.
22195
22196         Module quote.
22197         * m4/quote.m4: New file.
22198
22199         Module readutmp.
22200         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22201
22202         Module sig2str.
22203         * m4/sig2str.m4: New file.
22204
22205         Other.
22206         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22207         ulonglong.m4.
22208         * m4/intmax_t.m4: New file.
22209         * m4/d-type.m4: Indentation.
22210         * m4/jm-macros.m4: Update.
22211         * m4/prereq.m4 (jm_PREREQ): Update.
22212         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22213         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22214         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22215         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22216         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22217         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22218         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22219         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22220         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22221         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22222         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22223         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22224         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22225         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22226         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22227         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22228         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22229         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22230         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22231
22232 2002-12-24  Bruno Haible  <bruno@clisp.org>
22233
22234         * MODULES.txt: Update according to m4/ changes.
22235
22236         Module gettext.
22237         * config.rpath: New file, from gettext-0.11.5.
22238
22239         * modules/*: New module descriptions.
22240         * gnulib-tool: New file.
22241         * MODULES.html.sh: New file.
22242
22243 2002-12-21  Karl Berry  <karl@gnu.org>
22244
22245         * doc/fdl.texi: update to version 1.2.
22246
22247 2002-12-19  Karl Berry  <karl@gnu.org>
22248
22249         * config/config.guess: update from prep.
22250
22251 2002-12-18  Bruno Haible  <bruno@clisp.org>
22252
22253         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22254         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22255
22256 2002-12-17  Bruno Haible  <bruno@clisp.org>
22257
22258         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22259         stdlib.h, string.h.
22260
22261 2002-12-17  Bruno Haible  <bruno@clisp.org>
22262
22263         * lib/canon-host.c (strdup): Remove unused declaration.
22264
22265         * lib/fsusage.c: Include full_read.h.
22266         (get_fs_usage): Use full_read instead of safe_read.
22267
22268         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22269
22270 2002-12-12  Karl Berry  <karl@gnu.org>
22271
22272         * config/config.guess: update from prep.
22273
22274 2002-12-11  Bruno Haible  <bruno@clisp.org>
22275
22276         * m4/setenv.m4: New file, from gettext-0.11.5.
22277
22278 2002-12-11  Bruno Haible  <bruno@clisp.org>
22279
22280         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22281         not unsetenv().
22282         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22283         modifications:
22284
22285         2002-12-11  Bruno Haible  <bruno@clisp.org>
22286
22287                 * setenv.c (alloca): Fall back to malloc.
22288                 (freea): New macro.
22289                 (setenv): Use freea() to free memory allocated with alloca().
22290
22291         2002-11-13  Bruno Haible  <bruno@clisp.org>
22292
22293                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22294                 function declarations.
22295                 * unsetenv.c (unsetenv): Likewise.
22296
22297         2002-03-04  Bruno Haible  <bruno@clisp.org>
22298
22299                 Portability to AIX 4.3.3.
22300                 * unsetenv.c: New file, extracted from setenv.c.
22301                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22302
22303         2001-12-20  Bruno Haible  <bruno@clisp.org>
22304
22305                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22306                 use malloc instead. For SunOS 4.
22307
22308         2001-12-11  Bruno Haible  <bruno@clisp.org>
22309
22310                 * setenv.c: Declare alloca.
22311                 (compar_fn_t): New typedef.
22312                 (KNOWN_VALUE, STORE_VALUE): Use it.
22313
22314         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22315         setenv.h.
22316
22317 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22318
22319         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22320         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22321         Choose values that are less likely to collide with system fnmatch
22322         options.
22323         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22324         defined (e.g., a pure POSIX system).
22325         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22326         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22327
22328 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22329
22330         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22331         a pain in practice to deal with generated m4 files.  This change
22332         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22333
22334         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22335         and jm-glibc-io.m4, as they are no longer a special case.
22336         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22337         kludge and the auto-generation stuff.  Check only whether the
22338         functions are declared, not whether they exist, since older hosts
22339         that don't declare the functions can't use the optimization anyway.
22340
22341 2002-12-06  Jim Meyering  <jim@meyering.net>
22342
22343         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22344
22345         Merge in changes from libc's misc/error.c, in preparation
22346         for the merge of gnulib's changes back into libc.
22347
22348         * lib/error.c (_): Define only if not already defined.
22349         Move definition to follow all #include directives.
22350         Include unlocked-io.h only if !_LIBC.
22351         [_LIBC]: Include <libio/libioP.h>.
22352         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22353         (fflush): Tweak definition to use INTUSE.
22354         (putc): Define.
22355
22356 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22357
22358         * lib/alloca.c [defined emacs]: Include "lisp.h".
22359         (xalloc_die) [defined emacs]: New macro.
22360         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22361         [! defined emacs]: Include <xalloc.h>.
22362         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22363         (pointer): Typedef to POINTER_TYPE *.
22364         (malloc): Remove decl; we now always use xmalloc.
22365         (alloca): Use old-style definition, since Emacs needs this.
22366         Check for arithmetic overflow when computing combined size.
22367
22368 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22369
22370         Do not generate unlocked-io.h automatically, since it's easier to
22371         maintain it by hand.
22372
22373         * lib/unlocked-io.h: New file, from GNU diffutils,
22374         but with proper copyright notice and attribution.
22375         * lib/gen-uio: Remove.
22376         * lib/Makefile.am: Add copyright notice.
22377         (libfetish_a_SOURCES): Add unlocked-io.h.
22378         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22379         (DISTCLEANFILES, io_functions): Remove macros.
22380         (EXTRA_DIST): Remove gen_uio.
22381         (unlocked-io.h): Remove rule.
22382
22383 2002-12-04  Jim Meyering  <jim@meyering.net>
22384
22385         Reflect the fact that stat.c and lstat.c are no longer generated.
22386         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22387         (DISTCLEANFILES): Likewise.
22388         (EXTRA_DIST): Likewise.
22389         (all_local): Don't depend on stat.c or lstat.c.
22390         (stat.c, lstat.c): Remove rules.
22391         (EXTRA_DIST): Remove xstat.in.
22392
22393         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22394         * lib/stat.c: New file.  Contents mostly from xstat.in.
22395         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22396         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22397
22398         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22399         too.
22400         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22401
22402 2002-12-03  Jim Meyering  <jim@meyering.net>
22403
22404         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22405         but not semantics, to minimize the differences between these two files.
22406         (safe_read): Change comment to mention SAFE_READ_ERROR.
22407
22408         * lib/safe-read.c (IS_EINTR): Define.
22409         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22410
22411 2002-12-02  Jim Meyering  <jim@meyering.net>
22412
22413         * lib/safe-read.c (EINTR): Define.
22414         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22415         (INT_MAX): Provide fallback.
22416         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22417
22418         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22419
22420 2002-12-02  Bruno Haible  <bruno@clisp.org>
22421
22422         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22423         Define, taken from safe-read.c.
22424         (INT_MAX): Provide fallback.
22425         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22426         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22427
22428         * lib/safe-read.c (EINTR): Remove definition.
22429         (safe_read): Don't use EINTR if it is absent.
22430
22431 2002-12-01  Jim Meyering  <jim@meyering.net>
22432
22433         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22434         zero.
22435         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22436
22437 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22438
22439         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22440         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22441         with `if (! (value < limit)) abort ();', for readability.
22442
22443 2002-11-26  Karl Berry  <karl@gnu.org>
22444
22445         * lib/strdup.c: copy from libc again, with jim's ok.
22446         * lib/.cppi-disable: re-add strdup.c
22447
22448 2002-11-25  Karl Berry  <karl@gnu.org>
22449
22450         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22451         instead of "strtol.c".
22452
22453 2002-11-25  Karl Berry  <karl@gnu.org>
22454
22455         * config/install-sh: update from automake for variable quoting, $0 in
22456         error msgs, etc.
22457
22458         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22459         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22460         entry.
22461
22462 2002-11-25  Jim Meyering  <jim@meyering.net>
22463
22464         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22465
22466 2002-11-24  Karl Berry  <karl@gnu.org>
22467
22468         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22469         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22470
22471 2002-11-24  Jim Meyering  <jim@meyering.net>
22472
22473         Update from coreutils:
22474
22475         * lib/mktime.c: Merge in changes from libc.
22476
22477         Avoid a link-time failure on some Linux systems.
22478         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22479         (otherwise).
22480         (__mon_yday): Declare with the STATIC attribute.
22481         (__mktime_internal): Likewise.
22482         Based on a report from Greg Schafer.
22483
22484 2002-11-23  Jim Meyering  <jim@meyering.net>
22485
22486         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22487         Use `unsigned', not `int', as type of index.
22488
22489         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22490
22491         * lib/fsusage.c: Remove unneeded parentheses around operands of
22492         `defined'.
22493
22494 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22495
22496         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22497         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22498         so that we can be included first.
22499         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22500         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22501         No need to include stddef.h or sys/types.h any more.
22502         Surround local include files with "", not "<>".
22503         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22504         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22505         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22506         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22507         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22508         (ISPRINT): Remove; no longer needed now that we assume C89.
22509
22510         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22511         Preserve errno.
22512
22513         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22514         quotearg_char): Use SIZE_MAX rather than
22515         (size_t) -1 when we are talking about "infinity".
22516
22517         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22518
22519 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22520
22521         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22522         hint that one should use `if (! x) abort ();' rather than `assert
22523         (x);', and anyway it's one less thing to worry about configuring.
22524         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22525         hash_rehash, hash_insert): Use abort rather than assert.
22526
22527 2002-11-22  Bruno Haible  <bruno@clisp.org>
22528
22529         * lib/safe-read.h: Assume C89. Add comments.
22530         (safe_read): Change return type to size_t.
22531         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22532         byte counts > SSIZE_MAX correctly.
22533         * lib/safe-write.h: New file.
22534         * lib/safe-write.c: New file.
22535         * lib/full-read.h: New file.
22536         * lib/full-read.c: New file.
22537         * lib/full-write.h: Assume C89. Add comments.
22538         * lib/full-write.c: Include safe-write.h.
22539         (full_write): Rewritten to use safe_write.
22540         Suggested by Jim Meyering and Paul Eggert.
22541
22542 2002-11-21  Jim Meyering  <jim@meyering.net>
22543
22544         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22545
22546         Merge in changes from the coreutils.
22547
22548         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22549         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22550         <stdint.h>.
22551         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22552         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22553         int.  Work more efficiently if X is the same width as uintmax_t.
22554         Do not compare X to -1, to avoid bogus compiler warning.
22555         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22556         Don't assume that f_frsize and f_bsize are the same type.
22557
22558         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22559         warning on FreeBSD.
22560
22561         * lib/makepath.c (make_path): Restore umask *before* creating the final
22562         component.
22563         (make_path): Minor reformatting.
22564
22565         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22566         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22567         HAVE_MALLOC/HAVE_REALLOC.
22568
22569         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22570         dummy ones.  At least on GNU/Linux systems, `auto' means something
22571         else.
22572         From Michael Stone.
22573
22574 2002-11-21  Bruno Haible  <bruno@clisp.org>
22575
22576         Remove case insensitive option matching.
22577         * lib/argmatch.h (argcasematch): Remove declaration.
22578         (ARGCASEMATCH): Remove macro.
22579         (__xargmatch_internal): Remove case_sensitive argument.
22580         (XARGMATCH): Update.
22581         (XARGCASEMATCH): Remove macro.
22582         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22583         case_sensitive argument.
22584         (argcasematch): Remove function.
22585         (__xargmatch_internal): Remove case_sensitive argument.
22586         (main): Use XARGMATCH instead of XARGCASEMATCH.
22587
22588         * lib/xmalloc.c: Change compile-time error message. Add comment about
22589         required autoconf version.
22590
22591 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22592
22593         Merge argmatch cleanups from Bison.  Assume C89.
22594
22595         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22596         Include stdlib.h, for EXIT_FAILURE.
22597         Always include <string.h>, since we assume C89.
22598         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22599         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22600         Include <stddef.h> instead, since it's all we need for size_t.
22601         (PARAMS): Remove.  All uses removed.
22602         (ARRAY_CARDINALITY): Do not bother to #undef.
22603         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22604         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22605         Remove unnecessary parentheses.
22606         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22607         Insert necessary parentheses.
22608         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22609         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22610
22611 2002-11-19  Bruno Haible  <bruno@clisp.org>
22612
22613         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22614         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22615
22616         * lib/mbswidth.h (PARAMS): Remove macro.
22617         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22618         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22619
22620         * lib/gcd.h (PARAMS): Remove macro.
22621         (gcd): Use ANSI C function declarations.
22622         * lib/gcd.c (gcd): Likewise.
22623
22624 2002-11-15  Bruno Haible  <bruno@clisp.org>
22625
22626         * lib/strcspn.c: Include <stddef.h>.
22627         (strcspn): Use ANSI C function declaration. Change return type to
22628         size_t. Use NULL.
22629         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22630         (strpbrk): Use NULL.
22631         * lib/strpbrk.h (PARAMS): Remove macro.
22632         (strpbrk): Use ANSI C function declaration.
22633         * lib/strstr.c: Don't include <sys/types.h>.
22634         * lib/strstr.h (PARAMS): Remove macro.
22635         (strstr): Use ANSI C function declarations.
22636
22637 2002-11-14  Karl Berry  <karl@gnu.org>
22638
22639         * config/mkinstalldirs: `do' on separate line, instead of
22640         `for var; do'.
22641
22642 2002-11-06  Bruno Haible  <bruno@clisp.org>
22643
22644         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22645         * lib/gcd.c (gcd): Likewise.
22646
22647 2002-11-05  Bruno Haible  <bruno@clisp.org>
22648
22649         * lib/gcd.h: New file, from gettext-0.11.5.
22650         * lib/gcd.c: New file, from gettext-0.11.5.
22651
22652 2002-11-05  Bruno Haible  <bruno@clisp.org>
22653
22654         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22655         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22656         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22657         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22658
22659         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22660         <libintl.h>.
22661         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22662         <libintl.h>.
22663
22664         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22665         * lib/human.c: Include gettext.h instead of <libintl.h>.
22666         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22667         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22668         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22669         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22670         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22671         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22672         (textdomain): Remove definition.
22673         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22674
22675         * lib/long-options.c: Remove include of <libintl.h> and definition of
22676         _.
22677         * lib/same.c: Remove include of <libintl.h> and definition of _.
22678
22679 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22680
22681         * lib/config.charset: A few additions for Solaris.
22682
22683 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22684
22685         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22686         * lib/localcharset.c (locale_charset): Declare as extern "C".
22687
22688 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22689
22690         * lib/config.charset: msdos in uk_UA uses CP1125.
22691
22692 2002-11-04  Bruno Haible  <bruno@clisp.org>
22693
22694         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22695         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22696         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22697         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22698         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22699
22700 2002-11-04  Bruno Haible  <bruno@clisp.org>
22701
22702         * lib/localcharset.c (locale_charset): Don't return an empty string.
22703
22704 2002-11-04  Bruno Haible  <bruno@clisp.org>
22705
22706         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22707         aliases.
22708
22709 2002-11-04  Bruno Haible  <bruno@clisp.org>
22710
22711         * lib/config.charset: Update for newest glibc. Add canonical names
22712         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22713
22714 2002-11-04  Bruno Haible  <bruno@clisp.org>
22715
22716         * lib/config.charset: Add support for NetBSD.
22717
22718 2002-11-04  Bruno Haible  <bruno@clisp.org>
22719
22720         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22721
22722 2002-11-01  Bruno Haible  <bruno@clisp.org>
22723
22724         * configure.in: Add AC_CONFIG_AUX_DIR call.
22725         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22726         test/Makefile.
22727         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22728
22729 2002-09-28  Karl Berry  <karl@gnu.org>
22730
22731         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22732         installed automake until the next release, since changes have been
22733         made.
22734
22735 2002-09-25  Karl Berry  <karl@gnu.org>
22736
22737         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22738         * lib/getopt*: copy from libc/posix.
22739         * lib/gettext.h: copy from gettext.
22740         * lib/.cppi-disable: add strdup.c, gettext.h.
22741
22742 2002-09-25  Karl Berry  <karl@gnu.org>
22743
22744         * config/srclist.txt: enable gettext.h check.
22745         * config/config.{guess,sub}: update from prep.
22746         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22747                 from automake 1.6.3.
22748         See srclist*.
22749
22750 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22751
22752         * regex.c (PATFETCH): Remove the translating fetch.
22753         (PATFETCH_RAW): Rename to PATFETCH.
22754         (set_image_of_range): New fun.
22755         (SET_RANGE_TABLE_WORK_AREA): Use it.
22756         (regex_compile): Don't translate the pattern chars so eagerly.
22757         Only do it when inserting an `exactn' bytecode or when handling
22758         a char-range.
22759         (mutually_exclusive_p): Avoid empty statement.
22760
22761 2002-07-06  Jim Meyering  <meyering@lucent.com>
22762
22763         * m4/README: Don't mention Makefile.am.in.
22764         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22765
22766 2002-07-01  Jim Meyering  <meyering@lucent.com>
22767
22768         * lib/c-stack.c: Include sys/time.h.
22769         From Volker Borchert.
22770
22771 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22772
22773         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22774
22775 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22776
22777         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22778         New macro.  Use it uniformly instead of
22779         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22780         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22781         reported by Vin Shelton.
22782
22783 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22784
22785         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22786         Do not assume SA_SIGINFO behavior.
22787         Bug reported by Jim Meyering on NetBSD 1.5.2.
22788
22789 2002-06-22  Jim Meyering  <meyering@lucent.com>
22790
22791         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22792         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22793
22794         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22795         now that configure.ac uses AC_GNU_SOURCE.
22796         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22797         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22798
22799         Update to latest tools.  Suggestions from Paul Eggert.
22800         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22801         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22802         * m4/fnmatch.m4: Likewise.
22803         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22804         to AC_HEADER_STDBOOL
22805
22806 2002-06-22  Jim Meyering  <meyering@lucent.com>
22807
22808         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22809         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22810
22811 2002-06-22  Jim Meyering  <meyering@lucent.com>
22812
22813         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22814
22815         * lib/exitfail.c, exitfail.h: Likewise.
22816         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22817
22818         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22819         of fnmatch.h.
22820         (EXTRA_DIST): Add fnmatch_loop.c.
22821         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22822
22823         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22824         * lib/fnmatch.c: Update from diffutils-2.8.2.
22825         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22826         * lib/fnmatch.h: Remove file.
22827
22828 2002-06-21  Jim Meyering  <meyering@lucent.com>
22829
22830         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22831         * m4/mbrtowc.m4: Likewise.
22832
22833         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22834         * m4/mbswidth.m4: Reflect name change:
22835         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22836         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22837
22838         * m4/lib-link.m4: Update from gettext-0.11.2.
22839         * m4/gettext.m4: Likewise.
22840
22841         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22842         From Alfred M. Szmidt.
22843
22844 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22845
22846         * lib/file-type.h: Report an error if neither S_ISREG nor
22847         S_IFREG is defined, instead of using a test specific to glibc
22848         2.2.  This should be safe, since POSIX requires S_ISREG and
22849         Unix Version 7 had S_IFREG.  We don't need to check for
22850         <sys/types.h> since we don't use any symbols that it defines.
22851
22852 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22853
22854         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22855         $@-t, so that each temporary file name is unique and valid in the first
22856         8 characters, for operation under DOS.
22857
22858 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22859
22860         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22861
22862 2002-06-15  Jim Meyering  <meyering@lucent.com>
22863
22864         Work even with DJGPP 2.03, which lacks support for symlinks.
22865         From Richard Dawe.
22866         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22867         is defined.
22868         * lib/lchown.c (S_ISLNK): Likewise.
22869
22870 2002-06-15  Jim Meyering  <meyering@lucent.com>
22871
22872         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22873         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22874         have been included before this file.
22875
22876 2002-06-14  Jim Meyering  <meyering@lucent.com>
22877
22878         * lib/file-type.h: Use the version from diffutils-2.8.2.
22879         * lib/file-type.c: Likewise.
22880
22881 2002-06-07  Jim Meyering  <meyering@lucent.com>
22882
22883         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22884         They're needed at least for NetBSD 1.5.2.
22885         ($statxfs_includes): Include those same headers.
22886         ($statxfs_includes): Include sys/vfs.h if available.
22887         ($statxfs_includes): Likewise for sys/statvfs.h.
22888         Check for the following members in both structs statfs and statvfs:
22889         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22890
22891 2002-06-01  Jim Meyering  <meyering@lucent.com>
22892
22893         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22894         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22895
22896 2002-05-28  Jim Meyering  <meyering@lucent.com>
22897
22898         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22899         Reported by Volker Borchert.
22900
22901 2002-05-27  Jim Meyering  <meyering@lucent.com>
22902
22903         Fix a problem seen only on nonconforming systems whereby ls.c's
22904         use of localtime, and then of gettimeofday would cause trouble:
22905         the localtime call used to initialize rpl_gettimeofday's save
22906         mechanism would clobber ls's current local time information so
22907         that in any long listing the first file would always be listed
22908         with date 1970-01-01.  Analysis by Volker Borchert.
22909
22910         * lib/gettimeofday.c (localtime): Undefine.
22911         (rpl_localtime): New function.
22912
22913 2002-05-27  Jim Meyering  <meyering@lucent.com>
22914
22915         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22916         localtime.
22917
22918         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22919         use the replacement function; it wouldn't resolve at link time.
22920         Reported by Volker Borchert.
22921
22922 2002-05-22  Jim Meyering  <meyering@lucent.com>
22923
22924         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22925         file-type.h.
22926         * lib/file-type.h: New file.
22927         * lib/file-type.c (file_type): New file/function.  Extracted from
22928         diffutils.
22929
22930 2002-04-30  Jim Meyering  <meyering@lucent.com>
22931
22932         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22933
22934 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22935
22936         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22937
22938 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22939
22940         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22941         Do not check for alloca.h (no longer used) or stdbool.h (was never
22942         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22943
22944 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22945
22946         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22947
22948 2002-04-29  Jim Meyering  <meyering@lucent.com>
22949
22950         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22951         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22952         Use AC_FUNC_STRNLEN here instead.
22953
22954         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22955         With autoconf-2.53a, it's part of AC_PROG_CC.
22956
22957 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22958
22959         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22960         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22961
22962 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22963
22964         * lib/sig2str.h, lib/sig2str.c: New files.
22965         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22966
22967 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22968
22969         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22970         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22971         of 127, since 64 is the largest conceivable number for ancient
22972         nonstandard hosts.
22973         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22974
22975 2002-04-28  Jim Meyering  <meyering@lucent.com>
22976
22977         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22978
22979 2002-04-24  Jim Meyering  <meyering@lucent.com>
22980
22981         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22982         (jm_PREREQ): Use it.
22983
22984         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22985         mach/mach.h fcntl.h.
22986         Check for this function: setlocale.
22987
22988 2002-04-24  Jim Meyering  <meyering@lucent.com>
22989
22990         * lib/gettext.h: New file, from Gettext.
22991         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22992         (libfetish_a_SOURCES): Add gettext.h.
22993
22994 2002-04-16  Jim Meyering  <meyering@lucent.com>
22995
22996         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22997         ut_pid, ut_id, ut_exit.
22998
22999 2002-04-16  Jim Meyering  <meyering@lucent.com>
23000
23001         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23002         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23003         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23004
23005 2002-04-12  Jim Meyering  <meyering@lucent.com>
23006
23007         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23008         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23009         existence of the getmntinfo function.  Needed for Darwin 5.3.
23010
23011         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23012         This is necessary at least on Darwin 5.3.
23013
23014         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23015         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23016         strnlen.o in the library, and that makes some versions of ranlib
23017         object.
23018
23019 2002-04-12  Jim Meyering  <meyering@lucent.com>
23020
23021         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23022
23023 2002-04-09  Jim Meyering  <meyering@lucent.com>
23024
23025         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23026         to be more precise.  Rather than saying we're checking whether the
23027         function `works', say what we're testing.
23028         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23029         Reported by Bruno Haible.
23030
23031 2002-03-10  Jim Meyering  <meyering@lucent.com>
23032
23033         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23034         Suggestion from Santiago Vila.
23035
23036 2002-03-08  Jim Meyering  <meyering@lucent.com>
23037
23038         * lib/rename.c: Mention that this wrapper is needed also on
23039         mips-dec-ultrix4.4 systems.
23040
23041 2002-03-02  Jim Meyering  <meyering@lucent.com>
23042
23043         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23044         not HAVE_CLOCK_SETTIME.
23045
23046 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23047
23048         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23049         Check for clock_settime.
23050
23051 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23052
23053         * lib/nanosleep.h: Rename to....
23054         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23055
23056         * lib/gettime.c: New file.
23057         * lib/settime.c: New file.
23058         * lib/stime.c: Remove.
23059
23060         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23061         timespec.h.  Remove nanosleep.h.
23062
23063 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23064
23065         * m4/acl.m4: New file.
23066         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23067         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23068
23069 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23070
23071         * lib/acl.c, lib/acl.h: New files.
23072         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23073
23074 2002-02-24  Jim Meyering  <meyering@lucent.com>
23075
23076         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23077         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23078         cause trouble.  Reported by Nelson Beebe.
23079
23080 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23081
23082         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23083         compilers that don't know that xalloc_die never returns.
23084
23085 2002-02-20  Jim Meyering  <meyering@lucent.com>
23086
23087         * lib/getdate.c: Regenerate using bison-1.33.
23088
23089 2002-02-17  Jim Meyering  <meyering@lucent.com>
23090
23091         * config/config.guess (main): Don't use `head -1'; it's no longer
23092         portable. Use `sed 1q' instead.
23093
23094 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23095
23096         * m4/codeset.m4: Upgrade to gettext-0.11.
23097         * m4/gettext.m4: Upgrade to gettext-0.11.
23098         * m4/glibc21.m4: Upgrade to gettext-0.11.
23099         * m4/iconv.m4: Upgrade to gettext-0.11.
23100         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23101         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23102         * m4/lib-ld.m4: New file, from gettext-0.11.
23103         * m4/lib-link.m4: New file, from gettext-0.11.
23104         * m4/lib-prefix.m4: New file, from gettext-0.11.
23105         * m4/progtest.m4: Upgrade to gettext-0.11.
23106
23107 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23108
23109         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23110         (jm_PREREQ): Use it.
23111
23112 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23113
23114         * lib/posixver.c, lib/posixver.h: New files.
23115         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23116
23117 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23118             Bruno Haible  <bruno@clisp.org>
23119
23120         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23121         (fwrite_success_callback): New declaration.
23122         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23123         print_unicode_char. Call failure callback instead of error.
23124         (fwrite_success_callback): New function.
23125         (exit_failure_callback): New function.
23126         (fallback_failure_callback): New function.
23127         (print_unicode_char): Call unicode_to_mb.
23128
23129 2002-01-26  Jim Meyering  <meyering@lucent.com>
23130
23131         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23132         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23133
23134 2002-01-26  Jim Meyering  <meyering@lucent.com>
23135
23136         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23137
23138 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23139
23140         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23141
23142 2002-01-22  Jim Meyering  <meyering@lucent.com>
23143
23144         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23145         Otherwise, some versions of automake would omit the rule that makes
23146         Makefile from Makefile.in.
23147
23148 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23149
23150         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23151         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23152         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23153         (memcoll): Set errno to zero if there is no error.
23154
23155         * lib/quotearg.c (quotearg_buffer_restyled):
23156         Fix bug with quoting buffers containing NUL when backslashing escapes.
23157         This bug was exposed by the other changes in this patch.
23158         (quotearg_n_options): New arg ARGSIZE.
23159         All callers changed.
23160         (quoting_options_from_style): New function.
23161         (quotearg_n_style): Use it.
23162         (quotearg_n_style_mem): New function.
23163
23164         * lib/quotearg.h (quotearg_n_style_mem): New function.
23165
23166 2002-01-19  Jim Meyering  <meyering@lucent.com>
23167
23168         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23169         Remove useless quotes: DF_PROG="df".
23170         * m4/strnlen.m4: New file.
23171
23172 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23173
23174         * lib/backupfile.c (ISDIGIT): Comment fix.
23175         * lib/getdate.y (ISDIGIT): Likewise.
23176         * lib/posixtm.c (ISDIGIT, year): Likewise.
23177         * lib/strverscmp.c (ISDIGIT): Likewise.
23178         * lib/userspec.c (ISDIGIT): Likewise.
23179
23180 2002-01-16  Jim Meyering  <meyering@lucent.com>
23181
23182         * lib/getdate.y: Add three semicolons, each just before a closing
23183         brace. Bison (as of version 1.31) no longer papers over that mistake.
23184
23185 2002-01-05  Jim Meyering  <meyering@lucent.com>
23186
23187         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23188
23189 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23190
23191         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23192         not silently exit merely because the output buffer happens to
23193         have nothing pending.
23194
23195 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23196
23197         See the big note in ../ChangeLog.
23198         * lib/human.c (suffixes): Prefer K to k for 1024.
23199         (generate_suffix_backwards): New function.
23200         (human_readable_inexact): Use it.
23201         * lib/xstrtol.c (__xstrtol): If there is no number but there
23202         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23203         Accept 'K' as well as 'k'.
23204
23205 2001-12-15  Jim Meyering  <meyering@lucent.com>
23206
23207         * lib/regex.h (__restrict_arr): Update from libc.
23208
23209         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23210         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23211         (STREQ): Define.
23212
23213 2001-12-14  Jim Meyering  <meyering@lucent.com>
23214
23215         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23216         Suggestion from Bruno Haible.
23217
23218 2001-12-10  Jim Meyering  <meyering@lucent.com>
23219
23220         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23221         xrealloc, Instead, include "xalloc.h".
23222         (initbuffer): Don't cast xmalloc return value to char*.
23223         (readline): Reword comment.
23224         Don't cast xrealloc return value to char*
23225         Return NULL, not 0.
23226
23227 2001-12-09  Jim Meyering  <meyering@lucent.com>
23228
23229         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23230         about `signed and unsigned type in conditional expression'.
23231         * lib/posixtm.c (posix_time_parse): Likewise.
23232
23233         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23234
23235         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23236         to avoid a pedantic warning.
23237
23238         * lib/getstr.c: Don't include assert.h.
23239         (getstr): Remove warning-evoking assertions.
23240         Return -1 if offset parameter is out of bounds.
23241         Change the type of a local from int to size_t.
23242
23243         * lib/strftime.c (my_strftime_localtime_r): Include this function
23244         definition in the `#if ! HAVE_TM_GMTOFF' block.
23245
23246         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23247         Include xalloc.h instead.
23248
23249 2001-12-02  Jim Meyering  <meyering@lucent.com>
23250
23251         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23252         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23253         included.
23254
23255         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23256         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23257
23258 2001-11-30  Akim Demaille  <akim@epita.fr>
23259
23260         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23261         before being defined.
23262
23263 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23264
23265         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23266         First arg is int, not unsigned.
23267         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23268         (SIZE_MAX, UINT_MAX): New macros.
23269         (quotearg_n_options): Abort if N is negative.
23270         Avoid overflow check on hosts where size_t is 64 bits and int
23271         is 32 bits, as overflow is impossible there.
23272         Fix off-by-one typo that caused unnecessary reallocation.
23273
23274 2001-11-27  Jim Meyering  <meyering@lucent.com>
23275
23276         * lib/tempname.c: Merge with version from libc.
23277         * lib/regex.c: Likewise.
23278
23279         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23280         systems for which STDC_HEADERS is 0, it was not included, resulting in
23281         a warning about an integer-to-pointer conversion problem with getenv.
23282         Reported by Volker Borchert.
23283
23284 2001-11-26  Jim Meyering  <meyering@lucent.com>
23285
23286         * lib/gtod.h: Remove file.
23287         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23288         * lib/gettimeofday.c: Don't include gtod.h.
23289         (GTOD_init): Remove function.
23290         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23291         Suggestion from Volker Borchert.
23292
23293 2001-11-23  Jim Meyering  <meyering@lucent.com>
23294
23295         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23296         it.
23297         * lib/hash.c (struct hash_table): Define it here instead.
23298
23299 2001-11-22  Jim Meyering  <meyering@lucent.com>
23300
23301         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23302
23303 2001-11-20  Jim Meyering  <meyering@lucent.com>
23304
23305         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23306         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23307
23308 2001-11-19  Jim Meyering  <meyering@lucent.com>
23309
23310         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23311         directory.  Use "conftestXXXXXX" as the template.
23312         Suggestion from Paul Eggert.
23313
23314         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23315         immediately, so the test doesn't mistakenly hit the max-open-files
23316         limit.
23317
23318 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23319
23320         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23321         (TEMPORARIES): New macro.
23322         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23323         removes an artificial limitation (e.g. HP-UX 10.20, where
23324         TMP_MAX is 17576).
23325
23326 2001-11-18  Jim Meyering  <meyering@lucent.com>
23327
23328         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23329
23330 2001-11-18  Jim Meyering  <meyering@lucent.com>
23331
23332         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23333         on SunOS 4.
23334
23335         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23336         files will be created before anything else.
23337
23338 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23339
23340         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23341         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23342
23343 2001-11-17  Jim Meyering  <meyering@lucent.com>
23344
23345         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23346         Prompted by a report from Bob Proulx.
23347
23348         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23349         Instead, require UTILS_FUNC_MKSTEMP.
23350
23351 2001-11-17  Jim Meyering  <meyering@lucent.com>
23352
23353         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23354         Now, that's done as part of AC_FUNC_STRTOD.
23355
23356 2001-11-17  Jim Meyering  <meyering@lucent.com>
23357
23358         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23359         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23360         rather than group writable.  Patch by Juan F. Codagnone.
23361
23362         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23363         xrealloc, Instead, include "xalloc.h".
23364
23365         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23366         Remove explicit declarations of xmalloc, xrealloc,
23367         and xstrdup.  Instead, include "xalloc.h".
23368
23369         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23370         unlocked-io.h.
23371         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23372         Likewise.
23373         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23374
23375         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23376         Reported by Padraig Brady.
23377
23378         * lib/mkstemp.c: #undef mkstemp.
23379         Include config.h.
23380         (rpl_mkstemp): Rename from mkstemp.
23381         Protoize.
23382
23383 2001-11-16  Jim Meyering  <meyering@lucent.com>
23384
23385         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23386         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23387         determine the amount of total physical memory, use pstat_getstatic.
23388         HPUX-11 doesn't define _SC_PHYS_PAGES.
23389         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23390         If sysconf couldn't be used to determine the amount of available
23391         physical memory, use both pstat_getstatic and pstat_getdynamic.
23392         Based on a patch from Bob Proulx.
23393
23394 2001-11-10  Jim Meyering  <meyering@lucent.com>
23395
23396         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23397         (jm_PREREQ): Use it.
23398
23399 2001-11-09  Jim Meyering  <meyering@lucent.com>
23400
23401         * m4/jm-macros.m4: Require autoconf-2.52f.
23402         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23403         Use these AC_-prefixed names, not the AM_-prefixed ones.
23404
23405         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23406
23407 2001-11-05  Jim Meyering  <meyering@lucent.com>
23408
23409         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23410
23411 2001-11-04  Jim Meyering  <meyering@lucent.com>
23412
23413         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23414         $DEFS.
23415
23416 2001-11-03  Jim Meyering  <meyering@lucent.com>
23417
23418         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23419         of AC_DEFUN.
23420
23421         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23422         know the name of the variable in the macro definition.
23423
23424 2001-11-03  Jim Meyering  <meyering@lucent.com>
23425
23426         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23427         in argmatch_to_argument call.
23428
23429         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23430         argument.
23431
23432         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23433         e.g., a fault due to an attempt to free a NULL pointer.
23434
23435 2001-11-01  Jim Meyering  <meyering@lucent.com>
23436
23437         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23438         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23439
23440 2001-11-01  Jim Meyering  <meyering@lucent.com>
23441
23442         * lib/dirfd.c, lib/dirfd.h: New files.
23443         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23444
23445         * lib/hash.c (hash_print) [TESTING]: Clean up.
23446
23447 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23448
23449         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23450         to avoid a warning if -Wall.
23451
23452 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23453
23454         * README: New file
23455         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23456         (per RMS's instructions, this is now the canonical source)
23457         * lgpl/, gpl/: New directories.
23458
23459 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23460
23461         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23462
23463 2001-10-21  Jim Meyering  <meyering@lucent.com>
23464
23465         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23466         this code would end up calling gettext even in packages built
23467         with --disable-nls.
23468         * lib/getopt.c (_): Likewise.
23469         * lib/regex.c (_): Likewise.
23470
23471 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23472
23473         * m4/error.m4 (jm_PREREQ_ERROR):
23474         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23475         AC_FUNC_STRERROR_R does that.
23476         Check for strerror declaration.
23477
23478         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23479         are supposed to have them these days.
23480         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23481         Merge changes from latest Autoconf CVS.
23482         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23483         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23484         POSIX decided to standardize on the int flavor of strerror_r.
23485
23486 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23487
23488         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23489         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23490         Use strerror_r that is only a macro, even if it is not a function.
23491         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23492         (private_strerror): Use prototypes, not old-style function definition.
23493         (print_errno_message): New function.
23494         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23495         char*-flavored one.
23496         (error_tail, error, error_at_line): Use it.
23497
23498 2001-10-11  Jim Meyering  <meyering@lucent.com>
23499
23500         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23501         and quote_n (1, ... to avoid clobbering a buffer.
23502
23503 2001-10-05  Jim Meyering  <meyering@lucent.com>
23504
23505         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23506         hash-pjw.h.
23507         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23508         * lib/hash-pjw.h: New file.
23509
23510 2001-09-30  Jim Meyering  <meyering@lucent.com>
23511
23512         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23513         `struct fsstat' has the `f_fstypename' member.
23514         Use that to define FS_TYPE, which is now used to make
23515         the getfsstat link test tighter.
23516
23517 2001-09-30  Jim Meyering  <meyering@lucent.com>
23518
23519         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23520         Include <sys/ucred.h>, for Apple Darwin.
23521         Include sys/mount.h and sys/fs_types.h only if available.
23522         (FS_TYPE): Define.
23523         (read_filesystem_list): Use FS_TYPE.
23524
23525 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23526
23527         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23528         a boolean context.
23529
23530 2001-09-29  Jim Meyering  <meyering@lucent.com>
23531
23532         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23533         [one-argument getmntent function]): Include stdio.h before mntent.h.
23534         SunOS 4.1.x needs it for the declaration of `FILE'.
23535         Patch by Volker Borchert.
23536
23537         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23538         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23539         sys/fs_types.h, and make the link-test for getfsstat guard #include
23540         directives with appropriate #if HAVE_*_H tests so that we can
23541         detect getfsstat on Apple Darwin1.3.7 systems.
23542         Reported by Nelson Beebe.
23543         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23544
23545 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23546
23547         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23548         #defines strtoimax.  Also treat the other strto* functions
23549         like strtoimax.
23550
23551         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23552         Check for strtoul and strtoumax,
23553         as those declarations are made even in the signed case.
23554         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23555         Likewise, for strtol and strtoimax.
23556
23557 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23558
23559         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23560         #defines strtoimax.  Also treat the other strto* functions
23561         like strtoimax.
23562
23563         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23564         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23565         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23566
23567 2001-09-26  Jim Meyering  <meyering@lucent.com>
23568
23569         Most macros in unlocked-io.h had the wrong number of arguments.
23570         * lib/gen-uio: New script.
23571         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23572         * lib/unlocked-io.hin: Remove file.
23573         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23574         rather than trying to embed it here.
23575         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23576         Reported by Padraig Brady.
23577
23578 2001-09-25  Volker Borchert  <bt@teknon.de>
23579
23580         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23581         `result'.
23582
23583 2001-09-24  Jim Meyering  <meyering@lucent.com>
23584
23585         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23586
23587 2001-09-23  Jim Meyering  <meyering@lucent.com>
23588
23589         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23590         instead of the mere test for existence of mntent.h.  The latter
23591         would get a false-positive on AIX 3.4 systems.
23592         In the outer getmntent if-block, don't die if neither of the getmntent
23593         tests succeeds.  Instead, just fall through and continue with the
23594         remaining tests.
23595
23596 2001-09-23  Jim Meyering  <meyering@lucent.com>
23597
23598         * lib/mountlist.c: Remove useless parentheses in #if directives.
23599         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23600         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23601
23602 2001-09-22  Jim Meyering  <meyering@lucent.com>
23603
23604         * m4/gettext.m4: New file.  From gettext.
23605         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23606         * m4/progtest.m4: Likewise
23607         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23608         * m4/glibc21.m4: Likewise.
23609
23610         * m4/libintl.m4: Remove.  No longer used.
23611
23612 2001-09-22  Jim Meyering  <meyering@lucent.com>
23613
23614         * lib/localcharset.c: Update from latest gettext.
23615         * lib/config.charset: Likewise.
23616
23617 2001-09-20  Jim Meyering  <meyering@lucent.com>
23618
23619         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23620         strtoimax.
23621         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23622         strtoumax.
23623
23624 2001-09-20  Jim Meyering  <meyering@lucent.com>
23625
23626         * lib/xstrtol.c (strtoimax): Guard declaration with
23627         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23628         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23629         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23630         (strtoumax): Likewise, for completeness (it wasn't necessary).
23631
23632 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23633
23634         * lib/strtoimax.c (HAVE_LONG_LONG):
23635         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23636         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23637         to work around bug in IBM C compiler.
23638
23639 2001-09-17  Jim Meyering  <meyering@lucent.com>
23640
23641         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23642         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23643         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23644         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23645         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23646         whenever the right hand side need not be expanded by the shell.
23647
23648 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23649
23650         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23651         library.  It's not correct, as some older glibcs are buggy.
23652         fnmatch wasn't fixed until glibc 2.2.
23653
23654         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23655         special shell magic here.
23656
23657 2001-09-16  Jim Meyering  <meyering@lucent.com>
23658
23659         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23660         * m4/jm-macros.m4: Require it.
23661
23662 2001-09-16  Jim Meyering  <meyering@lucent.com>
23663
23664         * lib/mkdir.c: New file.
23665
23666 2001-09-15  Jim Meyering  <meyering@lucent.com>
23667
23668         * m4/jm-macros.m4: Check for help2man.
23669
23670 2001-09-11  Jim Meyering  <meyering@lucent.com>
23671
23672         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23673         The body, by Paul Eggert, was moved here from configure.in.
23674         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23675
23676 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23677
23678         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23679         (jm_PREREQ): Use it.
23680
23681 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23682
23683         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23684         Use ssize_t, not int, to store result of readlink.
23685         Check for ssize_t overflow as well as size_t overflow,
23686         as POSIX says the result of readlink is implementation-defined
23687         when ssize_t overflows.
23688         Remove unnecessary cast to char*.
23689         Use free+malloc instead of realloc, as the storage doesn't need
23690         to be preserved and it's clearer and can be more efficient that way.
23691         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23692         * lib/xreadlink.h (xreadlink): Update prototype.
23693
23694 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23695
23696         * lib/xgetcwd.c: Revert some of the previous change; intead,
23697         fix the HAVE_GETCWD_NULL code to behave more like the
23698         !HAVE_GETCWD_NULL code used to.
23699
23700         Include "xalloc.h".
23701         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23702         invoke xalloc_die.
23703
23704 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23705
23706         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23707         sys/param.h, as pathmax.h includes them.
23708
23709 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23710
23711         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23712         (jm_PREREQ_XGETCWD): New macro.
23713
23714         * m4/getcwd.m4: New file.
23715
23716 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23717
23718         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23719         like the HAVE_GETCWD_NULL code.
23720         Include pathmax.h if not HAVE_GETCWD.
23721         Do not include xalloc.h.
23722         (INITIAL_BUFFER_SIZE): New symbol.
23723         Do not use xmalloc / xrealloc, since the caller is responsible for
23724         handling errors.  Preserve errno around `free' during failure.
23725         Do not overrun buffer when using getwd.
23726
23727 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23728
23729         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23730         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23731         getcwd (NULL, 0).
23732
23733 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23734
23735         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23736         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23737         spotted by Jim Meyering.
23738
23739 2001-09-03  Jim Meyering  <meyering@lucent.com>
23740
23741         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23742         failure.
23743
23744 2001-09-02  Jim Meyering  <meyering@lucent.com>
23745
23746         * lib/error.c: Update from GNU libc.
23747
23748 2001-09-01  Jim Meyering  <meyering@lucent.com>
23749
23750         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23751         Used by df.
23752
23753 2001-09-01  Jim Meyering  <meyering@lucent.com>
23754
23755         * lib/xreadlink.c: New file.
23756         * lib/xreadlink.h: New file.
23757         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23758         xreadlink.h.
23759
23760         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23761         doesn't conflict with sparc Solaris 7's definition in
23762         /usr/include/sys/int_types.h.
23763
23764         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23765         files.
23766         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23767         and strncasecmp as r-values.  Unixware didn't have declarations.
23768
23769 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23770
23771         * lib/xstrtol.h: Add copyright notice.
23772         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23773         LONGINT_INVALID_SUFFIX_CHAR.
23774
23775 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23776
23777         * lib/xstrtol.c (strtoimax): New decl.
23778
23779 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23780
23781         * lib/xgetcwd.c: Don't include pathmax.h.
23782         Include stdlib.h and unistd.h if available.
23783         Include xalloc.h.
23784         (xmalloc, xstrdup, free): Remove decls.
23785         (xgetcwd): Don't assume sizes fit in unsigned.
23786         Check for overflow when computing sizes.
23787         Simplify reallocation code.
23788
23789 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23790
23791         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23792         a directory's st_size can have an arbitrary value, so the old
23793         usage could waste an arbitrary amount of memory.  All uses
23794         changed.
23795         * lib/savedir.h: Update prototype.
23796
23797 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23798
23799         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23800
23801         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23802         old strtoimax.c.
23803
23804         Also, make the following further changes to make this file's
23805         configuration more similar to that of strtol.c:
23806         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23807         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23808         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23809         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23810         changed to signed values.
23811
23812         And make the following changes as well:
23813         Fix copyright notice, as 1999 was missing.
23814         (verify): New macro.
23815         (strtoimax): Check sizes at compile-time, not run-time.
23816         Prefer strtol to strtoll if both work.
23817         (main): Remove; it was not that useful and was a pain to maintain.
23818
23819         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23820
23821 2001-08-31  Jim Meyering  <meyering@lucent.com>
23822
23823         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23824         Use an initial, malloc'd, buffer of length 128 rather than
23825         a statically allocated one of length 1024.
23826
23827 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23828
23829         Simplify code, partly by assuming autoconf 2.52 semantics.
23830
23831         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23832
23833         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23834         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23835         All uses removed.
23836         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23837         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23838         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23839         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23840         jm_AC_HEADER_INTTYPES_H.
23841         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23842
23843         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23844
23845         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23846         Quote first arg of AC_DEFUN.
23847         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23848         since they are needed to parse the include file even if we need
23849         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23850         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23851         but with opposite signedness.
23852
23853 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23854
23855         Merge 'exclude' changes from tar 1.13.22.
23856         This fixes one or two unlikely storage allocation overflow bugs,
23857         but doesn't change user-visible behavior otherwise.
23858
23859 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23860
23861         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23862         (jm_PREREQ_EXCLUDE): New macro.
23863
23864 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23865
23866         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23867         tm to be declared.
23868
23869 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23870
23871         * lib/hash.c: Remove '2001' from copyright notice.
23872
23873 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23874
23875         * lib/full-write.h: New file.
23876         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23877         * lib/full-write.c: Correct credits, as cccp.c no longer
23878         exists and anyway it was so heavily changed from the old cccp
23879         code as to be unrecognizable.  Include full-write.h.
23880         (full_write) Return size_t, with short writes meaning failure.
23881         All callers changed.  This fixes a bug with large buffers
23882         on 64-bit hosts.
23883         * lib/utime.c: Include full-write.h.
23884
23885 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23886
23887         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23888         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23889         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23890         Include if available.
23891         (<xalloc.h>): Include
23892         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23893         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23894         collide with FNM macros.
23895         (struct patopts): New struct.
23896         (struct exclude): Use it, as exclude patterns now come with options.
23897         (new_exclude): Support above changes.
23898         (new_exclude, add_exclude_file):
23899         Initial size must now be a power of two to simplify overflow checking.
23900         (free_exclude, fnmatch_no_wildcards): New function.
23901         (excluded_filename): No longer requires options arg, as the options
23902         are determined by add_exclude.  Now returns bool, not int.
23903         (excluded_filename, add_exclude):
23904         Add support for the fancy new exclusion options.
23905         (add_exclude, add_exclude_file): Now takes int options arg.
23906         Check for arithmetic overflow when computing sizes.
23907         (add_exclude_file): xrealloc might modify errno, so don't
23908         realloc until after errno might be used.
23909
23910         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23911         New macros.
23912         (free_exclude): New decl.
23913         (add_exclude, add_exclude_file): Now takes int options arg.
23914         (excluded_filename): No longer requires options arg, as the options
23915         are determined by add_exclude.  Now returns bool, not int.
23916
23917 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23918
23919         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23920
23921 2001-08-27  Jim Meyering  <meyering@lucent.com>
23922
23923         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23924
23925         * lib/version-etc.c (N_): Remove definition.
23926         Revert most of last change.
23927         Instead, simply don't mark the `Copyright...' string for translation.
23928         Based on advice from Paul Eggert.
23929
23930         * lib/strtoxmax.c: Tweak comment.
23931
23932 2001-08-26  Jim Meyering  <meyering@lucent.com>
23933
23934         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23935
23936         * m4/xstrtoimax.m4: New file.
23937         * m4/xstrtoumax.m4: Add comments explaining why we
23938         AC_REPLACE_FUNCS(strtol).
23939
23940 2001-08-26  Jim Meyering  <meyering@lucent.com>
23941
23942         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23943         of copyright with `%s' so translators don't get an untranslated
23944         message in 2002.
23945         (COPYRIGHT_YEAR): Define.
23946         (version_etc): Use fprintf rather than fputs.
23947         Suggestion from Ulrich Drepper.
23948
23949         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23950
23951         * lib/strtoll.c: New file, from GNU libc.
23952         * lib/xstrtoimax.c: New file.
23953
23954         * lib/xstrtol.h: Add xstrtoimax.
23955         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23956         * lib/strtoimax.c: New file.  Likewise, but first define
23957         STRTOUXMAX_SIGNED.
23958
23959         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23960         ...
23961         * lib/strtoxmax.c: ... then renamed to this.
23962
23963 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23964
23965         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23966         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23967         (jm_AC_TYPE_INTMAX_T): New macro.
23968         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23969
23970         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23971
23972         * m4/longlong.m4: Renamed from ulonglong.m4.
23973         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23974         * m4/uintmax_t.m4: Removed.
23975
23976 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23977
23978         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23979         Port to Solaris 8, where 'sed' requires a space after the 'r'
23980         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23981         Redirect output to $tmp just once.
23982
23983 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23984
23985         * lib/addext.c (<errno.h>): Include.
23986         (errno): Declare if not defined.
23987         (addext): Work correctly when pathconf returns -1 and leaves
23988         errno alone because there is no limit.  Also, work even if
23989         pathconf returns a value greater than SIZE_MAX.
23990
23991 2001-08-12  Jim Meyering  <meyering@lucent.com>
23992
23993         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23994         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23995         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23996         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23997         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23998         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23999         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24000         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24001         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24002         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24003         utime.m4, utimes.m4, xstrtoumax.m4:
24004         Quote the first argument in each use of AC_DEFUN.
24005
24006 2001-08-12  Jim Meyering  <meyering@lucent.com>
24007
24008         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24009         Simply `return getcwd (NULL, 0);'.
24010         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24011         Use 1300 as initial value for length, not PATH_MAX.
24012
24013         * lib/pathmax.h: Clean up cpp syntax.
24014
24015 2001-08-12  Jim Meyering  <meyering@lucent.com>
24016
24017         * lib/gettimeofday.c: New file.
24018         * lib/gtod.h: New file.
24019         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24020
24021 2001-08-05  Jim Meyering  <meyering@lucent.com>
24022
24023         * m4/jm-macros.m4: Require autoconf-2.52.
24024
24025 2001-08-04  Jim Meyering  <meyering@lucent.com>
24026
24027         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24028         stmt, to get in sync with glibc.
24029
24030 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24031
24032         The following changes are from gettext 0.10.39 as maintained by
24033         Bruno Haible.
24034
24035         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24036         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24037         with inverted sense.  All uses changed.
24038
24039         * lib/mbswidth.c: Don't include <limits.h>.
24040         Include <stdlib.h> and <string.h> unconditionally.
24041         (iswcntrl, mbsinit, ISCNTRL): New macros.
24042         (mbsnwidth): Use K&R style function declarations.
24043         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24044         can optimize it when MB_CUR_MAX == 1.
24045         The width of control characters is zero, not 1.
24046
24047 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24048
24049         The following changes are from gettext 0.10.39 as maintained by
24050         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24051
24052         * m4/codeset.m4: Upgrade to serial AM1.
24053         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24054         all uses changed.  Quote first arg of AC_DEFUN.
24055         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24056
24057         * m4/iconv.m4: Upgrade to serial AM2.
24058         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24059         Add --with-libconv-prefix.
24060         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24061         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24062         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24063         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24064         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24065
24066         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24067         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24068         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24069         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24070         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24071         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24072         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24073         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24074         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24075
24076         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24077         string.h any more.
24078
24079         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24080         not the default value.
24081
24082         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24083         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24084         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24085         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24086         Also check for iswcntrl, used for wcwidth fallback.
24087         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24088         to Autoconf 2.13.
24089
24090 2001-08-03  Jim Meyering  <meyering@lucent.com>
24091
24092         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24093         as it was in the original.  Reported by Paul Eggert.
24094
24095 2001-07-16  Jim Meyering  <meyering@lucent.com>
24096
24097         * m4/gettimeofday.m4: New file.
24098         Prompted by a report from Bernhard Baehr.
24099
24100 2001-07-15  Jim Meyering  <meyering@lucent.com>
24101
24102         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24103         stuff. Now it's in ../Makefile.cfg.
24104
24105 2001-07-15  Jim Meyering  <meyering@lucent.com>
24106
24107         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24108         (BUILT_SOURCES): Add unlocked-io.h.
24109         (io_functions): Define.
24110         (unlocked-io.h): New rule.
24111         (DISTCLEANFILES): Add unlocked-io.h.
24112         (all-local): Depend on unlocked-io.h, to ensure it is created.
24113
24114         * lib/unlocked-io.hin: New file
24115
24116         * lib/regex.c: Update from glibc.
24117
24118 2001-07-05  Jim Meyering  <meyering@lucent.com>
24119
24120         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24121         recommendation.
24122         (libfetish_a_SOURCES): Put all .h files here instead.
24123         Remove a thus-exposed (better checks in automake) duplicate and
24124         two unnecessary .h files.
24125
24126 2001-07-04  Jim Meyering  <meyering@lucent.com>
24127
24128         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24129         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24130         distcheck failure.
24131
24132 2001-07-02  Jim Meyering  <meyering@lucent.com>
24133
24134         The following changes were prompted by suggestions from Bruno Haible.
24135
24136         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24137         is now generated.
24138         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24139         definition of EXTRA_DIST.
24140         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24141         ensure that the generated file is created/updated whenever the list
24142         of $(unlocked_functions) is changed.
24143         (jm-glibc-io.m4): New rule.
24144         (unlocked-io.h): New rule -- currently unused.
24145
24146 2001-06-24  Jim Meyering  <meyering@lucent.com>
24147
24148         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24149         unmatched right bracket, rather than kludging it with an extra,
24150         falsely-matching quote in a comment.  Patch by Akim Demaille.
24151
24152 2001-06-11  Jim Meyering  <meyering@lucent.com>
24153
24154         * lib/regex.c: Update from GNU libc.
24155
24156 2001-05-27  Jim Meyering  <meyering@lucent.com>
24157
24158         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24159         Check for ut_type in struct utmp.
24160
24161 2001-05-27  Jim Meyering  <meyering@lucent.com>
24162
24163         * lib/readutmp.h (UT_TYPE): Define.
24164
24165 2001-05-24  Jim Meyering  <meyering@lucent.com>
24166
24167         * lib/argmatch.c: Include "quote.h".
24168         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24169         quote function.  Reported by Göran Uddeborg.
24170
24171 2001-05-22  Jim Meyering  <meyering@lucent.com>
24172
24173         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24174         now that we use the package-supplied version unconditionally.
24175         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24176
24177 2001-05-21  Jim Meyering  <meyering@lucent.com>
24178
24179         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24180         shell syntax errors.
24181
24182 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24183
24184         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24185
24186 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24187
24188         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24189         Don't bother to check library strftime, since
24190         we'll be using our own my_strftime function anyway.
24191         Define my_strftime instead of strftime.
24192
24193 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24194
24195         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24196         which is not yet declared.
24197
24198 2001-05-15  Jim Meyering  <meyering@lucent.com>
24199
24200         * m4/regex.m4: Use proper quoting so brackets appear in the test
24201         program.
24202         Reported by, and with help from, Bruno Haible.
24203
24204 2001-05-13  Jim Meyering  <meyering@lucent.com>
24205
24206         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24207         undefined.
24208
24209 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24210
24211         dirname code cleanup.  base_name now behaves more compatibly
24212         with POSIX basename when given file names that have trailing
24213         slashes, and similarly for dir_name.  Add new primitives
24214         base_len and dir_len.  Put the directory-name-related decls
24215         into dirname.h.
24216
24217         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24218         * lib/backupfile.c (base_name): Likewise.
24219         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24220         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24221         * lib/makepath.c (strip_trailing_slashes): Likewise.
24222         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24223         ISSLASH): Likewise.
24224         * lib/rename.c (strip_trailing_slashes): Likewise.
24225         * lib/same.c (base_name): Likewise.
24226         * lib/stripslash.c (ISSLASH): Likewise.
24227
24228         * lib/addext.c: Include <dirname.h> after size_t is defined.
24229         * lib/backupfile.c: Likewise.
24230
24231         * lib/addext.c (addext): Use base_len to trim redundant
24232         trailing slashes instead of doing it ourselves.
24233         But do not trim the last slash if it is not redundant.
24234
24235         * lib/backupfile.c (find_backup_file_name,
24236         max_backup_version): Use base_len instead of rolling it ourselves.
24237         Handle the case of "" and (on DOS) "C:" correctly.
24238
24239         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24240         needed. Include <string.h>, <dirname.h>.
24241         (base_name): Allow file names ending in slashes, other than names
24242         that are all slashes.  In this case, return the basename followed
24243         by the slashes.  This is more general, and can be used in places
24244         where the original base_name purposely had an assertion failure.
24245         (base_len): New function.
24246
24247         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24248         Do not include <assert.h>; no longer needed.
24249         Include xalloc.h.
24250         (memrchr): Remove decl.
24251         (dir_name_r): Remove.
24252         (dir_len): Renamed from dirlen.  All callers changed.
24253         Rewrite in terms of base_name, for simplicity and consistency.
24254         (dir_name): Never return NULL.  All callers changed.
24255         Do not include <stdlib.h> in test program; no longer needed.
24256         return 0; is fine for test program.
24257
24258         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24259         New macros.
24260         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24261
24262         * lib/path-concat.c (path_concat): Use base_len to compute
24263         base length, not strlen; this means we cannot rely on memcpy
24264         to null-terminate.
24265
24266         * lib/same.c (STREQ): Remove.
24267         (same_name): Handle the case where the basename ends in trailing '/'.
24268
24269         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24270         a slash was stripped.  Do not strip the last slash after a
24271         file system prefix.
24272
24273 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24274
24275         * lib/Makefile.am (libfetish_a_SOURCES):
24276         Add strftime.c, since we now compile it on all hosts.
24277
24278         * lib/strftime.c (my_strftime):
24279         Define to nstrftime if emacs, but only if my_strftime is not defined.
24280         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24281         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24282         Add one more extra argument: a nanoseconds value.
24283         All uses changed.
24284         (ns): New macro.
24285         (my_strftime function): Add %N format.
24286         (emacs_strftimeu): Renamed from emacs_strftime,
24287         with extra ut argument.
24288
24289 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24290
24291         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24292
24293 2001-04-21  Jim Meyering  <meyering@lucent.com>
24294
24295         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24296         doesn't interfere.
24297
24298 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24299
24300         * m4/ftruncate.m4: Check for chsize.
24301         Link with ftruncate.o unconditionally if ftruncate is missing.
24302         This was required when cross-compiling to i586-mingw32msvc.
24303
24304 2001-04-08  Jim Meyering  <meyering@lucent.com>
24305
24306         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24307         recomputed; that's necessary when the offset spans a DST transition.
24308         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24309
24310 2001-04-02  Jim Meyering  <meyering@lucent.com>
24311
24312         * lib/regex.h, regex.c: Update from GNU libc.
24313
24314 2001-03-24  Jim Meyering  <meyering@lucent.com>
24315
24316         * m4/jm-macros.m4: Require autoconf-2.49d.
24317
24318 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24319
24320         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24321
24322 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24323
24324         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24325
24326 2001-03-17  Jim Meyering  <meyering@lucent.com>
24327
24328         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24329         now that the version in autoconf is equivalent.
24330         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24331
24332         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24333         Suggestion from Akim Demaille.
24334
24335         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24336         (jm_PREREQ_TEMPNAME): New function.
24337
24338 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24339
24340         * lib/tempname.c (uint64_t): Define to uintmax_t if
24341         not defined, and if UINT64_MAX is not defined.
24342         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24343         Reported by John David Anglin.
24344
24345 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24346
24347         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24348         resolve alias if codeset is empty.
24349         * lib/config.charset (BeOS): Use wildcard syntax.
24350
24351 2001-03-13  Jim Meyering  <meyering@lucent.com>
24352
24353         * lib/path-concat.c (path_concat)
24354         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24355         concatenating e.g., `C:' and `foo'.
24356         From Bruno Haible.
24357
24358 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24359
24360         * lib/localcharset.c (locale_charset): Don't use
24361         setlocale(LC_CTYPE,NULL). Don't return NULL.
24362         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24363
24364 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24365
24366         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24367         support for DOS/DJGPP.
24368
24369 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24370
24371         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24372         lacks mkstemp.  Compile our own tempname.c if we compile our own
24373         mkstemp.c, as mkstemp relies on tempname.
24374
24375 2001-03-01  Jim Meyering  <meyering@lucent.com>
24376
24377         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24378         AH_VERBATIM really does output its argument verbatim.
24379
24380 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24381
24382         * lib/Makefile.am (libfetish_a_SOURCES):
24383         Add dup-safer.c, fopen-safer.c.
24384         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24385
24386         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24387         * lib/unistd-safer.h: New files.
24388
24389 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24390
24391         The mkstemp replacement is taken from glibc 2.2.2, with some
24392         portability fixes for use outside glibc, as follows:
24393
24394         * lib/tempname.c (struct_stat64): New macro.
24395         (direxists, __gen_tempname): Use it.
24396         This avoids a portability problem with Solaris 8.
24397
24398         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24399         (<stddef.h>, <stdint.h>, <string.h>):
24400         Include only if STDC_HEADERS || _LIBC.
24401         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24402         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24403         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24404         (__set_errno): Define this macro if <errno.h> doesn't.
24405         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24406         Define these macros if <stdio.h> doesn't.
24407         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24408         Define these macros if <sys/stat.h>
24409         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24410         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24411         __xstat64): Define if not _LIBC.
24412         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24413         (__gen_tempname): Invoke gettimeofday only if
24414         HAVE_GETTIMEOFDAY || _LIBC;
24415         otherwise, fall back on plain "time".
24416         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24417
24418         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24419
24420         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24421
24422 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24423
24424         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24425
24426 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24427
24428         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24429         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24430         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24431         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24432
24433 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24434
24435         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24436         Remove workaround macros for hosts that have mbrtowc but not
24437         mbstate_t, as we now insist on proper declarations for both
24438         before using mbrtowc.
24439
24440 2001-02-17  Jim Meyering  <meyering@lucent.com>
24441
24442         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24443         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24444         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24445         UnixWare 7.1.1.
24446
24447         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24448         rather than AC_CACHE_VAL.
24449
24450 2001-02-17  Jim Meyering  <meyering@lucent.com>
24451
24452         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24453         around included file name.
24454
24455         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24456
24457         * lib/strftime.c: Update from GNU libc (the only changes were to
24458         comments).
24459
24460 2001-02-17  Jim Meyering  <meyering@lucent.com>
24461
24462         * lib/regex.c: Update from libc.
24463
24464 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24465
24466         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24467         clash.
24468
24469 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24470
24471         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24472         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24473         Reported by Mark Hounschell via Paul Eggert.
24474
24475 2001-02-07  Jim Meyering  <meyering@lucent.com>
24476
24477         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24478
24479 2001-02-05  Jim Meyering  <meyering@lucent.com>
24480
24481         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24482         it includes the patch required for `large file' support with at least
24483         HP-UX's 10.20 /bin/cc.
24484
24485 2001-02-03  Jim Meyering  <meyering@lucent.com>
24486
24487         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24488         AS_IF, now that it works once again (mysteriously).
24489         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24490
24491 2001-01-30  Jim Meyering  <meyering@lucent.com>
24492
24493         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24494         * m4/chown.m4: Rename conftestchown to conftest.chown.
24495         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24496         s/conftestdir2/conftest.d2/.
24497         * m4/utimes.m4: s/conftestdata/conftest.data/
24498         Inspired by Pavel Roskin's change in autoconf.
24499
24500 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24501
24502         * lib/config.charset: Update for FreeBSD 4.2.
24503
24504 2001-01-27  Jim Meyering  <meyering@lucent.com>
24505
24506         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24507         a use of AS_IF.
24508         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24509
24510 2001-01-26  Jim Meyering  <meyering@lucent.com>
24511
24512         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24513         quotearg.c includes it.
24514
24515 2001-01-26  Jim Meyering  <meyering@lucent.com>
24516
24517         * lib/quotearg.c: Include stddef.h.
24518         * lib/quote.c: Include stddef.h.
24519         Reported by Axel Kittenberger.
24520
24521         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24522         line in double quotes so that it evokes a better diagnostic.
24523         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24524         Reported by Axel Kittenberger.
24525
24526 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24527
24528         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24529         as if it was a `charset'.
24530
24531 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24532
24533         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24534         has const.
24535
24536 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24537
24538         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24539         to avoid a warning.  Add back 'const' to inptr.
24540
24541 2001-01-20  Jim Meyering  <meyering@lucent.com>
24542
24543         Be sure that headers are checked before used in code compiled
24544         for the type checks.
24545         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24546         In place of that, invoke jm_CHECK_ALL_TYPES.
24547         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24548         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24549         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24550         The check for ssize_t was mistakenly run before the test for unistd.h.
24551
24552         The configure-time check for stdbool.h was missing.
24553         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24554         (jm_PREREQ_HASH): New function.
24555
24556 2001-01-17  Jim Meyering  <meyering@lucent.com>
24557
24558         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24559         for autoconf-2.49c.
24560         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24561
24562 2001-01-16  Jim Meyering  <meyering@lucent.com>
24563
24564         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24565         From Bruno Haible.
24566
24567 2001-01-14  Jim Meyering  <meyering@lucent.com>
24568
24569         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24570         foo and bar.  Create conftestdir/ in the script, not in the C code.
24571         Remove directories in the script, not in the C code.
24572         Remove conftestdir{,2} before trying to create the directory.
24573         Make the entire configure script fail if the mkdir fails.
24574
24575 2001-01-14  Jim Meyering  <meyering@lucent.com>
24576
24577         * lib/rename.c: New file.  From Volker Borchert.
24578         Include stdlib.h, string.h or strings.h, and xalloc.h.
24579         Use strip_trailing_slashes rather than open-coding it.
24580
24581 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24582
24583         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24584
24585 2001-01-03  Jim Meyering  <meyering@lucent.com>
24586
24587         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24588         of local `inptr' to avoid warning with some system declarations of
24589         iconv.
24590
24591 2001-01-02  Volker Borchert  <bt@teknon.de>
24592
24593         * m4/rename.m4: New file.
24594         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24595
24596 2001-01-01  Jim Meyering  <meyering@lucent.com>
24597
24598         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24599         even on systems with utmpx.h.  It's necessary for the declaration of
24600         utmp's ut_user member.  Reported by Andreas Jaeger.
24601
24602         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24603         available. They are required for the declarations of getgrgid and
24604         getpwuid resp.
24605         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24606         Reported by Andreas Jaeger.
24607
24608 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24609
24610         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24611         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24612         so `make install' also works in VPATH builds.
24613
24614 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24615
24616         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24617         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24618         can be used in subdirectories.
24619
24620 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24621
24622         * lib/modechange.c: Do not assume that mode_t uses the
24623         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24624         the other-execute bit of FOO even if S_IXOTH != 1.
24625
24626         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24627         WOTH, XOTH, ALLM): New macros.
24628         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24629          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24630         Use them.
24631         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24632         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24633         (mode_compile):
24634         No need to use uintmax_t; unsigned long is long enough.
24635         Don't bother to get suffix since we don't use it.
24636
24637 2000-12-26  Jim Meyering  <meyering@lucent.com>
24638
24639         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24640         better with autoheader.
24641
24642 2000-12-24  Jim Meyering  <meyering@lucent.com>
24643
24644         * lib/hash.c (is_prime): Return explicit boolean values.
24645         (hash_get_first): Return NULL to appease Irix5.6's 89.
24646         Reported by Nelson Beebe.
24647
24648 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24649
24650         * lib/localcharset.c (locale_charset): Add support for Win32.
24651
24652 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24653
24654         * lib/physmem.h, lib/physmem.c: New files.
24655
24656         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24657         (noinst_HEADERS): Add physmem.h.
24658
24659         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24660         't' for compatibility with Solaris 8 sort.
24661
24662 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24663
24664         * lib/config.charset: Add support for BeOS.
24665
24666 2000-12-17  Jim Meyering  <meyering@lucent.com>
24667
24668         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24669         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24670
24671 2000-12-16  Jim Meyering  <meyering@lucent.com>
24672
24673         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24674         N and M) would have treated it like `chown N:N FILE'.
24675
24676         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24677
24678 2000-12-16  Jim Meyering  <meyering@lucent.com>
24679
24680         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24681         SHELLS_FILE to a file name that's useful on djgpp systems.
24682         Include stdlib.h.
24683         (ADDITIONAL_DEFAULT_SHELLS): Define.
24684         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24685         Based mostly on a patch from Prashant TR.
24686
24687 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24688
24689         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24690         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24691         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24692
24693 2000-12-08  Andreas Schwab  <schwab@suse.de>
24694
24695         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24696         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24697
24698 2000-12-07  Jim Meyering  <meyering@lucent.com>
24699
24700         * lib/stripslash.c (ISSLASH): Define.
24701         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24702         `/'.
24703         From Prashant TR.
24704
24705         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24706         (dir_name_r): Declare this function as static.
24707         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24708         manifest itself on a name containing a mix of slashes and
24709         backslashes.
24710         Make this function work with names starting with a DOS-style
24711         drive letter and colon prefix.
24712         (dir_name): Append `.' if necessary.
24713         Based mostly on patches from Prashant TR and Eli Zaretskii.
24714
24715         * lib/dirname.h (dir_name_r): Remove prototype.
24716
24717 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24718
24719         * m4/off_t-format.m4: Remove this file.
24720         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24721
24722 2000-12-06  Jim Meyering  <meyering@lucent.com>
24723
24724         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24725         replacement strtoull, we may well need the replacement strtoul, too.
24726         Check for declarations of strtoul and strtoull.
24727         Check for strtol.  Mainly as a cue to cause automake to include
24728         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24729         Check for limits.h -- strtol.c needs it.
24730
24731 2000-12-05  Jim Meyering  <meyering@lucent.com>
24732
24733         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24734
24735 2000-12-04  Jim Meyering  <meyering@lucent.com>
24736
24737         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24738         Also include memory.h, stdlib.h, unistd.h if appropriate.
24739         Reported by Andreas Jaeger (conflicting declaration of malloc).
24740
24741 2000-12-02  Jim Meyering  <meyering@lucent.com>
24742
24743         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24744         * m4/jm-macros.m4 (jm_MACROS): require it.
24745
24746 2000-12-02  Jim Meyering  <meyering@lucent.com>
24747
24748         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24749
24750 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24751
24752         * lib/memrchr.c: Include <config.h> before any system include file.
24753
24754 2000-11-30  Jim Meyering  <meyering@lucent.com>
24755
24756         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24757
24758 2000-11-30  Jim Meyering  <meyering@lucent.com>
24759
24760         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24761
24762 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24763
24764         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24765
24766 2000-11-26  Jim Meyering  <meyering@lucent.com>
24767
24768         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24769
24770 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24771
24772         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24773         size of (size_t) -1; it's not portable.
24774
24775 2000-11-17  Jim Meyering  <meyering@lucent.com>
24776
24777         * lib/strstr.c: Update from GNU libc.
24778
24779 2000-11-17  Akim Demaille  <akim@epita.fr>
24780
24781         * lib/obstack.h: Formatting changes.
24782         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24783         prevent type checking.
24784         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24785         cast the value to (void *): assigning a `foo *' to a `void *'
24786         variable is valid.
24787         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24788
24789 2000-11-16  Jim Meyering  <meyering@lucent.com>
24790
24791         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24792
24793 2000-11-11  Jim Meyering  <meyering@lucent.com>
24794
24795         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24796
24797 2000-11-10  Jim Meyering  <meyering@lucent.com>
24798
24799         * lib/obstack.h: Update from GNU libc.
24800         * lib/obstack.c: Likewise.
24801
24802 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24803
24804         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24805
24806 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24807
24808         * lib/getusershell.c (setusershell): Use rewind rather than
24809         fseek/fseeko, to avoid configuration hassles with fseeko.
24810         Don't bother opening SHELLS_FILE if shellstream is NULL;
24811         it's not necessary.
24812
24813 2000-11-05  Jim Meyering  <meyering@lucent.com>
24814
24815         * lib/makepath.h (make_dir): Declare.
24816         * lib/makepath.c (make_dir): Remove `static' attribute.
24817         Tweak a comment.
24818
24819 2000-11-04  Jim Meyering  <meyering@lucent.com>
24820
24821         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24822
24823 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24824
24825         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24826         last one in a bucket, advance to the next bucket.
24827
24828 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24829
24830         * lib/fnmatch.c: Do not comment out all the code if we are using
24831         the GNU C library, because in some cases we are replacing buggy
24832         code in the GNU C library itself.
24833
24834 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24835
24836         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24837         (regex_compile): Catch bogus \(\1\).
24838
24839 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24840
24841         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24842         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24843         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24844
24845 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24846
24847         * lib/error.h, getline.h, modechange.h:
24848         Remove "2000" from Copyright line, as the file hasn't been
24849         changed this year other than in the copyright notice.
24850
24851         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24852         was changed this year.
24853
24854 2000-10-29  Jim Meyering  <meyering@lucent.com>
24855
24856         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24857         renaming.
24858         * m4/ls-mntd-fs.m4: Likewise
24859
24860 2000-10-29  Jim Meyering  <meyering@lucent.com>
24861
24862         * lib/xstat.in: Fix grammar in comment.
24863
24864 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24865
24866         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24867         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24868         doesn't define __restrict_arr.
24869
24870 2000-10-28  Jim Meyering  <meyering@lucent.com>
24871
24872         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24873         (jm_PREREQ_MEMCHR): New function.
24874
24875 2000-10-28  Jim Meyering  <meyering@lucent.com>
24876
24877         * lib/memchr.c: Update from libc.
24878         Adjust for portability:
24879         [HAVE_STDLIB_H]: Include stdlib.h.
24880         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24881         Undef __memchr, too.
24882         [!weak_alias]: Define __memchr to memchr.
24883
24884         * lib/regex.c: Update from libc.
24885         * lib/regex.h: Likewise.
24886         * lib/getopt1.c: Likewise.
24887         * lib/memcmp.c: Likewise.
24888
24889         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24890         Avoid using fseek, when possible -- it's broken by design.
24891         Patch by Ulrich Drepper.
24892
24893 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24894
24895         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24896         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24897         Giving in to popular pressure to shut up the compiler with casts.
24898
24899 2000-10-26  Jim Meyering  <meyering@lucent.com>
24900
24901         * lib/strftime.c: Update from libc.
24902
24903 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24904
24905         * regex.c: More `unsigned char' -> `re_char' changes.
24906         Also change several `int' into `re_wchar_t'.
24907         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24908         (PUSH_FAILURE_POINTER): Don't cast any more.
24909         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24910         We want GCC to complain, since this piece of code makes
24911         re_match non-reentrant, which *should* be fixed.
24912         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24913         (EXTEND_BUFFER): Use RETALLOC.
24914         (SET_LIST_BIT): Don't cast.
24915         (re_wchar_t): New type.
24916         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24917         that those two functions will always properly return.
24918         (IMMEDIATE_QUIT_CHECK): Cast to void.
24919         (analyse_first): Use recursion rather than an explicit stack.
24920         (re_compile_fastmap): Can't fail anymore.
24921         (re_search_2): Don't check re_compile_fastmap for failure.
24922         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24923         Now also sets the new value (passed in a new argument).
24924         (re_match_2_internal): Use it.
24925         Also, use a new var `reg' of type size_t when looping through regs
24926         rather than reuse the inappropriate `mcnt'.
24927
24928 2000-10-25  Jim Meyering  <meyering@lucent.com>
24929
24930         * lib/obstack.c: Update from libc.
24931
24932 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24933
24934         * regex.c (regex_compile): Change the way of handling a range from
24935         a char less than 256 to a char not less than 256.
24936
24937 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24938
24939         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24940         NT-Emacs only.
24941         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24942         so that re_search functions only quit when callers expect them to.
24943
24944 2000-10-23  Jim Meyering  <meyering@lucent.com>
24945
24946         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24947         wrong.  That set_locale call must not have any side effects.
24948         From Paul Eggert.
24949
24950 2000-10-22  Jim Meyering  <meyering@lucent.com>
24951
24952         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24953         [CYCLIC]: Remove now-unused definition.
24954
24955         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24956         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24957         Suggestion from Ulrich Drepper.
24958
24959 2000-10-21  Jim Meyering  <meyering@lucent.com>
24960
24961         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24962         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24963         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24964
24965 2000-10-21  Jim Meyering  <meyering@lucent.com>
24966
24967         * lib/dirname.c (memrchr): Declare if necessary.
24968         (dir_name): Remove the restriction that there be no
24969         trailing slashes.  Now, this code skips past them, effectively
24970         ignoring them.
24971         [TEST_DIRNAME] (main): New unit tests.
24972
24973         * lib/memrchr.c: New file from GNU libc.
24974         Undef __memrchr, too.
24975         [!weak_alias]: Define __memrchr to memrchr.
24976         Guard weak_alias use with `#ifdef weak_alias'.
24977
24978 2000-10-21  Jim Meyering  <meyering@lucent.com>
24979
24980         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24981         (dir_name): Use dir_name_r.
24982         * lib/dirname.h (dir_name_r): Declare it.
24983
24984 2000-10-17  Jim Meyering  <meyering@lucent.com>
24985
24986         * lib/quote.h (PARAMS): Define and use.
24987         Reported by Akim Demaille.
24988
24989         * lib/getopt.c: Update from libc.
24990
24991 2000-10-16  Jim Meyering  <meyering@lucent.com>
24992
24993         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24994         setlocale.
24995         From Jan Fedak.
24996
24997 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24998
24999         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25000
25001 2000-09-25  Jim Meyering  <meyering@lucent.com>
25002
25003         * lib/md5.h (rol): Define (from GnuPG).
25004
25005         * lib/sha.c: Give credit (GnuPG) where due.
25006         (M): Use rol rather than open-coding it.
25007         Add a FIXME comment.
25008
25009 2000-09-21  Jim Meyering  <meyering@lucent.com>
25010
25011         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25012         Reported by Michael Stone.
25013
25014 2000-09-20  Jim Meyering  <meyering@lucent.com>
25015
25016         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25017         (noinst_HEADERS): Add sha.h.
25018         Based on code from Scott G. Miller and from GnuPG.
25019
25020 2000-09-18  Jim Meyering  <meyering@lucent.com>
25021
25022         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25023         LIBS. Otherwise, everyone ends up linking with -lelf for some
25024         configurations.
25025         Reported by Mike Stone.
25026
25027 2000-09-15  Jim Meyering  <meyering@lucent.com>
25028
25029         * lib/regex.c: Update from libc.
25030
25031 2000-09-10  Jim Meyering  <meyering@lucent.com>
25032
25033         * lib/getopt.c (_getopt_internal): Update from glibc.
25034
25035 2000-09-09  Jim Meyering  <meyering@lucent.com>
25036
25037         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25038         think it should be used as a general replacement for isascii.
25039         * lib/fnmatch.c: Likewise.
25040         * lib/mbswidth.c: Likewise
25041         * lib/regex.c: Likewise.
25042
25043         Don't use atoi.
25044         * lib/userspec.c: Include sys/param.h and limits.h.
25045         Include xstrtol.h.
25046         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25047         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25048         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25049         UID, GID.  Check range.
25050
25051 2000-09-06  Jim Meyering  <meyering@lucent.com>
25052
25053         * lib/getopt.c (_getopt_internal): Update from glibc.
25054
25055 2000-08-30  Jim Meyering  <meyering@lucent.com>
25056
25057         * lib/strftime.c: Merge in changes from GNU libc.
25058
25059 2000-08-26  Jim Meyering  <meyering@lucent.com>
25060
25061         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25062         * m4/fpending.m4: New file.
25063
25064 2000-08-26  Jim Meyering  <meyering@lucent.com>
25065
25066         * lib/closeout.c: Include "__fpending.h".
25067         (close_stdout_status): Return right away if there's nothing to flush.
25068
25069         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25070         * lib/__fpending.c: New file.
25071         * lib/__fpending.h: New file.
25072
25073 2000-08-20  Jim Meyering  <meyering@lucent.com>
25074
25075         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25076         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25077         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25078
25079 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25080
25081         Improve fileutils installation on systems where running
25082         programs (like install) can't be unlinked.
25083         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25084         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25085
25086 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25087
25088         Standardize on "memory exhausted" instead of "Memory exhausted"
25089         or "virtual memory exhausted".
25090         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25091         "virtual memory exhausted".
25092         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25093         our own message.
25094         * lib/userspec.c (parse_user_spec): Likewise.
25095         * lib/bumpalloc.h: comment fix
25096         * lib/same.c, userspec.c: Include xalloc.h.
25097
25098         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25099         not char *const and pointing to a constant array.
25100         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25101         (xrealloc): Comment fix.
25102
25103         * lib/userspec.c (parse_user_spec):
25104         Don't translate a message until just before returning,
25105         to avoid unnecessary translation.
25106
25107 2000-08-07  Jim Meyering  <meyering@lucent.com>
25108
25109         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25110         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25111         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25112         getgroups.c, gethostname.c, getopt.h, group-member.c,
25113         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25114         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25115         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25116         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25117         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25118         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25119         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25120         yesno.c: Back out Copyright date changes for each file with no change
25121         this year.  This eases coordination with other programs using the same
25122         source code modules.  From Paul Eggert.
25123
25124 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25125
25126         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25127         not char, for compatibility with glibc 2.1.3 strftime.c.
25128
25129 2000-08-03  Greg McGary  <greg@mcgary.org>
25130
25131         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25132         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25133         (EXTEND_BUFFER): Use them.
25134
25135 2000-08-01  Jim Meyering  <meyering@lucent.com>
25136
25137         * lib/dirname.c (ISSLASH): Define.
25138         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25139         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25140         both `\' and `/' may be use as path separators.
25141         Based on a patch from Prashant TR.
25142
25143 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25144
25145         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25146         slot vector a constant, since it might get modified.
25147
25148 2000-07-31  Jim Meyering  <meyering@lucent.com>
25149
25150         * lib/xmalloc.c: Use `virtual memory exhausted', not
25151         `Memory exhausted'.
25152         * lib/obstack.c (print_and_abort): Likewise.
25153
25154 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25155
25156         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25157         buffer, so that the caller can always quote one small
25158         component of a "memory exhausted" message in slot 0.
25159         From a suggestion by Jim Meyering.
25160
25161 2000-07-30  Jim Meyering  <meyering@lucent.com>
25162
25163         * lib/makepath.c (make_path): Quote the other instance, too.
25164
25165         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25166         (STATIC_BUF_SIZE): Define.
25167         (quotearg_n_options): Use only statically allocated storage when
25168         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25169         than STATIC_BUF_SIZE.
25170
25171 2000-07-29  Jim Meyering  <meyering@lucent.com>
25172
25173         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25174         * lib/dirname.c (dir_name): Likewise.
25175
25176         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25177         `/'.
25178
25179         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25180         (dir_name): Assert that there are no trailing slashes.
25181
25182 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25183
25184         * lib/mbswidth.h (mbswidth): Add a flags argument.
25185         (mbswidth): New declaration.
25186         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25187         * lib/mbswidth.c (mbswidth): Add a flags argument.
25188         (mbsnwidth): New function.
25189
25190 2000-07-24  Jim Meyering  <meyering@lucent.com>
25191
25192         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25193
25194 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25195
25196         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25197
25198 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25199
25200         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25201         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25202         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25203         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25204         invoke multibyte primitives.
25205
25206 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25207
25208         * lib/quotearg.c:
25209         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25210         so that mbstate_t is always defined.
25211
25212         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25213         be 1 in at least one GCC installation, and this configuration
25214         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25215         performance on hosts that have mbrtowc but have only unibyte
25216         locales, but I assume these hosts are rare.
25217
25218 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25219
25220         * lib/mbswidth.c (_XOPEN_SOURCE):
25221         Don't define; this causes problems on Solaris 7.
25222         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25223
25224 2000-07-23  Jim Meyering  <meyering@lucent.com>
25225
25226         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25227         too: getgrgid, getpwuid, getuid.
25228
25229 2000-07-23  Jim Meyering  <meyering@lucent.com>
25230
25231         * lib/basename.c (base_name): Add an assertion.
25232
25233 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25234
25235         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25236         shadow its mbsinit function.
25237
25238 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25239
25240         * lib/mbswidth.h: New file.
25241         * lib/mbswidth.c: New file.
25242         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25243         (noinst_HEADERS): Add mbswidth.h.
25244
25245 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25246
25247         * lib/config.charset: Add support for FreeBSD. Improve support for
25248         HP-UX and IRIX 6.
25249
25250 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25251
25252         * m4/mbswidth.m4: New file.
25253         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25254
25255 2000-07-15  Jim Meyering  <meyering@lucent.com>
25256
25257         * lib/makepath.c: Include quote.h.
25258         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25259         corresponding argument in a `quote (...)' call.
25260         Give better diagnostics.
25261
25262         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25263         (noinst_HEADERS): Add quote.h.
25264
25265         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25266         from tar's src/misc.c.
25267         * lib/quote.h: New file.  Prototypes for same.
25268
25269 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25270
25271         From a suggestion by Bruno Haible.
25272         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25273         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25274         to decide whether to define the BeOS workaround macro;
25275         this adjusts to the change to AC_MBSTATE_T.
25276
25277 2000-07-14  Jim Meyering  <meyering@lucent.com>
25278
25279         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25280         jm_AC_TYPE_UINTMAX_T.
25281
25282 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25283
25284         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25285
25286         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25287         quotearg_buffer_restyled): Add support for
25288         clocale_quoting_style.  Undo previous change to
25289         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25290         and "{RIGHT QUOTATION MARK}" msgids.
25291
25292 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25293
25294         From a suggestion by Bruno Haible.
25295         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25296         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25297         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25298         and mbstate_t, to a single-part test that simply defines mbstate_t.
25299         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25300         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25301
25302 2000-07-10  Jim Meyering  <meyering@lucent.com>
25303
25304         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25305
25306         * m4/gnu-source.m4: Output to confdefs.h directly.
25307         Suggestion from Akim Demaille.
25308
25309 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25310
25311         The old behavior of quoting `like this' doesn't look good with
25312         newer, ISO-style fonts.  See:
25313         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25314
25315         Instead, quote "like this" by default.  Let the translator
25316         tailor the locale-specific quoting behavior by providing
25317         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25318
25319         * lib/quotearg.c (N_): New macro.
25320         (gettext_default): New function.
25321         (quotearg_buffer_restyled): Use
25322         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25323         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25324
25325 2000-07-09  Jim Meyering  <meyering@lucent.com>
25326
25327         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25328         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25329
25330         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25331         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25332
25333 2000-07-09  Jim Meyering  <meyering@lucent.com>
25334
25335         * lib/Most files: Update copyright dates to include 2000.
25336
25337 2000-07-08  Jim Meyering  <meyering@lucent.com>
25338
25339         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25340         if not defined.
25341         (xgethostname): Remove now-unnecessary #ifdef.
25342         Move declaration of `err' into loop where it's used.
25343
25344 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25345         and Bruno Haible  <haible@clisp.cons.org>
25346
25347         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25348         only if the test for an object-type mbstate_t fails.  This
25349         prevents us from mistakenly reporting that mbstate_t is a
25350         system object type after we "#define mbstate_t int" to work
25351         around its lack.
25352
25353 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25354         and Bruno Haible  <haible@clisp.cons.org>
25355
25356         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25357
25358 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25359
25360         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25361         to strerror_r.
25362         Include <ctype.h> for use of isalpha.
25363
25364 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25365
25366         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25367         by allocating a larger buffer. Test the gethostname return value for
25368         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25369         returns an error and ENAMETOOLONG isn't defined.
25370
25371 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25372
25373         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25374         dimension.
25375
25376 2000-07-04  Jim Meyering  <meyering@lucent.com>
25377
25378         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25379         of the deprecated AC_CHECKING.
25380
25381 2000-07-04  Jim Meyering  <meyering@lucent.com>
25382
25383         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25384         Reported by Bruno Haible.
25385
25386 2000-07-04  Jim Meyering  <meyering@lucent.com>
25387
25388         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25389         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25390         lacks mbrtowc.
25391
25392 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25393
25394         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25395         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25396
25397 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25398         and Bruno Haible  <haible@clisp.cons.org>
25399
25400         * lib/quotearg.c (mbrtowc):
25401         Assign to *pwc, and return 1 only if result is nonzero.
25402         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25403
25404 2000-07-03  Jim Meyering  <meyering@lucent.com>
25405
25406         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25407
25408 2000-07-03  Jim Meyering  <meyering@lucent.com>
25409
25410         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25411         This is necessary to get a definition of e.g., UTMP_FILE on
25412         HP-UX 10.20.
25413         From Bob Proulx.
25414
25415 2000-07-02  Jim Meyering  <meyering@lucent.com>
25416
25417         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25418
25419         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25420         AC_LIBOBJ(function_name).
25421         * m4/chown.m4: Likewise.
25422         * m4/fnmatch.m4: Likewise.
25423         * m4/ftruncate.m4: Likewise.
25424         * m4/getgroups.m4: Likewise.
25425         * m4/getline.m4: Likewise.
25426         * m4/group-member.m4: Likewise.
25427         * m4/jm-macros.m4: Likewise.
25428         * m4/lstat.m4: Likewise.
25429         * m4/malloc.m4: Likewise.
25430         * m4/memcmp.m4: Likewise.
25431         * m4/nanosleep.m4: Likewise.
25432         * m4/putenv.m4: Likewise.
25433         * m4/realloc.m4: Likewise.
25434         * m4/regex.m4: Likewise.
25435         * m4/stat.m4: Likewise.
25436         * m4/strftime.m4: Likewise.
25437
25438 2000-07-02  Jim Meyering  <meyering@lucent.com>
25439
25440         * lib/quotearg.c (mbstate_t): Don't define here.
25441
25442 2000-07-02  Jim Meyering  <meyering@lucent.com>
25443
25444         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25445
25446 2000-07-01  Jim Meyering  <meyering@lucent.com>
25447
25448         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25449
25450 2000-07-01  Jim Meyering  <meyering@lucent.com>
25451
25452         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25453         problem.
25454
25455 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25456
25457         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25458         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25459
25460 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25461
25462         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25463         per change in ../m4/ls-mntd-fs.m4.
25464         (read_filesystem_list): Ignore symbolic links.
25465
25466 2000-06-29  Jim Meyering  <meyering@lucent.com>
25467
25468         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25469         for declaration of strcmp.
25470
25471         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25472
25473         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25474         Avoid warning by casting result to `char *' to remove `const'.
25475
25476 2000-06-28  Jim Meyering  <meyering@lucent.com>
25477
25478         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25479         included by quotearg.c, for which we perform this test.  From
25480         Bruno Haible.
25481
25482 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25483
25484         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25485         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25486         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25487
25488 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25489
25490         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25491
25492 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25493
25494         savedir now sets errno on failure and invokes xmalloc to get memory.
25495         Fix a couple of other minor bugs while we're at it.
25496
25497         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25498         (NAMLEN): Remove macro.
25499         (malloc, realloc): Remove decls.
25500         (stpcpy): Likewise.
25501         ("xalloc.h"): Include.
25502         (NAME_SIZE_DEFAULT): New macro.
25503         (savedir): Use xmalloc / xrealloc to allocate memory.
25504         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25505         Skip "" directory entries.
25506         Use strlen to calculate directory entry length, since the old method
25507         is rarely used these days and isn't worth supporting.
25508         Don't use a pointer after freeing it.
25509         Check for integer overflow when calculating allocation size.
25510         Use memcpy to copy entries, instead of stpcpy.
25511         Set errno properly when returning NULL.
25512         Check for readdir error.
25513
25514 2000-06-26  Jim Meyering  <meyering@lucent.com>
25515
25516         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25517
25518 2000-06-25  Jim Meyering  <meyering@lucent.com>
25519
25520         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25521         Linux header bug when _XOPEN_SOURCE is defined to 500.
25522
25523 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25524
25525         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25526         deficiency.
25527
25528 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25529
25530         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25531         Include xalloc.h.
25532         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25533
25534 2000-06-24  Jim Meyering  <meyering@lucent.com>
25535
25536         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25537         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25538         for which strerror does return char*, but which lacks a conveniently
25539         accessible declaration of the function.  If the compile-test says
25540         strerror_r doesn't work, then resort to a `run'-test that works on
25541         BeOS and segfaults on DEC Unix.
25542
25543 2000-06-24  Jim Meyering  <meyering@lucent.com>
25544
25545         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25546
25547 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25548
25549         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25550         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25551
25552 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25553
25554         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25555         (mbrtowc, mbstate_t): Define substitutes if
25556         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25557         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25558         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25559
25560 2000-06-23  Jim Meyering  <meyering@lucent.com>
25561
25562         * m4/afs.m4: Add missing AC_MSG_RESULT.
25563         Reported by Bruno Haible.
25564
25565         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25566         Suggestion from Bruno Haible.
25567
25568 2000-06-23  Jim Meyering  <meyering@lucent.com>
25569
25570         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25571
25572 2000-06-21  Jim Meyering  <meyering@lucent.com>
25573
25574         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25575
25576 2000-06-21  Jim Meyering  <meyering@lucent.com>
25577
25578         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25579         (noinst_HEADERS): Add getstr.h.
25580
25581         * lib/getline.c (getstr): Move into a separate file.
25582         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25583         the following changes: new parameter, delim2; both delim[12]
25584         parameters have type `int', not `char'.  The latter would lose
25585         with 8-bit delimiters.
25586         * lib/getstr.h: New file.
25587
25588 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25589
25590         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25591         than 1024, return a memory chunk of least possible size, instead
25592         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25593         Use free/xmalloc instead of xrealloc to avoid copying for very long
25594         paths.
25595
25596 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25597
25598         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25599         the empty string.
25600
25601 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25602
25603         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25604         address, not strdup.  Include <stdlib.h> and don't declare free().
25605
25606 2000-06-19  Jim Meyering  <meyering@lucent.com>
25607
25608         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25609
25610 2000-06-18  Jim Meyering  <meyering@lucent.com>
25611
25612         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25613
25614         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25615         `checking whether...' message to be consistent with that of the
25616         lstat test.
25617
25618 2000-06-18  Jim Meyering  <meyering@lucent.com>
25619
25620         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25621         Besides, these days every porting target provides a mkdir function.
25622
25623         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25624         needed. (this snippet comes from src/system.h).
25625
25626 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25627
25628         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25629
25630 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25631
25632         * lib/human.c (adjust_value): New function.
25633         (human_readable_inexact): Apply rounding style even when
25634         printing approximate values.
25635
25636 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25637
25638         * lib/human.c (human_readable_inexact): Allow an input block
25639         size that is not a multiple of the output block size, and vice versa.
25640         Reported by Piergiorgio Sartor.
25641
25642 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25643
25644         * lib/getdate.y (get_date): Apply relative times after time
25645         zone indicator, not before.  Reported by Todd A. Jacobs.
25646
25647 2000-06-13  Jim Meyering  <meyering@lucent.com>
25648
25649         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25650
25651         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25652
25653 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25654
25655         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25656
25657 2000-06-12  Jim Meyering  <meyering@lucent.com>
25658
25659         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25660         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25661         optional argument.
25662         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25663         the optional argument, `lib'.
25664
25665 2000-06-08  Jim Meyering  <meyering@lucent.com>
25666
25667         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25668
25669 2000-06-04  Paul Eggert  <eggert@twinsun.com>