947bb9e5ce39fe5cccbc96c1f2227a1154aca455
[gnulib.git] / ChangeLog
1 2007-02-18  Bruno Haible  <bruno@clisp.org>
2
3         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
4         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5         HAVE_GETSUBOPT.
6         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
7         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
8         * lib/getsubopt.h: Remove file.
9         * modules/getsubopt (Files): Remove lib/getsubopt.h.
10         (Depends-on): Add stdlib.
11         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
12         (Includes): Use <stdlib.h> instead of getsubopt.h.
13         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
14         Set HAVE_GETSUBOPT.
15         * lib/getsubopt.c: Don't include getsubopt.h.
16
17 2007-02-18  Bruno Haible  <bruno@clisp.org>
18
19         * modules/fchdir (Depends-on): Add dup2.
20
21 2007-02-18  Bruno Haible  <bruno@clisp.org>
22
23         * lib/stdlib_.h: Handle glibc's special invocation convention
24         specially.
25
26 2007-02-18  Bruno Haible  <bruno@clisp.org>
27
28         * modules/stdlib-tests: New file.
29         * tests/test-stdlib.c: New file.
30
31         * modules/mkstemp (Files): Remove lib/mkstemp.h.
32         (Depends-on): Add stdlib.
33         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
34         (Includes): Use <stdlib.h> instead of mkstemp.h.
35         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
36         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
37         * lib/mkstemp.c: Don't include mkstemp.h.
38         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
39         * lib/stdlib--.h: Don't include mkstemp.h.
40
41         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
42         (Depends-on): Add stdlib.
43         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
44         (Includes): Use <stdlib.h> instead of mkdtemp.h.
45         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
46         HAVE_MKDTEMP.
47         * lib/mkdtemp.c: Don't include mkdtemp.h.
48         * lib/clean-temp.c: Don't include mkdtemp.h.
49
50         * modules/exit (Files): Remove lib/exit.h.
51         (Depends-on): Add stdlib.
52         (Makefile.am): Remove lib_SOURCES.
53         (Include): Use <stdlib.h> instead of exit.h.
54         * lib/argmatch.c: Don't include exit.h.
55         * lib/execute.c: Likewise.
56         * lib/pagealign_alloc.c: Likewise.
57         * lib/pipe.c: Likewise.
58         * lib/wait-process.c: Likewise.
59         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
60         * lib/exitfail.c: Likewise.
61         * lib/savewd.c: Likewise.
62         * lib/xsetenv.c: Likewise.
63
64
65         * modules/stdlib: New file.
66         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
67         and extra comments about mkstemp().
68         * lib/exit.h: Remove file.
69         * lib/mkdtemp.h: Remove file.
70         * lib/mkstemp.h: Remove file.
71         * m4/stdlib_h.m4: New file.
72         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
73
74 2007-02-18  Bruno Haible  <bruno@clisp.org>
75
76         * modules/math-tests: New file.
77         * tests/test-math.c: New file.
78
79         * modules/math: New file.
80         * modules/mathl (Files): Remove lib/mathl.h.
81         (Depends-on): Add math.
82         (Makefile.am): Don't mention mathl.h.
83         (Include): Use <math.h> instead of mathl.h.
84         * lib/math_.h: New file.
85         * lib/mathl.h: Remove file.
86         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
87         mathl.h.
88         * lib/asinl.c: Likewise.
89         * lib/atanl.c: Likewise.
90         * lib/ceill.c: Likewise.
91         * lib/cosl.c: Likewise.
92         * lib/expl.c: Likewise.
93         * lib/floorl.c: Likewise.
94         * lib/frexpl.c: Likewise.
95         * lib/ldexpl.c: Likewise.
96         * lib/logl.c: Likewise.
97         * lib/sincosl.c: Likewise.
98         * lib/sinl.c: Likewise.
99         * lib/sqrtl.c: Likewise.
100         * lib/tanl.c: Likewise.
101         * lib/trigl.c: Likewise.
102         * m4/math_h.m4: New file.
103         * MODULES.html.sh (Mathematics): Add math.
104
105 2007-02-17  Bruno Haible  <bruno@clisp.org>
106
107         * modules/wctype-tests: New file.
108         * tests/test-wctype.c: New file.
109
110         * modules/wchar-tests: New file.
111         * tests/test-wchar.c: New file.
112
113         * modules/unistd-tests: New file.
114         * tests/test-unistd.c: New file.
115
116         * modules/time-tests: New file.
117         * tests/test-time.c: New file.
118
119         * modules/sysexits-tests: New file.
120         * tests/test-sysexits.c: New file.
121
122         * modules/sys_time-tests: New file.
123         * tests/test-sys_time.c: New file.
124
125         * modules/sys_stat-tests: New file.
126         * tests/test-sys_stat.c: New file.
127
128         * modules/sys_socket-tests: New file.
129         * tests/test-sys_socket.c: New file.
130
131         * modules/sys_select-tests: New file.
132         * tests/test-sys_select.c: New file.
133
134         * modules/string-tests: New file.
135         * tests/test-string.c: New file.
136
137         * modules/stdbool-tests: New file.
138         * tests/test-stdbool.c: New file.
139
140         * modules/netinet_in-tests: New file.
141         * tests/test-netinet_in.c: New file.
142
143         * modules/inttypes-tests: New file.
144         * tests/test-inttypes.c: New file.
145
146         * modules/fcntl-tests: New file.
147         * tests/test-fcntl.c: New file.
148
149         * modules/byteswap-tests: New file.
150         * tests/test-byteswap.c: New file.
151
152         * modules/arpa_inet-tests: New file.
153         * tests/test-arpa_inet.c: New file.
154
155 2007-02-17  Bruno Haible  <bruno@clisp.org>
156
157         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
158         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
159         if the corresponding module is not enabled. Emit link warnings if
160         the function is used nevertheless.
161         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
162         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
163         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
164         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
165         * modules/inttypes (Depends-on): Add link-warning.
166         (Makefile.am): Copy the contents of build-aux/link-warning.h into
167         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
168         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
169         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
170         * modules/imaxdiv (configure.ac): Likewise.
171         * modules/strtoimax (configure.ac): Likewise.
172         * modules/strtoumax (configure.ac): Likewise.
173         
174 2007-02-17  Bruno Haible  <bruno@clisp.org>
175
176         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
177         gl_STRING_MODULE_INDICATOR_DEFAULTS.
178         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
179         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
180
181 2007-02-17  Bruno Haible  <bruno@clisp.org>
182
183         * modules/link-warning: New file.
184         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
185         * lib/string_.h (GL_LINK_WARNING): Remove definition.
186         * modules/string (Depends-on): Add link-warning.
187         (Makefile.am): Copy the contents of build-aux/link-warning.h into
188         string.h.
189         * MODULES.html.sh (Support for building libraries and executables): Add
190         link-warning.
191
192 2007-02-17  Bruno Haible  <bruno@clisp.org>
193
194         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
195         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
196         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
197         long lines.
198
199 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
200             Bruno Haible  <bruno@clisp.org>
201
202         * modules/tmpfile: New file.
203         * lib/tmpfile.c: New file.
204         * m4/tmpfile.m4: New file.
205         * MODULES.html.sh (func_all_modules): New section "Input/output".
206
207 2007-02-15  Bruno Haible  <bruno@clisp.org>
208
209         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
210         (supports_delete_on_close): New function.
211         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
212
213 2007-02-14  Bruno Haible  <bruno@clisp.org>
214
215         * modules/mbspcasecmp-tests: New file.
216         * tests/test-mbspcasecmp.sh: New file.
217         * tests/test-mbspcasecmp.c: New file.
218
219         New module mbspcasecmp.
220         * modules/mbspcasecmp: New file.
221         * lib/mbspcasecmp.c: New file.
222         * lib/string_.h (strncasecmp): Change warning message.
223         (mbspcasecmp): New declaration.
224         * m4/mbspcasecmp.m4: New file.
225         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
226         GNULIB_MBSPCASECMP.
227         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
228         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
229
230 2007-02-14  Bruno Haible  <bruno@clisp.org>
231
232         * modules/mbsncasecmp-tests: New file.
233         * tests/test-mbsncasecmp.sh: New file.
234         * tests/test-mbsncasecmp.c: New file.
235
236         New module mbsncasecmp.
237         * modules/mbsncasecmp: New file.
238         * lib/mbsncasecmp.c: New file.
239         * lib/string_.h (mbsncasecmp): New declaration.
240         * m4/mbsncasecmp.m4: New file.
241         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
242         GNULIB_MBSNCASECMP.
243         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
244         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
245
246 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
247
248         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
249         Verify that it doesn't overlap with our flags.
250         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
251         do not have the desired effect in multibyte locales; instead, use
252         mbscasecmp.
253         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
254         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
255         we don't require GNU fnmatch ourselves (if our users require it, they
256         should do so explicitly).
257
258         Fix regex code so it doesn't rely on strcasecmp.
259         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
260         Otherwise, include gnulib's langinfo.h.
261         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
262         undesirable behavior in non-C locales.  Instead, rely on localecharset.
263         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
264         * modules/regex (FILES): Remove m4/codeset.m4.
265         (Depends-on): Add localcharset.  Remove strcase.
266
267 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
268
269         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
270         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
271
272 2007-02-13  Bruno Haible  <bruno@clisp.org>
273
274         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
275         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
276
277 2007-02-12  Bruno Haible  <bruno@clisp.org>
278
279         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
280         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
281         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
282         time warning rather than a link error.
283
284 2007-02-12  Bruno Haible  <bruno@clisp.org>
285
286         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
287         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
288         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
289
290 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
291
292         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
293         args, not 2.
294
295 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
296
297         New module 'time', so that apps can include <time.h> as per
298         POSIX and GNU instead of separate include files like time_r.h
299         and timegm.h.  This implementation tries out a simpler approach
300         for replacing decls in standard include files (as compared to
301         the string module), somewhat as an experiment.
302
303         * config/srclist.txt: Comment out mktime.c for now.
304         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
305         since it doesn't apply any more.  Use generic wording instead.
306         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
307         'time'.
308         * lib/time_.h, m4/time_h.m4, modules/time: New files.
309         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
310         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
311         Don't include <sys/types.h>; no longer needed since we assume C89.
312         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
313         * lib/strftime.c: Likewise.
314         * lib/time_r.c: Likewise.
315         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
316         * lib/nanosleep.c: Include <time.h> first, to check interface.
317         * lib/strptime.c: Likewise.
318         * lib/time_r.c: Likewise.
319         * lib/timegm.c: Likewise.
320         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
321         needed.
322         * lib/timegm.c: Don't include timegm.h; no longer needed.
323         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
324         time.h now handles any problems in that area.
325         (struct timespec, nanosleep): Remove; time.h now arranges for these.
326         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
327         that time.h defines struct timespec.
328         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
329         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
330         handles that.
331         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
332         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
333         needed.  Set REPLACE_LOCALTIME.
334         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
335         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
336         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
337         nanosleep; time_h.m4 now does that.  Don't require
338         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
339         module handles this now.
340         * modules/getdate (Depends-on): Remove timespec.  Add time.
341         * modules/nanosleep (Depends-on): Likewise.
342         * modules/stat-time (Depends-on): Likewise.
343         * modules/nanosleep (Include): Include time.h, not timespec.h.
344         * modules/strptime (Files): Remove lib/strptime.h.
345         (Depends-on): Add extensions, time.
346         (Include): Include time.h, not strptime.h.
347         * modules/time_r (Files): Remove lib/time_r.h.
348         (Depends-on): Add time.
349         (Include): Include time.h, not time_r.h.
350         * modules/timegm: Likewise.
351         * modules/timespec (Description): Now does timespec-related decls
352         of our own, instead of struct timespec itself.
353         (Depends-on): Add time; remove extensions.
354         (Maintainer): Add self.
355         * modules/utimecmp (Depends-on): Add time; remove timespec.
356         * modules/utimens (Depends-on): Likewise.
357         * modules/xnanosleep (Depends-on): Likewise.
358
359 2007-02-11  Bruno Haible  <bruno@clisp.org>
360
361         * lib/c-strstr.c: Include allocsa.h.
362         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
363         * lib/c-strcasestr.c: Include allocsa.h.
364         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
365         * lib/strcasestr.c: Include allocsa.h.
366         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
367         * lib/mbsstr.c: Include allocsa.h.
368         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
369         allocsa/freesa instead of malloc/free.
370         * lib/mbscasestr.c: Include allocsa.h.
371         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
372         allocsa/freesa instead of malloc/free.
373         * modules/c-strstr (Depends-on): Add allocsa.
374         * modules/c-strcasestr (Depends-on): Likewise.
375         * modules/strcasestr (Depends-on): Likewise.
376         * modules/mbsstr (Depends-on): Likewise.
377         * modules/mbscasestr (Depends-on): Likewise.
378
379 2007-02-11  Bruno Haible  <bruno@clisp.org>
380
381         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
382
383         * modules/mbsspn-tests: New file.
384         * tests/test-mbsspn.sh: New file.
385         * tests/test-mbsspn.c: New file.
386
387 2007-02-11  Bruno Haible  <bruno@clisp.org>
388
389         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
390
391         * modules/mbspbrk-tests: New file.
392         * tests/test-mbspbrk.sh: New file.
393         * tests/test-mbspbrk.c: New file.
394
395 2007-02-11  Bruno Haible  <bruno@clisp.org>
396
397         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
398         unneeded cast.
399
400         * modules/mbscspn-tests: New file.
401         * tests/test-mbscspn.sh: New file.
402         * tests/test-mbscspn.c: New file.
403
404 2007-02-11  Bruno Haible  <bruno@clisp.org>
405
406         * modules/mbscasecmp-tests: New file.
407         * tests/test-mbscasecmp.sh: New file.
408         * tests/test-mbscasecmp.c: New file.
409
410 2007-02-11  Bruno Haible  <bruno@clisp.org>
411
412         Ensure O(n) worst-case complexity of mbscasestr.
413         * lib/mbscasestr.c: Include stdbool.h.
414         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
415         functions.
416         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
417         the bookkeeping indicates that it's worth it.
418         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
419
420         * modules/mbscasestr-tests: New file.
421         * tests/test-mbscasestr1.c: New file.
422         * tests/test-mbscasestr2.sh: New file.
423         * tests/test-mbscasestr2.c: New file.
424         * tests/test-mbscasestr3.sh: New file.
425         * tests/test-mbscasestr3.c: New file.
426         * tests/test-mbscasestr4.sh: New file.
427         * tests/test-mbscasestr4.c: New file.
428         * m4/locale-tr.m4: New file.
429
430 2007-02-11  Bruno Haible  <bruno@clisp.org>
431
432         Ensure O(n) worst-case complexity of mbsstr.
433         * lib/mbsstr.c: Include stdbool.h.
434         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
435         functions.
436         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
437         bookkeeping indicates that it's worth it.
438         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
439
440         * modules/mbsstr-tests: New file.
441         * tests/test-mbsstr1.c: New file.
442         * tests/test-mbsstr2.sh: New file.
443         * tests/test-mbsstr2.c: New file.
444         * tests/test-mbsstr3.sh: New file.
445         * tests/test-mbsstr3.c: New file.
446         * m4/locale-fr.m4: New file.
447
448 2007-02-11  Bruno Haible  <bruno@clisp.org>
449
450         * lib/mbsrchr.c (mbsrchr): Fix bug.
451
452         * modules/mbsrchr-tests: New file.
453         * tests/test-mbsrchr.sh: New file.
454         * tests/test-mbsrchr.c: New file.
455
456 2007-02-11  Bruno Haible  <bruno@clisp.org>
457
458         * lib/mbschr.c (mbschr): Fix bug.
459
460         * modules/mbschr-tests: New file.
461         * tests/test-mbschr.sh: New file.
462         * tests/test-mbschr.c: New file.
463         * m4/locale-zh.m4: New file.
464
465 2007-02-11  Bruno Haible  <bruno@clisp.org>
466
467         Support for copying multibyte string iterators.
468         * lib/mbiter.h: Include <string.h>.
469         (mbiter_multi_copy): New function.
470         (mbi_copy): New macro.
471         * lib/mbuiter.h: Include <string.h>.
472         (mbuiter_multi_copy): New function.
473         (mbui_copy): New macro.
474
475 2007-02-11  Bruno Haible  <bruno@clisp.org>
476
477         New module mbslen.
478         * modules/mbslen: New file.
479         * lib/mbslen.c: New file.
480         * lib/string_.h (mbslen): New declaration.
481         * m4/mbslen.m4: New file.
482         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
483         GNULIB_MBSLEN.
484         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
485         * MODULES.html.sh (Internationalization functions): Add mbslen.
486
487 2007-02-11  Bruno Haible  <bruno@clisp.org>
488
489         Ensure O(n) worst-case complexity of strcasestr substitute.
490         * lib/strcasestr.c: Include stdbool.h.
491         (knuth_morris_pratt): New function.
492         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
493         bookkeeping indicates that it's worth it.
494         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
495
496         * modules/strcasestr-tests: New file.
497         * tests/test-strcasestr.c: New file.
498
499 2007-02-11  Bruno Haible  <bruno@clisp.org>
500
501         Ensure O(n) worst-case complexity of c_strcasestr.
502         * lib/c-strcasestr.c: Include stdbool.h, string.h.
503         (knuth_morris_pratt): New function.
504         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
505         the bookkeeping indicates that it's worth it.
506         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
507
508         * modules/c-strcasestr-tests: New file.
509         * tests/test-c-strcasestr.c: New file.
510
511 2007-02-11  Bruno Haible  <bruno@clisp.org>
512
513         Ensure O(n) worst-case complexity of c_strstr.
514         * lib/c-strstr.c: Include stdbool.h, string.h.
515         (knuth_morris_pratt): New function.
516         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
517         bookkeeping indicates that it's worth it.
518         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
519
520         * lib/c-strstr.c: Complete rewrite for maintainability.
521
522         * modules/c-strstr-tests: New file.
523         * tests/test-c-strstr.c: New file.
524
525 2007-02-11  Bruno Haible  <bruno@clisp.org>
526
527         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
528         5.2.1 and earlier, whereby \055 was treated just like the range
529         delimiter '-'.  Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
530
531 2007-02-08  Bruno Haible  <bruno@clisp.org>
532
533         * modules/regex (Depends-on): Add stdbool.
534         Reported by Dalibor Topic <robilad@kaffe.org>.
535
536 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
537
538         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
539         Prefer returning from main to exiting from it.
540         Remove unnecessary parens after sizeof.
541
542 2007-02-05  Bruno Haible  <bruno@clisp.org>
543
544         New module mbssep.
545         * modules/mbssep: New file.
546         * lib/mbssep.c: New file.
547         * lib/string_.h (strsep): Add a conditional link warning.
548         (mbssep): New declaration.
549         * m4/mbssep.m4: New file.
550         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
551         GNULIB_MBSSEP.
552         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
553         * MODULES.html.sh (Internationalization functions): Add mbssep.
554
555 2007-02-05  Bruno Haible  <bruno@clisp.org>
556
557         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
558         Optimize search in case of 1 delimiter.
559
560 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
561
562         * lib/acl.h: Include sys/types.h before sys/acl.h.
563
564 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
565
566         Merge upstream fix for glibc bugzilla #3957:
567
568         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
569
570         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
571         bit for RE_HAT_LISTS_NOT_NEWLINE.
572         (build_charclass_op): Remove bogus comment.
573
574 2007-02-05  Simon Josefsson  <simon@josefsson.org>
575
576         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
577
578 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
579
580         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
581         * lib/memmem.c [!defined _LIBC]: Include config.h.
582
583 2007-02-04  Bruno Haible  <bruno@clisp.org>
584
585         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
586         warning message.
587
588 2007-02-04  Bruno Haible  <bruno@clisp.org>
589
590         New module mbstok_r.
591         * modules/mbstok_r: New file.
592         * lib/mbstok_r.c: New file.
593         * lib/string_.h (strtok_r): Change argument names to match the
594         comments. Add a conditional link warning.
595         (mbstok_r): New declaration.
596         * m4/mbstok_r.m4: New file.
597         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
598         GNULIB_MBSTOK_R.
599         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
600         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
601
602 2007-02-04  Bruno Haible  <bruno@clisp.org>
603
604         New module mbsspn.
605         * modules/mbsspn: New file.
606         * lib/mbsspn.c: New file.
607         * lib/string_.h (strspn): Add a conditional link warning.
608         (mbsspn): New declaration.
609         * m4/mbsspn.m4: New file.
610         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
611         GNULIB_MBSSPN.
612         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
613         * MODULES.html.sh (Internationalization functions): Add mbsspn.
614
615 2007-02-04  Bruno Haible  <bruno@clisp.org>
616
617         New module mbspbrk.
618         * modules/mbspbrk: New file.
619         * lib/mbspbrk.c: New file.
620         * lib/string_.h (strpbrk): Add a conditional link warning.
621         (mbspbrk): New declaration.
622         * m4/mbspbrk.m4: New file.
623         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
624         GNULIB_MBSPBRK.
625         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
626         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
627
628 2007-02-04  Bruno Haible  <bruno@clisp.org>
629
630         New module mbscspn.
631         * modules/mbscspn: New file.
632         * lib/mbscspn.c: New file.
633         * lib/string_.h (strcspn): Add a conditional link warning.
634         (mbscspn): New declaration.
635         * m4/mbscspn.m4: New file.
636         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
637         GNULIB_MBSCSPN.
638         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
639         * MODULES.html.sh (Internationalization functions): Add mbscspn.
640
641 2007-02-04  Bruno Haible  <bruno@clisp.org>
642
643         New module mbscasestr, reduced goal of strcasestr.
644         * modules/mbscasestr: New file.
645         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
646         (mbscasestr): Renamed from strcasestr.
647         * lib/strcasestr.c: Don't include mbuiter.h.
648         (strcasestr): Remove support for multibyte locales.
649         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
650         Change the conditional link warning.
651         (mbscasestr): New declaration.
652         * m4/mbscasestr.m4: New file.
653         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
654         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
655         REPLACE_STRCASESTR.
656         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
657         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
658         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
659         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
660         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
661         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
662         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
663         (Depends-on): Remove mbuiter.
664         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
665
666 2007-02-04  Bruno Haible  <bruno@clisp.org>
667
668         Simplify handling of strncasecmp.
669         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
670         the conditional link warning.
671         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
672         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
673         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
674         * modules/strcase (configure.ac): Don't invoke
675         gl_STRING_MODULE_INDICATOR.
676         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
677
678 2007-02-04  Bruno Haible  <bruno@clisp.org>
679
680         New module mbscasecmp, reduced goal of strcasecmp.
681         * modules/mbscasecmp: New file.
682         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
683         (mbscasecmp): Renamed from strcasecmp.
684         * lib/strcasecmp.c: Don't include mbuiter.h.
685         (strcasecmp): Remove support for multibyte locales.
686         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
687         Change the conditional link warning.
688         (mbscasecmp): New declaration.
689         * m4/mbscasecmp.m4: New file.
690         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
691         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
692         REPLACE_STRCASECMP.
693         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
694         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
695         GNULIB_MBSCASECMP.
696         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
697         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
698         * modules/strcase (Files): Remove m4/mbrtowc.m4.
699         (Depends-on): Remove mbuiter.
700         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
701
702 2007-02-04  Bruno Haible  <bruno@clisp.org>
703
704         New module mbsstr. Remove module strstr.
705         * modules/mbsstr: New file.
706         * modules/strstr: Remove file.
707         * lib/mbsstr.c: Renamed from lib/strstr.c.
708         (mbsstr): Renamed from strstr.
709         * lib/string_.h (strstr): Remove declaration. Change the conditional
710         link warning.
711         (mbsstr): New declaration.
712         * m4/mbsstr.m4: New file.
713         * m4/strstr.m4: Remove file.
714         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
715         REPLACE_STRSTR.
716         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
717         Don't initialize GNULIB_STRSTR.
718         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
719         substitute GNULIB_STRSTR and REPLACE_STRSTR.
720         * MODULES.html.sh (Internationalization functions): Add mbsstr.
721         (Support for systems lacking ANSI C 89): Remove strstr.
722
723 2007-02-04  Bruno Haible  <bruno@clisp.org>
724
725         New module mbsrchr.
726         * modules/mbsrchr: New file.
727         * lib/mbsrchr.c: New file.
728         * lib/string_.h (strrchr): Add a conditional link warning.
729         (mbsrchr): New declaration.
730         * m4/mbsrchr.m4: New file.
731         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
732         GNULIB_MBSRCHR.
733         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
734         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
735
736 2007-02-04  Bruno Haible  <bruno@clisp.org>
737
738         New module mbschr.
739         * modules/mbschr: New file.
740         * lib/mbschr.c: New file.
741         * lib/string_.h (strchr): Add a conditional link warning.
742         (mbschr): New declaration.
743         * m4/mbschr.m4: New file.
744         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
745         GNULIB_MBSCHR.
746         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
747         * MODULES.html.sh (Internationalization functions): Add mbschr.
748
749 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
750
751         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
752
753         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
754
755 2007-02-04  Bruno Haible  <bruno@clisp.org>
756
757         New module description section 'configure.ac-early'.
758         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
759         (func_get_autoconf_early_snippet): New function.
760         (func_import, func_create_testdir): Use it. Remove special cases for
761         modules 'extensions' and 'lock'.
762         * modules/extensions (configure.ac-early): Require
763         gl_USE_SYSTEM_EXTENSIONS.
764         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
765
766 2007-02-04  Bruno Haible  <bruno@clisp.org>
767
768         Make use of gcj-4.3's -fsource and -ftarget option.
769         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
770         and if so try the options -fsource and -ftarget.
771         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
772         source_version, ftarget_option, target_version arguments.
773         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
774         (is_envjavac_oldgcj_14_14_usable): Renamed from
775         is_envjavac_gcj_14_14_usable.
776         (is_envjavac_oldgcj_14_13_usable): Renamed from
777         is_envjavac_gcj_14_13_usable.
778         (is_gcj_present): Update.
779         (is_gcj_43, is_gcj43_usable): New functions.
780         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
781         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
782         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
783         try the options -fsource and -ftarget.
784
785 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
786
787         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
788         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
789         larger value.
790
791 2007-02-03  Jim Meyering  <jim@meyering.net>
792
793         Give tools a better chance to allocate space for very large buffers.
794         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
795
796         Make pwd and readlink work also when run with an unreadable parent dir
797         on systems with openat support.
798         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
799         provided getcwd function, even when we have openat support.
800         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
801
802 2007-02-02  Bruno Haible  <bruno@clisp.org>
803
804         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
805         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
806         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
807         portability problems if one of these functions is only used on specific
808         platforms.
809         Reported by Paul Eggert.
810
811 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
812
813         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
814         is causing more trouble than it's curing.
815         * lib/regex_internal.h (__mempcpy): Remove.
816         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
817         (and make the code a tad smaller to boot).
818         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
819
820 2007-02-02  Jim Meyering  <jim@meyering.net>
821
822         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
823         section, not in the Makefile.am: one.
824
825 2007-02-02  Eric Blake  <ebb9@byu.net>
826
827         * lib/strchrnul.c: Always include config.h first.
828
829         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
830         gnulib strstr is not necessary here.
831
832 2007-02-02  Simon Josefsson  <simon@josefsson.org>
833
834         * m4/socklen.m4: Fix typo.
835
836 2007-02-02  Eric Blake  <ebb9@byu.net>
837
838         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
839         * modules/netinet_in (Makefile.am): Likewise.
840
841 2007-02-01  Bruno Haible  <bruno@clisp.org>
842
843         * lib/string_.h (GL_LINK_WARNING): New macro.
844         (strcasecmp, strstr, strcasestr): If provided by the system,
845         conditionally define as a macro that leads to a warning instead of to
846         an error.
847         (strncasecmp): Conditionally define as a macro that leads to a warning.
848
849 2007-02-01  Jim Meyering  <jim@meyering.net>
850
851         Give tools a better chance to allocate space for very large buffers.
852         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
853
854 2007-02-01  Karl Berry  <karl@gnu.org>
855
856         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
857
858 2007-02-01  Bruno Haible  <bruno@clisp.org>
859
860         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
861         renamings.
862
863 2007-02-01  Eric Blake  <ebb9@byu.net>
864
865         * modules/regex (Depends-on): Revert dependence on mempcpy.
866         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
867         module's definition of mempcpy.
868         Reported by Paul Eggert.
869
870 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
871
872         * lib/string_.h: If the gnulib module XYZ is not present, undefine
873         the symbol XYZ before redefining it.  This fixes a problem with
874         programs that don't use XYZ, when compiled on systems that define
875         XYZ to something else.
876
877 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
878
879         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
880         occurs when "mkdir -m foo" creates a setgid directory that is (1)
881         writeable to group or other and (2) is intended to have a special
882         mode bit that is set or cleared.  In such a case, the directory
883         should be neither group- nor other-writeable until the special
884         mode bits are right.
885
886 2007-01-31  Eric Blake  <ebb9@byu.net>
887
888         * modules/mountlist (Depends-on): Add strstr.
889
890         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
891         bug.
892         * modules/string (Makefile.am): Remove redundant replacement.
893         * modules/regex (Depends-on): Add mempcpy.
894
895 2007-01-31  Bruno Haible  <bruno@clisp.org>
896
897         New module description field 'Link'.
898         * gnulib-tool (func_usage): Document --extract-link-directive.
899         (sed_extract_prog): Recognize 'Link' directive.
900         (func_get_link_directive): New function.
901         (func_import): Show summary of link directives.
902         Handle --extract-link-directive option.
903         * modules/acl (Link): New section.
904         * modules/clock-time (Link): New section.
905         * modules/euidaccess (Link): New section.
906         * modules/gettext (Link): New section.
907         * modules/iconv (Link): New section.
908         * modules/lock (Link): New section.
909         * modules/nanosleep (Link): New section.
910         * modules/readline (Link): New section.
911
912 2007-01-27  Bruno Haible  <bruno@clisp.org>
913
914         Enforce the use of gnulib modules for unportable <string.h> functions.
915         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
916         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
917         (gl_HEADER_STRING_H_BODY): Require it.
918         * lib/string_.h: If the gnulib module XYZ is not present, redefine
919         the symbol XYZ to one that gives a link error.
920         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
921         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
922         * modules/mempcpy (configure.ac): Likewise.
923         * modules/memrchr (configure.ac): Likewise.
924         * modules/stpcpy (configure.ac): Likewise.
925         * modules/stpncpy (configure.ac): Likewise.
926         * modules/strcase (configure.ac): Likewise.
927         * modules/strcasestr (configure.ac): Likewise.
928         * modules/strchrnul (configure.ac): Likewise.
929         * modules/strdup (configure.ac): Likewise.
930         * modules/strndup (configure.ac): Likewise.
931         * modules/strnlen (configure.ac): Likewise.
932         * modules/strpbrk (configure.ac): Likewise.
933         * modules/strsep (configure.ac): Likewise.
934         * modules/strstr (configure.ac): Likewise.
935         * modules/strtok_r (configure.ac): Likewise.
936
937 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
938
939         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
940
941 2007-01-30  Jim Meyering  <jim@meyering.net>
942
943         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
944
945 2007-01-29  Bruno Haible  <bruno@clisp.org>
946
947         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
948         * lib/execute.c: Likewise.
949         * lib/pipe.c: Likewise.
950         * lib/printf-args.h: Likewise.
951         * lib/printf-args.c: Likewise.
952         * lib/printf-parse.c: Likewise.
953         * lib/vasnprintf.c: Likewise.
954
955 2007-01-29  Eric Blake  <ebb9@byu.net>
956
957         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
958         declaration.
959
960 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
961
962         * lib/strptime.h (strptime): Use 'restrict' for args where
963         POSIX requires this.
964         * lib/strptime.c (strptime): Likewise.
965         Change license notice from LGPL to GPL, since gnulib-tool will
966         change this as needed.
967         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
968         defined.
969         Include "strptime.h" first, to check interface.
970         Do not #undef _LIBC and _NL_CURRENT.
971         Do not include <stdlib.h>; no longer needed.
972         Include "time_r.h" and declare ptime_locale_status
973         only if _LIBC is not defined.
974         (__P): Remove unused macro.
975         (match_string): Bring back glibc version, but use it only if _LIBC
976         is defined.
977         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
978         Remove unnecessary assertion and abort() call.
979         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
980         * m4/strptime.m4: Fix serial number comment.
981         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
982         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
983         (Depends-on): Add time_r.
984
985 2007-01-29  Bruno Haible  <bruno@clisp.org>
986
987         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
988         strptime.
989         * modules/strptime (Depends-on): Add stdbool.
990         * lib/strptime.h: Include <time.h> always. Add comments.
991
992 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
993
994         * modules/strptime: New file.
995         * lib/strptime.h: New file.
996         * lib/strptime.c: New file.
997         * m4/strptime.m4: New file.
998
999 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1000
1001         * MODULES.html.sh: New module mpsort.
1002         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1003
1004         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1005         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1006         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1007         All uses changed.
1008         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1009         All uses changed.
1010         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1011         to _Restrict_.
1012         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1013         the parameter matches the prototype.
1014
1015 2007-01-28  Jim Meyering  <jim@meyering.net>
1016
1017         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1018         sys/time.h here, reverting that part of the previous patch:
1019         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1020
1021 2007-01-28  Bruno Haible  <bruno@clisp.org>
1022
1023         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1024         value of $(SYS_TIME_H).
1025         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1026         remove it conditionally, too. [added by Jim Meyering]
1027         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1028         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1029         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1030         GETTIMEOFDAY_REPLACEMENT to 1.
1031
1032 2007-01-28  Bruno Haible  <bruno@clisp.org>
1033
1034         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1035         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1036         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1037         Set UNISTD_H instead of UNISTD_H2.
1038         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1039
1040 2007-01-28  Bruno Haible  <bruno@clisp.org>
1041
1042         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1043         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1044
1045 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1046
1047         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1048         (func_create_testdir): Ensure C locale for `grep' and `tr'
1049         character ranges.
1050         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1051         ACLOCAL_AMFLAGS parsing state machine.
1052
1053 2007-01-27  Bruno Haible  <bruno@clisp.org>
1054
1055         * modules/unistr/base: Update.
1056
1057 2007-01-27  Bruno Haible  <bruno@clisp.org>
1058
1059         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1060         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1061         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1062         modules/unistr/u32-mbtouc.
1063         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1064         * lib/unistr.h: Update.
1065         * lib/linebreak.c: Update.
1066         * modules/unistr/u32-mbtouc: Renamed from
1067         modules/unistr/u32-mbtouc-safe.
1068         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1069         * lib/unistr.h: Update.
1070         * lib/unistr/u32-to-u8.c: Update.
1071         * lib/unistr/u32-to-u16.c: Update.
1072
1073 2007-01-27  Bruno Haible  <bruno@clisp.org>
1074
1075         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1076         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1077         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1078         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1079         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1080         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1081         modules/unistr/u16-mbtouc.
1082         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1083         * lib/unistr.h: Update.
1084         * lib/linebreak.c: Update.
1085         * modules/linebreak: Update.
1086         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1087         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1088         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1089         * modules/unistr/u16-mbtouc: Renamed from
1090         modules/unistr/u16-mbtouc-safe.
1091         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1092         * lib/unistr.h: Update.
1093         * lib/unistr/u16-to-u8.c: Update.
1094         * modules/unistr/u16-to-u8: Update.
1095         * lib/unistr/u16-to-u32.c: Update.
1096         * modules/unistr/u16-to-u32: Update.
1097
1098 2007-01-27  Bruno Haible  <bruno@clisp.org>
1099
1100         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1101         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1102         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1103         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1104         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1105         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1106         modules/unistr/u8-mbtouc.
1107         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1108         * lib/unistr.h: Update.
1109         * lib/striconveh.c: Update.
1110         * modules/striconveh: Update.
1111         * lib/linebreak.c: Update.
1112         * modules/linebreak: Update.
1113         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1114         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1115         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1116         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1117         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1118         * lib/unistr.h: Update.
1119         * lib/striconveh.c: Update.
1120         * modules/striconveh: Update.
1121         * lib/unistr/u8-to-u16.c: Update.
1122         * modules/unistr/u8-to-u16: Update.
1123         * lib/unistr/u8-to-u32.c: Update.
1124         * modules/unistr/u8-to-u32: Update.
1125
1126 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1127
1128         Sync from Libtool.
1129         * lib/argz.c: Do not include strings.h nor memory.h, include
1130         string.h unconditionally.  Patch by Simon Josefsson.
1131
1132 2007-01-27  Bruno Haible  <bruno@clisp.org>
1133
1134         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1135         from gl_HEADER_STRING_H_BODY.
1136         (gl_HEADER_STRING_H_BODY): Require it.
1137         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1138         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1139         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1140         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1141         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1142         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1143         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1144         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1145         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1146         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1147         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1148         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1149         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1150         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1151         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1152
1153 2007-01-27  Bruno Haible  <bruno@clisp.org>
1154
1155         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1156         check_PROGRAMS into noinst_PROGRAMS.
1157         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1158         check_PROGRAMS in this case.
1159         (func_import): Set for_test to false.
1160         (func_create_testdir): Set for_test to true.
1161
1162 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1163             Bruno Haible  <bruno@clisp.org>
1164
1165         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1166         (Depends-on): Add string.
1167         (Includes): Use <string.h> instead of strcasestr.h.
1168         * modules/string (Makefile.am): Also substitute the value of
1169         REPLACE_STRCASESTR.
1170         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1171         assume strcasestr is declared in <string.h> not <strings.h>. Also
1172         set REPLACE_STRCASESTR.
1173         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1174         REPLACE_STRCASESTR.
1175         * lib/strcasestr.h: Remove file.
1176         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1177         * lib/string_.h (strcasestr): New declaration.
1178
1179 2007-01-27  Bruno Haible  <bruno@clisp.org>
1180
1181         * lib/string_.h: Use 'extern'.
1182
1183 2007-01-27  Jim Meyering  <jim@meyering.net>
1184
1185         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1186         of set-but-not-used local, "q".
1187
1188         * lib/mempcpy.c: Include <config.h> before <string.h>.
1189         This fixes a compilation error on HP-UX, due to the system's
1190         "restrict"-using mempcpy prototype.
1191
1192 2007-01-26  Bruno Haible  <bruno@clisp.org>
1193
1194         Small optimization.
1195         * lib/javacomp.c: Include c-strstr.h.
1196          (is_envjavac_gcj): Use c_strstr instead of strstr.
1197         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1198
1199 2007-01-26  Bruno Haible  <bruno@clisp.org>
1200
1201         * MODULES.html.sh (Unicode string functions): Add the new modules.
1202
1203         * modules/uniconv/u32-strconv-to-locale: New file.
1204         * lib/uniconv/u32-strconv-to-locale.c: New file.
1205
1206         * modules/uniconv/u16-strconv-to-locale: New file.
1207         * lib/uniconv/u16-strconv-to-locale.c: New file.
1208
1209         * modules/uniconv/u8-strconv-to-locale: New file.
1210         * lib/uniconv/u8-strconv-to-locale.c: New file.
1211
1212         * modules/uniconv/u32-strconv-from-locale: New file.
1213         * lib/uniconv/u32-strconv-from-locale.c: New file.
1214
1215         * modules/uniconv/u16-strconv-from-locale: New file.
1216         * lib/uniconv/u16-strconv-from-locale.c: New file.
1217
1218         * modules/uniconv/u8-strconv-from-locale: New file.
1219         * lib/uniconv/u8-strconv-from-locale.c: New file.
1220
1221         * modules/uniconv/u32-strconv-to-enc: New file.
1222         * lib/uniconv/u32-strconv-to-enc.c: New file.
1223         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1224         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1225
1226         * modules/uniconv/u16-strconv-to-enc: New file.
1227         * lib/uniconv/u16-strconv-to-enc.c: New file.
1228         * lib/uniconv/u-strconv-to-enc.h: New file.
1229         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1230         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1231
1232         * modules/uniconv/u8-strconv-to-enc: New file.
1233         * lib/uniconv/u8-strconv-to-enc.c: New file.
1234         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1235         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1236
1237         * modules/uniconv/u32-strconv-from-enc: New file.
1238         * lib/uniconv/u32-strconv-from-enc.c: New file.
1239         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1240         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1241
1242         * modules/uniconv/u16-strconv-from-enc: New file.
1243         * lib/uniconv/u16-strconv-from-enc.c: New file.
1244         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1245         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1246
1247         * modules/uniconv/u8-strconv-from-enc: New file.
1248         * lib/uniconv/u8-strconv-from-enc.c: New file.
1249         * lib/uniconv/u-strconv-from-enc.h: New file.
1250         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1251         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1252
1253         * modules/uniconv/u32-conv-from-enc: New file.
1254         * lib/uniconv/u32-conv-from-enc.c: New file.
1255         * modules/uniconv/u32-conv-from-enc-tests: New file.
1256         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1257
1258         * modules/uniconv/u16-conv-from-enc: New file.
1259         * lib/uniconv/u16-conv-from-enc.c: New file.
1260         * lib/uniconv/u-conv-from-enc.h: New file.
1261         * modules/uniconv/u16-conv-from-enc-tests: New file.
1262         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1263
1264         * modules/uniconv/u8-conv-from-enc: New file.
1265         * lib/uniconv/u8-conv-from-enc.c: New file.
1266         * modules/uniconv/u8-conv-from-enc-tests: New file.
1267         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1268
1269         * modules/uniconv/base: New file.
1270         * lib/uniconv.h: New file.
1271
1272 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1273
1274         * doc/gnulib-tool.texi (Initial import): Update to match current
1275         behavior with strdup module.
1276         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1277         * lib/memmem.h: Remove; all uses removed.  This is now done
1278         by <string.h>.
1279         * lib/mempcpy.h: Likewise.
1280         * lib/memrchr.h: Likewise.
1281         * lib/stpcpy.h: Likewise.
1282         * lib/stpncpy.h: Likewise.
1283         * lib/strcase.h: Likewise.
1284         * lib/strchrnul.h: Likewise.
1285         * lib/strdup.h: Likewise.
1286         * lib/strndup.h: Likewise.
1287         * lib/strnlen.h: Likewise.
1288         * lib/strpbrk.h: Likewise.
1289         * lib/strsep.h: Likewise.
1290         * lib/strstr.h: Likewise.
1291         * lib/strtok_r.h: Likewise.
1292         * lib/string_.h: New file.
1293         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1294         Rely on <string.h> instead.
1295         * lib/canon-host.c: Likewise.
1296         * lib/chdir-long.c: Likewise.
1297         * lib/concatpath.c: Likewise.
1298         * lib/exclude.c: Likewise.
1299         * lib/fchdir.c: Likewise.
1300         * lib/getaddrinfo.c: Likewise.
1301         * lib/getcwd.c: Likewise.
1302         * lib/getsubopt.c: Likewise.
1303         * lib/glob.c: Likewise.
1304         * lib/hard-locale.c: Likewise.
1305         * lib/iconvme.c: Likewise.
1306         * lib/javacomp.c: Likewise.
1307         * lib/mempcpy.c: Likewise.
1308         * lib/memrchr.c: Likewise.
1309         * lib/regex_internal.h: Likewise.
1310         * lib/stpncpy.c: Likewise.
1311         * lib/strcasecmp.c: Likewise.
1312         * lib/strchrnul.c: Likewise.
1313         * lib/strdup.c: Likewise.
1314         * lib/striconv.c: Likewise.
1315         * lib/striconveh.c: Likewise.
1316         * lib/striconveha.c: Likewise.
1317         * lib/strncasecmp.c: Likewise.
1318         * lib/strndup.c: Likewise.
1319         * lib/strnlen.c: Likewise.
1320         * lib/strsep.c: Likewise.
1321         * lib/strstr.c: Likewise.
1322         * lib/strtok_r.c: Likewise.
1323         * lib/userspec.c: Likewise.
1324         * lib/w32spawn.h: Likewise.
1325         * lib/xstrndup.c: Likewise.
1326         * lib/mountlist.c (strstr): Remove decl.
1327         * m4/string_h.m4: New file.
1328         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1329         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1330         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1331         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1332         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1333         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1334         Set REPLACE_STRCASECMP if necessary.
1335         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1336         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1337         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1338         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1339         HAVE_DECL_STRDUP if necessary.
1340         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1341         since gl_FUNC_STRNDUP does that now.
1342         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1343         Check for decl here...
1344         (gl_PREREQ_STRNLEN): ... not here.
1345         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1346         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1347         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1348         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1349         necessary.
1350         * modules/string: New file.
1351         * modules/memmem (Files): Remove special-purpose include file.
1352         (Depends-on): Add string.
1353         (Include): Include <string.h>, not the removed file.
1354         * modules/mempcpy: Likewise.
1355         * modules/memrchr: Likewise.
1356         * modules/stpcpy: Likewise.
1357         * modules/stpncpy: Likewise.
1358         * modules/strcase: Likewise.
1359         * modules/strchrnul: Likewise.
1360         * modules/strdup: Likewise.
1361         * modules/strndup: Likewise.
1362         * modules/strnlen: Likewise.
1363         * modules/strpbrk: Likewise.
1364         * modules/strsep: Likewise.
1365         * modules/strstr: Likewise.
1366         * modules/strtok_r: Likewise.
1367         * tests/test-dirname.c: Don't include "strdup.h", since
1368         <string.h> now suffices.
1369         * tests/test-memmem.c: Don't include "memmem.h", since
1370         <string.h> now suffices.
1371
1372 2007-01-25  Bruno Haible  <bruno@clisp.org>
1373
1374         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1375         *resultp is 0.
1376
1377         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1378         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1379         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1380         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1381
1382         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1383         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1384         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1385         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1386         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1387         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1388
1389 2007-01-24  Bruno Haible  <bruno@clisp.org>
1390
1391         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1392         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1393         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1394         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1395         gl_FUNC_FTS_CORE.
1396         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1397         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1398         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1399         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1400         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1401         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1402         gl_FUNC_FCHOWNAT.
1403         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1404         gl_FUNC_STRFTIME.
1405         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1406         Reported by Ralf Wildenhues.
1407
1408 2007-01-24  Bruno Haible  <bruno@clisp.org>
1409
1410         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1411         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1412         gl_GETADDRINFO.
1413         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1414         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1415         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1416
1417 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1418
1419         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1420         Don't use 'exit'; just return from 'main'.
1421         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1422
1423         * lib/fnmatch_.h: Readjust white space and comments to match
1424         glibc, to avoid spurious diffs.
1425
1426 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1427
1428         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1429         2004-12-01 change by Jakub Jelinek, since this code won't compile
1430         if !LIBC.  Problem reported by Bob Proulx.
1431
1432 2007-01-23  Bruno Haible  <bruno@clisp.org>
1433
1434         * lib/striconveh.c: Include c-strcaseeq.h.
1435         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1436         * modules/striconveh (Depends-on): Add c-strcaseeq.
1437
1438 2007-01-23  Bruno Haible  <bruno@clisp.org>
1439
1440         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1441
1442         * modules/c-strcaseeq: New file.
1443         * lib/c-strcaseeq.h: New file.
1444
1445         * modules/streq: New file.
1446         * lib/streq.h: New file.
1447
1448 2007-01-23  Bruno Haible  <bruno@clisp.org>
1449
1450         * modules/striconveha-tests: New file.
1451         * tests/test-striconveha.c: New file.
1452
1453         * lib/striconveha.h: Include <stdbool.h>.
1454         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1455         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1456         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1457         (mem_iconveha): New function.
1458         (str_iconveha_notranslit): Renamed from str_iconveha.
1459         (str_iconveha): New function.
1460         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1461         c-strcase.
1462
1463 2007-01-23  Bruno Haible  <bruno@clisp.org>
1464
1465         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1466         encodings without forgiving before trying any encoding with handler.
1467         (str_iconveha): Try all encodings without forgiving before trying any
1468         encoding with handler.
1469
1470 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1471
1472         Import the following changes from libc.
1473
1474         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1475
1476         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1477
1478         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1479
1480         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1481         normal_bracket label.
1482
1483         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1484
1485         [BZ #361]
1486         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1487         to normal_bracket after fetching the next character.
1488
1489 2007-01-22  Bruno Haible  <bruno@clisp.org>
1490
1491         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1492         argument.
1493         * lib/striconveh.c (iconv_carefully_1): New function.
1494         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1495         argument.
1496         (str_cd_iconveh): Update.
1497         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1498         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1499         * tests/test-striconveh.c (MAGIC): New macro.
1500         (new_offsets): New function.
1501         (main): Test call with and without offsets.
1502
1503 2007-01-22  Bruno Haible  <bruno@clisp.org>
1504
1505         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1506         * modules/sys_select (Makefile.am): Likewise.
1507         * modules/sys_socket (Makefile.am): Likewise.
1508         * modules/sys_time (Makefile.am): Likewise.
1509
1510 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1511
1512         * modules/gettimeofday (License): Change from GPL to LGPL, since
1513         gettimeofday is a library function.
1514
1515 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1516
1517         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1518
1519 2007-01-21  Bruno Haible  <bruno@clisp.org>
1520
1521         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1522
1523 2007-01-21  Bruno Haible  <bruno@clisp.org>
1524
1525         * modules/striconveha: New file.
1526         * lib/striconveha.h: New file.
1527         * lib/striconveha.c: New file.
1528         * MODULES.html.sh (Internationalization functions): Add striconveha.
1529         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1530         string.
1531         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1532
1533 2007-01-21  Bruno Haible  <bruno@clisp.org>
1534
1535         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1536         * lib/striconveh.c (str_iconveh): Likewise.
1537
1538 2007-01-21  Bruno Haible  <bruno@clisp.org>
1539
1540         * lib/striconveh.h (mem_iconveh): New declaration.
1541         * lib/striconveh.c (mem_iconveh): New function.
1542         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1543
1544 2007-01-21  Bruno Haible  <bruno@clisp.org>
1545
1546         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1547
1548         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1549         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1550         original result buffer.
1551         (str_cd_iconveh): Update.
1552         * tests/test-striconveh.c (main): Update.
1553
1554         * lib/striconv.h (mem_cd_iconv): Change specification.
1555         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1556         result buffer.
1557         (str_cd_iconv): Update.
1558         * tests/test-striconv.c (main): Update.
1559
1560 2007-01-21  Bruno Haible  <bruno@clisp.org>
1561
1562         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1563
1564 2007-01-20  Jim Meyering  <jim@meyering.net>
1565
1566         * lib/userspec.c (parse_with_separator): If a user or group string
1567         starts with "+", skip the corresponding name-to-ID look-up, since
1568         such a look-up must fail: user and group names may not include "+".
1569
1570 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1571
1572         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1573         since we now assume the sys_time module.
1574         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1575         check for sys/time.h; no longer needed.
1576         * modules/poll (Depends-on): Depend on sys_time.
1577
1578 2007-01-18  Bruno Haible  <bruno@clisp.org>
1579
1580         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1581         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1582
1583         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1584         gettimeofday.
1585
1586         * tests/test-gettimeofday.c: Include <time.h>.
1587         (dummy): Remove variable.
1588
1589         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1590         gl_HEADER_SYS_TIME_H.
1591         (gl_HEADER_SYS_TIME_H): New macro.
1592
1593         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1594         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1595         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1596         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1597         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1598         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1599         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1600         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1601         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1602         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1603         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1604
1605         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1606         last change; it caused a compilation error when cross-compiling to
1607         Cygwin.
1608
1609 2007-01-18  Jim Meyering  <jim@meyering.net>
1610
1611         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1612         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1613         than the race-prone "test -d sys || mkdir sys".
1614         (configure.ac): Use AC_PROG_MKDIR_P.
1615         * modules/sys_select: Likewise.
1616         * modules/sys_socket: Likewise.
1617         * modules/sys_time: Likewise.
1618
1619 2007-01-18  Eric Blake  <ebb9@byu.net>
1620
1621         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1622         replace gettimeofday.
1623         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1624         name, to avoid infinite recursion.
1625
1626 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1627
1628         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1629         module sys_time.
1630         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1631         assume timespec.h defines struct timeval.
1632         * lib/settime.c: Likewise.
1633         * lib/utimens.c: Likewise.
1634         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1635         since we now assume the gettimeofday module.
1636         * lib/tempname.c (__gen_tempname): Likewise.
1637         * lib/gettimeofday.h: Remove.
1638         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1639         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1640         Include <time.h>, for 'time()'.
1641         (localtime_buffer_addr): Also use this workaround if
1642         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1643         to simplify the uses.  All uses changed.
1644         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1645         that #undef is inside {}, and 'const' follows type name consistently.
1646         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1647         (gettimeofday): Do not use the maximum possible value for
1648         tv->tv_usec, since that might break usages other than ls.c.
1649         Instead, we'll leave ls.c alone.  This undoes today's patch
1650         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1651         we've never observed the problem but might as well keep the
1652         canary.
1653         * lib/nanosleep.c: Include timespec.h first, for interface check.
1654         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1655         now assume the sys_time module.
1656         * lib/tempname.c: Likewise.
1657         * lib/timespec.h: Likewise.
1658         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1659         needed.
1660         * lib/strftime.c: Likewise.
1661         * lib/timespec.h: Likewise.
1662         * lib/posixtm.c: Include posixtm.h first, for interface check.
1663         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1664         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1665         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1666         * lib/sys_time_.h: New file.
1667         * lib/timespec.h (struct timespec): Use long int, not long.
1668         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1669         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1670         Remove obsolescent call to AC_HEADER_TIME.
1671         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1672         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1673         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1674         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1675         Likewise.
1676         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1677         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1678         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1679         into the sys_time module.  Check for gettimeofday just once.
1680         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1681         for gettimeofday signature to just check the signature.  Merely
1682         compile it, since linking doesn't test signature.  Improve test for
1683         whether gettimeofday.o is actually needed.
1684         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1685         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1686         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1687         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1688         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1689         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1690         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1691         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1692         than worrying about sys/time.h.
1693         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1694         Don't bother worrying about TIME_WITH_SYS_TIME.
1695         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1696         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1697         * m4/sys_time_h.m4: New file.
1698         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1699         Don't include sys/time.h.  Return from main rather than exiting.
1700         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1701         all uses changed.
1702         * modules/gethrxtime (Depends-on): Add sys_time.
1703         * modules/gettime (Depends-on): Likewise.
1704         * modules/gettimeofday (Depends-on): Likewise.
1705         * modules/nanosleep (Depends-on): Likewise.
1706         * modules/settime (Depends-on): Likewise.
1707         * modules/tempname (Depends-on): Likewise.
1708         * modules/utimens (Depends-on): Likewise.
1709         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1710         (Include:) Change back to <sys/time.h>.
1711         (Maintainer:) Add self.
1712         * modules/sys_time: New file.
1713         * modules/tempname (Depends-on): Add gettimeofday.
1714         * tests/test-gettimeofday.c: Include <sys/time.h>
1715         rather than gettimeofday.h.
1716
1717 2007-01-17  Bruno Haible  <bruno@clisp.org>
1718
1719         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1720         the license default to GPL.
1721         (func_create_testdir): Don't complain if a module is LGPL and its
1722         tests module depends on GPLed modules.
1723
1724 2007-01-17  Bruno Haible  <bruno@clisp.org>
1725
1726         * lib/gettimeofday.c (gettimeofday): Add code for the case
1727         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1728         maximum possible value for tv->tv_usec, rather than the minimum one.
1729
1730 2005-10-08  Martin Lambers  <marlam@marlam.de>
1731 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1732 2007-01-16  Bruno Haible  <bruno@clisp.org>
1733
1734         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1735         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1736         gl_FUNC_GETTIMEOFDAY.
1737         (Include): Add gettimeofday.h.
1738         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1739         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1740         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1741         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1742         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1743         * lib/gettimeofday.h: New file.
1744         * lib/gettimeofday.c: Include <sys/timeb.h>.
1745         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1746         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1747         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1748         fall back on time().
1749
1750         * tests/test-gettimeofday.c: New file.
1751         * modules/gettimeofday-tests: New file.
1752
1753 2007-01-16  Eric Blake  <ebb9@byu.net>
1754
1755         * modules/fnmatch (Depends-on): Depend on wchar.
1756         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1757         * m4/fnmatch.m4: Likewise.
1758         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1759         * m4/mbchar.m4: Likewise.
1760         * modules/mbswidth (Depends-on): Depend on wchar.
1761         * lib/mbswidth.c: Assume <wchar.h>.
1762         * m4/mbswidth.m4: Likewise.
1763         * modules/quotearg (Depends-on): Depend on wchar.
1764         * lib/quotearg.c: Assume <wchar.h>.
1765         * m4/quotearg.m4: Likewise.
1766         * modules/regex (Depends-on): Depend on wchar.
1767         * lib/regex_internal.h: Assume <wchar.h>.
1768         * m4/regex.m4: Likewise.
1769         * modules/stdint (Depends-on): Depend on wchar.
1770         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1771         * m4/stdint.m4: Likewise.
1772         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1773         * modules/strftime (Depends-on): Depend on wchar.
1774         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1775         * modules/strtol (Depends-on): Depend on wchar.
1776         * lib/strtol.c: Assume <wchar.h>.
1777         * modules/wcwidth (Depends-on): Depend on wchar.
1778         * lib/wcwidth.h: Assume <wchar.h>.
1779         * m4/wcwidth.m4: Likewise.
1780
1781 2007-01-16  Bruno Haible  <bruno@clisp.org>
1782
1783         * modules/csharpexec-script: New, created from...
1784         * modules/csharpexec: ... this.
1785
1786 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1787
1788         * modules/javaexec-script: New, created from...
1789         * modules/javaexec: ... this.
1790
1791 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1792
1793         * modules/poll (Dependencies): Add sys_select.
1794
1795 2007-01-15  Jim Meyering  <jim@meyering.net>
1796
1797         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1798         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1799         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1800         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1801
1802 2007-01-15  Bruno Haible  <bruno@clisp.org>
1803
1804         * modules/striconveh: New file.
1805         * lib/striconveh.h: New file.
1806         * lib/striconveh.c: New file.
1807         * MODULES.html.sh (Internationalization functions): Add striconveh.
1808
1809         * modules/striconveh-tests: New file.
1810         * tests/test-striconveh.c: New file.
1811
1812 2007-01-15  Bruno Haible  <bruno@clisp.org>
1813
1814         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1815         not from GNU libiconv or GNU libc.
1816
1817 2007-01-15  Bruno Haible  <bruno@clisp.org>
1818
1819         * doc/gnulib-intro.texi (Copyright): Explain the different license
1820         terms for module descriptions, autoconf macros, tests, documentation.
1821
1822 2007-01-14  Bruno Haible  <bruno@clisp.org>
1823
1824         * modules/striconv-tests: New file.
1825         * tests/test-striconv.c: New file.
1826
1827 2007-01-14  Bruno Haible  <bruno@clisp.org>
1828
1829         * modules/iconv-tests: New file.
1830         * tests/test-iconv.c: New file.
1831
1832 2007-01-14  Bruno Haible  <bruno@clisp.org>
1833
1834         * gnulib-tool (func_get_license): For test modules, use the license of
1835         the main module.
1836
1837 2007-01-14  Bruno Haible  <bruno@clisp.org>
1838
1839         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1840         if iconv is found to exist.
1841
1842 2007-01-14  Bruno Haible  <bruno@clisp.org>
1843
1844         * modules/c-ctype-tests: New file.
1845         * tests/test-c-ctype.c: New file.
1846
1847 2007-01-14  Bruno Haible  <bruno@clisp.org>
1848
1849         * modules/binary-io-tests: New file.
1850         * tests/test-binary-io.sh: New file.
1851         * tests/test-binary-io.c: New file.
1852
1853 2007-01-14  Bruno Haible  <bruno@clisp.org>
1854
1855         * modules/array-oset-tests: New file.
1856         * tests/test-array_oset.c: New file.
1857
1858 2007-01-14  Bruno Haible  <bruno@clisp.org>
1859
1860         * modules/array-list-tests: New file.
1861         * tests/test-array_list.c: New file.
1862
1863 2007-01-14  Bruno Haible  <bruno@clisp.org>
1864
1865         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1866         and make.
1867         Reported by Simon Josefsson in
1868         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1869
1870 2007-01-14  Bruno Haible  <bruno@clisp.org>
1871
1872         * modules/allocsa-tests: New file.
1873         * tests/test-allocsa.c: New file.
1874
1875 2007-01-14  Bruno Haible  <bruno@clisp.org>
1876
1877         * modules/fchdir (Depends-on): Add absolute-header.
1878         * modules/unistd (Depends-on): Likewise.
1879
1880 2006-12-30  Bruno Haible  <bruno@clisp.org>
1881
1882         * modules/fchdir: New file.
1883         * modules/unistd (Files): Add lib/unistd_.h.
1884         (Makefile.am): Generate unistd.h from unistd_.h.
1885         * lib/fchdir.c: New file.
1886         * lib/dirent_.h: New file.
1887         * lib/unistd_.h: New file.
1888         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1889         * m4/fchdir.m4: New file.
1890         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1891         (gl_HEADER_UNISTD): Invoke it.
1892         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1893         function.
1894         * lib/backupfile.c (opendir, closedir): Undefine.
1895         * lib/chown.c (open, close): Undefine.
1896         * lib/clean-temp.c (open, close): Undefine.
1897         * lib/copy-file.c (open, close): Undefine.
1898         * lib/execute.c (open, close): Undefine.
1899         * lib/fsusage.c (open, close): Undefine.
1900         * lib/gc-gnulib.c (open, close): Undefine.
1901         * lib/getcwd.c (opendir, closedir): Undefine.
1902         * lib/glob.c (opendir, closedir): Undefine.
1903         * lib/javacomp.c (open, close): Undefine.
1904         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1905         * lib/openat-proc.c (open, close): Undefine.
1906         * lib/pagealign_alloc.c (open, close): Undefine.
1907         * lib/pipe.c (open, close): Undefine.
1908         * lib/progreloc.c (open, close): Undefine.
1909         * lib/savedir.c (opendir, closedir): Undefine.
1910         * lib/utime.c (open, close): Undefine.
1911         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1912
1913 2007-01-10  Bruno Haible  <bruno@clisp.org>
1914
1915         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1916
1917 2007-01-12  Eric Blake  <ebb9@byu.net>
1918
1919         Provide a robust <wchar.h>.  Further simplifications are now
1920         possible in other modules, but not included here.
1921         * modules/wchar: New module.
1922         * m4/wchar.m4: New file.
1923         * lib/wchar_.h: Likewise.
1924         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1925         of the new module.
1926         * MODULES.html.sh (Extended multibyte and wide character utilities):
1927         New section.
1928
1929 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1930
1931         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1932         to a reasonable default for memory allocation.
1933         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1934         file system that reports garbage st_size values for symlinks.
1935         Problem reported by Liyang Hu.
1936
1937 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1938
1939         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1940         Emacs .#* auto-save files).
1941
1942 2007-01-11  Bruno Haible  <bruno@clisp.org>
1943
1944         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1945         directory.
1946
1947 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1948
1949         Use @...@ consistently in lib/wctype_.h.
1950         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1951         on it being set to 1 or 0.
1952         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1953         go back to AC_SUBSTing it.
1954         * modules/wctype (Makefile.am): Undo previous change.
1955
1956 2007-01-10  Eric Blake  <ebb9@byu.net>
1957
1958         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1959         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1960         * modules/wctype (Makefile.am): Likewise.
1961         Reported by Chris McGuire.
1962
1963 2007-01-10  Jim Meyering  <jim@meyering.net>
1964
1965         fts.c: a small readability/maintainability improvement
1966         * lib/fts.c (fts_read): Make this code slightly more readable and
1967         maintainable by hoisting the "sp->fts_cur = p" assignments to
1968         immediately follow the statements that set P.  Derived from
1969         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1970
1971 2007-01-10  Eric Blake  <ebb9@byu.net>
1972
1973         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1974         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1975         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1976         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1977         Reported by Chris McGuire.
1978
1979 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1980
1981         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1982         in sed script.
1983
1984 2007-01-09  Bruno Haible  <bruno@clisp.org>
1985
1986         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1987         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1988         variables.
1989         (func_module): Use them.
1990
1991 2007-01-09  Bruno Haible  <bruno@clisp.org>
1992
1993         * modules/unistr/base: New file.
1994         * lib/unistr.h: New file.
1995
1996         * modules/unistr/u8-to-u16: New file.
1997         * lib/unistr/u8-to-u16.c: New file.
1998
1999         * modules/unistr/u8-to-u32: New file.
2000         * lib/unistr/u8-to-u32.c: New file.
2001
2002         * modules/unistr/u16-to-u8: New file.
2003         * lib/unistr/u16-to-u8.c: New file.
2004
2005         * modules/unistr/u16-to-u32: New file.
2006         * lib/unistr/u16-to-u32.c: New file.
2007
2008         * modules/unistr/u32-to-u8: New file.
2009         * lib/unistr/u32-to-u8.c: New file.
2010
2011         * modules/unistr/u32-to-u16: New file.
2012         * lib/unistr/u32-to-u16.c: New file.
2013
2014         * modules/unistr/u8-check: New file.
2015         * modules/unistr/u16-check: New file.
2016         * modules/unistr/u32-check: New file.
2017         * lib/unistr/u8-check.c: New file.
2018         * lib/unistr/u16-check.c: New file.
2019         * lib/unistr/u32-check.c: New file.
2020
2021         * modules/unistr/u8-chr: New file.
2022         * modules/unistr/u16-chr: New file.
2023         * modules/unistr/u32-chr: New file.
2024         * lib/unistr/u8-chr.c: New file.
2025         * lib/unistr/u16-chr.c: New file.
2026         * lib/unistr/u32-chr.c: New file.
2027
2028         * modules/unistr/u8-cmp: New file.
2029         * modules/unistr/u16-cmp: New file.
2030         * modules/unistr/u32-cmp: New file.
2031         * lib/unistr/u8-cmp.c: New file.
2032         * lib/unistr/u16-cmp.c: New file.
2033         * lib/unistr/u32-cmp.c: New file.
2034
2035         * modules/unistr/u8-cpy: New file.
2036         * modules/unistr/u16-cpy: New file.
2037         * modules/unistr/u32-cpy: New file.
2038         * lib/unistr/u8-cpy.c: New file.
2039         * lib/unistr/u16-cpy.c: New file.
2040         * lib/unistr/u32-cpy.c: New file.
2041         * lib/unistr/u-cpy.h: New file.
2042
2043         * modules/unistr/u8-cpy-alloc: New file.
2044         * modules/unistr/u16-cpy-alloc: New file.
2045         * modules/unistr/u32-cpy-alloc: New file.
2046         * lib/unistr/u8-cpy-alloc.c: New file.
2047         * lib/unistr/u16-cpy-alloc.c: New file.
2048         * lib/unistr/u32-cpy-alloc.c: New file.
2049         * lib/unistr/u-cpy-alloc.h: New file.
2050
2051         * modules/unistr/u8-endswith: New file.
2052         * modules/unistr/u16-endswith: New file.
2053         * modules/unistr/u32-endswith: New file.
2054         * lib/unistr/u8-endswith.c: New file.
2055         * lib/unistr/u16-endswith.c: New file.
2056         * lib/unistr/u32-endswith.c: New file.
2057         * lib/unistr/u-endswith.h: New file.
2058
2059         * modules/unistr/u8-mblen: New file.
2060         * modules/unistr/u16-mblen: New file.
2061         * modules/unistr/u32-mblen: New file.
2062         * lib/unistr/u8-mblen.c: New file.
2063         * lib/unistr/u16-mblen.c: New file.
2064         * lib/unistr/u32-mblen.c: New file.
2065
2066         * modules/unistr/u8-mbtouc: New file.
2067         * modules/unistr/u16-mbtouc: New file.
2068         * modules/unistr/u32-mbtouc: New file.
2069         * lib/unistr/u8-mbtouc.c: New file.
2070         * lib/unistr/u16-mbtouc.c: New file.
2071         * lib/unistr/u32-mbtouc.c: New file.
2072
2073         * modules/unistr/u8-mbtouc-safe: New file.
2074         * modules/unistr/u16-mbtouc-safe: New file.
2075         * modules/unistr/u32-mbtouc-safe: New file.
2076         * lib/unistr/u8-mbtouc-safe.c: New file.
2077         * lib/unistr/u16-mbtouc-safe.c: New file.
2078         * lib/unistr/u32-mbtouc-safe.c: New file.
2079
2080         * modules/unistr/u8-move: New file.
2081         * modules/unistr/u16-move: New file.
2082         * modules/unistr/u32-move: New file.
2083         * lib/unistr/u8-move.c: New file.
2084         * lib/unistr/u16-move.c: New file.
2085         * lib/unistr/u32-move.c: New file.
2086         * lib/unistr/u-move.h: New file.
2087
2088         * modules/unistr/u8-next: New file.
2089         * modules/unistr/u16-next: New file.
2090         * modules/unistr/u32-next: New file.
2091         * lib/unistr/u8-next.c: New file.
2092         * lib/unistr/u16-next.c: New file.
2093         * lib/unistr/u32-next.c: New file.
2094
2095         * modules/unistr/u8-prev: New file.
2096         * modules/unistr/u16-prev: New file.
2097         * modules/unistr/u32-prev: New file.
2098         * lib/unistr/u8-prev.c: New file.
2099         * lib/unistr/u16-prev.c: New file.
2100         * lib/unistr/u32-prev.c: New file.
2101
2102         * modules/unistr/u8-set: New file.
2103         * modules/unistr/u16-set: New file.
2104         * modules/unistr/u32-set: New file.
2105         * lib/unistr/u8-set.c: New file.
2106         * lib/unistr/u16-set.c: New file.
2107         * lib/unistr/u32-set.c: New file.
2108         * lib/unistr/u-set.h: New file.
2109
2110         * modules/unistr/u8-startswith: New file.
2111         * modules/unistr/u16-startswith: New file.
2112         * modules/unistr/u32-startswith: New file.
2113         * lib/unistr/u8-startswith.c: New file.
2114         * lib/unistr/u16-startswith.c: New file.
2115         * lib/unistr/u32-startswith.c: New file.
2116         * lib/unistr/u-startswith.h: New file.
2117
2118         * modules/unistr/u8-stpcpy: New file.
2119         * modules/unistr/u16-stpcpy: New file.
2120         * modules/unistr/u32-stpcpy: New file.
2121         * lib/unistr/u8-stpcpy.c: New file.
2122         * lib/unistr/u16-stpcpy.c: New file.
2123         * lib/unistr/u32-stpcpy.c: New file.
2124         * lib/unistr/u-stpcpy.h: New file.
2125
2126         * modules/unistr/u8-stpncpy: New file.
2127         * modules/unistr/u16-stpncpy: New file.
2128         * modules/unistr/u32-stpncpy: New file.
2129         * lib/unistr/u8-stpncpy.c: New file.
2130         * lib/unistr/u16-stpncpy.c: New file.
2131         * lib/unistr/u32-stpncpy.c: New file.
2132         * lib/unistr/u-stpncpy.h: New file.
2133
2134         * modules/unistr/u8-strcat: New file.
2135         * modules/unistr/u16-strcat: New file.
2136         * modules/unistr/u32-strcat: New file.
2137         * lib/unistr/u8-strcat.c: New file.
2138         * lib/unistr/u16-strcat.c: New file.
2139         * lib/unistr/u32-strcat.c: New file.
2140         * lib/unistr/u-strcat.h: New file.
2141
2142         * modules/unistr/u8-strchr: New file.
2143         * modules/unistr/u16-strchr: New file.
2144         * modules/unistr/u32-strchr: New file.
2145         * lib/unistr/u8-strchr.c: New file.
2146         * lib/unistr/u16-strchr.c: New file.
2147         * lib/unistr/u32-strchr.c: New file.
2148
2149         * modules/unistr/u8-strcmp: New file.
2150         * modules/unistr/u16-strcmp: New file.
2151         * modules/unistr/u32-strcmp: New file.
2152         * lib/unistr/u8-strcmp.c: New file.
2153         * lib/unistr/u16-strcmp.c: New file.
2154         * lib/unistr/u32-strcmp.c: New file.
2155
2156         * modules/unistr/u8-strcpy: New file.
2157         * modules/unistr/u16-strcpy: New file.
2158         * modules/unistr/u32-strcpy: New file.
2159         * lib/unistr/u8-strcpy.c: New file.
2160         * lib/unistr/u16-strcpy.c: New file.
2161         * lib/unistr/u32-strcpy.c: New file.
2162         * lib/unistr/u-strcpy.h: New file.
2163
2164         * modules/unistr/u8-strcspn: New file.
2165         * modules/unistr/u16-strcspn: New file.
2166         * modules/unistr/u32-strcspn: New file.
2167         * lib/unistr/u8-strcspn.c: New file.
2168         * lib/unistr/u16-strcspn.c: New file.
2169         * lib/unistr/u32-strcspn.c: New file.
2170         * lib/unistr/u-strcspn.h: New file.
2171
2172         * modules/unistr/u8-strdup: New file.
2173         * modules/unistr/u16-strdup: New file.
2174         * modules/unistr/u32-strdup: New file.
2175         * lib/unistr/u8-strdup.c: New file.
2176         * lib/unistr/u16-strdup.c: New file.
2177         * lib/unistr/u32-strdup.c: New file.
2178         * lib/unistr/u-strdup.h: New file.
2179
2180         * modules/unistr/u8-strlen: New file.
2181         * modules/unistr/u16-strlen: New file.
2182         * modules/unistr/u32-strlen: New file.
2183         * lib/unistr/u8-strlen.c: New file.
2184         * lib/unistr/u16-strlen.c: New file.
2185         * lib/unistr/u32-strlen.c: New file.
2186         * lib/unistr/u-strlen.h: New file.
2187
2188         * modules/unistr/u8-strmblen: New file.
2189         * modules/unistr/u16-strmblen: New file.
2190         * modules/unistr/u32-strmblen: New file.
2191         * lib/unistr/u8-strmblen.c: New file.
2192         * lib/unistr/u16-strmblen.c: New file.
2193         * lib/unistr/u32-strmblen.c: New file.
2194
2195         * modules/unistr/u8-strmbtouc: New file.
2196         * modules/unistr/u16-strmbtouc: New file.
2197         * modules/unistr/u32-strmbtouc: New file.
2198         * lib/unistr/u8-strmbtouc.c: New file.
2199         * lib/unistr/u16-strmbtouc.c: New file.
2200         * lib/unistr/u32-strmbtouc.c: New file.
2201
2202         * modules/unistr/u8-strncat: New file.
2203         * modules/unistr/u16-strncat: New file.
2204         * modules/unistr/u32-strncat: New file.
2205         * lib/unistr/u8-strncat.c: New file.
2206         * lib/unistr/u16-strncat.c: New file.
2207         * lib/unistr/u32-strncat.c: New file.
2208         * lib/unistr/u-strncat.h: New file.
2209
2210         * modules/unistr/u8-strncmp: New file.
2211         * modules/unistr/u16-strncmp: New file.
2212         * modules/unistr/u32-strncmp: New file.
2213         * lib/unistr/u8-strncmp.c: New file.
2214         * lib/unistr/u16-strncmp.c: New file.
2215         * lib/unistr/u32-strncmp.c: New file.
2216
2217         * modules/unistr/u8-strncpy: New file.
2218         * modules/unistr/u16-strncpy: New file.
2219         * modules/unistr/u32-strncpy: New file.
2220         * lib/unistr/u8-strncpy.c: New file.
2221         * lib/unistr/u16-strncpy.c: New file.
2222         * lib/unistr/u32-strncpy.c: New file.
2223         * lib/unistr/u-strncpy.h: New file.
2224
2225         * modules/unistr/u8-strnlen: New file.
2226         * modules/unistr/u16-strnlen: New file.
2227         * modules/unistr/u32-strnlen: New file.
2228         * lib/unistr/u8-strnlen.c: New file.
2229         * lib/unistr/u16-strnlen.c: New file.
2230         * lib/unistr/u32-strnlen.c: New file.
2231         * lib/unistr/u-strnlen.h: New file.
2232
2233         * modules/unistr/u8-strpbrk: New file.
2234         * modules/unistr/u16-strpbrk: New file.
2235         * modules/unistr/u32-strpbrk: New file.
2236         * lib/unistr/u8-strpbrk.c: New file.
2237         * lib/unistr/u16-strpbrk.c: New file.
2238         * lib/unistr/u32-strpbrk.c: New file.
2239         * lib/unistr/u-strpbrk.h: New file.
2240
2241         * modules/unistr/u8-strrchr: New file.
2242         * modules/unistr/u16-strrchr: New file.
2243         * modules/unistr/u32-strrchr: New file.
2244         * lib/unistr/u8-strrchr.c: New file.
2245         * lib/unistr/u16-strrchr.c: New file.
2246         * lib/unistr/u32-strrchr.c: New file.
2247
2248         * modules/unistr/u8-strspn: New file.
2249         * modules/unistr/u16-strspn: New file.
2250         * modules/unistr/u32-strspn: New file.
2251         * lib/unistr/u8-strspn.c: New file.
2252         * lib/unistr/u16-strspn.c: New file.
2253         * lib/unistr/u32-strspn.c: New file.
2254         * lib/unistr/u-strspn.h: New file.
2255
2256         * modules/unistr/u8-strstr: New file.
2257         * modules/unistr/u16-strstr: New file.
2258         * modules/unistr/u32-strstr: New file.
2259         * lib/unistr/u8-strstr.c: New file.
2260         * lib/unistr/u16-strstr.c: New file.
2261         * lib/unistr/u32-strstr.c: New file.
2262         * lib/unistr/u-strstr.h: New file.
2263
2264         * modules/unistr/u8-strtok: New file.
2265         * modules/unistr/u16-strtok: New file.
2266         * modules/unistr/u32-strtok: New file.
2267         * lib/unistr/u8-strtok.c: New file.
2268         * lib/unistr/u16-strtok.c: New file.
2269         * lib/unistr/u32-strtok.c: New file.
2270         * lib/unistr/u-strtok.h: New file.
2271
2272         * modules/unistr/u8-uctomb: New file.
2273         * modules/unistr/u16-uctomb: New file.
2274         * modules/unistr/u32-uctomb: New file.
2275         * lib/unistr/u8-uctomb.c: New file.
2276         * lib/unistr/u16-uctomb.c: New file.
2277         * lib/unistr/u32-uctomb.c: New file.
2278
2279         * MODULES.html.sh (Unicode string functions): Add the new modules.
2280
2281 2007-01-08  Bruno Haible  <bruno@clisp.org>
2282
2283         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2284         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2285         subdirectories.
2286
2287 2007-01-08  Karl Berry  <karl@gnu.org>
2288
2289         * doc/error.texi: mention that main() fns must set program_name
2290         when progname is used.
2291
2292 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2293
2294         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2295         WCTYPE_H is empty, for the benefit of builds from non-distclean
2296         directories.  Problem reported by Eric Blake in
2297         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2298
2299 2007-01-08  Bruno Haible  <bruno@clisp.org>
2300
2301         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2302         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2303         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2304         PROVIDE_CANONICALIZE_FILENAME_MODE.
2305         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2306
2307 2007-01-08  Bruno Haible  <bruno@clisp.org>
2308
2309         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2310         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2311         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2312         * lib/fts.c: Likewise.
2313         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2314
2315 2006-12-25  Bruno Haible  <bruno@clisp.org>
2316
2317         * modules/utf8-ucs4-safe: New file.
2318         * lib/utf8-ucs4-safe.h: New file.
2319         * lib/unistr/utf8-ucs4-safe.c: New file.
2320
2321         * modules/utf16-ucs4-safe: New file.
2322         * lib/utf16-ucs4-safe.h: New file.
2323         * lib/unistr/utf16-ucs4-safe.c: New file.
2324
2325         * MODULES.html.sh (Unicode string functions): Add the new modules.
2326
2327 2007-01-08  Bruno Haible  <bruno@clisp.org>
2328
2329         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2330         (Depends-on): Add unitypes.
2331         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2332         (u8_mbtouc_aux): Move out to separate file.
2333         (u8_mbtouc): Use ucs4_t, uint8_t types.
2334         * lib/unistr/utf8-ucs4.c: New file.
2335
2336         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2337         (Depends-on): Add unitypes.
2338         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2339         (u16_mbtouc_aux): Move out to separate file.
2340         (u16_mbtouc): Use ucs4_t, uint16_t types.
2341         * lib/unistr/utf16-ucs4.c: New file.
2342
2343         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2344         (Depends-on): Add unitypes.
2345         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2346         (u8_uctomb_aux): Move out to separate file.
2347         (u8_uctomb): Use ucs4_t, uint8_t types.
2348         * lib/unistr/ucs4-utf8.c: New file.
2349
2350         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2351         (Depends-on): Add unitypes.
2352         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2353         (u16_uctomb_aux): Move out to separate file.
2354         (u16_uctomb): Use ucs4_t, uint16_t types.
2355         * lib/unistr/ucs4-utf16.c: New file.
2356
2357 2006-12-25  Bruno Haible  <bruno@clisp.org>
2358
2359         * modules/unitypes: New file.
2360         * lib/unitypes.h: New file.
2361         * MODULES.html.sh (func_all_modules): New section "Unicode string
2362         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2363         this section. Add unitypes.
2364
2365 2007-01-08  Bruno Haible  <bruno@clisp.org>
2366
2367         Avoid variable names that conflict with those from libtool.
2368         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2369         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2370         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2371         library_names_spec to acl_library_names_spec, hardcode_* to
2372         acl_hardcode_*.
2373         Reported by Ralf Wildenhues.
2374
2375 2007-01-08  Bruno Haible  <bruno@clisp.org>
2376
2377         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2378         definition.
2379         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2380         definition.
2381         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2382         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2383         definition.
2384         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2385         definition.
2386         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2387         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2388         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2389         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2390         definition.
2391         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2392         definition.
2393         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2394         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2395         GC_USE_<algorithm>.
2396         * lib/gc-libgcrypt.c: Likewise.
2397         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2398         * modules/gc-arctwo (configure.ac): Likewise.
2399         * modules/gc-des (configure.ac): Likewise.
2400         * modules/gc-hmac-md5 (configure.ac): Likewise.
2401         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2402         * modules/gc-md2 (configure.ac): Likewise.
2403         * modules/gc-md4 (configure.ac): Likewise.
2404         * modules/gc-md5 (configure.ac): Likewise.
2405         * modules/gc-random (configure.ac): Likewise.
2406         * modules/gc-rijndael (configure.ac): Likewise.
2407         * modules/gc-sha1 (configure.ac): Likewise.
2408
2409 2007-01-08  Bruno Haible  <bruno@clisp.org>
2410
2411         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2412         macro definition.
2413         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2414         definition.
2415         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2416         definition.
2417         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2418         * modules/fcntl-safer (configure.ac): Likewise.
2419         * modules/fopen-safer (configure.ac): Likewise.
2420         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2421         GNULIB_FWRITEERROR macro definition.
2422
2423 2007-01-08  Bruno Haible  <bruno@clisp.org>
2424
2425         * m4/gnulib-common.m4: New file.
2426         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2427         (func_get_filelist): Add m4/gnulib-common.m4.
2428
2429 2007-01-08  Bruno Haible  <bruno@clisp.org>
2430
2431         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2432         command.
2433
2434 2007-01-08  Jim Meyering  <jim@meyering.net>
2435
2436         Use a more robust test for a "can't happen" condition.
2437         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2438         narrowed the st_size value.  Presuming the "can't happen" condition
2439         is true, that narrowing could conceivably convert an invalid st_size
2440         value into a valid one.  Instead, use a change based on Matthew
2441         Woehlke's original patch.
2442
2443         Slight readability improvement: use an assert-like macro
2444         in place of literal "abort ()" uses.
2445         * lib/fts.c (fts_assert): Define.
2446         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2447         Use this macro instead of a bare 'abort'.
2448
2449 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2450
2451         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2452         simply work around them.
2453         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2454         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2455         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2456         Don't bother to define as macros, since the standard doesn't require it.
2457         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2458         longer worry about IRIX 5.3.
2459         (HAVE_WCTYPE_CTMP_BUG): Remove.
2460
2461 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2462
2463         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2464         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2465         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2466         Problems reported by Georg Schwarz for IRIX 5.3.
2467
2468         * gnulib-tool (autoconf_minversion): Take the maximum version number
2469         found, not the minimum.  Problem reported by James Youngman.
2470
2471 2007-01-03  Karl Berry  <karl@gnu.org>
2472
2473         * doc/error.texi: new file, explaining interaction with progname.
2474         * doc/gnulib.texi: include it.  Update copyright.
2475
2476 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2477
2478         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2479         AC_CANONICAL_HOST, to improve autobuild outputs.
2480
2481 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2482             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2483
2484         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2485         sockets, server sockets, and other file descriptors.  Count errors
2486         to compute the return value.  Reorder the code a bit to be easier
2487         to follow.  Don't set event bits that were not requested (except
2488         POLLERR and POLLHUP).
2489
2490 2007-01-01  Bruno Haible  <bruno@clisp.org>
2491
2492         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2493
2494 2007-01-03  Jim Meyering  <jim@meyering.net>
2495
2496         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2497
2498 2007-01-02  Bruno Haible  <bruno@clisp.org>
2499
2500         * modules/settime (Include): Require timespec.h.
2501         * modules/nanosleep (Include): Likewise.
2502
2503 2007-01-01  Bruno Haible  <bruno@clisp.org>
2504
2505         * gnulib-tool (func_emit_copyright_notice): Bump year.
2506         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2507
2508 2007-01-01  Bruno Haible  <bruno@clisp.org>
2509
2510         Improve support for OpenBSD.
2511         * build-aux/config.rpath (libname_spec): Export.
2512         (library_names_spec): New variable. Export.
2513         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2514         library_names_spec from the config.rpath output. Locate shared library
2515         through the name pattern in library_names_spec.
2516
2517 2007-01-01  Eric Blake  <ebb9@byu.net>
2518
2519         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2520
2521 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2522
2523         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2524         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2525         assume the C locale, and avoid an "eval" that could cause trouble.
2526         Problem with SORT reported by Bob Proulx.
2527
2528         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2529         Define.  Trivial patch from Henning Nielsen Lund, originally
2530         sent to bug-grep@gnu.org today.
2531
2532 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2533
2534         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2535         struct stat.  Problem reported by Henning Nielsen Lund.
2536         * lib/acl.c: Include acl.h first, to check interface.  Don't
2537         bother to include sys/types.h and sys/stat.h again.
2538
2539 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2540
2541         Import the following change from libc; problem reported by
2542         Sven Verdoolaege.
2543
2544         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2545
2546         [BZ #1373]
2547         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2548
2549 2006-12-28  Jim Meyering  <jim@meyering.net>
2550
2551         * build-aux/announce-gen: Do not assume that the package
2552         builds any of tar.gz, tar.bz2, and .xdelta files.
2553         Suggestion from Simon Josefsson.
2554
2555 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2556
2557         * modules/announce-gen: New file.
2558
2559 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2560
2561         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2562         handles its gotchas now.
2563         * lib/mbswidth.c: Likewise.
2564         * lib/wcwidth.h: Likewise.
2565         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2566         and iswcntrl; the wctype module does this stuff now.
2567         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2568         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2569         * modules/mbchar (Depends-on): Add wctype.
2570         * modules/mbswidth (Depends-on): Likewise.
2571         * modules/wcwidth (Depends-on): Likewise.
2572
2573 2006-12-27  Eric Blake  <ebb9@byu.net>
2574
2575         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2576         module uses more than what <wctype.h> is required to provide.
2577
2578 2006-12-26  Eric Blake  <ebb9@byu.net>
2579
2580         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2581
2582 2006-12-26  Eric Blake  <ebb9@byu.net>
2583
2584         * modules/absolute-header: New module.
2585         * modules/fcntl (Depends-on): Depend on it.
2586         * modules/inttypes (Depends-on): Likewise.
2587         * modules/stdint (Depends-on): Likewise.
2588         * modules/sys_stat (Depends-on): Likewise.
2589         * modules/wctype (Depends-on): Likewise.
2590         * MODULES.html.sh (Support for building libraries and
2591         executables): Document it.
2592
2593 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2594
2595         * gnulib-tool (SED): Remove, undoing previous change.
2596         The problem was that it broke coreutils on Solaris, because
2597         "sed --posix" leaked into a makefile.
2598         (sed): New alias, if 'alias' and GNU sed.
2599
2600 2006-12-24  Jim Meyering  <jim@meyering.net>
2601
2602         Work around an fchownat bug in glibc-2.4:
2603         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2604         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2605         in spite of the -P option.
2606         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2607         New macros.
2608         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2609         * modules/openat (Files): Add lib/fchownat.c.
2610         * lib/openat.c (fchownat): Don't define here.  Move to...
2611         * lib/fchownat.c: ...this new file.
2612
2613 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2614
2615         Fix bug reported by Bruno Haible in
2616         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2617         where quotearg.c didn't compile on Mac OS X 10.2 because it
2618         lacks <wchar.h> and wint_t.
2619         * lib/wctype_.h (__wctype_wint_t): New type.
2620         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2621         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2622         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2623         Arg is now of type __wctype_wint_t, not wint_t.
2624         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2625         substitute HAVE_WINT_T.
2626         * modules/wctype (Files): Add m4/wint_t.m4.
2627         (wctype.h): Substitute HAVE_WINT_T.
2628
2629 2006-12-23  Bruno Haible  <bruno@clisp.org>
2630
2631         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2632
2633 2006-12-23  Bruno Haible  <bruno@clisp.org>
2634
2635         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2636         S_ISLNK.
2637         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2638         mingw.
2639
2640 2006-12-22  Bruno Haible  <bruno@clisp.org>
2641
2642         * lib/copy-file.c: Include acl.h.
2643         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2644         Close the file descriptors only after being done with copy_acl.
2645         * modules/copy-file (Depends-on): Add acl.
2646
2647 2006-12-22  Bruno Haible  <bruno@clisp.org>
2648
2649         * gnulib-tool (SED): New variable.
2650         Use $SED instead of sed everywhere.
2651
2652 2006-12-22  Bruno Haible  <bruno@clisp.org>
2653
2654         * modules/no-c++: New file.
2655         * m4/no-c++.m4: New file.
2656         * MODULES.html.sh (Support for building libraries and executables):
2657         Add no-c++.
2658
2659 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2660
2661         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2662         Include <limits.h>, and use its INT_MAX to rewrite the
2663         j loop so that it does not overflow 'int'.  Problem reported by
2664         Ralf Wildenhues in
2665         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2666         Play it safe by shifting left by 1 rather than multiplying by 2,
2667         as GCC is less likely to optimize this away when the value
2668         is signed (when it assumes overflow leads to undefined behavior).
2669         Also, don't assume time_t uses two's complement.
2670
2671 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2672
2673         * MODULES.html.sh: New module wctype.
2674         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2675         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2676         <wctype.h>, since the new wctype module should fix this.
2677         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2678         the wctype module should arrange for it.
2679         * lib/regex_internal.h: Likewise.
2680         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2681         since the wctype module should handle this now.
2682         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2683         * modules/fnmatch (Depends-on): Add wctype.
2684         * modules/quotearg (Depends-on): Likewise.
2685         * modules/regex (Depends-on): Likewise.
2686
2687 2006-12-19  Bruno Haible  <bruno@clisp.org>
2688
2689         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2690         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2691
2692 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2693
2694         * modules/savewd (Depends-on): Fix dependency on fcntl.
2695
2696 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2697
2698         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2699         conforms to C99, rather than relying on the user's environment
2700         setting of STDINT_H.
2701
2702 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2703         and Eric Blake  <ebb9@byu.net>
2704
2705         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2706         This is more consistent with the other defines here.
2707         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2708         Port to z/OS.  Problem reported by Paul Gilmartin.
2709         Change local vars to use gl_ prefix rather than ac_.
2710         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2711         with other defines.
2712         * modules/double-slash-root: New module.
2713         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2714         (Depends-on): Add double-slash-root.
2715         * MODULES.html.sh (File system functions): Mention new module.
2716
2717 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2718
2719         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2720         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2721         This is for the benefit of gzip, which doesn't do i18n.
2722
2723 2006-12-12  Jim Meyering  <jim@meyering.net>
2724
2725         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2726         Reported by Andreas Schwab <schwab@suse.de>.
2727
2728 2006-12-12  Bruno Haible  <bruno@clisp.org>
2729
2730         Merge these changes.
2731         2006-09-05  Bruno Haible  <bruno@clisp.org>
2732         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2733         iconv_alloc succeeded.
2734         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2735         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2736         test for " && dest " at the end - dest is always != NULL there. Call
2737         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2738         with 2xNULL arguments, also to flush the state storage. Handle the
2739         IRIX iconv behaviour. Realloc the final result, to throw away unused
2740         memory.
2741
2742 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2743
2744         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2745         and fchmodat unconditionally, since glibc 2.4 has them.
2746         Problem reported by Arkadiusz Miskiewicz.
2747
2748 2006-12-10  Bruno Haible  <bruno@clisp.org>
2749
2750         * gnulib-tool (func_import): Show the include files only for those
2751         modules that are copied and specified.
2752         Reported by Karl Berry.
2753
2754 2006-12-08  Jim Meyering  <jim@meyering.net>
2755
2756         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2757         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2758
2759         * build-aux/announce-gen: Add two new options, both optional:
2760         --bootstrap-tools=TOOL_LIST
2761               a comma-separated list of tools, e.g.,
2762               autoconf,automake,bison,gnulib
2763         --gnulib-snapshot-date=DATE
2764               if gnulib is in the bootstrap tool list,
2765               then report this as the snapshot date.
2766               If not specified, use the current date/time.
2767               If you specify a date here, be sure it's UTC.
2768
2769 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2770
2771         * tests/test-argp-2.sh: Fix test to match actual output.
2772         (func_compare): Fix sed script to be portable.
2773
2774 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2775
2776         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2777         workaround for this case.  It is not autoconfigured now; offhand
2778         it's hard to see how to autoconfigure it.
2779
2780 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2781
2782         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2783         a directory that is about to be chowned.  Such a directory's
2784         initial file permissions should permit the owner only and this
2785         should not be changed until after the chown, since the group and
2786         other bits would be incorrect if they granted permission before
2787         the chown.
2788
2789         Fix porting problem for iswctype reported by Georg Schwarz in:
2790         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2791         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2792         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2793         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2794         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2795
2796 2006-12-03  Jim Meyering  <jim@meyering.net>
2797
2798         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2799         p->fts_statp may not yet be defined.
2800         (fts_read): Instead, set it in the caller, once p->fts_statp is
2801         sure to be defined, and corresponds to a top-level directory.
2802         This bug made du -x fail.  Here's the coreutils test case:
2803         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2804         Reported by Mike Frysinger.
2805
2806 2006-12-01  Jim Meyering  <jim@meyering.net>
2807
2808         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2809         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2810         Reported by Simon Josefsson.
2811
2812 2006-11-30  Jim Meyering  <jim@meyering.net>
2813
2814         * m4/warning.m4: Use the all-permissive copyright notice
2815         recommended by RMS (rather than LGPL).
2816         * m4/vararrays.m4: Likewise.
2817         * m4/flexmember.m4: Likewise.
2818
2819 2006-11-29  Bruno Haible  <bruno@clisp.org>
2820
2821         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2822         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2823         using +=.
2824         Reported by Simon Josefsson <simon@josefsson.org>.
2825
2826 2006-11-28  James Youngman <jay@gnu.org>
2827
2828         * README: Advise users that they might find the bug-gnulib@gnu.org
2829         and autotools-announce@gnu.org mailing lists useful.
2830
2831 2006-11-28  Bruno Haible  <bruno@clisp.org>
2832
2833         * m4/ptrdiff_max.m4: Remove file.
2834
2835 2006-11-21  Bruno Haible  <bruno@clisp.org>
2836
2837         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2838         _AC_COMPUTE_INT.
2839         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2840         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2841         _AC_COMPUTE_INT.
2842         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2843         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2844         _AC_COMPUTE_INT.
2845         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2846
2847 2006-11-28  Jim Meyering  <jim@meyering.net>
2848
2849         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2850         warning from "gcc -Wshadow" about shadowing the builtin.
2851
2852 2006-11-27  Bruno Haible  <bruno@clisp.org>
2853
2854         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2855         _AC_COMPUTE_INT.
2856         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2857
2858 2006-11-27  Bruno Haible  <bruno@clisp.org>
2859             Paul Eggert  <eggert@cs.ucla.edu>
2860
2861         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2862
2863 2006-11-26  Bruno Haible  <bruno@clisp.org>
2864
2865         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2866         noinst_LTLIBRARIES.
2867
2868 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2869             Bruno Haible  <bruno@clisp.org>
2870
2871         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2872         if compiling with "gcc -ansi".
2873
2874 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2875
2876         Fix some incompatibilities with gcc -ansi -pedantic.
2877         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2878         if compiling pedantically with GCC, unless it's C99 or later.
2879         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2880         it mishandles gcc -ansi -pedantic as well.
2881         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2882         if gcc -pedantic.
2883         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2884         initializers for struct if -pedantic, unless it's C99 or later.
2885
2886 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2887
2888         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2889         Don't close an fd more than once. Identical atimes indicate
2890         success, not failure.
2891
2892 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2893
2894         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2895
2896 2006-11-23  Jim Meyering  <jim@meyering.net>
2897
2898         * build-aux/announce-gen: New file.  From coreutils.
2899
2900 2006-11-22  Jim Meyering  <jim@meyering.net>
2901
2902         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2903         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2904         (fts_read): Use a temporary to narrow the overused st_size member
2905         before using it in a switch statement.  Reported by Matthew Woehlke.
2906
2907         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2908         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2909
2910 2006-11-20  Bruno Haible  <bruno@clisp.org>
2911
2912         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2913         changequote instead of pairs of brackets.
2914         Reported by Andreas Schwab <schwab@suse.de>.
2915
2916 2006-11-21  Jim Meyering  <jim@meyering.net>
2917
2918         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2919         so as to remain compatible with older compilers.
2920         Patch from Michael Deutschmann.
2921
2922 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2923
2924         * MODULES.html.sh (File system functions): Add openat.
2925
2926         * lib/openat.h (rpl_fstatat): New macro, if
2927         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2928         (fstatat): Define to rpl_fstatat under the same conditions,
2929         unless COMPILING_FSTATAT.
2930         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2931         seems to have the bug.
2932         * lib/fstatat.c: New file.
2933         * modules/openat (Files): Add it.
2934
2935 2006-11-20  Bruno Haible  <bruno@clisp.org>
2936
2937         * Makefile: New file.
2938
2939 2006-11-20  Jim Meyering  <jim@meyering.net>
2940
2941         The beginnings of syntax-related checks for gnulib.
2942         * lib/Makefile: New file.
2943         * lib/t-idcache: New script.  Ensure that the two halves of
2944         idcache.c stay in sync.
2945
2946         * lib/idcache.c: Adjust comments in user- and group- portions to
2947         be more accurate, and to be consistent with one another.
2948
2949 2006-11-20  Jim Meyering  <jim@meyering.net>
2950
2951         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2952         continue using the flexible array member (thus, this module performs
2953         half as many malloc calls), with the addition that...
2954         (getgroup, getuser): Consistently record a non-match via an empty
2955         "name" string, and map an empty string match to a NULL return value.
2956         * modules/idcache (Depends-on): Re-add flexmember.
2957
2958         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2959         (getuidbyname, getgroup, getgidbyname): Likewise.
2960
2961         Use cleaner syntax: NULL rather than 0.
2962         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2963
2964 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2965
2966         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2967         It mishandled the case where the group was missing.
2968         Problem reported by Greg Schafer.
2969         * modules/idcache: Likewise.
2970
2971 2006-11-18  Jim Meyering  <jim@meyering.net>
2972
2973         * check-module (%exempt_header): Add exception for some
2974         conditionally-included headers.
2975
2976         * modules/i-ring (Depends-on): Add verify.
2977         (License): Change to LGPL.
2978
2979 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2980
2981         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2982         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2983         and inttostr.h.  Use snprintf rather than uinttostr, so that
2984         LGPLed code doesn't depend on GPLed.
2985
2986 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2987
2988         * modules/inline (License): Change from GPL to LGPL.
2989
2990 2006-11-17  Jim Meyering  <jim@meyering.net>
2991
2992         * modules/d-type (License): Switch to LGPL.
2993
2994 2006-11-15  Bruno Haible  <bruno@clisp.org>
2995
2996         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2997
2998 2006-11-15  Eric Blake  <ebb9@byu.net>
2999
3000         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3001         the module dependency.
3002
3003 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3004             Bruno Haible  <bruno@clisp.org>
3005
3006         * gnulib-tool (func_create_testdir): Add license consistency check.
3007
3008 2006-11-15  Eric Blake  <ebb9@byu.net>
3009
3010         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3011         random "(cached)" in configure output.
3012
3013 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3014
3015         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3016         test for conforming inttypes.h is both announced and cached.
3017
3018         * MODULES.html.sh (seen_modules, seen_files): New variables.
3019         (func_module): Rewrite to use a few less gnulib-tool and sed
3020         invocations.  Avoid a couple of quadratic algorithms for ...
3021         (missed_modules, missed_files): ... these, with ...
3022         (func_append, func_tmpdir): ... these new functions, from
3023         gnulib-tool.  Analogously, install traps for cleanup.
3024
3025         * tests/test-gc.c (main): Remove unused variables.
3026         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3027
3028 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3029
3030         * modules/inttostr (License): Change to LGPL.
3031
3032 2006-11-14  Eric Blake  <ebb9@byu.net>
3033
3034         * modules/tempname (License): Change to LGPL.
3035
3036 2006-11-14  Eric Blake  <ebb9@byu.net>
3037
3038         * doc/functions.texi (Function Portability): *printf functions on
3039         Cygwin now understand all POSIX size specifiers.
3040
3041 2006-11-14  Bruno Haible  <bruno@clisp.org>
3042
3043         * modules/c-ctype (License): Change to LGPL.
3044
3045 2006-11-12  Bruno Haible  <bruno@clisp.org>
3046
3047         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3048         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3049         for GNOME libraries, for which the include files are installed in
3050         subdirectories of $prefix/include.
3051
3052 2006-11-12  Bruno Haible  <bruno@clisp.org>
3053
3054         * m4/lib-link.m4: Require at least autoconf-2.54.
3055         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3056         name to underscores for the --with option.
3057
3058 2006-11-13  Bruno Haible  <bruno@clisp.org>
3059
3060         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3061         the tests directory.
3062         Reported by Ralf Wildenhues.
3063
3064 2006-11-13  Bruno Haible  <bruno@clisp.org>
3065
3066         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3067         (func_emit_initmacro_end): Undo the override here.
3068         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3069         Works around the famous automake error in coreutils.
3070
3071 2006-11-13  Eric Blake  <ebb9@byu.net>
3072
3073         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3074         element, not its node.
3075
3076 2006-11-12  Bruno Haible  <bruno@clisp.org>
3077
3078         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3079         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3080
3081 2006-11-12  Bruno Haible  <bruno@clisp.org>
3082
3083         * gnulib-tool: New option --local-symlink.
3084         (func_usage): Document it.
3085         (lsymbolic): New variable.
3086         (func_import, func_create_testdir): If --symlink was not specified,
3087         test whether --local-symlink was specified and the file comes from
3088         the local_gnulib_dir.
3089
3090 2006-11-12  Bruno Haible  <bruno@clisp.org>
3091
3092         * gnulib-tool (func_ln): New function.
3093         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3094
3095 2006-11-12  Bruno Haible  <bruno@clisp.org>
3096
3097         Finish support for source files in subdirectories.
3098         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3099         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3100         AUTOMAKE_OPTIONS.
3101         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3102
3103 2006-11-12  Bruno Haible  <bruno@clisp.org>
3104
3105         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3106         EXTRA_lib_SOURCES augmentation.
3107         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3108
3109 2006-11-12  Jim Meyering  <jim@meyering.net>
3110
3111         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3112         file descriptors.  This also averts a failure on systems with
3113         native openat support when a traversed directory lacks "x" access.
3114         * lib/fts_.h: Include "i-ring.h"
3115         (struct FTS) [fts_fd_ring]: New member.
3116         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3117         (FCHDIR): Add parentheses.
3118         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3119         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3120         When descending, rather than simply closing the previous
3121         fts_cwd_fd value, push that file descriptor onto the ring.
3122         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3123         (fts_open): Initialize the new fd_ring member.
3124         (fts_close): Clear the ring.
3125         (fts_safe_changedir): When possible, use our new fd_ring to skip
3126         the diropen and fstat and dev/ino comparison that would normally
3127         accompany a virtual `chdir ("..")'.
3128
3129         * modules/fts (Depends-on): Add i-ring.
3130         * modules/i-ring: New module.
3131         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3132         * m4/i-ring.m4: New file.
3133
3134 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3135
3136         * gnulib-tool (func_create_testdir): Fix replacement of
3137         `build-aux' in configure.ac.  Run autotools in gltests
3138         subdirectory.
3139         (func_create_testdir, func_create_megatestdir, test): There is
3140         no need for '--force' in most autotool invocations in a new
3141         tree.  Actually fail the whole test if any of the tools, or the
3142         configure or make stages fail.
3143
3144         Sync from Automake.
3145         * build-aux/gnupload: Revert last change.  Add pointer to upload
3146         instructions of the GNU Maintenance Instructions.
3147         Suggestion by Karl Berry.
3148
3149 2006-11-10  Jim Meyering  <jim@meyering.net>
3150
3151         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3152
3153 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3154
3155         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3156         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3157         (bind_textdomain_codeset) [! ENABLE_NLS]:
3158         Evaluate all the arguments.  That way, callers get compatible behavior
3159         if the arguments have side effects.  Also, it avoids some GCC
3160         diagnostics in some cases; Joel E. Denny reported problems when Bison
3161         was configured with --enable-gcc-warnigs.
3162
3163 2006-11-10  Jim Meyering  <jim@meyering.net>
3164
3165         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3166         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3167         account.
3168
3169 2006-11-10  Jim Meyering  <jim@meyering.net>
3170
3171         * modules/inline: New file/module.
3172         * modules/xalloc (Files): Remove m4/inline.m4.
3173         (Depends-on): Add inline, instead.
3174         * modules/oset: Likewise.
3175         * modules/list: Likewise.
3176
3177 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3178
3179         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3180         Problem reported by Matthew Woehlke.
3181
3182 2006-11-09  Bruno Haible  <bruno@clisp.org>
3183
3184         * lib/tempname.c (gen_tempname): Remove variant that invokes
3185         __gen_tempname.
3186         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3187         __gen_tempname.
3188
3189 2006-11-08  Bruno Haible  <bruno@clisp.org>
3190
3191         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3192         to 'yes' instead of 'cross-compiling'.
3193
3194 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3195
3196         * lib/quotearg.h (quotearg_free): New decl.
3197         * lib/quotearg.c (quotearg_free): New function.
3198         (slot0, nslots, slotvec0, slotvec):
3199         Now file-scope so that quotearg_free can get at them.
3200
3201 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3202
3203         Sync from Automake.
3204         * build-aux/gnupload: Add missing 'gnu' to example URL.
3205         Report by Karl Berry.
3206
3207 2006-11-08  Bruno Haible  <bruno@clisp.org>
3208
3209         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3210         Suggested by Paul Eggert.
3211
3212 2006-11-08  Jim Meyering  <jim@meyering.net>
3213
3214         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3215         It's already included if !_LIBC.
3216         (fts_safe_changedir): Add a comment.
3217
3218 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3219
3220         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3221         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3222         Matthew Woehlke.
3223
3224         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3225         definitions up, to avoid colliding with change below.
3226         (static_inline) [HAVE_INLINE]: New macro.
3227         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3228         Provide extern decls when !HAVE_INLINE.  Do not define unless
3229         static_inline is defined, either by us or by xmalloc.c.  Use
3230         static_inline rather than static inline.
3231         (XCALLOC): Optimize sizeof(T) = 1 case.
3232         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3233
3234 2006-11-07  Bruno Haible  <bruno@clisp.org>
3235
3236         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3237         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3238         AC_C_INLINE.
3239         * modules/xalloc (Files): Add m4/inline.m4.
3240
3241 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3242
3243         * README: Fix typo.
3244         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3245         (Miscellanous Notes): ...from this.
3246
3247 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3248
3249         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3250         Mention that offsetof should be used instead of sizeof.
3251         From Bruno Haible.
3252
3253 2006-11-07  Bruno Haible  <bruno@clisp.org>
3254
3255         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3256
3257 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3258
3259         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3260         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3261         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3262         (gl_tree_add_before, gl_tree_add_after):
3263         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3264         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3265         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3266         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3267         (gl_linked_add_after, gl_linked_add_at): Likewise.
3268         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3269         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3270         (gl_tree_add_before, gl_tree_add_after): Likewise.
3271         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3272         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3273         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3274
3275 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3276
3277         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3278
3279 2006-11-06  Bruno Haible  <bruno@clisp.org>
3280
3281         * m4/inline.m4: New file.
3282         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3283         * modules/list (Files): Add m4/inline.m4.
3284         * modules/oset (Files): Likewise.
3285
3286 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3287
3288         * lib/idcache.c: Include <stddef.h>, for offsetof.
3289         (struct userid.name): Change from char * to a flexible array member.
3290         All uses changed.
3291         * modules/idcache (Depends-on): Add flexmember.
3292
3293         * MODULES.html.sh (Core language properties): New module flexmember.
3294         * modules/flexmember, m4/flexmember.m4: New files.
3295
3296         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3297         inline functions that are identical with the old xnmalloc_inline,
3298         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3299         that we can avoid some unnecessary integer multiplications and
3300         divisions in the common case where the element size is known at
3301         compile time.
3302         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3303         needed.
3304         (xnboundedmalloc): Remove.
3305         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3306         arguments, for consistency with rest of this header.
3307         (xcharalloc): Rewrite using XNMALLOC.
3308         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3309         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3310         versions have been moved to lib/xalloc.h and renamed to be the
3311         non-*_inline versions.
3312         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3313         and xnrealloc functions, since those functions are now inline and
3314         now call us.
3315         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3316         renaming described above.
3317         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3318         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3319         captures the dependency in AC_C_INLINE.
3320
3321         New module canonicalize-lgpl, proposed by Charles Wilson in
3322         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3323         with a few small changes afterwards.
3324         * MODULES.html.sh (File system functions): New module
3325         canonicalize-lgpl.
3326         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3327         and canonicalize_file_name.
3328         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3329         * modules/canonicalize-lgpl: New files.
3330
3331 2006-11-05  Bruno Haible  <bruno@clisp.org>
3332
3333         * gnulib-tool (func_import, func_create_testdir): Create directories
3334         also for files in subdirectories of lib/.
3335
3336 2006-11-05  Bruno Haible  <bruno@clisp.org>
3337
3338         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3339         ANSI C compliant.
3340
3341 2006-11-03  Bruno Haible  <bruno@clisp.org>
3342
3343         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3344         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3345         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3346         (xnboundedmalloc): New inline function.
3347         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3348         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3349         xmalloc.
3350         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3351         xmalloc.
3352         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3353         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3354         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3355         xmalloc.
3356         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3357         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3358         xmalloc.
3359         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3360         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3361         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3362         xmalloc.
3363         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3364         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3365         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3366         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3367         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3368         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3369         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3370
3371 2006-11-03  Bruno Haible  <bruno@clisp.org>
3372
3373         * lib/c-ctype.h [C++]: Define functions without name mangling.
3374         * lib/fwriteerror.h [C++]: Likewise.
3375         * lib/gcd.h [C++]: Likewise.
3376         * lib/linebreak.h [C++]: Likewise.
3377
3378 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3379
3380         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3381         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3382         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3383         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3384         Check for functions and headers just once.
3385         Check for declaration of canonicalize_file_name.
3386         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3387
3388 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3389
3390         * gnulib-tool (func_import): Fix typo in actioncmd.
3391
3392 2006-11-02  Bruno Haible  <bruno@clisp.org>
3393
3394         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3395         newline sequence in the Makefile.am snippet as a space, like "make"
3396         does.
3397         Reported by Roger Persson <perrog@gmail.com>.
3398
3399 2006-11-01  Bruno Haible  <bruno@clisp.org>
3400
3401         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3402         already declared in <string.h>.
3403         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3404
3405 2006-11-01  Bruno Haible  <bruno@clisp.org>
3406
3407         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3408         * lib/strcase.h: Include <string.h>.
3409         (strcasecmp): Define to rpl_strcasecmp here.
3410
3411 2006-11-01  Bruno Haible  <bruno@clisp.org>
3412
3413         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3414
3415 2006-11-01  Eric Blake  <ebb9@byu.net>
3416
3417         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3418
3419         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3420
3421 2006-10-29  Bruno Haible  <bruno@clisp.org>
3422
3423         Make it compile in C++ mode.
3424         * lib/full-write.c (full_rw): Add a cast.
3425
3426 2006-11-01  Bruno Haible  <bruno@clisp.org>
3427
3428         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3429         be POSIX compliant.
3430         Reported by Roger Persson <perrog@gmail.com>.
3431
3432 2006-11-01  Eric Blake  <ebb9@byu.net>
3433
3434         * lib/getopt_.h: Fix comments.
3435
3436 2006-10-31  Eric Blake  <ebb9@byu.net>
3437
3438         * modules/tmpdir (Depends-on): Add sys_stat.
3439         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3440         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3441         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3442         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3443         tempname.
3444
3445 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3446
3447         Avoid some C++ diagnostics reported by Bruno Haible.
3448         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3449         xmalloc.
3450         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3451         (struct slotvec): Move to top level.
3452         (quotearg_n_options): Rewrite to avoid xmalloc.
3453         * lib/xalloc.h (xcharalloc): New function.
3454         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3455         [defined __cplusplus]: Add function template that provides result
3456         type propagation.  This part of the change is from Bruno Haible.
3457
3458 2006-10-29  Bruno Haible  <bruno@clisp.org>
3459
3460         Make it compile in C++ mode.
3461         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3462         * lib/strnlen1.c (strnlen1): Cast memchr result.
3463         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3464         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3465         (create_temp_dir): Rename local variable 'template'.
3466         (compile_csharp_using_sscli): Add cast.
3467         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3468         * lib/findprog.c (find_in_path): Likewise.
3469         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3470         * lib/wait-process.c (register_slave_subprocess): Likewise.
3471
3472 2006-10-22  Bruno Haible  <bruno@clisp.org>
3473
3474         * modules/tsearch: New file.
3475         * lib/tsearch.h: New file.
3476         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3477         * m4/tsearch.m4: New file.
3478         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3479
3480 2006-10-29  Eric Blake  <ebb9@byu.net>
3481
3482         * lib/arcfour.c: Assume config.h.
3483         * lib/arctwo.c: Likewise.
3484         * lib/base64.c: Likewise.
3485         * lib/check-version.c: Likewise.
3486         * lib/crc.c: Likewise.
3487         * lib/des.c: Likewise.
3488         * lib/gc-gnulib.c: Likewise.
3489         * lib/gc-libgcrypt.c: Likewise.
3490         * lib/gc-pbkdf2-sha1.c: Likewise.
3491         * lib/getaddrinfo.c: Likewise.
3492         * lib/getdelim.c: Likewise.
3493         * lib/getline.c: Likewise.
3494         * lib/hmac-md5.c: Likewise.
3495         * lib/hmac-sha1.c: Likewise.
3496         * lib/iconvme.c: Likewise.
3497         * lib/md2.c: Likewise.
3498         * lib/md4.c: Likewise.
3499         * lib/memxor.c: Likewise.
3500         * lib/read-file.c: Likewise.
3501         * lib/readline.c: Likewise.
3502         * lib/rijndael-alg-fst.c: Likewise.
3503         * lib/rijndael-api-fst.c: Likewise.
3504         * lib/xgetdomainname.c: Likewise.
3505
3506 2006-10-28  Eric Blake  <ebb9@byu.net>
3507
3508         * lib/xstrndup.c: Assume config.h.
3509
3510 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3511
3512         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3513         stat-macros.h is now for our own macros, whereas stat_h is for
3514         macros in the <sys/stat.h> name space.
3515         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3516         (STAT_MACROS_H): Remove.
3517         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3518         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3519         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3520         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3521         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3522         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3523         Move these macros to ...
3524         * lib/stat_.h: here.  Don't include stat-macros.h.
3525         * lib/canonicalize.c: Don't include stat-macros.h.
3526         * lib/chown.c: Likewise.
3527         * lib/euidaccess.c: Likewise.
3528         * lib/file-type.c: Likewise.
3529         * lib/filemode.c: Likewise.
3530         * lib/glob.c: Likewise.
3531         * lib/isapipe.c: Likewise.
3532         * lib/lchown.c: Likewise.
3533         * lib/lstat.c: Likewise.
3534         * lib/mkdir-p.c: Likewise.
3535         * lib/rmdir.c: Likewise.
3536         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3537         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3538         unless mkdir isn't declared, to speed up 'configure'.
3539         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3540         would define all the S_* symbols.
3541         * modules/canonicalize (Depends-on):
3542         Depend on sys_stat, not stat-macros.
3543         * modules/chown: Likewise.
3544         * modules/euidaccess: Likewise.
3545         * modules/filemode: Likewise.
3546         * modules/file-type: Likewise.
3547         * modules/glob: Likewise.
3548         * modules/isapipe: Likewise.
3549         * modules/lchown: Likewise.
3550         * modules/lstat: Likewise.
3551         * modules/mkancesdirs: Likewise.
3552         * modules/rmdir: Likewise.
3553         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3554         * modules/modechange: Likewise.
3555         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3556         (configure.ac): Remove gl_STAT_MACROS.
3557         * modules/sys_stat (Depends-on): Remove stat-macros.
3558
3559 2006-10-27  Bruno Haible  <bruno@clisp.org>
3560
3561         * m4/signed.m4: Remove file.
3562         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3563         invocation.
3564         * modules/vasnprintf (Files): Remove m4/signed.m4.
3565
3566 2006-10-27  Bruno Haible  <bruno@clisp.org>
3567
3568         Update to GNU gettext 0.16.
3569         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3570         m4/inttypes-h.m4, m4/signed.m4.
3571         * m4/gettext.m4: Update to GNU gettext 0.16.
3572         * m4/intl.m4: New file, from GNU gettext.
3573         * m4/intldir.m4: New file, from GNU gettext.
3574         * config/srclist.txt: Update
3575
3576 2006-10-27  Eric Blake  <ebb9@byu.net>
3577
3578         * MODULES.html.sh: Document tempname.
3579         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3580         dependencies.
3581         (Files): Move lib/tempname.c...
3582         * modules/tempname: ...to this new module.
3583         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3584         (gl_PREREQ_TEMPNAME): Move...
3585         * m4/tempname.m4: ...to this new file.
3586         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3587         * modules/sys_stat (Depends-on): Add stat-macros.
3588         * lib/stat_.h (includes): Pick up stat macros.
3589         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3590         if stat macros are broken.
3591         * lib/tempname.c (includes): No need to include "stat-macros.h".
3592         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3593         (direxists, __path_search) [!_LIBC]: Don't compile these in
3594         gnulib; the tmpdir module covers that.
3595         * lib/tempname.h: New file.
3596
3597 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3598
3599         * COPYING: Explain how gnulib-tool converts licence headers.
3600         Almost all wording by Eric Blake.
3601
3602 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3603
3604         * lib/mbchar.h (is_basic_table): Make read-only.
3605         * lib/mbchar.c (is_basic_table): Likewise.
3606         Reported by John Darrington.
3607
3608 2006-10-25  Bruno Haible  <bruno@clisp.org>
3609
3610         * lib/progname.h (set_program_name): Undefine before defining.
3611
3612 2006-10-25  Bruno Haible  <bruno@clisp.org>
3613
3614         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3615         false for non-gcc C++ compilers.
3616         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3617
3618 2006-10-24  Bruno Haible  <bruno@clisp.org>
3619
3620         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3621         iconv implementations like Irix iconv.
3622
3623 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3624
3625         * modules/vararrays: New file.
3626         * m4/vararrays.m4: New file, taken from diffutils.
3627         * MODULES.html.sh: New module vararrays.
3628
3629 2006-10-24  Karl Berry  <karl@gnu.org>
3630
3631         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3632         Don't call GNU Unix.
3633
3634 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3635
3636         * users.txt: Add Libtool.
3637
3638         Sync from Libtool:
3639
3640         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3641
3642         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3643         to gnulib's policy of including config.h unconditionally.
3644
3645 2006-10-24  Bruno Haible  <bruno@clisp.org>
3646
3647         * modules/wcwidth (Files): Add m4/wint_t.m4.
3648         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3649         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3650
3651 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3652
3653         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3654         to pacify GCC with some -W flags enabled.  Problem reported by
3655         Bruno Haible.
3656
3657 2006-10-24  Jim Meyering  <jim@meyering.net>
3658
3659         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3660         Reported by Karl Berry.
3661
3662 2006-10-23  Bruno Haible  <bruno@clisp.org>
3663
3664         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3665
3666 2006-10-24  Bruno Haible  <bruno@clisp.org>
3667
3668         * lib/gl_list.h: Use C comment style, not C++ comment style.
3669
3670 2006-10-23  Eric Blake  <ebb9@byu.net>
3671
3672         * lib/getaddrinfo.c (includes): Add missing include.
3673
3674 2006-10-23  Bruno Haible  <bruno@clisp.org>
3675             Paul Eggert  <eggert@cs.ucla.edu>
3676
3677         Ability to rename obstack_free.
3678         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3679         obstack_free.
3680         (obstack_free): Invoke the __obstack_free macro.
3681         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3682
3683 2006-10-23  Bruno Haible  <bruno@clisp.org>
3684             Paul Eggert  <eggert@cs.ucla.edu>
3685
3686         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3687         __argc, __argv from the declaration. (They are defined as macros on
3688         mingw.)
3689
3690 2006-10-22  Bruno Haible  <bruno@clisp.org>
3691
3692         * doc/gnulib-intro.texi: New file.
3693         * doc/gnulib.texi: Include it.
3694
3695 2006-10-21  Bruno Haible  <bruno@clisp.org>
3696
3697         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3698         "Introduction", "Miscellanous Notes", "Particular Modules".
3699
3700 2006-10-21  Bruno Haible  <bruno@clisp.org>
3701
3702         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3703         Change mostlyclean-local rule to avoid sh syntax error from bash
3704         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3705
3706 2006-10-23  Jim Meyering  <jim@meyering.net>
3707
3708         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3709         in place of snprintf.
3710
3711         * modules/inttostr (Files): Add lib/uinttostr.c.
3712         * lib/uinttostr.c (inttostr): New file/function.
3713         * lib/inttostr.h (uinttostr): Declare.
3714         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3715         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3716         Add uinttostr.
3717         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3718
3719 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3720
3721         * lib/canonicalize.c (ELOOP): Define if not already defined.
3722         Problem reported by Bruno Haible in
3723         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3724
3725 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3726
3727         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3728         Problem reported by Perry Smith and Ville Laurikari.
3729
3730         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3731         uses.
3732
3733 2006-10-19  Bruno Haible  <bruno@clisp.org>
3734
3735         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3736         for mingw.
3737
3738 2006-10-19  Bruno Haible  <bruno@clisp.org>
3739
3740         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3741         Needed for mingw.
3742
3743 2006-10-19  Bruno Haible  <bruno@clisp.org>
3744
3745         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3746
3747 2006-10-19  Bruno Haible  <bruno@clisp.org>
3748
3749         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3750         it.
3751
3752 2006-10-19  Bruno Haible  <bruno@clisp.org>
3753
3754         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3755         invocation.
3756
3757 2006-10-19  Bruno Haible  <bruno@clisp.org>
3758
3759         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3760         mountlist by default.
3761
3762 2006-10-16  Bruno Haible  <bruno@clisp.org>
3763
3764         * lib/c-strstr.c: Include c-strstr.h.
3765
3766 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3767
3768         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3769         in a slash.
3770
3771 2006-10-18  Bruno Haible  <bruno@clisp.org>
3772
3773         * lib/lock.h [C++]: Wrap definitions in extern "C".
3774
3775 2006-10-18  Bruno Haible  <bruno@clisp.org>
3776
3777         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3778         gl_LIBOBJS list.
3779
3780 2006-10-18  Bruno Haible  <bruno@clisp.org>
3781
3782         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3783
3784 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3785
3786         * lib/xstrtol.h: Include gettext.h.
3787         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3788         Problem reported by Eric Blake.
3789         * modules/xstrtol (Depends-on): Add gettext-h.
3790
3791 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3792
3793         * lib/strftime.c (advance): New macro.
3794         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3795         incomplete type, so you can't add 0 to it.  Problem and patch
3796         reported by Eelco Dolstra for dietlibc.
3797
3798 2006-10-18  Jim Meyering  <jim@meyering.net>
3799
3800         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3801         type for a local, and rename it: s/up/user_proc/.
3802
3803 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3804
3805         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3806         READ_UTMP_USER_PROCESS.
3807         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3808
3809 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3810
3811         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3812         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3813
3814 2006-10-17  Eric Blake  <ebb9@byu.net>
3815
3816         * lib/sigprocmask.c (sigprocmask): Fix typo.
3817
3818         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3819
3820         * modules/clean-temp (Makefile.am): Don't add to make output...
3821         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3822         config.h.
3823
3824 2006-10-17  Bruno Haible  <bruno@clisp.org>
3825
3826         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3827         differently if DEFAULT_TEXT_DOMAIN is set.
3828
3829 2006-10-16  Bruno Haible  <bruno@clisp.org>
3830
3831         * lib/clean-temp.c: Include fwriteerror.h.
3832
3833 2006-10-16  Bruno Haible  <bruno@clisp.org>
3834
3835         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3836
3837 2006-10-16  Bruno Haible  <bruno@clisp.org>
3838
3839         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3840         * lib/sigprocmask.h: Include <sys/types.h>.
3841         (sigset_t): Use the system's definition if present.
3842
3843 2006-10-17  Eric Blake  <ebb9@byu.net>
3844
3845         * lib/xvasprintf.c (includes): Assume config.h.
3846         * lib/xasprintf.c (includes): Likewise.
3847
3848 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3849
3850         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3851         at least as wide as intmax_t.
3852
3853 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3854
3855         (Imported from Automake.)
3856         * build-aux/gnupload: Update to version 1.1 of directive file.
3857
3858 2006-10-16  Eric Blake  <ebb9@byu.net>
3859
3860         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3861         match Automake 1.10a.
3862
3863 2006-10-14  Bruno Haible  <bruno@clisp.org>
3864
3865         * modules/sigprocmask: New file.
3866         * lib/sigprocmask.h: New file.
3867         * lib/sigprocmask.c: New file.
3868         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3869         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3870         request sigprocmask.o.
3871         (gl_PREREQ_SIGPROCMASK): New macro.
3872         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3873         (Depends-on): Add sigprocmask.
3874         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3875         gt_SIGNALBLOCKING. Test for 'raise' only once.
3876         * lib/fatal-signal.c: Include sigprocmask.h.
3877         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3878         unblock_fatal_signals): Define always.
3879         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3880         sigprocmask.
3881
3882 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3883
3884         Sync from Automake.
3885         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3886         which incorrectly sets the mode of an existing destination
3887         directory.  In some cases the unpatched install-sh could do the
3888         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3889         system.  We hope this is rare in practice, but it's clearly worth
3890         fixing.  Problem reported by Alex Unleashed in
3891         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3892         Also, don't bother to check for -m bugs unless we're using -m;
3893         suggested by Stepan Kasal.
3894
3895 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3896
3897         Sync from Automake.
3898         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3899         `-c' flag, so they appear at the same position as in %FASTDEP%
3900         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3901         which ignores unknown options only after the first non-option.
3902         Bug report against M4 by Nelson H. F. Beebe.
3903
3904 2006-10-13  Jim Meyering  <jim@meyering.net>
3905
3906         Fix a bug in yesterday's change.
3907         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3908         p->fts_statp->st_dev would be used uninitialized.
3909         Ensures that we always call fts_stat on the very first entry.
3910         Miklos Szeredi reported that find -xdev stopped working.
3911
3912 2006-10-12  Bruno Haible  <bruno@clisp.org>
3913
3914         * gnulib-tool (func_get_automake_snippet): Append an automatically
3915         computed EXTRA_DIST augmentation.
3916         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3917         * modules/alloca-opt (Makefile.am): Likewise.
3918         * modules/allocsa (Makefile.am): Likewise.
3919         * modules/arcfour (Makefile.am): Likewise.
3920         * modules/arctwo (Makefile.am): Likewise.
3921         * modules/argmatch (Makefile.am): Likewise.
3922         * modules/argz (Makefile.am): Likewise.
3923         * modules/atexit (Makefile.am): Likewise.
3924         * modules/backupfile (Makefile.am): Likewise.
3925         * modules/byteswap (Makefile.am): Likewise.
3926         * modules/c-strtod (Makefile.am): Likewise.
3927         * modules/c-strtold (Makefile.am): Likewise.
3928         * modules/calloc (Makefile.am): Likewise.
3929         * modules/canon-host (Makefile.am): Likewise.
3930         * modules/canonicalize (Makefile.am): Likewise.
3931         * modules/chdir-long (Makefile.am): Likewise.
3932         * modules/chdir-safer (Makefile.am): Likewise.
3933         * modules/check-version (Makefile.am): Likewise.
3934         * modules/chown (Makefile.am): Likewise.
3935         * modules/cloexec (Makefile.am): Likewise.
3936         * modules/close-stream (Makefile.am): Likewise.
3937         * modules/closeout (Makefile.am): Likewise.
3938         * modules/crc (Makefile.am): Likewise.
3939         * modules/csharpexec (Makefile.am): Likewise.
3940         * modules/cycle-check (Makefile.am): Likewise.
3941         * modules/des (Makefile.am): Likewise.
3942         * modules/dev-ino (Makefile.am): Likewise.
3943         * modules/dirfd (Makefile.am): Likewise.
3944         * modules/dirname (Makefile.am): Likewise.
3945         * modules/dup2 (Makefile.am): Likewise.
3946         * modules/eealloc (Makefile.am): Likewise.
3947         * modules/error (Makefile.am): Likewise.
3948         * modules/euidaccess (Makefile.am): Likewise.
3949         * modules/exclude (Makefile.am): Likewise.
3950         * modules/exitfail (Makefile.am): Likewise.
3951         * modules/fcntl-safer (Makefile.am): Likewise.
3952         * modules/fcntl (Makefile.am): Likewise.
3953         * modules/file-type (Makefile.am): Likewise.
3954         * modules/fileblocks (Makefile.am): Likewise.
3955         * modules/filemode (Makefile.am): Likewise.
3956         * modules/filenamecat (Makefile.am): Likewise.
3957         * modules/fnmatch (Makefile.am): Likewise.
3958         * modules/fopen-safer (Makefile.am): Likewise.
3959         * modules/fpending (Makefile.am): Likewise.
3960         * modules/fprintftime (Makefile.am): Likewise.
3961         * modules/free (Makefile.am): Likewise.
3962         * modules/fsusage (Makefile.am): Likewise.
3963         * modules/ftruncate (Makefile.am): Likewise.
3964         * modules/fts (Makefile.am): Likewise.
3965         * modules/gc-arcfour (Makefile.am): Likewise.
3966         * modules/gc-des (Makefile.am): Likewise.
3967         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3968         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3969         * modules/gc-md4 (Makefile.am): Likewise.
3970         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3971         * modules/gc-sha1 (Makefile.am): Likewise.
3972         * modules/gc (Makefile.am): Likewise.
3973         * modules/getaddrinfo (Makefile.am): Likewise.
3974         * modules/getcwd (Makefile.am): Likewise.
3975         * modules/getdelim (Makefile.am): Likewise.
3976         * modules/getdomainname (Makefile.am): Likewise.
3977         * modules/getgroups (Makefile.am): Likewise.
3978         * modules/gethostname (Makefile.am): Likewise.
3979         * modules/gethrxtime (Makefile.am): Likewise.
3980         * modules/getline (Makefile.am): Likewise.
3981         * modules/getloadavg (Makefile.am): Likewise.
3982         * modules/getlogin_r (Makefile.am): Likewise.
3983         * modules/getndelim2 (Makefile.am): Likewise.
3984         * modules/getopt (Makefile.am): Likewise.
3985         * modules/getpagesize (Makefile.am): Likewise.
3986         * modules/getpass-gnu (Makefile.am): Likewise.
3987         * modules/getpass (Makefile.am): Likewise.
3988         * modules/getsubopt (Makefile.am): Likewise.
3989         * modules/gettime (Makefile.am): Likewise.
3990         * modules/gettimeofday (Makefile.am): Likewise.
3991         * modules/getugroups (Makefile.am): Likewise.
3992         * modules/getusershell (Makefile.am): Likewise.
3993         * modules/glob (Makefile.am): Likewise.
3994         * modules/group-member (Makefile.am): Likewise.
3995         * modules/hard-locale (Makefile.am): Likewise.
3996         * modules/hash (Makefile.am): Likewise.
3997         * modules/hmac-md5 (Makefile.am): Likewise.
3998         * modules/hmac-sha1 (Makefile.am): Likewise.
3999         * modules/human (Makefile.am): Likewise.
4000         * modules/idcache (Makefile.am): Likewise.
4001         * modules/imaxabs (Makefile.am): Likewise.
4002         * modules/imaxdiv (Makefile.am): Likewise.
4003         * modules/inet_ntop (Makefile.am): Likewise.
4004         * modules/inet_pton (Makefile.am): Likewise.
4005         * modules/intprops (Makefile.am): Likewise.
4006         * modules/inttostr (Makefile.am): Likewise.
4007         * modules/inttypes (Makefile.am): Likewise.
4008         * modules/isapipe (Makefile.am): Likewise.
4009         * modules/javaversion (Makefile.am): Likewise.
4010         * modules/lchmod (Makefile.am): Likewise.
4011         * modules/lchown (Makefile.am): Likewise.
4012         * modules/localcharset (Makefile.am): Likewise.
4013         * modules/long-options (Makefile.am): Likewise.
4014         * modules/lstat (Makefile.am): Likewise.
4015         * modules/malloc (Makefile.am): Likewise.
4016         * modules/mathl (Makefile.am): Likewise.
4017         * modules/mbchar (Makefile.am): Likewise.
4018         * modules/md2 (Makefile.am): Likewise.
4019         * modules/md4 (Makefile.am): Likewise.
4020         * modules/md5 (Makefile.am): Likewise.
4021         * modules/memcasecmp (Makefile.am): Likewise.
4022         * modules/memchr (Makefile.am): Likewise.
4023         * modules/memcmp (Makefile.am): Likewise.
4024         * modules/memcoll (Makefile.am): Likewise.
4025         * modules/memcpy (Makefile.am): Likewise.
4026         * modules/memmem (Makefile.am): Likewise.
4027         * modules/memmove (Makefile.am): Likewise.
4028         * modules/mempcpy (Makefile.am): Likewise.
4029         * modules/memrchr (Makefile.am): Likewise.
4030         * modules/memset (Makefile.am): Likewise.
4031         * modules/memxor (Makefile.am): Likewise.
4032         * modules/mkancesdirs (Makefile.am): Likewise.
4033         * modules/mkdir-p (Makefile.am): Likewise.
4034         * modules/mkdir (Makefile.am): Likewise.
4035         * modules/mkdtemp (Makefile.am): Likewise.
4036         * modules/mkstemp (Makefile.am): Likewise.
4037         * modules/mktime (Makefile.am): Likewise.
4038         * modules/modechange (Makefile.am): Likewise.
4039         * modules/mountlist (Makefile.am): Likewise.
4040         * modules/nanosleep (Makefile.am): Likewise.
4041         * modules/obstack (Makefile.am): Likewise.
4042         * modules/openat (Makefile.am): Likewise.
4043         * modules/pagealign_alloc (Makefile.am): Likewise.
4044         * modules/pathmax (Makefile.am): Likewise.
4045         * modules/physmem (Makefile.am): Likewise.
4046         * modules/poll (Makefile.am): Likewise.
4047         * modules/posixtm (Makefile.am): Likewise.
4048         * modules/posixver (Makefile.am): Likewise.
4049         * modules/putenv (Makefile.am): Likewise.
4050         * modules/quote (Makefile.am): Likewise.
4051         * modules/quotearg (Makefile.am): Likewise.
4052         * modules/raise (Makefile.am): Likewise.
4053         * modules/read-file (Makefile.am): Likewise.
4054         * modules/readline (Makefile.am): Likewise.
4055         * modules/readlink (Makefile.am): Likewise.
4056         * modules/readtokens (Makefile.am): Likewise.
4057         * modules/readutmp (Makefile.am): Likewise.
4058         * modules/realloc (Makefile.am): Likewise.
4059         * modules/regex (Makefile.am): Likewise.
4060         * modules/rename-dest-slash (Makefile.am): Likewise.
4061         * modules/rename (Makefile.am): Likewise.
4062         * modules/rijndael (Makefile.am): Likewise.
4063         * modules/rmdir (Makefile.am): Likewise.
4064         * modules/rpmatch (Makefile.am): Likewise.
4065         * modules/safe-read (Makefile.am): Likewise.
4066         * modules/safe-write (Makefile.am): Likewise.
4067         * modules/same-inode (Makefile.am): Likewise.
4068         * modules/same (Makefile.am): Likewise.
4069         * modules/save-cwd (Makefile.am): Likewise.
4070         * modules/savedir (Makefile.am): Likewise.
4071         * modules/setenv (Makefile.am): Likewise.
4072         * modules/settime (Makefile.am): Likewise.
4073         * modules/sha1 (Makefile.am): Likewise.
4074         * modules/sig2str (Makefile.am): Likewise.
4075         * modules/snprintf (Makefile.am): Likewise.
4076         * modules/stat-macros (Makefile.am): Likewise.
4077         * modules/stat-time (Makefile.am): Likewise.
4078         * modules/stdbool (Makefile.am): Likewise.
4079         * modules/stdint (Makefile.am): Likewise.
4080         * modules/stdlib-safer (Makefile.am): Likewise.
4081         * modules/stpcpy (Makefile.am): Likewise.
4082         * modules/stpncpy (Makefile.am): Likewise.
4083         * modules/strcase (Makefile.am): Likewise.
4084         * modules/strcasestr (Makefile.am): Likewise.
4085         * modules/strchrnul (Makefile.am): Likewise.
4086         * modules/strcspn (Makefile.am): Likewise.
4087         * modules/strdup (Makefile.am): Likewise.
4088         * modules/strerror (Makefile.am): Likewise.
4089         * modules/strftime (Makefile.am): Likewise.
4090         * modules/strndup (Makefile.am): Likewise.
4091         * modules/strnlen (Makefile.am): Likewise.
4092         * modules/strpbrk (Makefile.am): Likewise.
4093         * modules/strsep (Makefile.am): Likewise.
4094         * modules/strstr (Makefile.am): Likewise.
4095         * modules/strtod (Makefile.am): Likewise.
4096         * modules/strtoimax (Makefile.am): Likewise.
4097         * modules/strtok_r (Makefile.am): Likewise.
4098         * modules/strtol (Makefile.am): Likewise.
4099         * modules/strtoll (Makefile.am): Likewise.
4100         * modules/strtoul (Makefile.am): Likewise.
4101         * modules/strtoull (Makefile.am): Likewise.
4102         * modules/strtoumax (Makefile.am): Likewise.
4103         * modules/strverscmp (Makefile.am): Likewise.
4104         * modules/sys_socket (Makefile.am): Likewise.
4105         * modules/sys_stat (Makefile.am): Likewise.
4106         * modules/sysexits (Makefile.am): Likewise.
4107         * modules/time_r (Makefile.am): Likewise.
4108         * modules/timegm (Makefile.am): Likewise.
4109         * modules/timespec (Makefile.am): Likewise.
4110         * modules/tmpfile-safer (Makefile.am): Likewise.
4111         * modules/trim (Makefile.am): Likewise.
4112         * modules/unistd-safer (Makefile.am): Likewise.
4113         * modules/unlinkdir (Makefile.am): Likewise.
4114         * modules/unlocked-io (Makefile.am): Likewise.
4115         * modules/userspec (Makefile.am): Likewise.
4116         * modules/utime (Makefile.am): Likewise.
4117         * modules/utimecmp (Makefile.am): Likewise.
4118         * modules/utimens (Makefile.am): Likewise.
4119         * modules/vasnprintf (Makefile.am): Likewise.
4120         * modules/vasprintf (Makefile.am): Likewise.
4121         * modules/vsnprintf (Makefile.am): Likewise.
4122         * modules/xalloc (Makefile.am): Likewise.
4123         * modules/xgetcwd (Makefile.am): Likewise.
4124         * modules/xnanosleep (Makefile.am): Likewise.
4125         * modules/xreadlink (Makefile.am): Likewise.
4126         * modules/xstrtod (Makefile.am): Likewise.
4127         * modules/xstrtol (Makefile.am): Likewise.
4128         * modules/xstrtold (Makefile.am): Likewise.
4129         * modules/yesno (Makefile.am): Likewise.
4130         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4131
4132 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4133
4134         * modules/error (Makefile.am): Distribute files through
4135         EXTRA_DIST, not lib_SOURCES.
4136
4137 2006-10-12  Eric Blake  <ebb9@byu.net>
4138
4139         * modules/error (Makefile.am): Distribute files in /lib.
4140         * modules/obstack (Makefile.am): Likewise.
4141
4142 2006-10-12  Bruno Haible  <bruno@clisp.org>
4143
4144         * modules/acl (Makefile.am): Distribute all files in lib/ through
4145         EXTRA_DIST.
4146         * modules/arcfour (Makefile.am): Likewise.
4147         * modules/arctwo (Makefile.am): Likewise.
4148         * modules/argmatch (Makefile.am): Likewise.
4149         * modules/argz (Makefile.am): Likewise.
4150         * modules/atexit (Makefile.am): Likewise.
4151         * modules/backupfile (Makefile.am): Likewise.
4152         * modules/c-strtod (Makefile.am): Likewise.
4153         * modules/c-strtold (Makefile.am): Likewise.
4154         * modules/calloc (Makefile.am): Likewise.
4155         * modules/canon-host (Makefile.am): Likewise.
4156         * modules/canonicalize (Makefile.am): Likewise.
4157         * modules/chdir-long (Makefile.am): Likewise.
4158         * modules/chdir-safer (Makefile.am): Likewise.
4159         * modules/check-version (Makefile.am): Likewise.
4160         * modules/chown (Makefile.am): Likewise.
4161         * modules/cloexec (Makefile.am): Likewise.
4162         * modules/close-stream (Makefile.am): Likewise.
4163         * modules/closeout (Makefile.am): Likewise.
4164         * modules/crc (Makefile.am): Likewise.
4165         * modules/cycle-check (Makefile.am): Likewise.
4166         * modules/des (Makefile.am): Likewise.
4167         * modules/dirfd (Makefile.am): Likewise.
4168         * modules/dirname (Makefile.am): Likewise.
4169         * modules/dup2 (Makefile.am): Likewise.
4170         * modules/euidaccess (Makefile.am): Likewise.
4171         * modules/exclude (Makefile.am): Likewise.
4172         * modules/exitfail (Makefile.am): Likewise.
4173         * modules/fcntl-safer (Makefile.am): Likewise.
4174         * modules/file-type (Makefile.am): Likewise.
4175         * modules/fileblocks (Makefile.am): Likewise.
4176         * modules/filemode (Makefile.am): Likewise.
4177         * modules/filenamecat (Makefile.am): Likewise.
4178         * modules/fnmatch (Makefile.am): Likewise.
4179         * modules/fopen-safer (Makefile.am): Likewise.
4180         * modules/fpending (Makefile.am): Likewise.
4181         * modules/fprintftime (Makefile.am): Likewise.
4182         * modules/free (Makefile.am): Likewise.
4183         * modules/fsusage (Makefile.am): Likewise.
4184         * modules/ftruncate (Makefile.am): Likewise.
4185         * modules/fts (Makefile.am): Likewise.
4186         * modules/gc (Makefile.am): Likewise.
4187         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4188         * modules/getaddrinfo (Makefile.am): Likewise.
4189         * modules/getcwd (Makefile.am): Likewise.
4190         * modules/getdelim (Makefile.am): Likewise.
4191         * modules/getdomainname (Makefile.am): Likewise.
4192         * modules/getgroups (Makefile.am): Likewise.
4193         * modules/gethostname (Makefile.am): Likewise.
4194         * modules/gethrxtime (Makefile.am): Likewise.
4195         * modules/getline (Makefile.am): Likewise.
4196         * modules/getloadavg (Makefile.am): Likewise.
4197         * modules/getlogin_r (Makefile.am): Likewise.
4198         * modules/getopt (Makefile.am): Likewise.
4199         * modules/getpass (Makefile.am): Likewise.
4200         * modules/getpass-gnu (Makefile.am): Likewise.
4201         * modules/getsubopt (Makefile.am): Likewise.
4202         * modules/gettime (Makefile.am): Likewise.
4203         * modules/gettimeofday (Makefile.am): Likewise.
4204         * modules/getugroups (Makefile.am): Likewise.
4205         * modules/getusershell (Makefile.am): Likewise.
4206         * modules/glob (Makefile.am): Likewise.
4207         * modules/group-member (Makefile.am): Likewise.
4208         * modules/hard-locale (Makefile.am): Likewise.
4209         * modules/hash (Makefile.am): Likewise.
4210         * modules/hmac-md5 (Makefile.am): Likewise.
4211         * modules/hmac-sha1 (Makefile.am): Likewise.
4212         * modules/human (Makefile.am): Likewise.
4213         * modules/idcache (Makefile.am): Likewise.
4214         * modules/imaxabs (Makefile.am): Likewise.
4215         * modules/imaxdiv (Makefile.am): Likewise.
4216         * modules/inet_ntop (Makefile.am): Likewise.
4217         * modules/inet_pton (Makefile.am): Likewise.
4218         * modules/inttostr (Makefile.am): Likewise.
4219         * modules/isapipe (Makefile.am): Likewise.
4220         * modules/lchown (Makefile.am): Likewise.
4221         * modules/long-options (Makefile.am): Likewise.
4222         * modules/lstat (Makefile.am): Likewise.
4223         * modules/malloc (Makefile.am): Likewise.
4224         * modules/mathl (Makefile.am): Likewise.
4225         * modules/mbchar (Makefile.am): Likewise.
4226         * modules/md2 (Makefile.am): Likewise.
4227         * modules/md4 (Makefile.am): Likewise.
4228         * modules/md5 (Makefile.am): Likewise.
4229         * modules/memcasecmp (Makefile.am): Likewise.
4230         * modules/memchr (Makefile.am): Likewise.
4231         * modules/memcmp (Makefile.am): Likewise.
4232         * modules/memcoll (Makefile.am): Likewise.
4233         * modules/memcpy (Makefile.am): Likewise.
4234         * modules/memmem (Makefile.am): Likewise.
4235         * modules/memmove (Makefile.am): Likewise.
4236         * modules/mempcpy (Makefile.am): Likewise.
4237         * modules/memrchr (Makefile.am): Likewise.
4238         * modules/memset (Makefile.am): Likewise.
4239         * modules/memxor (Makefile.am): Likewise.
4240         * modules/mkancesdirs (Makefile.am): Likewise.
4241         * modules/mkdir (Makefile.am): Likewise.
4242         * modules/mkdir-p (Makefile.am): Likewise.
4243         * modules/mkdtemp (Makefile.am): Likewise.
4244         * modules/mkstemp (Makefile.am): Likewise.
4245         * modules/mktime (Makefile.am): Likewise.
4246         * modules/modechange (Makefile.am): Likewise.
4247         * modules/mountlist (Makefile.am): Likewise.
4248         * modules/nanosleep (Makefile.am): Likewise.
4249         * modules/openat (Makefile.am): Likewise.
4250         * modules/pagealign_alloc (Makefile.am): Likewise.
4251         * modules/physmem (Makefile.am): Likewise.
4252         * modules/poll (Makefile.am): Likewise.
4253         * modules/posixtm (Makefile.am): Likewise.
4254         * modules/posixver (Makefile.am): Likewise.
4255         * modules/putenv (Makefile.am): Likewise.
4256         * modules/quote (Makefile.am): Likewise.
4257         * modules/quotearg (Makefile.am): Likewise.
4258         * modules/raise (Makefile.am): Likewise.
4259         * modules/read-file (Makefile.am): Likewise.
4260         * modules/readline (Makefile.am): Likewise.
4261         * modules/readlink (Makefile.am): Likewise.
4262         * modules/readtokens (Makefile.am): Likewise.
4263         * modules/readutmp (Makefile.am): Likewise.
4264         * modules/realloc (Makefile.am): Likewise.
4265         * modules/regex (Makefile.am): Likewise.
4266         * modules/rename (Makefile.am): Likewise.
4267         * modules/rename-dest-slash (Makefile.am): Likewise.
4268         * modules/rijndael (Makefile.am): Likewise.
4269         * modules/rmdir (Makefile.am): Likewise.
4270         * modules/rpmatch (Makefile.am): Likewise.
4271         * modules/safe-read (Makefile.am): Likewise.
4272         * modules/safe-write (Makefile.am): Likewise.
4273         * modules/same (Makefile.am): Likewise.
4274         * modules/save-cwd (Makefile.am): Likewise.
4275         * modules/savedir (Makefile.am): Likewise.
4276         * modules/setenv (Makefile.am): Likewise.
4277         * modules/settime (Makefile.am): Likewise.
4278         * modules/sha1 (Makefile.am): Likewise.
4279         * modules/sig2str (Makefile.am): Likewise.
4280         * modules/snprintf (Makefile.am): Likewise.
4281         * modules/stdlib-safer (Makefile.am): Likewise.
4282         * modules/stpcpy (Makefile.am): Likewise.
4283         * modules/stpncpy (Makefile.am): Likewise.
4284         * modules/strcase (Makefile.am): Likewise.
4285         * modules/strcasestr (Makefile.am): Likewise.
4286         * modules/strchrnul (Makefile.am): Likewise.
4287         * modules/strcspn (Makefile.am): Likewise.
4288         * modules/strdup (Makefile.am): Likewise.
4289         * modules/strerror (Makefile.am): Likewise.
4290         * modules/strftime (Makefile.am): Likewise.
4291         * modules/strndup (Makefile.am): Likewise.
4292         * modules/strnlen (Makefile.am): Likewise.
4293         * modules/strpbrk (Makefile.am): Likewise.
4294         * modules/strsep (Makefile.am): Likewise.
4295         * modules/strstr (Makefile.am): Likewise.
4296         * modules/strtod (Makefile.am): Likewise.
4297         * modules/strtoimax (Makefile.am): Likewise.
4298         * modules/strtok_r (Makefile.am): Likewise.
4299         * modules/strtol (Makefile.am): Likewise.
4300         * modules/strtoll (Makefile.am): Likewise.
4301         * modules/strtoul (Makefile.am): Likewise.
4302         * modules/strtoull (Makefile.am): Likewise.
4303         * modules/strtoumax (Makefile.am): Likewise.
4304         * modules/strverscmp (Makefile.am): Likewise.
4305         * modules/time_r (Makefile.am): Likewise.
4306         * modules/timegm (Makefile.am): Likewise.
4307         * modules/tmpfile-safer (Makefile.am): Likewise.
4308         * modules/unistd-safer (Makefile.am): Likewise.
4309         * modules/unlinkdir (Makefile.am): Likewise.
4310         * modules/userspec (Makefile.am): Likewise.
4311         * modules/utime (Makefile.am): Likewise.
4312         * modules/utimecmp (Makefile.am): Likewise.
4313         * modules/utimens (Makefile.am): Likewise.
4314         * modules/vasnprintf (Makefile.am): Likewise.
4315         * modules/vasprintf (Makefile.am): Likewise.
4316         * modules/vsnprintf (Makefile.am): Likewise.
4317         * modules/xalloc (Makefile.am): Likewise.
4318         * modules/xgetcwd (Makefile.am): Likewise.
4319         * modules/xnanosleep (Makefile.am): Likewise.
4320         * modules/xreadlink (Makefile.am): Likewise.
4321         * modules/xstrtod (Makefile.am): Likewise.
4322         * modules/xstrtol (Makefile.am): Likewise.
4323         * modules/xstrtold (Makefile.am): Likewise.
4324         * modules/yesno (Makefile.am): Likewise.
4325
4326 2006-10-12  Jim Meyering  <jim@meyering.net>
4327
4328         * m4/getloadavg.m4: Revert the change below.
4329
4330         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4331         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4332         fail with a symlink, which is what coreutils' ./bootstrap now
4333         creates by default.
4334
4335 2006-10-12  Bruno Haible  <bruno@clisp.org>
4336
4337         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4338         mingw.
4339         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4340         MSVC and mingw explicitly.
4341
4342 2006-10-11  Simon Josefsson  <jas@extundo.com>
4343             Bruno Haible  <bruno@clisp.org>
4344
4345         Add support for multiple gnulib-tool invocations in the scope of a
4346         single configure.ac file.
4347         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4348         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4349         with the same contents as the _LIBADD variable.
4350         (func_emit_initmacro_start, func_emit_initmacro_end,
4351         func_emit_initmacro_done): New functions.
4352         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4353         gl_LIBOBJS and gl_LTLIBOBJS.
4354
4355 2006-10-11  Bruno Haible  <bruno@clisp.org>
4356
4357         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4358         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4359         autoreconf. Instead, invoke autopoint explicitly but move back the
4360         *.m4 files from gnulib.
4361
4362 2006-10-11  Bruno Haible  <bruno@clisp.org>
4363
4364         * gnulib-tool (func_usage): Make module names after --create-testdir
4365         optional.
4366         (func_create_testdir): If no module was specified, use nearly all
4367         modules.
4368
4369 2006-10-12  Jim Meyering  <jim@meyering.net>
4370
4371         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4372         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4373         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4374         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4375         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4376         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4377         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4378         (fts_set_stat_required): New function.
4379         (fts_open): Defer the calls to fts_stat, if possible or requested.
4380         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4381         into fts_stat itself.
4382         (fts_read): Perform any required (deferred) fts_stat call.
4383         (fts_build): Likewise, for the directory we're about to open and read.
4384         In the readdir loop, carefully decide whether each entry will require
4385         an eventual call to fts_stat, using dirent.d_type info if available.
4386         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4387         a command line argument into this function.  Update all callers.
4388         Map a return value of FTS_DOT to FTS_D for a command line argument.
4389         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4390         Thanks to Miklos Szeredi for his tenacity and for the initial
4391         bug report about "find" failing on a FUSE-based file system.
4392
4393         * lib/fts.c (fts_open): Use consistent indentation.
4394
4395 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4396
4397         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4398         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4399         reported by Jim Meyering.  All uses of cache variables renamed
4400         to match Autoconf's.
4401         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4402         the other one.
4403
4404         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4405         Fix misspelling in diagnostic.
4406
4407 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4408
4409         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4410         defined.  Problem reported by Matthew Woehlke.
4411
4412         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4413         Add support for Tandem NonStop R series.
4414         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4415         Use new macro.
4416
4417         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4418         (has_trailing_slash): Omit size arg; all callers changed.
4419         Omit 'inline', since it doesn't help performance and we'd
4420         need to configure it.
4421         Don't count //, ///, etc. as having a trailing slash.
4422         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4423         (rpl_rename_dest_slash): On failure, use rename's errno rather
4424         than (in some cases) an incorrect or junk errno.
4425         Simplify code by removing need to compute length; this does
4426         cause it to make two passes instead of one over the file name,
4427         but it's worth it.
4428
4429         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4430         change, since Autoconf's version may no longer be appropriate now
4431         that we are using CVS Autoconf's version.  Add support for Tandem.
4432
4433 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4434             Bruno Haible  <bruno@clisp.org>
4435
4436         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4437         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4438         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4439         gl_AC_TYPE_LONG_LONG.
4440
4441         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4442         instead of HAVE_LONG_LONG.
4443         * lib/printf-args.c (printf_fetchargs): Likewise.
4444         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4445         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4446         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4447         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4448         gl_AC_TYPE_LONG_LONG.
4449
4450 2006-10-11  Bruno Haible  <bruno@clisp.org>
4451
4452         * m4/longlong.m4: Add comments.
4453         * m4/ulonglong.m4: Likewise.
4454
4455 2006-10-10  Bruno Haible  <bruno@clisp.org>
4456
4457         Make it possible to #define stpcpy, strdup to aliases.
4458         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4459         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4460
4461 2006-10-10  Bruno Haible  <bruno@clisp.org>
4462
4463         Make it possible to #define gcd to an alias.
4464         * lib/gcd.c: Include config.h.
4465
4466 2006-10-10  Bruno Haible  <bruno@clisp.org>
4467
4468         Make it possible to #define c_isascii to an alias.
4469         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4470         defined. Undefine the macros before defining them, to avoid gcc
4471         warnings.
4472         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4473         define NO_C_CTYPE_MACROS early.
4474
4475 2006-10-10  Bruno Haible  <bruno@clisp.org>
4476
4477         Make it possible to #define set_program_name to an alias.
4478         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4479         ENABLE_RELOCATABLE early.
4480
4481 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4482
4483         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4484         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4485         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4486         More generally, don't assume that 64-bit signed int is available
4487         if unsigned int is, and vice versa.
4488         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4489         unsigned symbols, not on their signed counterparts.
4490         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4491         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4492         (UINT64_C, UINTMAX_C):
4493         Likewise.
4494         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4495         unsigned counterparts.
4496         (Have_long_long, Unsigned): New macros.
4497         (Int): Renamed from INT.
4498         (strtoimax): Use the new macros.
4499         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4500         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4501         * modules/inttypes (inttypes.h): Substitute
4502         HAVE_UNSIGNED_LONG_LONG_INT.
4503         * modules/stdint (stdint.h): Likewise.
4504         (Files): Add m4/ulonglong.m4.
4505
4506 2006-10-10  Bruno Haible  <bruno@clisp.org>
4507
4508         Fix a gcc -Wshadow warning.
4509         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4510         to 'bucket'.
4511         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4512         gl_linked_indexof_from_to): Likewise.
4513         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4514         Likewise.
4515         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4516         Likewise.
4517         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4518         Reported by Eric Blake.
4519
4520 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4521
4522         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4523         for NetBSD.  Problem reported by Bruno Haible.
4524
4525 2006-10-09  Jim Meyering  <jim@meyering.net>
4526
4527         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4528         Patch from Bruno Haible.
4529
4530 2006-10-09  Jim Meyering  <jim@meyering.net>
4531
4532         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4533         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4534         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4535
4536 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4537
4538         Don't include <config.h> twice; this doesn't work in some cases,
4539         e.g., when config.h has "#define intmax_t long long int" and
4540         we include <config.h>, <inttypes.h>, <config.h> in that order.
4541         Problem reported by Matthew Woehlke in:
4542         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4543         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4544         * lib/fts-cycle.c: Don't include config.h.
4545         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4546         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4547         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4548         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4549         inttypes.h.
4550         * lib/xstrtoumax.c: Likewise.
4551         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4552         __strtol and the like, so that this module is more like its siblings.
4553         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4554         Remove; no longer needed now that we assume gnulib inttypes.h.
4555
4556 2006-10-08  Bruno Haible  <bruno@clisp.org>
4557
4558         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4559         option.
4560
4561 2006-10-07  Jim Meyering  <jim@meyering.net>
4562
4563         * modules/inttypes (inttypes.h): Revert what seems to have been
4564         an inadvertent part of today's change: use "|", not "/" in the
4565         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4566
4567 2006-10-07  Bruno Haible  <bruno@clisp.org>
4568
4569         * modules/sublist: New file.
4570
4571 2006-10-07  Bruno Haible  <bruno@clisp.org>
4572
4573         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4574         * modules/argz (argz.h): Likewise.
4575         * modules/arpa_inet (arpa/inet.h): Likewise.
4576         * modules/byteswap (byteswap.h): Likewise.
4577         * modules/configmake (configmake.h): Likewise.
4578         * modules/fcntl (fcntl.h): Likewise.
4579         * modules/fnmatch (fnmatch.h): Likewise.
4580         * modules/getopt (getopt.h): Likewise.
4581         * modules/glob (glob.h): Likewise.
4582         * modules/inttypes (inttypes.h): Likewise.
4583         * modules/netinet_in (netinet/in.h): Likewise.
4584         * modules/poll (poll.h): Likewise.
4585         * modules/stdbool (stdbool.h): Likewise.
4586         * modules/stdint (stdint.h): Likewise.
4587         * modules/sys_select (sys/select.h): Likewise.
4588         * modules/sys_socket (sys/socket.h): Likewise.
4589         * modules/sys_stat (sys/stat.h): Likewise.
4590         * modules/sysexits (sysexits.h): Likewise.
4591         * modules/unistd (unistd.h): Likewise.
4592         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4593         Add a "DO NOT EDIT" comment to the generated file.
4594         (func_import): Likewise for gnulib-comp.m4.
4595
4596 2006-10-07  Bruno Haible  <bruno@clisp.org>
4597
4598         * lib/gl_sublist.h: New file.
4599         * lib/gl_sublist.c: New file.
4600
4601 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4602
4603         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4604         name (relative to the original working directory) and the file
4605         name component (relative to the temporary working directory).  All
4606         callers changed.
4607         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4608         * lib/mkdir-p.c (make_dir_parents): Likewise.
4609         * lib/mkdir-p.h (make_dir_parents): Likewise.
4610
4611 2006-10-06  Eric Blake  <ebb9@byu.net>
4612
4613         Define several macros for use by the clean-temp module.
4614         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4615         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4616         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4617
4618         * lib/clean-temp.h (close_stream_temp): New declaration.
4619         * lib/clean-temp.c (includes): Pull in headers according to what
4620         other modules are in use.
4621         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4622
4623 2006-10-06  Bruno Haible  <bruno@clisp.org>
4624
4625         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4626         instead of fopen, fwriteerror.
4627
4628 2006-10-06  Bruno Haible  <bruno@clisp.org>
4629
4630         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4631         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4632         int.
4633         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4634         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4635         Return an error indicator.
4636         Suggested by Eric Blake.
4637
4638 2006-10-06  Bruno Haible  <bruno@clisp.org>
4639
4640         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4641         Reported by Eric Blake.
4642
4643 2006-10-06  Bruno Haible  <bruno@clisp.org>
4644
4645         * modules/closeout (Description): Mention stderr too.
4646
4647 2006-10-06  Bruno Haible  <bruno@clisp.org>
4648         and Paul Eggert  <eggert@cs.ucla.edu>
4649
4650         * lib/closeout.c (close_stdout): Also close stderr.
4651         * lib/closeout.h: Update comment.
4652
4653 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4654
4655         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4656         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4657         * lib/dirchownmod.c: Include lchown.h.
4658         * lib/lchown.c: Don't include files that lchown.h now includes.
4659         Don't declare chown, since lchown.h now does that.
4660         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4661         (lchown): Define to rpl_chown if lchown is declared but
4662         does not exist.  Declare using a prototype if lchown is not
4663         declared.  Add a copyright notice.
4664         * lib/mkstemp.h: Include <unistd.h>.
4665         * lib/openat.c: Include lchown.h.
4666
4667         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4668         we now test for that separately.
4669         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4670         rather than O_NOFOLLOW, when testing whether it's possible to
4671         avoid a race condition reliably.
4672         * lib/savewd.c (savewd_chdir): Likewise.
4673
4674         Remove macros that are no longer needed now that stdint.h is
4675         reliable.
4676         * lib/fsusage.c (UINTMAX_MAX): Remove.
4677         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4678         * lib/utimecmp.c (SIZE_MAX): Remove.
4679
4680         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4681
4682         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4683         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4684         O_NOATIME works.
4685
4686 2006-10-05  Bruno Haible  <bruno@clisp.org>
4687
4688         * lib/gl_list.h (gl_sortedlist_search_from_to,
4689         gl_sortedlist_indexof_from_to): New declarations.
4690         (gl_list_implementation): New fields sortedlist_search_from_to,
4691         sortedlist_indexof_from_to.
4692         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4693         inline functions.
4694         * lib/gl_list.c (gl_sortedlist_search_from_to,
4695         gl_sortedlist_indexof_from_to): New functions.
4696         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4697         function.
4698         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4699         (gl_array_sortedlist_search_from_to): New function.
4700         (gl_array_list_implementation): Update.
4701         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4702         function.
4703         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4704         (gl_carray_sortedlist_search_from_to): New function.
4705         (gl_carray_list_implementation): Update.
4706         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4707         gl_linked_sortedlist_indexof_from_to): New functions.
4708         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4709         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4710         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4711         gl_tree_sortedlist_indexof_from_to): New functions.
4712         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4713         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4714         Update.
4715         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4716         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4717         Update.
4718
4719 2006-10-05  Bruno Haible  <bruno@clisp.org>
4720
4721         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4722         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4723         (struct gl_list_implementation): Add fields search_from_to,
4724         indexof_from_to. Remove fields search, indexof.
4725         (gl_list_search): Use the search_from_to method.
4726         (gl_list_search_from, gl_list_search_from_to): New functions.
4727         (gl_list_indexof): Use the indexof_from_to method.
4728         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4729         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4730         (gl_list_search_from, gl_list_search_from_to): New functions.
4731         (gl_list_indexof): Use the indexof_from_to method.
4732         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4733         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4734         gl_array_indexof. Add start_index, end_index arguments.
4735         (gl_array_search_from_to): Renamed from gl_array_search. Add
4736         start_index, end_index arguments.
4737         (gl_array_remove, gl_array_list_implementation): Update.
4738         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4739         gl_carray_indexof. Add start_index, end_index arguments.
4740         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4741         start_index, end_index arguments.
4742         (gl_carray_remove, gl_carray_list_implementation): Update.
4743         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4744         gl_linked_search. Add start_index, end_index arguments.
4745         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4746         start_index, end_index arguments.
4747         (gl_linked_remove): Update.
4748         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4749         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4750         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4751         field to 'size_t'.
4752         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4753         gl_tree_search. Add start_index, end_index arguments.
4754         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4755         start_index, end_index arguments.
4756         (gl_tree_remove): Update.
4757         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4758         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4759         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4760         function.
4761         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4762         gl_tree_search. Add start_index, end_index arguments.
4763         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4764         start_index, end_index arguments.
4765         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4766         Update.
4767         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4768
4769 2006-10-05  Bruno Haible  <bruno@clisp.org>
4770
4771         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4772
4773         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4774         fwriteerror_temp): New declarations.
4775         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4776         (descriptors): New variable.
4777         (cleanup): First, close the descriptors.
4778         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4779         fclose_temp, fwriteerror_temp): New functions.
4780
4781 2006-10-04  Jim Meyering  <jim@meyering.net>
4782
4783         * lib/fts.c (fts_open): Tiny comment change.
4784
4785 2006-10-04  Bruno Haible  <bruno@clisp.org>
4786
4787         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4788         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4789         gl_LOCK_BODY.
4790         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4791         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4792         gl_LOCK_EARLY_BODY.
4793         (gl_LOCK): Require gl_LOCK_BODY.
4794
4795 2006-10-04  Bruno Haible  <bruno@clisp.org>
4796
4797         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4798         (gl_oset_search_atleast): New declaration.
4799         (struct gl_oset_implementation): Add field 'search_atleast'.
4800         (gl_oset_search_atleast): New inline function.
4801         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4802         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4803         (gl_array_oset_implementation): Update.
4804         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4805         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4806         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4807
4808 2006-10-04  Bruno Haible  <bruno@clisp.org>
4809
4810         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4811
4812 2006-10-03  Bruno Haible  <bruno@clisp.org>
4813
4814         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4815         from gl_avltreehash_list_implementation.
4816
4817 2006-10-03  Bruno Haible  <bruno@clisp.org>
4818
4819         * lib/gl_oset.c (gl_oset_add): Fix return type.
4820
4821 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4822
4823         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4824
4825 2006-10-02  Eric Blake  <ebb9@byu.net>
4826
4827         * modules/strnlen (Depends-on): Add extensions.
4828
4829 2006-10-02  Eric Blake  <ebb9@byu.net>
4830
4831         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4832         definition in 2.60+.
4833
4834 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4835
4836         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4837         checks.
4838
4839 2006-10-02  Bruno Haible  <bruno@clisp.org>
4840
4841         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4842         to the AUTOMAKE_OPTIONS.
4843         Reported by Jim Meyering.
4844
4845 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4846
4847         Work around bug in Solaris 10 /proc file system:
4848         /proc/self/fd/NNN/.. isn't the parent directory of
4849         the directory whose file descriptor is NNN.  This needs to
4850         be worked around at run time, not compile time, since a
4851         program might be built on Solaris 8, where things work, and
4852         run on Solaris 10.
4853         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4854         to use the following interface instead:
4855         (OPENAT_BUFFER_SIZE): New macro.
4856         (openat_proc_name): New function.
4857         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4858         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4859         Likewise.
4860         * lib/openat-proc.c: New file.
4861         * modules/openat (Files): Add lib/openat-proc.c.
4862         (Depends-on): Add same-inode, stdbool.
4863         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4864
4865 2006-09-29  Bruno Haible  <bruno@clisp.org>
4866
4867         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4868         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4869         argument. Set stdout_closed before testing for ferror, not after.
4870         (fwriteerror, fwriteerror_no_ebadf): New functions.
4871
4872 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4873
4874         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4875
4876 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4877
4878         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4879         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4880
4881 2006-09-28  Jim Meyering  <jim@meyering.net>
4882
4883         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4884         Include <unistd.h>.
4885
4886 2006-09-28  Bruno Haible  <bruno@clisp.org>
4887
4888         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4889         * modules/linkedhash-list (Depends-on): Likewise.
4890         * modules/rbtreehash-list (Depends-on): Likewise.
4891
4892 2006-09-28  Bruno Haible  <bruno@clisp.org>
4893
4894         * lib/strndup.h: Simplify the redefinition of strndup.
4895         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4896         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4897
4898 2006-09-28  Bruno Haible  <bruno@clisp.org>
4899
4900         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4901         * lib/gl_linkedhash_list.c: Likewise.
4902         * lib/gl_rbtreehash_list.c: Likewise.
4903
4904 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4905
4906         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4907         getaddrinfo.
4908
4909         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4910         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4911         it causes <stdio_ext.h> to cause a compile-time error.
4912         Problem reported by Nelson H. F. Beebe.
4913         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4914         of HAVE_DECL___PENDING.
4915
4916         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4917         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4918         declaration.
4919
4920 2006-09-27  Jim Meyering  <jim@meyering.net>
4921
4922         This file could end up with a definition for a function
4923         named __strndup, rather than rpl_strndup on a system with
4924         incomplete weak_alias support.
4925         * lib/strndup.c (strndup): Rename from __strndup.
4926         Remove #defines that used to map __strndup to strndup.
4927         Don't use K&R prototypes.
4928         Remove LIBC-related code, since this file is not sync'd with glibc.
4929         * lib/strndup.h: Revamp, accordingly.
4930         * m4/strndup.m4: Modernize.
4931
4932 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4933
4934         * modules/savewd (Depends-on): Add 'raise'.
4935         * lib/savewd.c: Include <signal.h>, for 'raise'.
4936
4937 2006-09-26  Jim Meyering  <jim@meyering.net>
4938
4939         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4940         when we detect Darwin 8.7.0's acl_get_file bug.
4941         Rearrange to perform the new (below) run-test while $LIBS
4942         contains any acl-related library.  Set USE_ACL at the end.
4943         (gl_ACL_GET_FILE): New function.
4944
4945 2006-09-26  Eric Blake  <ebb9@byu.net>
4946
4947         * lib/verror.c: Include <config.h> unconditionally.
4948
4949 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4950
4951         * modules/clock-time (Maintainer): Add self.
4952         * modules/getlogin_r (Depends-on): Add extensions.
4953
4954 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4955
4956         * modules/clock-time: New module.
4957         * modules/nanosleep (Depends-on): Add clock-time.
4958         * modules/gethrxtime (Depends-on): Likewise.
4959         * modules/gettime (Depends-on): Likewise.
4960         * modules/settime (Depends-on): Likewise.
4961
4962         * modules/fts-lgpl: Depend on openat.
4963         * modules/mkancesdirs: Depend on savewd.
4964         * modules/mkdir-p: Likewise.
4965
4966 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4967
4968         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4969
4970         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4971         `gl_have_arbitrary_file_name_length_limit' to
4972         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4973         actually works between configure runs.
4974
4975 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4976             Bruno Haible  <bruno@clisp.org>
4977
4978         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4979
4980 2006-09-25  Jim Meyering  <jim@meyering.net>
4981
4982         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4983         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4984
4985 2006-09-25  Eric Blake  <ebb9@byu.net>
4986
4987         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4988         exec's in 2006-09-18 patch when shuffling fds.
4989
4990 2006-09-25  Bruno Haible  <bruno@clisp.org>
4991
4992         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4993         Reported by Jim Meyering.
4994
4995 2006-09-24  Jim Meyering  <jim@meyering.net>
4996
4997         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4998         compare a pointer against a literal "0".  That caused failures with
4999         at least HP-UX's hpcc.
5000
5001 2006-09-22  Simon Josefsson  <jas@extundo.com>
5002
5003         * modules/gc-sha1:
5004         * modules/gc-md4:
5005         * modules/gc-hmac-sha1:
5006         * modules/gc-hmac-md5:
5007         * modules/gc-des:
5008         * modules/gc-arcfour: Distribute more files.
5009
5010 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5011
5012         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5013         (gl_linked_iterator_from_to): Initialize struct completely.
5014         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5015         (gl_tree_iterator_from_to): Likewise
5016         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5017         * lib/gl_array_list.c [lint] (gl_array_iterator)
5018         (gl_array_iterator_from_to): Likewise.
5019         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5020         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5021         (gl_carray_iterator_from_to): Likewise.
5022
5023         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5024         * lib/md4.c (md4_process_block): Remove unused variable.
5025         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5026         parentheses for clarity.
5027
5028 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5029
5030         * modules/bison-i18n (Depends-on): Add gettext.
5031
5032 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5033
5034         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5035         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5036         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5037         also add missing comma that caused broken test.
5038         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5039         stdlib.h, for `abort'.
5040         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5041         variables.
5042         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5043         include unistd.h if present, for `rmdir'.
5044         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5045         variables.
5046         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5047         in the process include standard headers for prototypes.
5048         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5049         gets declared on GNU/Linux.
5050         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5051         unistd.h, for `rmdir'.
5052         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5053
5054         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5055         always true.
5056         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5057
5058         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5059
5060 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5061
5062         * gnulib-tool (func_version): Create output all at once.  This
5063         may help avoid triggering unnecessary SIGPIPEs, and at any
5064         rate it doesn't hurt.
5065
5066 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5067             Bruno Haible  <bruno@clisp.org>
5068
5069         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5070         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5071         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5072
5073         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5074         (gl_FUNC_VASPRINTF): Invoke it.
5075
5076 2006-09-22  Bruno Haible  <bruno@clisp.org>
5077
5078         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5079         getloadavg.c as first argument.
5080
5081 2006-09-22  Bruno Haible  <bruno@clisp.org>
5082
5083         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5084         at the beginning of the gl_INIT macro.
5085         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5086         gl_GETLOADAVG.
5087
5088 2006-09-22  Bruno Haible  <bruno@clisp.org>
5089
5090         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5091         module.
5092         Suggested by Ralf Wildenhues.
5093
5094 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5095
5096         Import this patch from libc:
5097
5098         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5099
5100         * lib/regex_internal.c (re_string_reconstruct): Handle
5101         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5102         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5103         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5104         re_string_context_at.
5105
5106         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5107         now requires it.
5108         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5109         gl_REGEX now does it for us.
5110         (gl_REGEX): Add test taken from
5111         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5112
5113         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5114         Check that large offsets work.  Modernize Autoconf usages.
5115         Prefer "yes" to mean a good thing rather than a bad.
5116         Don't put "#define mkstemp" in config.h, as this might interfere
5117         with standard system headers that "#define mkstemp mkstemp64".
5118
5119         * modules/mkstemp (Depends-on): Add extensions, so that
5120         mkstemp is visible on some platforms.
5121         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5122         (Include): Change to "mkstemp.h" from <stdlib.h>.
5123         (Files): Add mkstemp.h.
5124
5125         * lib/mkstemp.h: New file, since some standard headers
5126         #define mkstemp.
5127         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5128         Include "mkstemp.h".
5129         Make the _LIBC code resemble glibc original more,
5130         e.g., use K&R style.
5131         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5132         (mkstemp): Remove, since mkstemp.h does this for us.
5133         * lib/stdlib--.h: Include mkstemp.h.
5134
5135         Import this patch from libc:
5136
5137         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5138
5139         * lib/tempname.c (__gen_tempname): Change attempts_min
5140         into a macro.  Use preprocessor to decide how to initialize
5141         attempts [Coverity CID 67].
5142
5143 2006-09-20  Bruno Haible  <bruno@clisp.org>
5144
5145         * lib/mkdtemp.c: Import from libc.
5146         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5147                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5148                 attempts_min into a macro.  Use preprocessor to decide how to
5149                 initialize attempts [Coverity CID 67].
5150         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5151                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5152                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5153
5154 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5155
5156         * gnulib-tool (func_exit): New function, to allow to pass the
5157         exit status portably through the trap.  Use everywhere.
5158         (--help, --version): Signal a write error.
5159         (trap): catch SIGPIPE, for write errors.
5160         Exit at the end of the trap, with the correct exit status.
5161
5162 2006-09-19  Karl Berry  <karl@gnu.org>
5163
5164         * doc/gnulib.texi: note about the license texinfo files.
5165
5166 2006-09-19  Eric Blake  <ebb9@byu.net>
5167
5168         * gnulib-tool: Avoid space-tab.
5169
5170 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5171
5172         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5173         that prevented coreutils 6.1 from building.  Problem reported
5174         by Petter Reinholdtsen.
5175
5176 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5177
5178         * gnulib-tool (avoidlist): Fix typo that broke options like
5179         --avoid=lock that are used by coreutils bootstrap.
5180
5181 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5182
5183         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5184         more systematically.
5185
5186 2006-09-18  Jim Meyering  <jim@meyering.net>
5187
5188         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5189
5190 2006-09-18  Bruno Haible  <bruno@clisp.org>
5191
5192         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5193
5194 2006-09-18  Bruno Haible  <bruno@clisp.org>
5195
5196         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5197         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5198         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5199         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5200         * m4/gettext.m4: Require autoconf >= 2.52.
5201         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5202         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5203         of gl_cv_header_inttypes_h.
5204
5205 2006-09-18  Bruno Haible  <bruno@clisp.org>
5206
5207         * lib/javaversion.c: Include configmake.h.
5208
5209 2006-09-18  Bruno Haible  <bruno@clisp.org>
5210
5211         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5212         avoid that the while loops be executed in a subshell.
5213
5214 2006-09-18  Bruno Haible  <bruno@clisp.org>
5215
5216         * MODULES.html.sh (func_module): Break long lines.
5217         Suggested by Bruce Korb <bkorb@gnu.org>.
5218
5219 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5220
5221         Speed up by a factor of 1.12.
5222         * gnulib-tool (nl): New variable.
5223         (func_import): Rewrite include directive extraction to only read each
5224         directive once.
5225
5226 2006-09-17  Bruno Haible  <bruno@clisp.org>
5227
5228         * modules/javaversion (Makefile.am): Remove DEFS setting.
5229         (Depends-on): Add configmake, for PKGDATADIR definition.
5230
5231 2006-09-17  Bruno Haible  <bruno@clisp.org>
5232
5233         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5234
5235 2006-09-17  Bruno Haible  <bruno@clisp.org>
5236
5237         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5238         (func_modules_transitive_closure, func_modules_add_dummy,
5239         func_modules_to_filelist, func_import, func_create_testdir,
5240         func_create_megatestdir, ...): Use it wherever possible.
5241         Suggested by Ralf Wildenhues.
5242
5243 2006-09-16  Karl Berry  <karl@gnu.org>
5244
5245         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5246         to avoid sectioning errors.
5247         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5248         [ifinfo]: blank line after @center-ed titles.
5249         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5250         Spell FSF address consistently with others.
5251         (These changes approved by rms.)
5252
5253 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5254
5255         Speed up by a factor of 1.61.
5256         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5257         already checked module names again.
5258
5259 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5260
5261         Speed up by a factor of 1.13.
5262         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5263         for new_files, and the input to func_add_or_update.
5264
5265 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5266
5267         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5268         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5269
5270 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5271
5272         * modules/mkancesdirs (Depends-on): Add fcntl.
5273         * modules/savewd: New file.
5274         * MODULES.html.sh (File system functions): Add savewd.
5275
5276         * modules/configmake (Makefile.am): Add support for the
5277         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5278
5279 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5280
5281         * m4/savewd.m4: New file.
5282
5283 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5284
5285         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5286         (dirchownmod): New arg FD.  All callers changed.
5287         Use FD rather than opening the directory ourself, as opening is
5288         now the caller's responsibility.
5289         * lib/dirchownmod.h: Likewise.
5290         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5291         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5292         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5293         (test_dir): Remove.
5294         (mkancesdirs): Return length of prefix of FILE that has already
5295         been made, or -2 if there is a child doing the work.  Redo
5296         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5297         ".", and treat ".." specially since it might stray back into
5298         already-created areas.  Use a subprocess if necessary.  New arg
5299         WD; all users changed.  MAKE_DIR function should now return 1
5300         if it creates a directory that is not readable.  Return -2 if
5301         a child process is spun off.
5302         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5303         Adjust signature to match code.
5304         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5305         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5306         all users changed.
5307         * lib/savewd.c, lib/savewd.h: New files.
5308
5309 2006-09-15  Jim Meyering  <jim@meyering.net>
5310
5311         * modules/rename-dest-slash: New module.
5312         * MODULES.html.sh (posix_compat): Add it here.
5313
5314         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5315
5316 2006-09-15  Jim Meyering  <jim@meyering.net>
5317
5318         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5319         file.
5320
5321         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5322
5323 2006-09-15  Jim Meyering  <jim@meyering.net>
5324
5325         * lib/rename-dest-slash.c (has_trailing_slash): Use
5326         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5327         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5328         test before testing whether SRC is a directory.
5329         Suggestions from Bruno Haible.
5330
5331         Avoid a warning about an unused variable.
5332         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5333         into the #ifdef block where it's used.
5334
5335         * lib/rename-dest-slash.c: New file.
5336
5337 2006-09-14  Bruno Haible  <bruno@clisp.org>
5338
5339         * lib/allocsa.c: Include <config.h> unconditionally.
5340         * lib/asnprintf.c: Likewise.
5341         * lib/asprintf.c: Likewise.
5342         * lib/c-strcasecmp.c: Likewise.
5343         * lib/c-strcasestr.c: Likewise.
5344         * lib/c-strncasecmp.c: Likewise.
5345         * lib/c-strstr.c: Likewise.
5346         * lib/classpath.c: Likewise.
5347         * lib/clean-temp.c: Likewise.
5348         * lib/concatpath.c: Likewise.
5349         * lib/copy-file.c: Likewise.
5350         * lib/csharpcomp.c: Likewise.
5351         * lib/csharpexec.c: Likewise.
5352         * lib/execute.c: Likewise.
5353         * lib/fatal-signal.c: Likewise.
5354         * lib/findprog.c: Likewise.
5355         * lib/fwriteerror.c: Likewise.
5356         * lib/gl_array_list.c: Likewise.
5357         * lib/gl_array_oset.c: Likewise.
5358         * lib/gl_avltree_list.c: Likewise.
5359         * lib/gl_avltree_oset.c: Likewise.
5360         * lib/gl_avltreehash_list.c: Likewise.
5361         * lib/gl_carray_list.c: Likewise.
5362         * lib/gl_linked_list.c: Likewise.
5363         * lib/gl_linkedhash_list.c: Likewise.
5364         * lib/gl_list.c: Likewise.
5365         * lib/gl_oset.c: Likewise.
5366         * lib/gl_rbtree_list.c: Likewise.
5367         * lib/gl_rbtree_oset.c: Likewise.
5368         * lib/gl_rbtreehash_list.c: Likewise.
5369         * lib/imaxabs.c: Likewise.
5370         * lib/imaxdiv.c: Likewise.
5371         * lib/javacomp.c: Likewise.
5372         * lib/javaexec.c: Likewise.
5373         * lib/javaversion.c: Likewise.
5374         * lib/linebreak.c: Likewise.
5375         * lib/localcharset.c: Likewise.
5376         * lib/lock.c: Likewise.
5377         * lib/mbchar.c: Likewise.
5378         * lib/mbswidth.c: Likewise.
5379         * lib/mkdtemp.c: Likewise.
5380         * lib/pipe.c: Likewise.
5381         * lib/printf-args.c: Likewise.
5382         * lib/printf-parse.c: Likewise.
5383         * lib/progname.c: Likewise.
5384         * lib/progreloc.c: Likewise.
5385         * lib/readlink.c: Likewise.
5386         * lib/sh-quote.c: Likewise.
5387         * lib/stpcpy.c: Likewise.
5388         * lib/stpncpy.c: Likewise.
5389         * lib/strcasecmp.c: Likewise.
5390         * lib/strcasestr.c: Likewise.
5391         * lib/strcspn.c: Likewise.
5392         * lib/striconv.c: Likewise.
5393         * lib/strncasecmp.c: Likewise.
5394         * lib/strnlen1.c: Likewise.
5395         * lib/strstr.c: Likewise.
5396         * lib/strtok_r.c: Likewise.
5397         * lib/tls.c: Likewise.
5398         * lib/tmpdir.c: Likewise.
5399         * lib/unicodeio.c: Likewise.
5400         * lib/unsetenv.c: Likewise.
5401         * lib/vasnprintf.c: Likewise.
5402         * lib/vasprintf.c: Likewise.
5403         * lib/wait-process.c: Likewise.
5404         * lib/xallocsa.c: Likewise.
5405         * lib/xsetenv.c: Likewise.
5406         * lib/xstriconv.c: Likewise.
5407
5408 2006-09-13  Simon Josefsson  <jas@extundo.com>
5409
5410         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5411         that internally, suggested by Ralf Wildenhues
5412         <Ralf.Wildenhues@gmx.de>.
5413
5414 2006-09-13  Simon Josefsson  <jas@extundo.com>
5415
5416         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5417         @LIBOBJS@.
5418         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5419
5420 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5421
5422         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5423         longer worry about uses that don't define HAVE_CONFIG_H.
5424         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5425         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5426         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5427         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5428         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5429         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5430         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5431         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5432         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5433         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5434         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5435         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5436         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5437         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5438         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5439         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5440         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5441         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5442         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5443         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5444         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5445         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5446         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5447         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5448         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5449         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5450         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5451         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5452         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5453         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5454         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5455         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5456         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5457         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5458         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5459         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5460         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5461         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5462         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5463         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5464         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5465         Likewise.
5466
5467 2006-09-13  Eric Blake  <ebb9@byu.net>
5468
5469         * lib/getopt.c: Fix typo in last commit.
5470
5471 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5472
5473         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5474         dgettext.
5475
5476 2006-09-12  Jim Meyering  <jim@meyering.net>
5477
5478         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5479         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5480         Reported by Nelson H. F. Beebe.
5481
5482 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5483
5484         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5485         program_invocation_name and program_invocation_short_name are
5486         initialized.
5487         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5488         and program_invocation_short_name to argp.h, so they are visible
5489         to user programs.
5490         * lib/argp.h: Likewise
5491
5492 2006-09-10  Bruno Haible  <bruno@clisp.org>
5493
5494         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5495         m4/inttypes_h.m4, m4/uintmax_t.m4.
5496
5497 2006-09-10  Bruno Haible  <bruno@clisp.org>
5498
5499         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5500         gl_AC_TYPE_UINTMAX_T.
5501
5502 2006-09-10  Bruno Haible  <bruno@clisp.org>
5503
5504         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5505
5506 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5507
5508         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5509         convention.  Text proposed by Bruno Haible.
5510         (struct argp_option): Document the use of N_() wrappers.
5511
5512         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5513         '\v', and translate the two parts separately, instead of feeding
5514         the whole string to gettext.  This allows to exclude
5515         '\v' from the strings visible to the translator by writing doc
5516         strings as N_("..") "\v" N_("..").
5517
5518 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5519
5520         * config/srclist.txt: Undo latest change; the bug was fixed.
5521
5522 2006-09-09  Bruno Haible  <bruno@clisp.org>
5523
5524         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5525         assignments if building a library without libtool.
5526         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5527         in func_emit_lib_Makefile_am.
5528         (func_import): When building a static library libfoo.a, arrange to
5529         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5530         (func_create_testdir): Likewise.
5531         * modules/gc (configure.ac, Makefile.am): If building statically,
5532         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5533         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5534         * modules/striconv (configure.ac, Makefile.am): Likewise.
5535         Based on a suggestion by Ralf Wildenhues.
5536
5537 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5538
5539         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5540         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5541         Also:
5542
5543         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5544         Add year_2050_test to catch glibc bug 2821
5545         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5546
5547         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5548         Prefer #ifdef to #if.
5549
5550         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5551         Return from 'main' instead of calling 'exit'.
5552
5553 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5554
5555         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5556         returned the maximum time_t value rather than (time_t) -1.
5557         Problem originally reported by William Bardwell
5558         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5559
5560         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5561         Moved to here ...
5562         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5563         ... from here.
5564
5565 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5566
5567         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5568         2821 is fixed.
5569
5570 2006-09-08  Jim Meyering  <jim@meyering.net>
5571
5572         Don't make generated files read-only.  That would bother too many
5573         people.  However, do retain the ability to work when targets are
5574         read-only: remove the destination and temporary files before writing
5575         them (when generated via sed or echo), or by using the -f option for
5576         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5577         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5578         * modules/byteswap, modules/configmake, modules/fcntl:
5579         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5580         * modules/localcharset, modules/netinet_in, modules/poll:
5581         * modules/stdbool, modules/stdint, modules/sys_select:
5582         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5583
5584 2006-09-08  Jim Meyering  <jim@meyering.net>
5585
5586         Avoid new build failure on FreeBSD 6.0.
5587         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5588         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5589         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5590
5591 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5592
5593         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5594
5595 2006-09-07  Jim Meyering  <jim@meyering.net>
5596
5597         Fix global typo in last change: use chmod u-w, not chmod u-x.
5598         Spotted by Paul Eggert and Bruce Korb.
5599         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5600         * modules/byteswap, modules/configmake, modules/fcntl:
5601         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5602         * modules/localcharset, modules/netinet_in, modules/poll:
5603         * modules/stdbool, modules/stdint, modules/sys_select:
5604         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5605
5606 2006-09-06  Jim Meyering  <jim@meyering.net>
5607
5608         Make generated files be read-only.
5609         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5610         Ensure that each generated file is now read-only.
5611         * modules/argz: Likewise.
5612         * modules/arpa_inet: Likewise.
5613         * modules/byteswap: Likewise.
5614         * modules/configmake: Likewise.
5615         * modules/fcntl: Likewise.
5616         * modules/fnmatch: Likewise.
5617         * modules/getopt: Likewise.
5618         * modules/glob: Likewise.
5619         * modules/inttypes: Likewise.
5620         * modules/netinet_in: Likewise.
5621         * modules/poll: Likewise.
5622         * modules/stdbool: Likewise.
5623         * modules/stdint: Likewise.
5624         * modules/sys_select: Likewise.
5625         * modules/sys_socket: Likewise.
5626         * modules/sys_stat: Likewise.
5627         * modules/sysexits: Likewise.
5628         * modules/localcharset: Same as above, but continue using temporary
5629         file named "t-$@" (why different?) rather than the "$@-t" used
5630         everywhere else.
5631
5632         * modules/sysexits (Makefile.am): Replace literal occurrences
5633         of "sysexit.h" more readable, and more consistent, "$@".
5634
5635 2006-09-06  Bruno Haible  <bruno@clisp.org>
5636
5637         * modules/striconv: New file.
5638         * modules/xstriconv: New file.
5639         * MODULES.html.sh (Internationalization functions): Add striconv,
5640         xstriconv.
5641
5642 2006-09-06  Bruno Haible  <bruno@clisp.org>
5643
5644         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5645         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5646         not using libtool correctly.
5647
5648 2006-09-06  Bruno Haible  <bruno@clisp.org>
5649
5650         * lib/striconv.h: New file.
5651         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5652         iconvstring.c.
5653         * lib/xstriconv.h: New file.
5654         * lib/xstriconv.c: New file.
5655
5656 2006-09-06  Bruno Haible  <bruno@clisp.org>
5657
5658         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5659         lib_..._LDFLAGS.
5660
5661 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5662
5663         * lib/argz_.h: Sync from Libtool.
5664
5665         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5666                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5667
5668         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5669
5670 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5671
5672         * modules/trim: New file.
5673
5674 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5675
5676         * lib/trim.h: New file.
5677         * lib/trim.c: New file.
5678
5679 2006-09-05  Bruno Haible  <bruno@clisp.org>
5680
5681         * MODULES.html.sh (String handling): Add trim.
5682
5683 2006-09-04  Karl Berry  <karl@gnu.org>
5684
5685         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5686         until next release.
5687
5688 2006-09-03  Bruno Haible  <bruno@clisp.org>
5689
5690         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5691         correctly.
5692
5693 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5694
5695         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5696         not gl_GETLOADAVG.  Omit unneeded semicolons.
5697         Problems reported by Ralf Wildenhues in
5698         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5699         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5700         at the end, which is the usual gnulib style.
5701
5702         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5703         of doing all the work ourselves.
5704         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5705         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5706
5707 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5708
5709         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5710         Problem reported by Ralf Wildenhues in
5711         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5712
5713         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5714         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5715
5716 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5717
5718         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5719         yesterday's patch by changing test -n to test -z.
5720
5721 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5722
5723         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5724         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5725         the former is now obsolescent.
5726
5727         * modules/chdir-long (Depends-on): Add fcntl.
5728
5729 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5730
5731         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5732         obsolescent, and programs should use gnulib instead.
5733         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5734         but with prefixes changed.
5735
5736 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5737
5738         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5739         or stdbool.h, because they might not exist while configuring.
5740
5741         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5742         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5743         does that for us.
5744         (O_DIRECTORY): Remove.
5745
5746 2006-08-31  Eric Blake  <ebb9@byu.net>
5747
5748         * gnulib-tool: Don't let emacs change spaces to TAB.
5749
5750 2006-08-31  Bruno Haible  <bruno@clisp.org>
5751
5752         * gnulib-tool: When calling func_import more than once, do it in a
5753         subshell.
5754         Reported by Eric Blake <ebb9@byu.net>.
5755
5756 2006-08-31  Bruno Haible  <bruno@clisp.org>
5757
5758         * gnulib-tool (nl): Remove variable.
5759         (sed_transform_lib_file): Use more robust test for config-h module.
5760         (func_import): Fix typo in 2006-08-25 patch.
5761
5762 2006-08-31  Bruno Haible  <bruno@clisp.org>
5763
5764         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5765         specified, augment Makefile.am variables instead of assigning them.
5766
5767 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5768
5769         Work around a bug in both the Linux and SunOS 64-bit kernels:
5770         nanosleep mishandles sleeps for longer than 2**31 seconds.
5771         Problem reported by Frank v Waveren in
5772         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5773         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5774         Check for nanosleep bug.
5775         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5776
5777 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5778
5779         Work around a bug in both the Linux and SunOS 64-bit kernels:
5780         nanosleep mishandles sleeps for longer than 2**31 seconds.
5781         Problem reported by Frank v Waveren in
5782         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5783         * lib/nanosleep.c (BILLION): New constant.
5784         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5785         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5786         implementation.
5787
5788 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5789
5790         * modules/nanosleep (Depends-on): Add gettime.
5791
5792 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5793         and Simon Josefsson  <jas@extundo.com>
5794         and Oskar Liljeblad  <oskar@osk.mine.nu>
5795
5796         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5797         * gnulib-tool (func_import): New license type 'unmodifiable license
5798         text'.
5799         * modules/fdl: Use it.  Longer description.
5800         * module/gpl, module/lgpl: New files.
5801
5802 2006-08-30  Jim Meyering  <jim@meyering.net>
5803
5804         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5805         shadowing the parameter.
5806
5807 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5808
5809         Sync from Libtool:
5810
5811         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5812
5813         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5814         sharing with gnulib.  Report by Eric Blake.
5815
5816 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5817
5818         * modules/isapipe: New file.
5819         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5820
5821 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5822
5823         * modules/configmake (Makefile.am): Add a comment, and omit
5824         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5825         by Bruno Haible.
5826
5827 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5828
5829         * m4/isapipe.m4: New file.
5830
5831 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5832
5833         * lib/isapipe.c, lib/isapipe.h: New files.
5834
5835 2006-08-29  Jim Meyering  <jim@meyering.net>
5836
5837         * modules/configmake (Makefile.am): Make configmake.h depend on
5838         Makefile.  Otherwise, a stale configmake.h could hang around.
5839
5840 2006-08-29  Eric Blake  <ebb9@byu.net>
5841
5842         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5843         resolution of upstream bug 3044.
5844
5845 2006-08-29  Bruno Haible  <bruno@clisp.org>
5846
5847         * modules/localcharset (Depends-on): Add configmake.
5848         (Makefile.am): Remove setting of LIBDIR through DEFS.
5849
5850 2006-08-29  Bruno Haible  <bruno@clisp.org>
5851
5852         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5853         defined.
5854
5855 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5856
5857         * modules/fcntl: New file.
5858         * modules/chdir-safer (Depends-on): Add fcntl.
5859         * modules/fts: Likewise.
5860         * modules/mkdir-p: Likewise.
5861
5862         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5863         This undoes the most recent change, since we're now addressing the
5864         problem in a different way.
5865
5866         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5867         into output, since the output might be called Makefile.am even
5868         if $makefile_name is something different.
5869         (func_import): Use $makefile_am rather than
5870         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5871         empty.
5872
5873         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5874
5875 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5876
5877         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5878         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5879         recent change to stdint.m4, since we're now addressing the problem in a
5880         different way.
5881
5882 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5883
5884         * m4/fcntl_h.m4: New file.
5885
5886 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5887
5888         * lib/fcntl_.h: New file.
5889         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5890         the fcntl module.
5891         * lib/dirchownmod.c: Likewise.
5892         * lib/fts.c: Likewise.
5893
5894         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5895         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5896         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5897         just before including <inttypes.h>, to avoid circular inclusion.
5898
5899 2006-08-28  Jim Meyering  <jim@meyering.net>
5900
5901         * doc/visibility.texi: Actually read and correct the grammar of the
5902         sentence affected by yesterday's change.
5903
5904 2006-08-28  Eric Blake  <ebb9@byu.net>
5905
5906         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5907         needs wrapper.
5908
5909 2006-08-28  Eric Blake  <ebb9@byu.net>
5910
5911         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5912
5913 2006-08-28  Eric Blake  <ebb9@byu.net>
5914
5915         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5916
5917 2006-08-28  Bruno Haible  <bruno@clisp.org>
5918
5919         * modules/c-strstr: New file, from GNU gettext.
5920         * MODULES.html.sh (String handling): Add c-strstr.
5921
5922 2006-08-28  Bruno Haible  <bruno@clisp.org>
5923
5924         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5925         macros.
5926         Reported by Eric Blake.
5927
5928 2006-08-28  Bruno Haible  <bruno@clisp.org>
5929
5930         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5931         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5932         * lib/vasprintf.c: Include errno.h, limits.h.
5933         (EOVERFLOW): New fallback definition.
5934         (vasprintf): Test here whether the string length is > INT_MAX.
5935         * lib/vsnprintf.c: Include errno.h, limits.h.
5936         (EOVERFLOW): New fallback definition.
5937         (vsnprintf): Fix bug when generated string was too long for the buffer.
5938         Test here whether the string length is > INT_MAX.
5939
5940 2006-08-28  Bruno Haible  <bruno@clisp.org>
5941
5942         * lib/inttypes_.h (SCNX*): Remove definitions.
5943         Reported by Eric Blake.
5944
5945 2006-08-28  Bruno Haible  <bruno@clisp.org>
5946
5947         * lib/c-strstr.h: New file, from GNU gettext.
5948         * lib/c-strstr.c: New file, from GNU gettext.
5949
5950 2006-08-28  Bruno Haible  <bruno@clisp.org>
5951
5952         * gnulib-tool: Reorder some statements.
5953
5954 2006-08-28  Bruno Haible  <bruno@clisp.org>
5955
5956         * gnulib-tool: New option --makefile-name.
5957         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5958         $makefile_name.
5959         (func_import): Write $makefile_name to the cache file, and read it from
5960         there unless explicitly specified. Use $makefile_name as file name
5961         instead of Makefile.am. Adjust the recommendations accordingly.
5962
5963 2006-08-28  Bruno Haible  <bruno@clisp.org>
5964
5965         * gnulib-tool (func_verify_module): Check against misapplying patch.
5966
5967 2006-08-28  Bruno Haible  <bruno@clisp.org>
5968
5969         * gnulib-tool (func_relativize, func_relconcat): New functions.
5970         Give an error if --local-dir is given with --update.
5971         Remove trailing slashes from $local_gnulib_dir.
5972         (func_import): Store the relativized $local_gnulib_dir in
5973         gnulib-cache.m4, and read it from there if not specified explicitly.
5974
5975 2006-08-28  Bruno Haible  <bruno@clisp.org>
5976
5977         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5978         is the current directory. Respect also $local_gnulib_dir.
5979
5980 2006-08-28  Bruno Haible  <bruno@clisp.org>
5981             Simon Josefsson  <jas@extundo.com>
5982
5983         BeOS portability.
5984         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5985
5986 2006-08-27  Jim Meyering  <jim@meyering.net>
5987
5988         * doc/visibility.texi: Remove duplicate word: "pointer".
5989
5990 2006-08-26  Bruno Haible  <bruno@clisp.org>
5991
5992         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5993         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5994         (Makefile.am): Create inttypes.h from inttypes_.h.
5995         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5996
5997         * modules/imaxabs: New file.
5998
5999         * modules/imaxdiv: New file.
6000
6001 2006-08-26  Bruno Haible  <bruno@clisp.org>
6002
6003         * m4/inttypes.m4: New file.
6004         * m4/_inttypes_h.m4: Remove file.
6005         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6006         PRI_MACROS_BROKEN.
6007         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6008
6009         * m4/imaxabs.m4: New file.
6010
6011         * m4/imaxdiv.m4: New file.
6012
6013 2006-08-26  Bruno Haible  <bruno@clisp.org>
6014
6015         * lib/inttypes_.h: New file.
6016         * lib/inttypes.h: Remove file.
6017         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6018
6019         * lib/imaxabs.c: New file.
6020
6021         * lib/imaxdiv.c: New file.
6022
6023 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6024
6025         New config-h module, so that "make" output needn't be cluttered
6026         by -DHAVE_CONFIG_H.
6027         * MODULES.html.sh (Support for building libraries and executables):
6028         Add config-h.
6029         * modules/config-h: New file.
6030         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6031         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6032         the config-h module is used.
6033
6034         New configmake module, so that "make" output needn't be cluttered
6035         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6036         * MODULES.html.sh (Support for building libraries and executables):
6037         Add configmake.
6038         * modules/configmake: New file.
6039
6040 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6041
6042         * m4/config-h.m4: New file.
6043
6044 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6045
6046         * config/srclist.txt: Add elisp-comp.
6047
6048 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6049
6050         * MODULES.html.sh (Support for building libraries and executables):
6051         Add elisp-comp.
6052         * build-aux/elisp-comp: New file.
6053         * modules/elisp-comp: New file.
6054
6055 2006-08-24  Bruno Haible  <bruno@clisp.org>
6056
6057         * gnulib-tool (func_create_testdir): Use non-default values of
6058         sourcebase and m4base.
6059
6060 2006-08-24  Bruno Haible  <bruno@clisp.org>
6061
6062         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6063         HTML structure.
6064
6065 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6066
6067         * modules/openat (Depends-on): Add lchown.
6068
6069 2006-08-23  Bruno Haible  <bruno@clisp.org>
6070
6071         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6072         of gl_LOCK_EARLY instead of gl_LOCK.
6073
6074 2006-08-23  Bruno Haible  <bruno@clisp.org>
6075
6076         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6077         on OSF/1 to no.
6078         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6079
6080 2006-08-23  Bruno Haible  <bruno@clisp.org>
6081
6082         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6083         as unusable.
6084
6085         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6086         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6087         (gl_LOCK): New macro.
6088
6089 2006-08-22  Simon Josefsson  <jas@extundo.com>
6090
6091         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6092         to md5 module.
6093
6094 2006-08-22  Simon Josefsson  <jas@extundo.com>
6095
6096         * MODULES.html.sh: Add "Support for maintaining and release
6097         projects".
6098
6099         * build-aux/gnupload: New file, from coreutils.
6100
6101 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6102
6103         Avoid the need for AC_LIBSOURCES in m4 macros.
6104         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6105         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6106         * modules/check-version (EXTRA_DIST): Add check-version.h.
6107         * modules/crc (EXTRA_DIST): Add crc.h.
6108         * modules/des (EXTRA_DIST): Add des.h.
6109         * modules/gc (EXTRA_DIST): Add gc.h.
6110         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6111         * modules/getline (EXTRA_DIST): Add getline.h.
6112         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6113         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6114         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6115         * modules/md2 (EXTRA_DIST): Add md2.h.
6116         * modules/md4 (EXTRA_DIST): Add md4.h.
6117         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6118         * modules/read-file (EXTRA_DIST): Add read-file.h.
6119         * modules/readline (EXTRA_DIST): Add readline.h.
6120         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6121         rijndael-api-fst.h.
6122
6123 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6124
6125         * m4/rijndael.m4 (gl_ARCFOUR):
6126         * m4/arctwo.m4 (gl_ARCTWO):
6127         * m4/check-version.m4 (gl_CHECK_VERSION):
6128         * m4/crc.m4 (gl_CRC):
6129         * m4/des.m4 (gl_DES):
6130         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6131         * m4/gc.m4 (gl_GC):
6132         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6133         * m4/getline.m4 (gl_FUNC_GETLINE):
6134         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6135         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6136         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6137         * m4/md2.m4 (gl_MD2):
6138         * m4/md4.m4 (gl_MD4):
6139         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6140         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6141         * m4/readline.m4 (gl_FUNC_READLINE):
6142         * m4/rijndael.m4 (gl_RIJNDAEL):
6143         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6144         to get the necessary .h files and whatnot.
6145
6146 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6147
6148         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6149         gnulib rather than the other way around.
6150         * config/srclistvars.sh (COREUTILS): Remove.
6151
6152 2006-08-22  Jim Meyering  <jim@meyering.net>
6153
6154         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6155
6156         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6157
6158 2006-08-22  Eric Blake  <ebb9@byu.net>
6159
6160         * modules/regexprops-generic: New file.
6161         * MODULES.html.sh (Support for building documentation): List it.
6162
6163 2006-08-22  Eric Blake  <ebb9@byu.net>
6164
6165         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6166         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6167         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6168         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6169
6170 2006-08-22  Bruno Haible  <bruno@clisp.org>
6171
6172         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6173         and lib_LTLIBRARIES like the other lib_* variables.
6174
6175 2006-08-22  Bruno Haible  <bruno@clisp.org>
6176
6177         * build-aux/x-to-1.in: New file, from GNU gettext.
6178
6179 2006-08-22  Bruno Haible  <bruno@clisp.org>
6180
6181         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6182         <utmpx.h> exists.
6183
6184 2006-08-22  Bruno Haible  <bruno@clisp.org>
6185
6186         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6187         <utmpx.h> exists.
6188
6189 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6190
6191         BeOS portability.
6192         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6193         exist.
6194         Problem reported by Bruno Haible.
6195
6196 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6197
6198         Avoid the need for AC_LIBSOURCES in m4 macros.
6199         * modules/acl (EXTRA_DIST): Add acl.h.
6200         * modules/argmatch (Files): Add m4/argmatch.m4.
6201         (configure.ac): Add gl_ARGMATCH.
6202         (EXTRA_DIST): Renamed from lib_SOURCES, for
6203         consistency with the other modules.  Remove argmatch.c.
6204         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6205         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6206         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6207         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6208         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6209         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6210         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6211         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6212         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6213         * modules/closeout (EXTRA_DIST): Add closeout.h.
6214         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6215         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6216         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6217         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6218         dirname.h; remove basename.c and stripslash.c.
6219         * modules/exclude (EXTRA_DIST): Add exclude.h.
6220         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6221         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6222         * modules/file-type (EXTRA_DIST): Add file-type.h.
6223         * modules/filemode (EXTRA_DIST): Add filemode.h.
6224         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6225         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6226         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6227         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6228         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6229         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6230         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6231         * modules/getdate (EXTRA_DIST): Add getdate.c.
6232         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6233         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6234         * modules/getpass (EXTRA_DIST): Add getpass.h.
6235         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6236         * modules/group-member (EXTRA_DIST): Add group-member.h.
6237         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6238         * modules/hash (EXTRA_DIST): Add hash.h.
6239         * modules/human (EXTRA_DIST): Add human.h.
6240         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6241         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6242         * modules/lchown (EXTRA_DIST): Add lchown.h.
6243         * modules/long-options (EXTRA_DIST): Add long-options.h.
6244         * modules/lstat (EXTRA_DIST): Add lstat.h.
6245         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6246         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6247         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6248         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6249         * modules/memxor (EXTRA_DIST): Add memxor.h.
6250         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6251         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6252         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6253         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6254         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6255         * modules/physmem (EXTRA_DIST): Add physmem.h.
6256         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6257         * modules/posixver (EXTRA_DIST): Add posixver.h.
6258         * modules/quote (EXTRA_DIST): Add quote.h.
6259         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6260         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6261         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6262         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6263         regex_internal.h regexec.c.
6264         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6265         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6266         * modules/same (EXTRA_DIST): Add same.h.
6267         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6268         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6269         * modules/savedir (EXTRA_DIST): Add savedir.h.
6270         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6271         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6272         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6273         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6274         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6275         * modules/strdup (EXTRA_DIST): Add strdup.h.
6276         * modules/strftime (EXTRA_DIST): Add strftime.h.
6277         * modules/strndup (EXTRA_DIST): Add strndup.h.
6278         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6279         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6280         * modules/time_r (EXTRA_DIST): Add time_r.h.
6281         * modules/timespec (EXTRA_DIST): Add timespec.h.
6282         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6283         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6284         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6285         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6286         * modules/userspec (EXTRA_DIST): Add userspec.h.
6287         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6288         * modules/utimens (EXTRA_DIST): Add utimens.h.
6289         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6290         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6291         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6292         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6293         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6294         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6295         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6296         * modules/yesno (EXTRA_DIST): Add yesno.h.
6297
6298 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6299
6300         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6301
6302         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6303         * m4/dev-ino.m4, same-inode.m4: Remove.
6304
6305         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6306         * m4/acl.m4 (AC_FUNC_ACL):
6307         * m4/backupfile.m4 (gl_BACKUPFILE):
6308         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6309         * m4/canon-host.m4 (gl_CANON_HOST):
6310         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6311         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6312         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6313         * m4/cloexec.m4 (gl_CLOEXEC):
6314         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6315         * m4/closeout.m4 (gl_CLOSEOUT):
6316         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6317         * m4/dirname.m4 (gl_DIRNAME):
6318         * m4/exclude.m4 (gl_EXCLUDE):
6319         * m4/exitfail.m4 (gl_EXITFAIL):
6320         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6321         * m4/file-type.m4 (gl_FILE_TYPE):
6322         * m4/filemode.m4 (gl_FILEMODE):
6323         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6324         * m4/fpending.m4 (gl_FUNC_FPENDING):
6325         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6326         * m4/fts.m4 (gl_FUNC_FTS):
6327         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6328         * m4/getdate.m4 (gl_GETDATE):
6329         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6330         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6331         * m4/getpass.m4 (gl_FUNC_GETPASS):
6332         * m4/gettime.m4 (gl_GETTIME):
6333         * m4/getugroups.m4 (gl_GETUGROUPS):
6334         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6335         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6336         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6337         * m4/hash.m4 (gl_HASH):
6338         * m4/idcache.m4 (gl_IDCACHE):
6339         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6340         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6341         * m4/long-options.m4 (gl_LONG_OPTIONS):
6342         * m4/lstat.m4 (gl_FUNC_LSTAT):
6343         * m4/md5.m4 (gl_MD5):
6344         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6345         * m4/memcoll.m4 (gl_MEMCOLL):
6346         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6347         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6348         * m4/memxor.m4 (gl_MEMXOR):
6349         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6350         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6351         * m4/modechange.m4 (gl_MODECHANGE):
6352         * m4/mountlist.m4 (gl_MOUNTLIST):
6353         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6354         * m4/openat.m4 (gl_FUNC_OPENAT):
6355         * m4/pathmax.m4 (gl_PATHMAX):
6356         * m4/physmem.m4 (gl_PHYSMEM):
6357         * m4/posixtm.m4 (gl_POSIXTM):
6358         * m4/posixver.m4 (gl_POSIXVER):
6359         * m4/quote.m4 (gl_QUOTE):
6360         * m4/quotearg.m4 (gl_QUOTEARG):
6361         * m4/readtokens.m4 (gl_READTOKENS):
6362         * m4/readutmp.m4 (gl_READUTMP):
6363         * m4/regex.m4 (gl_REGEX):
6364         * m4/safe-read.m4 (gl_SAFE_READ):
6365         * m4/safe-write.m4 (gl_SAFE_WRITE):
6366         * m4/same.m4 (gl_SAME):
6367         * m4/save-cwd.m4 (gl_SAVE_CWD):
6368         * m4/savedir.m4 (gl_SAVEDIR):
6369         * m4/settime.m4 (gl_SETTIME):
6370         * m4/sha1.m4 (gl_SHA1):
6371         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6372         * m4/stat-macros.m4 (gl_STAT_MACROS):
6373         * m4/stat-time.m4 (gl_STAT_TIME):
6374         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6375         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6376         * m4/strdup.m4 (gl_FUNC_STRDUP):
6377         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6378         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6379         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6380         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6381         * m4/time_r.m4 (gl_TIME_R):
6382         * m4/timespec.m4 (gl_TIMESPEC):
6383         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6384         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6385         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6386         * m4/userspec.m4 (gl_USERSPEC):
6387         * m4/utimecmp.m4 (gl_UTIMECMP):
6388         * m4/utimens.m4 (gl_UTIMENS):
6389         * m4/xalloc.m4 (gl_XALLOC):
6390         * m4/xgetcwd.m4 (gl_XGETCWD):
6391         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6392         * m4/xreadlink.m4 (gl_XREADLINK):
6393         * m4/xstrtod.m4 (gl_XSTRTOD):
6394         * m4/yesno.m4 (gl_YESNO):
6395         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6396         to get the necessary .h files and whatnot.
6397
6398 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6399             Bruno Haible  <bruno@clisp.org>
6400
6401         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6402         /bin/sh understanding of '!' conditional negation.
6403
6404 2006-08-21  Jim Meyering  <jim@meyering.net>
6405
6406         * modules/openat (Depends-on): Really alphabetize.
6407
6408         * modules/acl (Depends-on): Add error and quote.
6409
6410         * check-module (find_included_lib_files): Add at-func.c to the
6411         ok-to-include-more-than-once white list.
6412
6413         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6414
6415 2006-08-21  Bruno Haible  <bruno@clisp.org>
6416
6417         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6418         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6419         Reported by Martin Lambers <marlam@marlam.de>.
6420
6421 2006-08-21  Bruno Haible  <bruno@clisp.org>
6422
6423         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6424         specify an installation location, don't emit a noinst_LIBRARIES or
6425         noinst_LTLIBRARIES assignment.
6426
6427 2006-08-21  Bruno Haible  <bruno@clisp.org>
6428
6429         BeOS portability.
6430         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6431         BeOS has mbrtowc() but no <wctype.h>.
6432
6433 2006-08-21  Bruno Haible  <bruno@clisp.org>
6434
6435         BeOS portability.
6436         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6437         exist.
6438
6439 2006-08-21  Bruno Haible  <bruno@clisp.org>
6440
6441         BeOS portability.
6442         * lib/mbchar.h: Include <wctype.h> only if it exists.
6443
6444 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6445
6446         Remove files that are no longer needed by their respective modules.
6447         * m4/obstack.m4: Remove.
6448         * m4/strerror_r.m4: Remove.
6449         * m4/uint32_t.m4: Remove.
6450         * m4/uintptr_t.m4: Remove.
6451         * m4/ullong_max.m4: Remove.
6452         * m4/xstrtoimax.m4: Remove.
6453         * m4/xstrtoumax.m4: Remove.
6454
6455         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6456         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6457         dependencies now capture this.
6458
6459         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6460         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6461         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6462         * m4/human.m4 (gl_HUMAN): Likewise.
6463         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6464         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6465
6466         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6467
6468         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6469         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6470         stdint.
6471         * m4/human.m4 (gl_HUMAN): Likewise.
6472         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6473         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6474         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6475         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6476         * m4/xstrtol (gl_XSTRTOL): Likewise.
6477
6478         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6479         AC_TYPE_LONG_LONG_INT.
6480         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6481         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6482         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6483         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6484
6485         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6486         on stdbool.
6487
6488         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6489         (gl_PREREQ_XSTRTOUL): Remove.
6490
6491         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6492
6493         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6494         mode.
6495
6496 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6497
6498         Add and change modules to make it easier for coreutils to use
6499         gnulib-tool.
6500         * modules/backupfile (Files): Remove m4/d-ino.m4.
6501         (Depends-on): Add d-ino.
6502         * modules/cycle-check (Depends-on): Add stdint.
6503         (lib_SOURCES): Add cycle-check.h.
6504         * modules/d-ino: New module.
6505         * modules/d-type: New module.
6506         * modules/error (Files): Remove m4/strerror_r.m4.
6507         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6508         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6509         m4/inttypes_h.m4, m4/uintmax_t.m4.
6510         (Depends-on): Add stdint.
6511         (lib_SOURCES): Add fsusage.h.
6512         * modules/getcwd (Files): Remove d-ino.m4.
6513         (Depends-on): Add d-ino.
6514         * modules/getndelim2 (Depends-on): Add stdint.
6515         * modules/glob (Files): Remove m4/d-type.m4.
6516         (Depends-on): Add d-type.
6517         * modules/host-os: New module.
6518         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6519         m4/inttypes_h.m4, m4/uintmax_t.m4.
6520         * Depends-on: Add stdint.
6521         (lib_SOURCES): Add human.h.
6522         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6523         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6524         m4/uintmax_t.m4, m4/ulonglong.m4.
6525         (Depends-on): Add stdint.
6526         (EXTRA_DIST): Add inttostr.h.
6527         * modules/lchmod: New module.
6528         * modules/link-follow: New module.
6529         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6530         (Depends-on): Add lchmod.
6531         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6532         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6533         (Depends-on): Add stdint.
6534         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6535         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6536         (Depends-on): Add stdint.
6537         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6538         * modules/perl: New module.
6539         * modules/regex (Depends-on): Add stdint.
6540         * modules/rmdir-errno: New module.
6541         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6542         m4/intmax_t.m4.
6543         (Depends-on): Add stdint.
6544         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6545         m4/uintmax_t.m4.
6546         (Depends-on): Add stdint.
6547         * modules/unlink-busy: New module.
6548         * modules/utimecmp (Depends-on): Add stdint.
6549         * modules/uptime: New module.
6550         * modules/winsz-ioctl: New module.
6551         * modules/winsz-termios: New module.
6552         * modules/xnanosleep (Depends-on): Add nanosleep.
6553         * modules/ullong_max: Remove.
6554         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6555         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6556         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6557         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6558         (Depends-on): Add inttypes.
6559         (lib_SOURCES): Add xstrtol.h.
6560         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6561         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6562         * MODULES.html.sh: Move 'assert' into the assert section.
6563         Move 'dummy' into the linking section.
6564         Remove ullong_max.
6565         Add section for compatibility checks for POSIX:2001 functions,
6566         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6567         winsz-ioctl, and winsz-termios into it.
6568         Add lchmod.
6569         Add top-level Misc section and put host-os, perl, and uptime
6570         into it.
6571
6572 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6573
6574         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6575         now assume the stdint module.  Do not include inttypes.h.
6576         * lib/fsusage.h: Likewise.
6577         * lib/getndelim2.c: Likewise.
6578         * lib/human.h: Likewise.
6579         * lib/inttostr.h: Likewise.
6580         * lib/obstack.c: Likewise.
6581         * lib/regex_internal.h: Likewise.
6582         * lib/tempname.c: Likewise.
6583         * lib/utimecmp.c: Likewise.
6584         * lib/xstrtol.h: Likewise.
6585
6586         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6587
6588         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6589         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6590         * lib/xtime.h: Likewise.
6591
6592 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6593
6594         * modules/openat (Files): Add lib/fchmodat.c.
6595         Fixes problem reported by Jay Youngman.
6596
6597 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6598
6599         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6600         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6601
6602 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6603             Bruno Haible  <bruno@clisp.org>
6604
6605         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6606         and is a script that invokes bison. Tighten the code. Add comments.
6607
6608 2006-08-18  Jim Meyering  <jim@meyering.net>
6609
6610         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6611         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6612         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6613         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6614
6615 2006-08-18  Bruno Haible  <bruno@clisp.org>
6616
6617         * modules/bison-i18n: New file.
6618         * MODULES.html.sh (Internationalization functions): Add it.
6619
6620 2006-08-18  Bruno Haible  <bruno@clisp.org>
6621
6622         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6623         sys/statvfs.h. When getmntinfo was found, check its declaration and
6624         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6625
6626 2006-08-18  Bruno Haible  <bruno@clisp.org>
6627
6628         * m4/bison-i18n.m4: New file, from bison.
6629
6630 2006-08-18  Bruno Haible  <bruno@clisp.org>
6631
6632         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6633         (ME_DUMMY): Treat "kernfs" as a dummy.
6634         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6635
6636 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6637
6638         Update from coreutils.
6639
6640         2006-08-15  Jim Meyering  <jim@meyering.net>
6641
6642         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6643
6644         2006-01-17  Jim Meyering  <jim@meyering.net>
6645
6646         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6647
6648         2006-01-11  Jim Meyering  <jim@meyering.net>
6649
6650         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6651         Check for the lchmod function.
6652
6653 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6654
6655         Update from coreutils.
6656
6657         * lib/__fpending.h: Add copyright notice.
6658         * lib/fprintftime.h: Likewise.
6659         * lib/savedir.c: Use (C) in copyright notice.
6660         * lib/savedir.h: Likewise.
6661
6662         2006-08-15  Jim Meyering  <jim@meyering.net>
6663
6664         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6665         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6666         in support of the EXPECTED_ERRNO macro.
6667         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6668         definitions.  Instead, define the appropriate symbols and include
6669         "at-func.c".
6670         * lib/mkdirat.c (mkdirat): Likewise.
6671         * lib/fchmodat.c (fchmodat): Likewise.
6672         (ENOSYS): Remove definition.
6673         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6674         it.  Don't include "unistd--.h" -- it wasn't ever used.
6675
6676         2006-01-17  Jim Meyering  <jim@meyering.net>
6677
6678         Rewrite fts.c not to change the current working directory,
6679         by using openat, fstatat, fdopendir, etc..
6680
6681         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6682         (HAVE_OPENAT_SUPPORT): Define.
6683         [_LIBC] (fchdir): Don't undef or define; no longer used.
6684         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6685         Now, this `function' always succeeds, and consumes its file descriptor
6686         parameter -- so callers must not close such FDs.  Update callers.
6687         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6688         (diropen): Add parameter, SP.  Adjust all callers.
6689         Implement using diropen_fd, rather than open.
6690         (fts_open): Initialize new member, fts_cwd_fd.
6691         Remove fts_rft-setting code.
6692         (fts_close): Close fts_cwd_fd, if necessary.
6693         (__opendir2): Define in terms of opendir or opendirat,
6694         depending on whether the FST_NOCHDIR flag is set.
6695         (fts_build): Since fts_safe_changedir consumes its FD, and since
6696         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6697         and close the dup'd file descriptor upon failure.
6698         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6699         (fts_safe_changedir): Tweak semantics to reflect that this function
6700         now calls cwd_advance_fd and hence consumes its FD argument.
6701         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6702         [struct FTS] (fts_rft): Remove now-unused member.
6703         [struct FTS] (fts_cycle.state): Improve comment.
6704
6705         * lib/openat.c (openat_needs_fchdir): New function.
6706         * lib/openat.h (openat_needs_fchdir): Declare it.
6707
6708 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6709
6710         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6711         Problem and fix reported by Pádraig Brady in
6712         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6713
6714 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6715
6716         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6717
6718 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6719
6720         * lib/memcoll.c (memcoll): Optimize for the common case where the
6721         arguments are bytewise equal.
6722
6723 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6724
6725         * doc/regexprops-generic.texi: Add a copyright notice.
6726
6727 2006-08-15  Bruno Haible  <bruno@clisp.org>
6728
6729         * modules/tmpdir (License): Change to LGPL.
6730
6731 2006-08-15  Bruno Haible  <bruno@clisp.org>
6732
6733         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6734         module.
6735
6736 2006-08-14  Simon Josefsson  <jas@extundo.com>
6737
6738         * config/srclist.txt: Add gnupload.
6739
6740 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6741
6742         Change copyright notice from LGPL 2 to GPL 2, since that's the
6743         standard form used in the gnulib repository.
6744         * tests/test-lock.c: Likewise.
6745         * tests/test-stdint.c: Likewise.
6746         * tests/test-tls.c: Likewise.
6747
6748         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6749         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6750         Add copyright notice.
6751
6752         * check-module: Add copyright notice.  Output a copyright
6753         notice if "--version" is specified.
6754         * modules/COPYING: New file.
6755         * tests/test-getaddrinfo.c: Add copyright notice.
6756         * tests/test-verify.c: Likewise.
6757
6758 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6759
6760         Change copyright notice from LGPL 2 to GPL 2, since that's the
6761         standard form used in the gnulib repository.
6762         * lib/lock.c: LGPL -> GPL.
6763         * lib/lock.h: Likewise.
6764         * lib/strnlen1.c: Likewise.
6765         * lib/strnlen1.h: Likewise.
6766         * lib/tls.c: Likewise.
6767         * lib/tls.h: Likewise.
6768         * lib/tmpdir.c: Likewise.
6769
6770         * lib/TODO: Remove; this belongs only in coreutils.
6771
6772 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6773
6774         Add copyright notices to long-enough files that lack them, since
6775         otherwise the files aren't clearly free.  Use the same notice that
6776         getdate.texi already uses.
6777         * doc/alloca-opt.texi: Add copyright notice.
6778         * doc/alloca.texi: Likewise.
6779         * doc/ctime.texi: Likewise.
6780         * doc/functions.texi: Likewise.
6781         * doc/gcd.texi: Likewise.
6782         * doc/gnulib-tool.texi: Likewise.
6783         * doc/inet_ntoa.texi: Likewise.
6784         * doc/visibility.texi: Likewise.
6785
6786         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6787         * doc/quote.texi: Add copyright notice.
6788
6789         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6790         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6791         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6792         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6793         is now obsolete, and give a pointer to the Sun list.
6794         Add copyright notice.
6795
6796 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6797
6798         * config/srclistvars.sh: Add copyright notice.
6799
6800 2006-08-14  Eric Blake  <ebb9@byu.net>
6801
6802         Import the following change from libc:
6803
6804         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6805
6806         Upstream bug 2997.
6807         * lib/misc/error.c: Add space between program name and message if file
6808         name is missing.
6809
6810 2006-08-12  Karl Berry  <karl@gnu.org>
6811
6812         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6813         remove, these originate in gnulib now.
6814
6815 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6816
6817         * doc/Makefile (standards.info standards.html standards.dvi):
6818         Also depend on make-stds.texi.
6819
6820 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6821
6822         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6823         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6824
6825         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6826         in wchar_t.  Problem reported by Eric Blake.
6827
6828         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6829         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6830         Also, help the compiler to keep LEN in a register.
6831
6832 2006-08-11  Eric Blake  <ebb9@byu.net>
6833
6834         * users.txt: Sort.  Add tar.
6835
6836 2006-08-11  Bruno Haible  <bruno@clisp.org>
6837
6838         * users.txt: New file.
6839
6840 2006-08-11  Bruno Haible  <bruno@clisp.org>
6841
6842         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6843         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6844
6845 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6846
6847         * modules/snprintf (Depends-on): Remove minmax.
6848         (Maintainer): Add self and Bruno.
6849
6850 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6851
6852         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6853         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6854         (EOVERFLOW): Define if the system does not.
6855         Do not include "minmax.h"; it wasn't used.
6856         (snprintf): Don't assume size_t promotes to an unsigned type.
6857         Fix bug when generated string was too long for the buffer: the
6858         buffer's contents are supposed to be the initial prefix of the
6859         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6860         exceeds INT_MAX; do the check ourselves.
6861
6862         Import the following changes from libc:
6863
6864         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6865
6866         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6867         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6868         set wc to the byte which couldn't be converted.
6869         (re_string_reconstruct): Don't clear valid_raw_len before calling
6870         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6871         tip_context using re_string_context_at.
6872
6873         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6874
6875         * lib/posix/regex.h: g++ still cannot handled [restrict].
6876
6877         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6878
6879         * lib/posix/regex.h: Remove special handling for VMS.
6880
6881 2006-08-10  Jim Meyering  <jim@meyering.net>
6882
6883         * modules/same-inode: New module.
6884         * modules/dev-ino: New module.
6885         * modules/cycle-check: Depend on these modules, rather than simply
6886         including their .h files.
6887         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6888         required via m4/cycle-check.m4.
6889         * modules/same: Depend on new same-inode module, rather than
6890         including same-inode.h.
6891         * modules/chdir-safer: New file.
6892
6893         * modules/chown (Depends-on): Add stat-macros.
6894
6895 2006-08-10  Jim Meyering  <jim@meyering.net>
6896
6897         * m4/cycle-check.m4: New file.
6898         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6899         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6900
6901 2006-08-10  Eric Blake  <ebb9@byu.net>
6902
6903         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6904         in from original proposal.
6905
6906 2006-08-10  Eric Blake  <ebb9@byu.net>
6907         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6908
6909         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6910         namespace.
6911
6912 2006-08-10  Bruno Haible  <bruno@clisp.org>
6913
6914         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6915         as well.
6916
6917 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6918
6919         Sync from coreutils.
6920
6921         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6922
6923         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6924         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6925
6926 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6927
6928         * modules/restrict: Remove; no longer needed now that we assume
6929         Autoconf 2.59 or later.
6930         * MODULES.html.sh: Remove 'restrict'.
6931         * modules/argp (Depends-on): Remove 'restrict'.
6932         * modules/base64 (Depends-on): Likewise.
6933         * modules/gc (Depends-on): Likewise.
6934         * modules/getaddrinfo (Depends-on): Likewise.
6935         * modules/glob (Depends-on): Likewise.
6936         * modules/inet_ntop (Depends-on): Likewise.
6937         * modules/inet_pton (Depends-on): Likewise.
6938         * modules/memxor (Depends-on): Likewise.
6939         * modules/regex (Depends-on): Likewise.
6940         * modules/strtok_r (Depends-on): Likewise.
6941         * modules/time_r (Depends-on): Likewise.
6942
6943 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6944
6945         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6946         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6947         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6948         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6949         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6950         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6951         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6952         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6953
6954         Merge from coreutils.
6955         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6956         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6957         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6958         * m4/time_r.m4 (gl_TIME_R): Likewise.
6959
6960 2006-08-09  Karl Berry  <karl@gnu.org>
6961
6962         * config/srclist.txt: no more gettext-tools, per Bruno.
6963
6964 2006-08-08  Eric Blake  <ebb9@byu.net>
6965
6966         * modules/verror: New module.
6967         * MODULES.html.sh: Document it.
6968
6969 2006-08-08  Eric Blake  <ebb9@byu.net>
6970
6971         * lib/verror.h, lib/verror.c: New files.
6972
6973 2006-08-08  Eric Blake  <ebb9@byu.net>
6974
6975         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6976         verror_at_line output complies with GNU Coding Standards even when
6977         file is NULL.
6978
6979 2006-08-07  Bruno Haible  <bruno@clisp.org>
6980
6981         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6982         versions of AIX.
6983         Reported by Ralf Wildenhues.
6984
6985 2006-08-07  Bruno Haible  <bruno@clisp.org>
6986
6987         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6988         in an AC_DEFUN. Needed so that the autoconf snippets can use
6989         AC_REQUIRE.
6990
6991 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6992
6993         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6994         Initialize pkgdata_DATA.
6995         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6996         overriding it.
6997
6998 2006-08-06  Eric Blake  <ebb9@byu.net>
6999
7000         * lib/error.h: Fold in some upstream changes from glibc.
7001         * lib/error.c: Likewise.
7002
7003 2006-08-04  Bruno Haible  <bruno@clisp.org>
7004
7005         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7006         Make the mostlyclean-local rule depend on mostlyclean-generic.
7007         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7008
7009 2006-07-31  Bruno Haible  <bruno@clisp.org>
7010
7011         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7012         <stdlib.h>, <string.h>.
7013
7014 2006-07-30  Bruno Haible  <bruno@clisp.org>
7015
7016         * modules/readlink (License): Change to LGPL.
7017
7018 2006-07-30  Bruno Haible  <bruno@clisp.org>
7019
7020         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7021         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7022         set PKGDATADIR to point to it.
7023
7024 2006-07-30  Bruno Haible  <bruno@clisp.org>
7025
7026         * modules/csharpexec (configure.ac): Comment out macro invocation.
7027         * modules/javaexec (configure.ac): Likewise.
7028         * modules/javacomp-script (configure.ac): Likewise.
7029
7030         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7031
7032 2006-07-30  Bruno Haible  <bruno@clisp.org>
7033
7034         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7035         linked-list.
7036
7037 2006-07-30  Bruno Haible  <bruno@clisp.org>
7038
7039         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7040
7041 2006-07-30  Bruno Haible  <bruno@clisp.org>
7042
7043         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7044         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7045         get removed.
7046
7047 2006-07-29  Bruno Haible  <bruno@clisp.org>
7048
7049         Make it possible for gnulib-tool to work with locally modified or
7050         augmented gnulib repositories.
7051         * gnulib-tool (func_usage): Document --local-dir option.
7052         (local_gnulib_dir): New variable.
7053         Handle --local-dir option.
7054         (func_lookup_file): New function.
7055         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7056         (func_get_description, func_get_filelist, func_get_description,
7057         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7058         func_get_automake_snippet, func_get_include_directive,
7059         func_get_license, func_get_maintainer): Use func_lookup_file.
7060         (func_import, func_create_testdir): Use func_lookup_file.
7061
7062 2006-07-29  Bruno Haible  <bruno@clisp.org>
7063
7064         * modules/setenv (Depends-on): Add unistd.
7065
7066 2006-07-29  Bruno Haible  <bruno@clisp.org>
7067
7068         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7069
7070 2006-07-29  Bruno Haible  <bruno@clisp.org>
7071
7072         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7073
7074 2006-07-29  Bruno Haible  <bruno@clisp.org>
7075
7076         * gnulib-tool (import, update): If there is no Makefile.am, look at
7077         aclocal.m4, instead of bailing out.
7078
7079 2006-07-29  Bruno Haible  <bruno@clisp.org>
7080
7081         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7082         Categorize the options by when they are useful.
7083
7084 2006-07-29  Bruno Haible  <bruno@clisp.org>
7085
7086         * gnulib-tool (func_usage): Document option --no-libtool.
7087         Handle option --no-libtool.
7088         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7089         for changed semantics of $libtool variable.
7090         (func_import): Likewise. If libtool is not used, show this through
7091         an option --no-libtool.
7092         (func_create_testdir): Update.
7093
7094 2006-07-29  Bruno Haible  <bruno@clisp.org>
7095
7096         * gnulib-tool (func_import): Extend error message about missing
7097         --doc-base.
7098
7099 2006-07-29  Bruno Haible  <bruno@clisp.org>
7100
7101         * gnulib-tool (func_import): Don't create the $docbase directory if
7102         there is no file to store there.
7103
7104 2006-07-29  Bruno Haible  <bruno@clisp.org>
7105
7106         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7107         relevant, look for configure.ac there, not in the current directory.
7108         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7109
7110 2006-07-29  Bruno Haible  <bruno@clisp.org>
7111
7112         * gnulib-tool (SORT): New variable.
7113         (func_usage): Undocument --assume-autoconf option.
7114         Remove --assume-autoconf option handling.
7115         (autoconf_minversion): Determine from the contents of configure.ac.
7116         (func_import): Remove autoconf_minversion handling.
7117         Suggested by Eric Blake.
7118
7119 2006-07-29  Bruno Haible  <bruno@clisp.org>
7120
7121         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7122
7123 2006-07-29  Bruno Haible  <bruno@clisp.org>
7124
7125         * config/srclist.txt (*setenv.[ch]): Remove rules.
7126
7127 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7128
7129         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7130
7131 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7132
7133         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7134         arpa/inet.h.
7135
7136 2006-07-28  Simon Josefsson  <jas@extundo.com>
7137
7138         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7139         * modules/inet_pton (Depends-on): Likewise.
7140
7141 2006-07-28  Simon Josefsson  <jas@extundo.com>
7142
7143         * m4/netinet_in_h.m4: New file.
7144
7145 2006-07-28  Simon Josefsson  <jas@extundo.com>
7146
7147         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7148         #include's.
7149
7150 2006-07-28  Simon Josefsson  <jas@extundo.com>
7151
7152         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7153         #include's.
7154
7155 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7156
7157         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7158         setgid on directories only if they set these bits.
7159         * lib/modechange.h: Remove obsolete comment about masks.
7160
7161 2006-07-28  Eric Blake  <ebb9@byu.net>
7162
7163         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7164         macro expansion.
7165
7166 2006-07-28  Bruno Haible  <bruno@clisp.org>
7167
7168         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7169
7170 2006-07-28  Bruno Haible  <bruno@clisp.org>
7171
7172         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7173
7174 2006-07-28  Bruno Haible  <bruno@clisp.org>
7175
7176         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7177         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7178         Define fallbacks.
7179         Avoids link error on FreeBSD 4.x.
7180         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7181
7182         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7183         encoding.
7184         * lib/mbswidth.c (iswcntrl): Likewise.
7185
7186 2006-07-27  Bruno Haible  <bruno@clisp.org>
7187
7188         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7189         test.
7190
7191 2006-07-27  Bruno Haible  <bruno@clisp.org>
7192
7193         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7194         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7195         defined.
7196
7197 2006-07-26  Eric Blake  <ebb9@byu.net>
7198
7199         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7200
7201 2006-07-26  Eric Blake  <ebb9@byu.net>
7202
7203         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7204         like mingw that lack mkstemp.
7205         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7206         avoid compilation warning on mingw.
7207
7208 2006-07-26  Bruno Haible  <bruno@clisp.org>
7209
7210         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7211         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7212         INT_FAST*_MIN, INTPTR_MIN.
7213
7214 2006-07-25  Bruno Haible  <bruno@clisp.org>
7215
7216         * modules/version-etc (Depends-on): Add stdarg.
7217
7218 2006-07-25  Bruno Haible  <bruno@clisp.org>
7219
7220         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7221         complex commands.
7222
7223 2006-07-25  Bruno Haible  <bruno@clisp.org>
7224
7225         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7226         defined in <stdarg.h> or config.h.
7227
7228 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7229
7230         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7231         (gl_STDIO_SAFER): Remove.
7232
7233 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7234
7235         * MODULES.html.sh (File stream based Input/Output):
7236         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7237         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7238         * modules/fopen-safer, modules/tmpfile-safer: New files.
7239         * modules/stdio-safer: Remove.
7240
7241 2006-07-24  Bruno Haible  <bruno@clisp.org>
7242
7243         * modules/tmpdir: New file.
7244         * MODULES.html.sh (File system functions): Add it.
7245
7246 2006-07-24  Bruno Haible  <bruno@clisp.org>
7247
7248         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7249         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7250
7251 2006-07-24  Bruno Haible  <bruno@clisp.org>
7252
7253         * modules/clean-temp: New file.
7254
7255 2006-07-24  Bruno Haible  <bruno@clisp.org>
7256
7257         * m4/tmpdir.m4: New file, from GNU gettext.
7258
7259 2006-07-24  Bruno Haible  <bruno@clisp.org>
7260
7261         * lib/tmpdir.h: New file, from GNU gettext.
7262         * lib/tmpdir.c: New file, from GNU gettext.
7263
7264 2006-07-24  Bruno Haible  <bruno@clisp.org>
7265
7266         * lib/clean-temp.h: New file, from GNU gettext.
7267         * lib/clean-temp.c: New file, from GNU gettext.
7268
7269 2006-07-23  Eric Blake  <ebb9@byu.net>
7270
7271         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7272         (Depends-on): Add binary-io.
7273
7274 2006-07-23  Eric Blake  <ebb9@byu.net>
7275
7276         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7277
7278 2006-07-23  Eric Blake  <ebb9@byu.net>
7279
7280         * lib/tmpfile-safer.c: New file.
7281         * lib/stdio-safer.h (fopen_safer): Add prototype.
7282         * lib/stdio--.h (tmpfile): Make safer.
7283
7284 2006-07-23  Bruno Haible  <bruno@clisp.org>
7285
7286         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7287         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7288         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7289         gl_linked_remove_at): Use it.
7290
7291 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7292         and Simon Josefsson <jas@extundo.com>
7293
7294         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7295
7296         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7297
7298 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7299
7300         * modules/close-stream: New file.
7301         * modules/closeout (Description): Make it clear that it exits
7302         with a diagnostic on error.
7303         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7304         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7305
7306 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7307
7308         * m4/close-stream.m4: New file.
7309
7310 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7311
7312         * lib/close-stream.c, lib/close-stream.h: New files.
7313
7314 2006-07-22  Bruno Haible  <bruno@clisp.org>
7315
7316         Merge from GNU gettext 0.15.
7317
7318         2006-05-01  Bruno Haible  <bruno@clisp.org>
7319
7320                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7321
7322         2006-07-22  Bruno Haible  <bruno@clisp.org>
7323
7324                 * modules/javaversion: New file.
7325                 * MODULES.html.sh (Java): Add javaversion.
7326
7327         2006-03-12  Bruno Haible  <bruno@clisp.org>
7328
7329                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7330
7331         2005-12-04  Bruno Haible  <bruno@clisp.org>
7332
7333                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7334                 (untested).
7335
7336         2006-06-21  Bruno Haible  <bruno@clisp.org>
7337
7338                 Avoid warnings from recent versions of mcs.
7339                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7340                 -o, -L, -r any more. Use options documented since mcs-1.0
7341                 instead. Similarly for -g.
7342
7343         2005-12-04  Bruno Haible  <bruno@clisp.org>
7344
7345                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7346                 .resources, not .resource.
7347
7348         2005-07-09  Bruno Haible  <bruno@clisp.org>
7349
7350                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7351                 add a .dll suffix.
7352                 Reported by Mark Junker <mjscod@gmx.de>.
7353
7354         2006-07-22  Bruno Haible  <bruno@clisp.org>
7355
7356                 * modules/gettext: Upgrade to gettext-0.15.
7357                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7358                 m4/visibility.m4.
7359                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7360
7361 2006-07-22  Bruno Haible  <bruno@clisp.org>
7362
7363         Merge from GNU gettext 0.15.
7364
7365         2006-03-25  Bruno Haible  <bruno@clisp.org>
7366
7367                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7368
7369         2006-07-21  Bruno Haible  <bruno@clisp.org>
7370
7371                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7372                 "1.1".
7373
7374         2006-05-09  Bruno Haible  <bruno@clisp.org>
7375
7376                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7377                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7378                 for the conftestver execution.
7379
7380         2006-05-01  Bruno Haible  <bruno@clisp.org>
7381
7382                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7383                 optional target-version argument. Verify that the compiler
7384                 groks source of the specified source-version, or add -source
7385                 option as necessary. Verify that the compiler produces
7386                 bytecode in the specified target-version, or add -target and
7387                 -source options as necessary. Make the result of the test
7388                 available as variable CONF_JAVAC. Also log error output in
7389                 config.log.
7390
7391         2006-03-11  Bruno Haible  <bruno@clisp.org>
7392
7393                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7394
7395         2006-05-09  Bruno Haible  <bruno@clisp.org>
7396
7397                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7398                 CLASSPATH_SEPARATOR to a semicolon.
7399
7400         2006-03-12  Bruno Haible  <bruno@clisp.org>
7401
7402                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7403                 available as variable CONF_JAVA, for subsequent autoconf
7404                 tests. Also log error output in config.log.
7405
7406         2006-07-19  Bruno Haible  <bruno@clisp.org>
7407
7408                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7409                 that getline works on glibc2 systems. Needed to avoid trouble
7410                 in relocatable.c.
7411                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7412
7413         2005-12-04  Bruno Haible  <bruno@clisp.org>
7414
7415                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7416                 launcher (untested).
7417
7418         2005-12-04  Bruno Haible  <bruno@clisp.org>
7419
7420                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7421
7422         2006-07-22  Bruno Haible  <bruno@clisp.org>
7423
7424                 * gettext.m4: Update from GNU gettext-0.15.
7425                 * nls.m4: Likewise.
7426                 * po.m4: Likewise.
7427                 * inttypes-pri.m4: Likewise.
7428                 * inttypes-h.m4: Renamed from inttypes.m4.
7429                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7430
7431 2006-07-22  Bruno Haible  <bruno@clisp.org>
7432
7433         Merge from GNU gettext 0.15.
7434
7435         2005-07-05  Bruno Haible  <bruno@clisp.org>
7436
7437                 * printf-args.c (printf_fetchargs): Work around broken
7438                 definition of wint_t on mingw.
7439
7440         2005-02-12  Bruno Haible  <bruno@clisp.org>
7441
7442                 * xallocsa.h: Add extern "C" for C++.
7443
7444         2006-05-17  Bruno Haible  <bruno@clisp.org>
7445
7446                 Cygwin portability.
7447                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7448
7449         2006-04-30  Bruno Haible  <bruno@clisp.org>
7450
7451                 * progreloc.c: Include <mach-o/dyld.h> if available.
7452                 (find_executable): Use _NSGetExecutablePath when possible.
7453
7454         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7455
7456                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7457                 function.
7458
7459         2005-12-29  Bruno Haible  <bruno@clisp.org>
7460
7461                 * progreloc.c (set_program_name_and_installdir): Fix
7462                 compilation error.
7463
7464         2005-12-04  Bruno Haible  <bruno@clisp.org>
7465
7466                 Cygwin portability.
7467                 * progreloc.c: Include <windows.h> also on Cygwin.
7468                 (find_executable): Add support for Cygwin.
7469                 (set_program_name_and_installdir): Handle also platforms with
7470                 nonempty EXEEXT.
7471
7472         2006-07-11  Bruno Haible  <bruno@clisp.org>
7473
7474                 * javacomp.c: Fix a comment.
7475                 Reported by Jim Meyering.
7476
7477         2006-04-30  Bruno Haible  <bruno@clisp.org>
7478
7479                 * javacomp.h (compile_java_class): Add source_version,
7480                 target_version arguments.
7481                 * javacomp.c: Rewritten to choose only a compiler that
7482                 respects the specified source_version and target_version.
7483
7484         2006-06-27  Bruno Haible  <bruno@clisp.org>
7485
7486                 Assume correct S_ISDIR macro.
7487                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7488
7489         2006-07-22  Bruno Haible  <bruno@clisp.org>
7490
7491                 * javaversion.h: New file, from GNU gettext.
7492                 * javaversion.c: New file, from GNU gettext.
7493                 * javaversion.java: New file, from GNU gettext.
7494                 * javaversion.class: New file, from GNU gettext.
7495
7496         2006-05-17  Bruno Haible  <bruno@clisp.org>
7497
7498                 Cygwin portability.
7499                 * javaexec.c (execute_java_class): Test for jview program
7500                 also on Cygwin.
7501
7502         2006-04-09  Bruno Haible  <bruno@clisp.org>
7503
7504                 * fatal-signal.c: Don't include string.h.
7505                 (at_fatal_signal): Use a copying loop instead of memcpy.
7506
7507         2005-12-04  Bruno Haible  <bruno@clisp.org>
7508
7509                 * csharpexec.c: Add support for 'clix' launcher (untested).
7510                 (execute_csharp_using_sscli): New function.
7511                 (execute_csharp_program): Call it.
7512
7513         2006-06-21  Bruno Haible  <bruno@clisp.org>
7514
7515                 Avoid warnings from recent versions of mcs.
7516                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7517                 -o, -L, -r any more. Use options documented since mcs-1.0
7518                 instead. Similarly for -g.
7519
7520         2005-07-09  Bruno Haible  <bruno@clisp.org>
7521
7522                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7523                 add a .dll suffix.
7524                 Reported by Mark Junker <mjscod@gmx.de>.
7525
7526         2006-06-17  Bruno Haible  <bruno@clisp.org>
7527
7528                 * config.charset: Update for NetBSD 3.0.
7529
7530         2006-05-17  Bruno Haible  <bruno@clisp.org>
7531
7532                 Cygwin portability.
7533                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7534
7535         2006-05-16  Bruno Haible  <bruno@clisp.org>
7536
7537                 * localcharset.c [CYGWIN]: Include <windows.h>.
7538                 (get_charset_aliases): For Cygwin, return the same CPxxx
7539                 aliases list as under WIN32.
7540                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7541                 the environment variables. Fall back to GetACP().
7542
7543         2006-04-05  Bruno Haible  <bruno@clisp.org>
7544
7545                 * config.charset: Update Juan Manuel Guerrero's address.
7546
7547         2005-02-12  Bruno Haible  <bruno@clisp.org>
7548
7549                 * allocsa.h: Add extern "C" for C++.
7550
7551         2005-02-10  Bruno Haible  <bruno@clisp.org>
7552
7553                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7554                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7555
7556         2006-07-22  Bruno Haible  <bruno@clisp.org>
7557
7558                 * gettext.h: Update to GNU gettext-0.15.
7559
7560 2006-07-22  Bruno Haible  <bruno@clisp.org>
7561
7562         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7563         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7564         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7565
7566 2006-07-21  Eric Blake  <ebb9@byu.net>
7567
7568         * modules/stdlib-safer: New file.
7569         * MODULES.html.sh (File stream based Input/Output): Add
7570         stdlib-safer.
7571
7572 2006-07-21  Eric Blake  <ebb9@byu.net>
7573
7574         * lib/stdlib-safer.h: New file from coreutils, required by
7575         stdlib--.h.
7576
7577 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7578
7579         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7580
7581 2006-07-20  Bruno Haible  <bruno@clisp.org>
7582
7583         * gnulib-tool: Recognize new option --assume-autoconf.
7584         (autoconf_minversion): New variable.
7585         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7586
7587 2006-07-20  Bruno Haible  <bruno@clisp.org>
7588
7589         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7590
7591 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7592
7593         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7594         Reindent and repaginate.
7595
7596 2006-07-19  Derek Price  <derek@ximbiot.com>
7597
7598         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7599         Correct grammar.
7600
7601 2006-07-17  Bruno Haible  <bruno@clisp.org>
7602
7603         * modules/list: New file.
7604         * modules/array-list: New file.
7605         * modules/carray-list, modules/carray-list-tests: New files.
7606         * modules/linked-list, modules/linked-list-tests: New files.
7607         * modules/avltree-list, modules/avltree-list-tests: New files.
7608         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7609         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7610         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7611         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7612         * modules/oset: New file.
7613         * modules/array-oset: New file.
7614         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7615         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7616         * tests/test-carray_list.c: New file.
7617         * tests/test-linked_list.c: New file.
7618         * tests/test-avltree_list.c: New file.
7619         * tests/test-rbtree_list.c: New file.
7620         * tests/test-linkedhash_list.c: New file.
7621         * tests/test-avltreehash_list.c: New file.
7622         * tests/test-rbtreehash_list.c: New file.
7623         * tests/test-avltree_oset.c: New file.
7624         * tests/test-rbtree_oset.c: New file.
7625         * MODULES.html.sh (Container data structures): New section.
7626
7627 2006-07-17  Bruno Haible  <bruno@clisp.org>
7628
7629         * m4/gl_list.m4: New file.
7630
7631 2006-07-17  Bruno Haible  <bruno@clisp.org>
7632
7633         * lib/gl_list.h: New file.
7634         * lib/gl_list.c: New file.
7635         * lib/gl_array_list.h: New file.
7636         * lib/gl_array_list.c: New file.
7637         * lib/gl_carray_list.h: New file.
7638         * lib/gl_carray_list.c: New file.
7639         * lib/gl_linked_list.h: New file.
7640         * lib/gl_linked_list.c: New file.
7641         * lib/gl_anylinked_list1.h: New file.
7642         * lib/gl_anylinked_list2.h: New file.
7643         * lib/gl_avltree_list.h: New file.
7644         * lib/gl_avltree_list.c: New file.
7645         * lib/gl_anyavltree_list1.h: New file.
7646         * lib/gl_anyavltree_list2.h: New file.
7647         * lib/gl_rbtree_list.h: New file.
7648         * lib/gl_rbtree_list.c: New file.
7649         * lib/gl_anyrbtree_list1.h: New file.
7650         * lib/gl_anyrbtree_list2.h: New file.
7651         * lib/gl_anytree_list1.h: New file.
7652         * lib/gl_anytree_list2.h: New file.
7653         * lib/gl_linkedhash_list.h: New file.
7654         * lib/gl_linkedhash_list.c: New file.
7655         * lib/gl_anyhash_list1.h: New file.
7656         * lib/gl_anyhash_list2.h: New file.
7657         * lib/gl_avltreehash_list.h: New file.
7658         * lib/gl_avltreehash_list.c: New file.
7659         * lib/gl_rbtreehash_list.h: New file.
7660         * lib/gl_rbtreehash_list.c: New file.
7661         * lib/gl_anytreehash_list1.h: New file.
7662         * lib/gl_anytreehash_list2.h: New file.
7663
7664         * lib/gl_oset.h: New file.
7665         * lib/gl_oset.c: New file.
7666         * lib/gl_array_oset.h: New file.
7667         * lib/gl_array_oset.c: New file.
7668         * lib/gl_avltree_oset.h: New file.
7669         * lib/gl_avltree_oset.c: New file.
7670         * lib/gl_rbtree_oset.h: New file.
7671         * lib/gl_rbtree_oset.c: New file.
7672         * lib/gl_anytree_oset.h: New file.
7673
7674 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7675
7676         * m4/mkancesdirs.m4: New file.
7677         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7678         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7679         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7680         it.
7681
7682 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7683
7684         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7685         * lib/mkancesdirs.h: New files.
7686         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7687         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7688         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7689         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7690         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7691         callers changed.  Revamp internals significantly, by not
7692         attempting to create directories that are temporarily more
7693         permissive than the final results.  Do not attempt to use
7694         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7695         This removes some race conditions, fixes some bugs, and simplifies
7696         things.  Use new dirchownmod function to do owner and mode changes.
7697         * lib/mkdir-p.h: Likewise.
7698         * lib/modechange.c (octal_to_mode): New function.
7699         (struct mode_change): New member mentioned.
7700         (make_node_op_equals): New arg mentioned.  All callers changed.
7701         (mode_compile): Keep track of which mode bits the user has explicitly
7702         mentioned.
7703         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7704         New arg PMODE_BITS, to keep track of which mode bits the user
7705         mentioned; it treats S_ISUID and S_ISGID speciall.
7706         All callers changed.
7707         * lib/modechange.h: Likewise.
7708
7709 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7710
7711         * MODULES.html.sh: Add mkancestors.
7712         * modules/mkancesdirs: New module.
7713         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7714         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7715         The chdir-safer and afs files are now orphans; I'll remove them
7716         unless someone speaks up.
7717         Add lib/dirchownmod.c, lib/dirchownmod.h.
7718         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7719         Add lchown, mkancesdirs.
7720         (Maintainer): Add self.
7721
7722 2006-07-15  Karl Berry  <karl@gnu.org>
7723
7724         * gnulib-tool: help message wording/arrangement.
7725
7726 2006-07-14  Simon Josefsson  <jas@extundo.com>
7727
7728         * doc/gnulib.texi (Libtool and Windows): New section.
7729
7730 2006-07-12  Simon Josefsson  <jas@extundo.com>
7731
7732         * modules/gendocs (License): Fix license, approved by Karl.
7733
7734 2006-07-12  Eric Blake  <ebb9@byu.net>
7735
7736         * MODULES.html.sh: Add gendocs.
7737
7738 2006-07-11  Eric Blake  <ebb9@byu.net>
7739
7740         * modules/fdl: New module, to install doc/fdl.texi.
7741         * MODULES.html.sh: Add new section for documentation modules.
7742         * gnulib-tool: Avoid space-tab.
7743         (--doc-base): New option, to manage files from doc.
7744
7745 2006-07-11  Eric Blake  <ebb9@byu.net>
7746
7747         * m4/absolute-header.m4: Fix comments to match recent change.
7748
7749 2006-07-11  Eric Blake  <ebb9@byu.net>
7750
7751         * gnulib-tool: List --doc-base before --tests-base.
7752
7753 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7754
7755         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7756
7757 2006-07-11  Bruno Haible  <bruno@clisp.org>
7758
7759         * README: Mention where to put documentation.
7760
7761 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7762
7763         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7764
7765 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7766
7767         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7768         to stdint.m4.
7769
7770 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7771
7772         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7773         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7774         "no/such/file/stdint.h" when there is no such file, so that
7775         the resulting C code can be parsed by dodgy compilers.
7776         Problems reported by Bob Proulx.
7777
7778 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7779
7780         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7781         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7782         macros into the GNU _D_EXACT_NAMLEN.
7783         * lib/savedir.c:  Likewise.
7784         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7785
7786 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7787         and Paul Eggert  <eggert@cs.ucla.edu>
7788
7789         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7790         * m4/savedir.m4:
7791         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7792         macros into the GNU _D_EXACT_NAMLEN.
7793
7794 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7795
7796         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7797         around the absolute name, to work around a problem with the HP-UX
7798         11.23 native C compiler, reported by Bob Proulx.
7799
7800 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7801
7802         * doc/maintain.texi, make-stds.texi: Sync from
7803         <http://savannah.gnu.org/projects/gnustandards>.
7804
7805 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7806
7807         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7808
7809 2006-07-09  Jim Meyering  <jim@meyering.net>
7810
7811         * m4/glob.m4: Remove a doubled word in a comment.
7812
7813 2006-07-09  Jim Meyering  <jim@meyering.net>
7814
7815         * lib/argp-pv.c: Remove a doubled word in a comment.
7816         * lib/check-version.c (check_version): Likewise.
7817         * lib/javacomp.c (compile_java_class): Likewise.
7818
7819 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7820
7821         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7822         for the benefit of people using Autoconf 2.60.  If you want to
7823         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7824         (or m4/onceonly.m4, if pre-2.57) manually.
7825
7826 2006-07-08  Jim Meyering  <jim@meyering.net>
7827
7828         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7829         comment.
7830         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7831         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7832         comment.
7833
7834 2006-07-08  Jim Meyering  <jim@meyering.net>
7835
7836         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7837
7838 2006-07-07  Simon Josefsson  <jas@extundo.com>
7839
7840         * tests/test-crc.c: Change expected crc value, the test vector
7841         were probably computed using the old broken crc.c?
7842
7843 2006-07-06  Simon Josefsson  <jas@extundo.com>
7844
7845         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7846         now the canonical place for the M4 file).
7847
7848         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7849         from the sys_socket dependency now.
7850
7851         * modules/inet_pton (Files): Ditto.
7852
7853         * modules/inet_ntop (Files): Ditto.
7854
7855 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7856
7857         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7858         not gl_PREREQ_GETUSERSHELL.
7859
7860 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7861
7862         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7863         with only one argument, for Autoconf 2.60.
7864         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7865         expand to nothing, so add a shell command to avoid syntax error.
7866         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7867
7868 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7869
7870         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7871
7872 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7873
7874         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7875         no longer needed.  Check for isblank decl.
7876         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7877         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7878         of existence.
7879
7880 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7881
7882         * lib/getloadavg.c: Use __VMS, not VMS.
7883         * lib/getopt.c: Likewise.
7884         * lib/getpagesize.h: Likewise.
7885         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7886         and probably does not work.
7887
7888 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7889
7890         * lib/.cppi-disable: Add wcwidth.
7891         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7892         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7893         (ISGRAPH): Remove.  All uses changed to isgraph.
7894         (FOLD) [!defined _LIBC]: Remove special case.
7895         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7896         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7897         HAVE_ISBLANK.
7898         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7899         case.
7900
7901 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7902
7903         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7904         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7905         brackets.  Other minor changes to suppress some compiler
7906         warnings.
7907
7908 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7909         and Paul Eggert  <eggert@cs.ucla.edu>
7910
7911         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7912         of invoking obsolescent AC_HEADER_DIRENT macro.
7913         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7914         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7915         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7916         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7917         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7918         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7919         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7920         * m4/readdir.m4: Remove; no longer needed.
7921
7922 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7923         and Paul Eggert  <eggert@cs.ucla.edu>
7924
7925         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7926         Don't worry about this obsolete case any more.
7927         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7928         directories.
7929         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7930         worry about this obsolete case any more.
7931         * lib/fts.c: Likewise.
7932         * lib/getcwd.c: Likewise.
7933         * lib/glob.h: Likewise.
7934         * lib/savedir.c: Likewise.
7935
7936 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7937
7938         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7939         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7940         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7941         needed.
7942         All uses removed.
7943         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7944         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7945         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7946         needed.
7947         * m4/getdate.m4 (gl_GETDATE): Likewise.
7948         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7949         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7950         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7951         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7952         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7953         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7954         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7955         needed.
7956
7957 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7958
7959         * lib/memcasecmp.c: Include <limits.h>.
7960         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7961         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7962         Don't assume isdigit succeeds only on '0' through '9'.
7963
7964 2006-07-05  Eric Blake  <ebb9@byu.net>
7965
7966         * modules/getaddrinfo (Depends-on): Add snprintf.
7967
7968 2006-07-05  Eric Blake  <ebb9@byu.net>
7969
7970         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7971         to avoid 'header present but could not be compiled' on cygwin.
7972
7973 2006-07-05  Eric Blake  <ebb9@byu.net>
7974
7975         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7976         missing from netdb.h.
7977         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7978
7979 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7980
7981         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7982         no longer needed.
7983         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7984         * m4/getdate.m4 (gl_GETDATE): Likewise.
7985         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7986         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7987         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7988         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7989         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7990
7991 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7992
7993         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7994         All uses of is_space replaced by isspace.
7995         * lib/exit.h: Don't talk about STDC_HEADERS.
7996         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7997         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7998         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7999         replaced by isprint etc.
8000         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8001         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8002         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8003         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8004         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8005         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8006
8007 2006-07-05  Bruno Haible  <bruno@clisp.org>
8008
8009         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8010         the function exists, before testing against AIX.
8011         Reported by Martin Lambers <marlam@marlam.de>.
8012
8013 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8014
8015         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8016         From Mark D. Baushke.
8017
8018 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8019
8020         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8021         to the absolute name, not just one, to bypass Sun C 5.8's
8022         "warning: #include of /usr/include/... may be non-portable".
8023
8024 2006-07-04  Eric Blake  <ebb9@byu.net>
8025
8026         * modules/dirname-tests: New test module.
8027         * tests/test-dirname.c: New file, replacing dirname.c
8028         TEST_DIRNAME section that was recently deleted.
8029
8030 2006-07-04  Bruno Haible  <bruno@clisp.org>
8031
8032         Assume ANSI C header files and <ctype.h> functions.
8033         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8034         (mbsnwidth): Use isprint, iscntrl instead.
8035
8036 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8037
8038         Merge from coreutils.
8039         * MODULES.html.sh: Add xstrtold.
8040         * modules/xstrtold: New file.
8041         * modules/cycle-check (Files): Add lib/same-inode.h.
8042         * modules/dirname (Files): Add m4/double-slash-root.m4.
8043         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8044         * modules/mkdir-p (Files): Add lib/same-inode.h.
8045         * modules/same (Files): Add lib/same-inode.h.
8046
8047 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8048
8049         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8050         This is to keep the terminology clean; POSIX talks about
8051         "absolute pathnames", not "full pathnames", but the GNU
8052         Coding Standards say to use "path" for something else;
8053         so use "absolute" to keep both sides happy.
8054         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8055         Set gl_absolute_header, not gl_full_header_path.
8056         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8057         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8058         All uses changed.
8059
8060         Merge from coreutils.
8061
8062         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8063
8064         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8065         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8066         want to require the building of c-strtod.o.
8067         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8068         needs -lm directly.
8069         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8070
8071         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8072
8073         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8074         --as-needed option if available.  Problem reported by Albert Chin in
8075         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8076         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8077         cc merely issues a bunch of annoying warnings for --as-needed
8078         (this problem was reported by Bob Proulx).  Also, try linking with
8079         -lm to detect a bug in binutils 2.16 (this problem was reported
8080         by Ralf Wildenhues).
8081
8082         2006-06-18  Jim Meyering  <jim@meyering.net>
8083
8084         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8085         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8086         macro.
8087         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8088         also check for glibc-2.4's abort-inducing bug.
8089
8090         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8091         Low-probability clean-up should be to use rmdir to get rid of
8092         the just-created directory, not unlink.
8093
8094         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8095         configure fail, and request a bug report to inform us about it.
8096         Add a comment that, barring reports to the contrary, in 2007 we'll
8097         assume ftruncate is universally available.
8098
8099         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8100
8101         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8102
8103         2006-03-12  Jim Meyering  <jim@meyering.net>
8104
8105         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8106         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8107         * m4/same.m4 (gl_SAME): Likewise.
8108         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8109
8110         2006-03-11  Eric Blake  <ebb9@byu.net>
8111
8112         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8113         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8114         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8115         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8116
8117 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8118
8119         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8120         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8121         reported by Mark D. Baushke, one in
8122         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8123
8124         Merge from coreutils.
8125
8126         * lib/.cppi-disable: Add stdint_.h.
8127         * lib/.cvsignore: Add stdint.h.
8128
8129         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8130
8131         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8132         both double and long double versions.
8133         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8134         * lib/xstrtold.c: New file.
8135         * lib/xstrtod.h (xstrtold): New decl.
8136
8137         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8138
8139         * lib/filemode.c (setst): Remove.
8140         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8141         (arguably) clearer, and the generated code is a bit smaller on my
8142         Debian GNU/Linux stable x86 host.
8143
8144         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8145
8146         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8147         Assume that filemode.h includes sys/types.h and sys/stat.h.
8148         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8149         (ftypelet): Reorder to put common cases first, for efficiency.
8150         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8151         to do 'M'.
8152         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8153         of 10, for compatibility with FreeBSD.  All callers changed.
8154         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8155         types that can't be deduced solely from st_mode.  First arg is now a
8156         const pointer.
8157         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8158         (strmode): Renamed from mode_string.
8159         (filemodestring): New decl.
8160         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8161         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8162         needed.
8163         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8164
8165         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8166
8167         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8168         fsusage.h now does that.  Include fsusage.h first, to test interface.
8169         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8170         at most one method (the old code could have generated decls that
8171         didn't conform to C89, not that this was ever exercised).
8172         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8173
8174         2006-03-19  Jim Meyering  <jim@meyering.net>
8175
8176         Work even in a chroot where d_ino values for entries in "/"
8177         don't match the stat.st_ino values for the same names.
8178         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8179         number, iterate through all entries again, using lstat instead.
8180         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8181         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8182
8183         * lib/getcwd.c (__getcwd): Clarify a comment.
8184         Use memcpy in place of a call to strcpy.
8185
8186         2006-03-12  Jim Meyering  <jim@meyering.net>
8187
8188         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8189         matches that of the current directory (which we're about to chdir ".."
8190         out of), then save the dev-ino of the parent, instead.
8191
8192         * lib/same-inode.h (SAME_INODE): New file/macro.
8193         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8194         Include "same-inode.h", instead.
8195         * lib/same.c: Likewise.
8196         * lib/cycle-check.h: Include "same-inode.h".
8197         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8198         * lib/cycle-check.c (SAME_INODE): Remove definition.
8199         * lib/root-dev-ino.h: Include "same-inode.h".
8200
8201         2006-03-11  Eric Blake  <ebb9@byu.net>
8202
8203         * lib/same.c (same_name): s/base_name/last_component/
8204         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8205         * lib/filenamecat.c (file_name_concat): Likewise.
8206
8207         2006-03-11  Eric Blake  <ebb9@byu.net>,
8208                     Paul Eggert  <eggert@cs.ucla.edu>
8209
8210         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8211         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8212         drive prefix.
8213         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8214         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8215         (last_component): New method.
8216         * lib/dirname.c (dir_len): Determine when drive letters need a
8217         subsequent slash.  Preserve // when it is special.
8218         (dir_name): Don't append dot when drive letter is absolute.
8219         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8220         * lib/basename.c (base_name): New semantics - malloc the result.
8221         Preserve // when it is special.  Preserve relative files that look
8222         like drive letters.
8223         (base_len): Preserve // when it is special.
8224         (last_component): New method, similar to old base_name semantics.
8225         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8226         base_name.  Strip redundant slashes from ///.
8227
8228 2006-07-03  Jim Meyering  <jim@meyering.net>
8229
8230         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8231         macro is used before the first cycle_check call.
8232
8233 2006-07-03  Eric Blake  <ebb9@byu.net>
8234
8235         * modules/dirname (Depends-on): Add xstrndup.
8236
8237 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8240         test cases, so that config.log is a bit easier to follow.
8241
8242 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8243
8244         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8245         both are 64 bits, since this seems to be the tradition, and this
8246         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8247         we ever run into a host that prefers long long to long in this
8248         case, we'll need another configure-time test.  Problem reported by
8249         Jim Meyering.
8250
8251 2006-07-02  Eric Blake  <ebb9@byu.net>
8252
8253         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8254
8255 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8256
8257         * modules/inttypes (Depends-on): No longer depends on stdint.
8258         * modules/stdint (Description): Say more about assumptions.
8259         Say that the fast types might differ.  Say macros are used.
8260         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8261         (Makefile.am): Revise list of substituted symbols to match
8262         new stdint.m4.
8263         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8264         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8265         * tests/test-stdint.c (verify_same_types)
8266         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8267         the code conforms to C99/C89.
8268         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8269         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8270
8271 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8272
8273         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8274         but fix a bug, by requiring at least 64 bits.
8275         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8276         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8277         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8278         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8279
8280         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8281         changes.  Make 2.59 a prerequisite.  Check and substitute for
8282         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8283         inttypes.h.  Do not use special include files; just use the
8284         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8285         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8286         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8287         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8288         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8289         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8290         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8291         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8292         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8293         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8294         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8295         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8296         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8297         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8298         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8299         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8300         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8301         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8302         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8303         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8304         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8305         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8306         not check for things that C99 does not require, e.g., int8_t.  If
8307         a test isn't needed unless <stdint.h> isn't working, and is
8308         unlikely to be needed for any other reason, then don't do it
8309         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8310         size_t, since we assume C89 freestanding at least.  Do not check
8311         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8312         the right thing even if the types are not defined.  Instead use:
8313         (gl_STDINT_TYPE_PROPERTIES): New macro.
8314         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8315         testing whether <sys/types.h> clashes, as Autoconf does this for
8316         us now.  All uses removed.
8317         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8318         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8319         (gl_CHECK_TYPE_SAME):
8320         Remove; no longer needed.
8321         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8322         exists, since we'll return 0 anyway in that case.
8323         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8324
8325 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8326
8327         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8328         possible collision with system files.
8329         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8330         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8331         WCHAR_MIN and WCHAR_MAX in this case.
8332         (<stddef.h>): Do not include; no longer needed.
8333         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8334         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8335         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8336         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8337         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8338         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8339         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8340         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8341         !defined(__c99))]: Include in this case too, since it's harmless
8342         now.
8343         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8344         dangerous to do so.
8345         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8346         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8347         (_STDINT_MIN, _STDINT_MAX): New macros.
8348         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8349         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8350         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8351         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8352         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8353         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8354         macros, not typedefs; this simplifies things quite a bit.
8355         Use long int for all types narrower than int64_t.
8356         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8357         Define in terms of long long int or int64_t or long int,
8358         not int64_t or int32_t.  This saves some compile-time testing.
8359         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8360         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8361         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8362         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8363         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8364         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8365         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8366         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8367         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8368         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8369         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8370         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8371         undef any previous version and define our own version, for
8372         simplicity and consistency with the new macros for types.
8373         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8374         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8375         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8376         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8377         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8378         @WINT_T_SUFFIX@ to keep things simple here.
8379         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8380         Simplify by assuming typical 8/16/32/64 host, since we're
8381         already doing that elsewhere anyway.
8382         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8383         and assume long long int is 64 bits if available.  This
8384         speeds up 'configure'.
8385
8386 2006-07-01  Eric Blake  <ebb9@byu.net>
8387
8388         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8389         Reported by Andreas Buening.
8390
8391 2006-07-01  Eric Blake  <ebb9@byu.net>
8392
8393         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8394
8395 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8396
8397         * lib/getaddrinfo.c: fixed typo
8398
8399 2006-06-29  Jim Meyering  <jim@meyering.net>
8400
8401         * modules/strftime (Maintainer): Add my name, since with the
8402         FPRINTFTIME changes strftime.c has forked from glibc.
8403
8404 2006-06-29  Eric Blake  <ebb9@byu.net>
8405
8406         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8407
8408 2006-06-29  Eric Blake  <ebb9@byu.net>
8409
8410         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8411
8412 2006-06-29  Eric Blake  <ebb9@byu.net>
8413
8414         * lib/stat_.h: New file.
8415
8416 2006-06-29  Eric Blake  <ebb9@byu.net>
8417
8418         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8419         unused static function.
8420
8421 2006-06-29  Eric Blake  <ebb9@byu.net>
8422
8423         * doc/functions.texi (Function Portability): Document missing lstat
8424         on mingw.
8425
8426 2006-06-29  Eric Blake  <ebb9@byu.net>
8427
8428         * MODULES.html.sh: Add sys_stat.
8429         * modules/sys_stat: New module.
8430         * modules/mkstemp (Depends-on): Add sys_stat.
8431
8432 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8433
8434         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8435
8436 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8437
8438         * m4/c-bs-a.m4: Removed.
8439
8440 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8441
8442         * lib/strftime.c: Assume strftime() exists.
8443
8444 2006-06-29  Derek Price  <derek@ximbiot.com>
8445
8446         * modules/c-bs-a: Removed - \a is C89.
8447         * MODULES.html.sh: Remove c-bs-a.
8448
8449 2006-06-29  Bruno Haible  <bruno@clisp.org>
8450
8451         * modules/wcwidth (License): Change to LGPL.
8452
8453 2006-06-28  Simon Josefsson  <jas@extundo.com>
8454
8455         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8456         on _WIN32.
8457
8458         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8459         getnameinfo.
8460
8461 2006-06-28  Simon Josefsson  <jas@extundo.com>
8462
8463         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8464
8465 2006-06-28  Simon Josefsson  <jas@extundo.com>
8466
8467         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8468         functions there.  It will succeed on Windows XP, but on Windows
8469         2000 and (presumably) earlier, it will fail, and use the internal
8470         re-implementation.
8471         (use_win32_p): New function.
8472         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8473         Support AI_NUMERICSERV to disable getservbyname.
8474         (getnameinfo): New function, only supports
8475         NI_NUMERICHOST|NI_NUMERICSERV for now.
8476
8477         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8478         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8479         getnameinfo.
8480
8481 2006-06-28  Eric Blake  <ebb9@byu.net>
8482
8483         * modules/wcwidth: New file.
8484         * modules/mbchar (Depends-on): Add wcwidth.
8485         * modules/mbswidth (Depends-on): Add wcwidth.
8486         * MODULES.html.sh: Add wcwidth.
8487
8488 2006-06-28  Eric Blake  <ebb9@byu.net>
8489
8490         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8491         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8492
8493 2006-06-28  Eric Blake  <ebb9@byu.net>
8494
8495         * lib/xvasprintf.h: Fix comments.
8496
8497 2006-06-28  Eric Blake  <ebb9@byu.net>
8498
8499         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8500         * lib/mbswidth.c (wcwidth): Move from here...
8501         * lib/wcwidth.h: ...to this new file.
8502
8503 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8504
8505         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8506
8507         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8508         it's obsolete.
8509         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8510
8511 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8512
8513         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8514         Autoconf 2.60 says this stuff was obsolete.
8515
8516 2006-06-28  Bruno Haible  <bruno@clisp.org>
8517
8518         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8519
8520 2006-06-28  Bruno Haible  <bruno@clisp.org>
8521
8522         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8523         gt_TYPE_WCHAR_T.
8524
8525 2006-06-28  Bruno Haible  <bruno@clisp.org>
8526
8527         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8528         declaration for wcwidth.
8529         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8530
8531 2006-06-28  Bruno Haible  <bruno@clisp.org>
8532
8533         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8534         (mkdir): Define using _mkdir.
8535
8536 2006-06-28  Bruno Haible  <bruno@clisp.org>
8537
8538         * lib/getaddrinfo.h: Fix POSIX URL.
8539         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8540         _WIN32.
8541         (use_win32_p): Make static.
8542         (getaddrinfo): Reject service name if it is empty or does not consist
8543         solely of decimal digits, or if its value is > 65535.
8544         (getnameinfo): Remove useless casts.
8545
8546 2006-06-27  Simon Josefsson  <jas@extundo.com>
8547
8548         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8549         Eggert and Martin Lambers.
8550
8551 2006-06-27  Simon Josefsson  <jas@extundo.com>
8552
8553         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8554         Eggert and Martin Lambers.
8555
8556 2006-06-27  Bruno Haible  <bruno@clisp.org>
8557
8558         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8559         result to 0, not to empty.
8560         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8561
8562 2006-06-27  Bruno Haible  <bruno@clisp.org>
8563
8564         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8565
8566 2006-06-26  Simon Josefsson  <jas@extundo.com>
8567
8568         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8569         present.
8570
8571 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8572
8573         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8574         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8575         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8576
8577 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8578
8579         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8580
8581 2006-06-26  Bruno Haible  <bruno@clisp.org>
8582
8583         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8584
8585 2006-06-26  Bruno Haible  <bruno@clisp.org>
8586
8587         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8588
8589 2006-06-26  Bruno Haible  <bruno@clisp.org>
8590
8591         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8592         SGI C compiler in pre-C99 mode.
8593         Suggested by Mark D. Baushke and Larry Jones.
8594
8595 2006-06-26  Bruno Haible  <bruno@clisp.org>
8596
8597         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8598         WCHAR_MAX.
8599         Reported by Mark D. Baushke and Larry Jones.
8600
8601 2006-06-26  Bruno Haible  <bruno@clisp.org>
8602
8603         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8604         in pre-C99 mode.
8605         Suggested by Mark D. Baushke and Larry Jones.
8606
8607 2006-06-23  Simon Josefsson  <jas@extundo.com>
8608             Bruno Haible  <bruno@clisp.org>
8609
8610         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8611         Emit mostlyclean-local rule.
8612         (func_emit_tests_Makefile_am): Likewise.
8613         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8614
8615 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8616
8617         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8618
8619 2006-06-23  Bruno Haible  <bruno@clisp.org>
8620
8621         * tests/test-stdint.c: Update to match ISO C 99 Technical
8622         Corrigendum 1.
8623
8624 2006-06-23  Bruno Haible  <bruno@clisp.org>
8625
8626         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8627
8628 2006-06-23  Bruno Haible  <bruno@clisp.org>
8629
8630         * lib/stdint_.h: Treat IRIX like OpenBSD.
8631
8632 2006-06-23  Bruno Haible  <bruno@clisp.org>
8633
8634         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8635         ISO C 99 Technical Corrigendum 1.
8636
8637 2006-06-22  Simon Josefsson  <jas@extundo.com>
8638
8639         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8640         MinGW.
8641
8642 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8643
8644         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8645         needed.  Some compiler complained about some of them.  Problem reported
8646         by Larry Jones in
8647         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8648
8649 2006-06-21  Simon Josefsson  <jas@extundo.com>
8650
8651         * tests/test-getaddrinfo.c: New file.
8652
8653         * modules/getaddrinfo-tests: New file.
8654
8655         * MODULES.html.sh: Add inet_pton.
8656
8657         * modules/inet_pton: New file.
8658
8659 2006-06-21  Simon Josefsson  <jas@extundo.com>
8660
8661         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8662         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8663         of using the (limited) gnulib implementation on Windows XP.
8664
8665         * m4/inet_pton.m4: New file.
8666
8667 2006-06-21  Simon Josefsson  <jas@extundo.com>
8668
8669         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8670         variable.
8671
8672         * lib/socket_.h: Don't define WINVER.
8673
8674         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8675         slightly modified to work in gnulib.
8676
8677 2006-06-21  Simon Josefsson  <jas@extundo.com>
8678
8679         * doc/gnulib.texi (Windows sockets): Add.
8680
8681 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8682
8683         * lib/read-file.c (fread_file): Start with buffer allocation of
8684         0 bytes rather than 1 byte; this simplifies the code.
8685         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8686         code to free buffer and save/restore errno.
8687         (internal_read_file): Remove unused local.
8688
8689 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8690
8691         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8692         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8693         Problem reported by Denis Excoffier in
8694         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8695
8696 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8697
8698         * modules/sys_socket, modules/socklen: Include sys/types since
8699         FreeBSD 4.x's sys/socket.h needs it.
8700
8701 2006-06-19  Simon Josefsson  <jas@extundo.com>
8702
8703         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8704
8705 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8706
8707         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8708
8709 2006-06-19  Bruno Haible  <bruno@clisp.org>
8710
8711         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8712         and FULL_PATH_INTTYPES_H in angle brackets.
8713         Reported by Mark D. Baushke <mdb@gnu.org>.
8714
8715 2006-06-17  Eric Blake  <ebb9@byu.net>
8716
8717         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8718         errno.
8719
8720 2006-06-17  Bruno Haible  <bruno@clisp.org>
8721
8722         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8723         <sys/inttypes.h>.
8724
8725 2006-06-17  Bruno Haible  <bruno@clisp.org>
8726
8727         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8728         whether errno is declared. Assume <errno.h> declares errno.
8729
8730 2006-06-17  Bruno Haible  <bruno@clisp.org>
8731
8732         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8733
8734 2006-06-17  Bruno Haible  <bruno@clisp.org>
8735
8736         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8737         problem on Solaris 2.5.1.
8738
8739 2006-06-16  Eric Blake  <ebb9@byu.net>
8740
8741         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8742         * lib/unicodeio.c [!defined errno]: Likewise.
8743         * lib/strtol.c [!defined errno]: Likewise.
8744         * lib/strtod.c [!defined errno]: Likewise.
8745
8746 2006-06-15  Eric Blake  <ebb9@byu.net>
8747
8748         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8749
8750 2006-06-15  Eric Blake  <ebb9@byu.net>
8751
8752         * config/srclist.txt (ssize_t.m4): Lose sync.
8753
8754 2006-06-15  Bruno Haible  <bruno@clisp.org>
8755
8756         * modules/stdint (Files): Include m4/full-header-path.m4,
8757         m4/size_max.m4, m4/wchar_t.m4.
8758         (Makefile.am): Many more substitutions.
8759         * modules/stdint-tests: New file.
8760         * tests/test-stdint.c: New file.
8761
8762 2006-06-15  Bruno Haible  <bruno@clisp.org>
8763
8764         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8765         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8766         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8767         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8768         gl_CHECK_TYPE_SAME): New macros.
8769
8770 2006-06-15  Bruno Haible  <bruno@clisp.org>
8771
8772         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8773
8774 2006-06-15  Bruno Haible  <bruno@clisp.org>
8775
8776         * lib/stdint_.h: Rewritten to be fully auto-configured.
8777         Fixes bug on HP-UX/IA64.
8778
8779 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8780
8781         * lib/getdate.y (__attribute__): Don't define if already defined.
8782         Problem reported by Larry Jones.
8783         * lib/utimens.c (__attribute__): Likewise.
8784
8785 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8786
8787         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8788         reported by Andreas Schwab.
8789
8790 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8791             Bruno Haible  <bruno@clisp.org>
8792
8793         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8794         check for the declaration of strnlen and a run test that exposes the
8795         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8796         rpl_strndup.
8797
8798 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8799             Bruno Haible  <bruno@clisp.org>
8800
8801         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8802
8803 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8804
8805         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8806         compile test, for Tru64 4.0D.
8807
8808 2006-05-28  Karl Berry  <karl@gnu.org>
8809
8810         * config/srclist.txt (printf-args.c): lose sync.
8811
8812 2006-05-26  Martin Lambers  <marlam@marlam.de>
8813
8814         * lib/getpass.c: Updates the test for the native W32 API, and adds
8815         missing includes, thus fixing compilation warnings.
8816
8817 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8818
8819         * lib/exclude.c (exclude_fnmatch): New function.
8820         (excluded_file_name): Call exclude_fnmatch.
8821         * lib/exclude.h (excluded_file_name): New prototype
8822
8823 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8824
8825         * lib/tempname.c (small_open, large_open): New macros.
8826         (__open, __open64) [!_LIBC]: Remove.
8827         (__gen_tempname): Use small_open and large_open instead of __open
8828         and __open64.  This fixes a portability bug on HP-UX 11.11i
8829         reported by Simon Wing-Tang in
8830         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8831
8832 2006-05-24  Bruno Haible  <bruno@clisp.org>
8833
8834         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8835         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8836         Reported by Thorsten Maerz <torte@netztorte.de> via
8837         Aaron Stone <aaron@serendipity.cx>.
8838
8839 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8840
8841         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8842         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8843         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8844         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8845         not really conditional on the cache.
8846         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8847
8848 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8849
8850         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8851         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8852         (my_usleep): Don't mishandle maximum value.
8853
8854 2006-05-19  Jim Meyering  <jim@meyering.net>
8855
8856         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8857
8858 2006-05-17  Bruno Haible  <bruno@clisp.org>
8859
8860         Cygwin portability.
8861         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8862
8863 2006-05-17  Bruno Haible  <bruno@clisp.org>
8864
8865         * lib/stdint_.h: Fix recognition of Cygwin.
8866
8867 2006-05-15  Bruno Haible  <bruno@clisp.org>
8868
8869         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8870         on libtool patch by Ralf Wildenhues.
8871
8872 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8873
8874         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8875         test for C99 conformance; (bool) 0.5 is an integer constant
8876         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8877         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8878
8879 2006-05-11  Simon Josefsson  <jas@extundo.com>
8880
8881         * m4/xvasprintf.m4: Fix obvious typo.
8882
8883 2006-05-11  Jim Meyering  <jim@meyering.net>
8884
8885         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8886         James Lemley.
8887
8888 2006-05-10  Simon Josefsson  <jas@extundo.com>
8889
8890         * lib/md4.c: Typo fix, update copyright years.
8891         (K1, K2): Don't use L because it turn computations into 64-bit on
8892         64-bit platforms.
8893
8894 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8895
8896         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8897         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8898         unwanted sign propagation, e.g., on hosts with 64-bit int.
8899         There still are some problems with reeelly weird theoretical hosts
8900         (e.g., 33-bit int) but it's not worth worrying about now.
8901         * lib/sha1.c (rol): Likewise.
8902         (K1, K2, K3, K4): Remove unnecessary L suffix.
8903
8904 2006-05-10  Bruno Haible  <bruno@clisp.org>
8905
8906         * lib/des.c: Cast to avoid warnings.
8907
8908 2006-05-09  Bruno Haible  <bruno@clisp.org>
8909
8910         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8911         (Depends-on): Depend also on xsize, stdarg.
8912         (configure.ac): Add gl_XVASPRINTF.
8913
8914 2006-05-09  Bruno Haible  <bruno@clisp.org>
8915
8916         * m4/xvasprintf.m4: New file.
8917
8918 2006-05-09  Bruno Haible  <bruno@clisp.org>
8919
8920         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8921         (EOVERFLOW): Define fallback value.
8922         (xstrcat): New function.
8923         (xvasprintf): Recognize the special case of a string concatenation.
8924
8925 2006-05-08  Eric Blake  <ebb9@byu.net>
8926
8927         * gnulib-tool (func_version): Base copyright year on CVS date.
8928         (func_emit_copyright_notice): New function.
8929         (func_emit_lib_Makefile_am): Use it.
8930         (func_emit_tests_Makefile_am): Likewise.
8931         (func_import): Likewise.
8932
8933 2006-05-08  Bruno Haible  <bruno@clisp.org>
8934
8935         * modules/stdarg: New file.
8936         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8937
8938 2006-05-08  Bruno Haible  <bruno@clisp.org>
8939
8940         * m4/stdarg.m4: New file, from GNU gettext.
8941
8942 2006-05-08  Bruno Haible  <bruno@clisp.org>
8943
8944         * config/srclist.txt (build-aux/config.rpath): different from latest
8945         release.
8946
8947 2006-05-08  Bruno Haible  <bruno@clisp.org>
8948
8949         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8950
8951 2006-05-05  Jim Meyering  <jim@meyering.net>
8952
8953         * m4/warning.m4: New file, derived from bison's file by the same name.
8954
8955 2006-05-03  Bruno Haible  <bruno@clisp.org>
8956
8957         * lib/stdint_.h: Shorter URL.
8958         * lib/inttypes.h: Likewise.
8959
8960 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8961
8962         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8963
8964 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8965
8966         * lib/verify.h: Document the internals better.  Most of this change
8967         was written by Bruno Haible.
8968
8969 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8970
8971         * doc/verify.texi: New file, partly based on a proposal by
8972         Bruno Haible.
8973
8974 2006-05-02  Bruno Haible  <bruno@clisp.org>
8975
8976         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8977         test from here...
8978         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8979
8980 2006-04-29  Bruno Haible  <bruno@clisp.org>
8981
8982         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8983         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8984
8985 2006-04-29  Bruno Haible  <bruno@clisp.org>
8986
8987         * gnulib-tool: Make --update option actually work.
8988
8989 2006-04-29  Bruno Haible  <bruno@clisp.org>
8990
8991         * doc/gcd.texi: New file.
8992         * doc/gnulib.texi: Include it.
8993
8994 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8995
8996         * lib/getdate.y (get_date): When adding relative date, start with the
8997         initial time, not with the result of the first mktime call.
8998
8999 2006-04-25  Bruno Haible  <bruno@clisp.org>
9000
9001         * gnulib-tool (func_import): Output the include directives in three
9002         blocks, sorted separately.
9003         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9004
9005 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9006
9007         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9008         to define main with arguments, for C++.  Reported by Eric Blake.
9009         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9010         Prefer 'int main ()' to 'int main (void)', for C++.
9011         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9012         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9013         for 'main', for C99 and C++.
9014
9015 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9016
9017         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9018         Don't assume that exit status -1 is valid.
9019         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9020         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9021         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9022         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9023         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9024         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9025         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9026         functions can be used without declaring them, or that you can
9027         exit with status -1.
9028         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9029
9030 2006-04-24  Karl Berry  <karl@gnu.org>
9031
9032         * config/srclist.txt (longdouble.m4): sync lost.
9033
9034 2006-04-24  Eric Blake  <ebb9@byu.net>
9035
9036         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9037
9038 2006-04-24  Bruno Haible  <bruno@clisp.org>
9039
9040         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9041         poll() implementation in AIX.
9042         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9043
9044 2006-04-24  Bruno Haible  <bruno@clisp.org>
9045
9046         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9047         assigned exactly once.
9048
9049 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9050             Bruno Haible  <bruno@clisp.org>
9051
9052         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9053         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9054         for AM_CPPFLAGS.
9055
9056 2006-04-23  Bruno Haible  <bruno@clisp.org>
9057
9058         * modules/copy-file: Depend on unistd.
9059         * modules/execute: Likewise.
9060         * modules/fatal-signal: Likewise.
9061         * modules/findprog: Likewise.
9062         * modules/mkdtemp : Likewise.
9063         * modules/pipe: Likewise.
9064         * modules/wait-process: Likewise.
9065
9066 2006-04-23  Bruno Haible  <bruno@clisp.org>
9067
9068         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9069         condition was already detected.
9070         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9071
9072 2006-04-23  Bruno Haible  <bruno@clisp.org>
9073
9074         * lib/copy-file.c: Include <unistd.h> unconditionally.
9075         * lib/execute.c: Likewise.
9076         * lib/fatal-signal.c: Likewise.
9077         * lib/findprog.c: Likewise.
9078         * lib/mkdtemp.c: Likewise.
9079         * lib/pipe.h: Likewise.
9080         * lib/pipe.c: Likewise.
9081         * lib/wait-process.h: Likewise.
9082
9083 2006-04-23  Bruno Haible  <bruno@clisp.org>
9084
9085         * gnulib-tool (func_usage): Fix --import description. Document
9086         --update.
9087         (func_import): Create temporary file in a temporary directory, if
9088         --dry-run is specified. Silence errors from 'grep' when there are no
9089         m4 files in $m4dir.
9090         (func_create_testdir): Silence errors from 'grep' when there are no
9091         m4 files in $m4dir.
9092         Reported by Karl Berry <karl@freefriends.org>.
9093
9094 2006-04-20  Bruno Haible  <bruno@clisp.org>
9095
9096         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9097         one argument, so that the code will be portable to Autoconf 2.60.
9098         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9099         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9100         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9101
9102 2006-04-19  Derek Price  <derek@ximbiot.com>
9103             Eric Blake  <ebb9@byu.net>
9104
9105         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9106         rather than "/full/path.h".  Update comment to match.  Shorten &
9107         generalize m4_translit call via AS_TR_CPP.
9108
9109 2006-04-19  Derek Price  <derek@ximbiot.com>
9110             Eric Blake  <ebb9@byu.net>
9111
9112         * lib/inttypes.h: Correct grammar in comment.
9113
9114 2006-04-18  Derek Price  <derek@ximbiot.com>
9115             Paul Eggert  <eggert@cs.ucla.edu>
9116
9117         * modules/inttypes: New file.
9118         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9119
9120 2006-04-18  Derek Price  <derek@ximbiot.com>
9121             Paul Eggert  <eggert@cs.ucla.edu>
9122
9123         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9124         New files.
9125
9126 2006-04-18  Derek Price  <derek@ximbiot.com>
9127             Paul Eggert  <eggert@cs.ucla.edu>
9128
9129         * lib/inttypes.h: New file.
9130         * lib/strtoimax.c: Assume <inttypes.h>.
9131
9132 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9133
9134         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9135         isn't mounted.  Problem reported by Kir Kolyshkin.
9136
9137 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9138
9139         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9140         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9141         Derek R. Price.
9142         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9143         implementation.
9144
9145 2006-04-12  Eric Blake  <ebb9@byu.net>
9146
9147         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9148         is now done automatically by the corresponding Autoconf macro.
9149
9150 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9151
9152         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9153         time_r.h.
9154
9155 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9156
9157         Merge regex changes from libc, removing some of our
9158         POSIX-conformance changes that were rejected and redoing them in a
9159         less-intrusive way.
9160
9161         * lib/regcomp.c (re_compile_internal, init_dfa):
9162         Length arg is now size_t, not Idx.  All uses changed.
9163         (peek_token): Forward decl now says internal_function.
9164         (__re_error_msgid, __re_error_msgid_idx):
9165         Now static rather than extern with attribute_hidden.
9166         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9167         For some reason libc prefers K&R style defns for external functions.
9168         (regerror) [!defined _LIBC]: Likewise.
9169         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9170         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9171         (build_range_exp, build_collating_symbol):
9172         Use K&R-style defn.
9173         (re_compile_fastmap): Use '\0' to memset, not 0.
9174         (utf8_sb_map): Make the calculations more obvious.
9175         (init_dfa, parse_bracket_exp, build_charclass_op):
9176         Call calloc and cast result, as glibc does.
9177         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9178         (build_range_exp, build_collating_symbol):
9179         Now internal functions.
9180
9181         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9182
9183         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9184         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9185         Don't depend on VMS; depend on __VMS instead, for POSIX
9186         namespace cleanness.
9187         (regoff_t): Define to ssize_t, not long int.
9188
9189         Remove the REG_ macros named below.  Instead, make the old names
9190         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9191         __USE_GNU_REGEX.
9192         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9193         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9194         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9195         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9196         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9197         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9198         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9199         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9200         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9201         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9202         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9203         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9204         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9205         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9206         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9207         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9208         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9209         (REG_NREGS):
9210         Remove.  All uses replaced by the old RE_* names.
9211         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9212         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9213         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9214         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9215         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9216         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9217         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9218         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9219         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9220         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9221         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9222         Don't bother having these macros be independent of each others'
9223         values, since they no longer exist in the POSIX name space.
9224
9225         Rename the following member names back to their old names,
9226         unless !__USE_GNU_REGEX.  All uses changed back.
9227         (buffer): Renamed from re_buffer.
9228         (allocated): Renamed from re_allocated.
9229         (used): Renamed from re_used.
9230         (syntax): Renamed from re_syntax.
9231         (fastmap): Renamed from re_fastmap.
9232         (translate): Renamed from re_translate.
9233         (can_be_null): Renamed from re_can_be_null.
9234         (regs_allocated): Renamed from re_regs_allocated.
9235         (fastmap_accurate): Renamed from re_fastmap_accurate.
9236         (no_sub): Renamed from re_no_sub.
9237         (not_bol): Renamed from re_not_bol.
9238         (not_eol): Renamed from re_not_eol.
9239         (newline_anchor): Renamed from re_newline_anchor.
9240         (num_regs): Renamed from rm_num_regs.
9241         (start): Renamed from rm_start.
9242         (end): Renamed from rm_end.
9243
9244         (free_state): Move up a bit.
9245
9246         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9247         #define to be empty.
9248         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9249         when that is what is intended.
9250         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9251         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9252         (MAX): New macro.
9253         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9254         All uses changed back to re_malloc, etc.  It's now the caller's
9255         responsibility to check for overflow; all callers changed.
9256         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9257         (re_x2nrealloc): Remove.
9258         (free_state): Remove decl.
9259
9260         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9261         (re_set_registers, re_exec):
9262         Use K&R-style defn.
9263
9264         2006-01-31  Roland McGrath  <roland@redhat.com>
9265
9266         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9267         Reported by Mike Frysinger <vapier@gentoo.org>.
9268
9269         2006-01-15  Andreas Jaeger  <aj@suse.de>
9270
9271         [BZ #1950]
9272         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9273         build_wcs_upper_buffer change.
9274         (build_wcs_upper_buffer): Change return type.
9275
9276         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9277
9278         * lib/regex_internal.h: Include <stdint.h> if available.
9279
9280         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9281
9282         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9283
9284         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9285
9286         * lib/regcomp.c: Adjust for changed secondary hash function.
9287
9288         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9289
9290         * lib/regex.h: Pretty printing.
9291         Clean up namespace a bit.
9292
9293         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9294
9295         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9296         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9297
9298         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9299                     Ulrich Drepper  <drepper@redhat.com>
9300
9301         [BZ #1302]
9302         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9303         changed.
9304         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9305
9306         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9307
9308         [BZ #281]
9309         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9310         * lib/regcomp.c: Remove unnecessary uses of
9311         unsigned RE_TRANSLATE_TYPE.
9312         * lib/regex_internal.h: Likewise.
9313         * lib/regex_internal.c: Likewise.
9314         * lib/regexec.c: Likewise.
9315         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9316
9317         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9318
9319         * lib/regexec.c (find_recover_state): Remove unnecessary
9320         initialization.
9321         (transit_state_bkref): Make DFA a const pointer.
9322         (get_subexp): Likewise.
9323         (check_arrival): Likewise.
9324         (update_cur_sifted_state): Likewise.
9325         (re_search_internal): Likewise.
9326         (prune_impossible_nodes): Likewise.
9327         (acquire_init_state_context): Likewise.
9328         (proceed_next_node): Likewise.
9329         (set_regs): Likewise.
9330         (free_fail_stack_return): Likewise.
9331         (check_arrival_expand_ecl): Mark DFA parameter as const.
9332         (check_arrival_expand_ecl_sub): Likewise.
9333         (check_subexp_limits): Likewise.
9334         (sub_epsilon_src_nodes):  Likewise.
9335         (add_epsilon_src_nodes):  Likewise.
9336         (merge_state_array): Likewise.
9337         (update_regs): Likewise.
9338         (build_trtable): Likewise.
9339         (sift_states_backward): Mark MCTX parameter as const.
9340         (build_sifted_states): Likewise.
9341         (update_cur_sifted_state): Likewise.
9342         (sift_states_mkref): Likewise.
9343         (check_arrival_expand_ecl): Mark eclosure as const.
9344         (check_dst_limits_calc_pos_1): Likewise.
9345         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9346         pointer.
9347
9348         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9349
9350         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9351         (transit_state_sb): Likewise.
9352         (transit_state_mb): Likewise.
9353         (sift_states_iter_mb): Likewise.
9354         (check_arrival_add_next_nodes): Likewise.
9355         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9356         [_LIBC] (re_search_2_stub): Use mempcpy.
9357
9358         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9359         mbrtowc for very simple UTF-8 case.
9360
9361         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9362         a pointer-to-const.
9363         (re_acquire_state_context): Likewise.
9364         * lib/regex_internal.h: Adjust prototypes.
9365
9366         * lib/regex.c: Prevent using C++ compilers.
9367
9368         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9369         (re_acquire_state_context): Likewise.
9370
9371 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9372
9373         * modules/regex (Depends-on): Add ssize_t.
9374
9375 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9376
9377         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9378         translation table.
9379
9380 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9381
9382         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9383
9384 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9385             Bruno Haible  <bruno@clisp.org>
9386
9387         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9388         <sys/types.h> and <inttypes.h>.
9389
9390 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9391
9392         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9393         `__error_t_defined', so argp.h will not typedef the former.
9394
9395 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9396
9397         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9398         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9399         glibc names.  Even if glibc is changed to conform to POSIX, the
9400         traditional names will be available anyway, since regex depends on
9401         the extensions module.  Also, fix a longstanding typo in the
9402         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9403         reported by Emanuele Giaquinta.  Also, change sense of cached
9404         variable, so that the message makes sense.
9405
9406 2006-03-24  Simon Josefsson  <jas@extundo.com>
9407
9408         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9409         including some doc fixes.
9410         (base64_encode_alloc): Fix +1 bug on allocation failures.
9411
9412 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9413
9414         * lib/base64.c (base64_encode): Do not read past end of array with
9415         unsanitized input on systems with CHAR_BIT > 8.
9416
9417 2006-03-24  Eric Blake  <ebb9@byu.net>
9418
9419         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9420
9421 2006-03-22  Karl Berry  <karl@gnu.org>
9422
9423         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9424         * config/srclistvars.sh (COREUTILS): new var.
9425
9426 2006-03-17  Jim Meyering  <jim@meyering.net>
9427
9428         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9429         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9430
9431 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9432
9433         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9434         no longer needs it.  Instead, check that regoff_t is as least
9435         as wide as ptrdiff_t.
9436
9437         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9438         so that our regex.h stays compatible with the installed regex.
9439         This is helpful for installers who configure --without-included-regex.
9440         Problem reported by Emanuele Giaquinta.
9441
9442 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9443
9444         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9445         Typedef to long int, not to off_, as POSIX will likely change
9446         in that direction.
9447
9448 2006-03-15  Eric Blake  <ebb9@byu.net>
9449
9450         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9451
9452 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9453
9454         * lib/argp-help.c (validate_uparams): Fix typo
9455         * lib/argp-parse.c (argp_default_options): Consistently begin help
9456         messages with a lowercase letter.
9457
9458 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9459
9460         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9461         overrun buffers and shouldn't be used (much as gets shouldn't be
9462         used).
9463         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9464
9465 2006-03-08  Simon Josefsson  <jas@extundo.com>
9466
9467         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9468         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9469
9470 2006-03-08  Simon Josefsson  <jas@extundo.com>
9471
9472         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9473         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9474
9475 2006-03-08  Simon Josefsson  <jas@extundo.com>
9476
9477         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9478         signal that configure disabled the device.
9479
9480 2006-03-08  Simon Josefsson  <jas@extundo.com>
9481
9482         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9483         languages.
9484
9485 2006-03-07  Simon Josefsson  <jas@extundo.com>
9486
9487         * modules/getopt (Depends-on): Add unistd.
9488
9489         * modules/unistd: New file.
9490
9491 2006-03-07  Simon Josefsson  <jas@extundo.com>
9492
9493         * modules/gc-random: New file.
9494
9495 2006-03-07  Simon Josefsson  <jas@extundo.com>
9496
9497         * m4/unistd_h.m4: New file.
9498
9499 2006-03-07  Simon Josefsson  <jas@extundo.com>
9500
9501         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9502         test to be side-effect free by storing the result in the cache
9503         variable gl_cv_lib_readline, and moving the assignment of
9504         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9505         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9506
9507 2006-03-07  Simon Josefsson  <jas@extundo.com>
9508
9509         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9510         error on missing devices (the functions will return an error).
9511
9512         * m4/gc.m4: Move random stuff to gc-random.m4
9513
9514 2006-03-07  Simon Josefsson  <jas@extundo.com>
9515
9516         * lib/unistd_.h: New file.
9517
9518 2006-03-07  Simon Josefsson  <jas@extundo.com>
9519
9520         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9521
9522 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9523
9524         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9525         Problem reported by Juan Manuel Guerrero.
9526
9527 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9528
9529         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9530         the unistd module.
9531         * lib/getlogin_r.c: Likewise.
9532         * lib/getlogin_r.h: Likewise.
9533         * lib/glob.c: Likewise.
9534         * lib/pagealign_alloc.c: Likewise.
9535         * lib/unistd_.h: Remove; no longer needed.
9536
9537 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9538
9539         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9540         Add unistd.
9541         * modules/c-stack (Depends-on): Add unistd.
9542         * modules/getlogin_r: Likewise.
9543         * modules/glob: Likewise.
9544         * modules/pagealign_alloc: Likewise.
9545         * modules/unistd (Files): Remove lib/unistd_.h.
9546         (EXTRA_DIST): Remove.
9547         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9548         need unistd_.h.
9549         (MOSTLYCLEANFILES): Remove unistd.h-t.
9550
9551 2006-03-03  Simon Josefsson  <jas@extundo.com>
9552
9553         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9554
9555 2006-03-03  Simon Josefsson  <jas@extundo.com>
9556
9557         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9558         libidn and bison.
9559
9560 2006-03-03  Simon Josefsson  <jas@extundo.com>
9561
9562         * build-aux/maint.mk: Add indent target.
9563
9564 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9565
9566         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9567         our replacement poll.h in any case, to avoid a differing
9568         declaration from a system header.  Seen on AIX.
9569
9570 2006-03-01  Simon Josefsson  <jas@extundo.com>
9571
9572         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9573         <kasal@ucw.cz>.
9574
9575 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9576
9577         * modules/gettime (Depends-on): Add extensions module.
9578         * modules/nanosleep (Depends-on): Likewise.
9579         * modules/settime (Depends-on): Likewise.
9580
9581 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9582
9583         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9584         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9585         pedantically.
9586         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9587         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9588
9589         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9590         not "==".  Reported by Ralf Wildenhues.
9591
9592 2006-03-01  Karl Berry  <karl@gnu.org>
9593
9594         * doc/Copyright/request-*: new files, synced from gnuorg.
9595
9596 2006-03-01  Karl Berry  <karl@gnu.org>
9597
9598         * config/srclist.txt (Copyright/*): new entries.
9599
9600 2006-02-28  Simon Josefsson  <jas@extundo.com>
9601
9602         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9603
9604 2006-02-27  Simon Josefsson  <jas@extundo.com>
9605
9606         * lib/base64.h: Indent #define's.  From Jim Meyering
9607         <jim@meyering.net>.
9608
9609 2006-02-27  Jim Meyering  <jim@meyering.net>
9610
9611         Revert the change of 2006-02-24, so these files can continue
9612         to be sync'd from gettext.
9613         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9614         of `config.h'.
9615
9616 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9617
9618         * modules/intprops: New file.
9619         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9620         Add intprops.
9621         * modules/getloadavg (Files): Remove lib/intprops.h.
9622         (Depends-on): Add intprops.
9623         * modules/human: Likewise.
9624         * modules/inttostr: Likewise.
9625         * modules/openat: Likewise.
9626         * modules/sig2str: Likewise.
9627         * modules/userspec: Likewise.
9628         * modules/utimecmp: Likewise.
9629         * modules/xnanosleep: Likewise.
9630         * modules/xstrtol: Likewise.
9631
9632 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9633
9634         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9635         * modules/lock-tests (TESTS): Use $(EXEEXT).
9636         * modules/tls-tests: Likewise.
9637         * modules/argp-tests: Likewise.
9638         (check_PROGRAMS): New var, replacing...
9639         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9640
9641 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9642
9643         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9644         `config.h'.
9645
9646 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9647
9648         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9649
9650 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9651
9652         Sync from coreutils.
9653         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9654         gl_CHDIR_SAFER.
9655
9656 2006-02-22  Jim Meyering  <jim@meyering.net>
9657
9658         Sync from coreutils.
9659         * m4/chdir-safer.m4: New file.
9660
9661 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9662
9663         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9664         AT_FDCWD exceeds INT_MAX.
9665         * lib/openat.h (AT_FDCWD): Likewise.
9666
9667 2006-02-17  Eric Blake  <address@hidden>
9668
9669         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9670
9671 2006-02-16  Simon Josefsson  <jas@extundo.com>
9672
9673         * modules/getaddrinfo (Depends-on): Add sys_socket.
9674
9675 2006-02-15  Simon Josefsson  <jas@extundo.com>
9676
9677         * build-aux/maint.mk: Add dsyntax-check rule.
9678
9679 2006-02-15  Eric Blake  <ebb9@byu.net>
9680
9681         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9682         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9683         'present but cannot compile' warnings on cygwin.
9684         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9685         use ws2tcpip.h if sys/socket.h works.
9686         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9687         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9688
9689 2006-02-14  Simon Josefsson  <jas@extundo.com>
9690
9691         * modules/maintainer-makefile (Files): Rename.
9692
9693         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9694         and (the local) Makefile.cfg to maint-cfg.mk.
9695
9696         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9697         to the latter.
9698
9699         * modules/maintainer-makefile: New module.
9700
9701         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9702         severaly stripped to make it possible to build it up from scratch
9703         with reliable tests.
9704
9705         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9706         fixes to permit overriding the default actions when configure and
9707         makefile are not available.
9708
9709 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9710
9711         Sync from coreutils.
9712         * modules/lstat (Depends-on): Don't depend on xalloc.
9713         (License): Change from GPL to LGPL, since this is now simply a
9714         replacement for a libc function.
9715
9716 2006-02-14  Jim Meyering  <jim@meyering.net>
9717
9718         Sync from coreutils.
9719
9720         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9721         failure on deficient systems, and simplify gnulib lgpl dependencies.
9722         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9723         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9724
9725         * lib/xalloc-die.c: Remove unused definition of N_.
9726
9727 2006-02-14  Jim Meyering  <jim@meyering.net>
9728
9729         Sync from coreutils.
9730         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9731         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9732         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9733         double-quote uses of that variable, to accommodate the rare case in
9734         which getmntent is available in none of the libraries checked.  This
9735         happens at least on FreeBSD 5.0.
9736
9737 2006-02-13  Simon Josefsson  <jas@extundo.com>
9738
9739         * gnulib-tool (Usage): Fix --import, from
9740         karl@freefriends.org (Karl Berry).
9741
9742 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9743
9744         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9745
9746 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9747
9748         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9749         "autoupdate" on 2005-12-12.
9750
9751 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9752
9753         * modules/closeout (Depends-on): Remove atexit.
9754
9755 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9756
9757         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9758         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9759
9760 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9761
9762         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9763         __EXTENSIONS__ if this causes compilation to fail.  Problem
9764         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9765         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9766
9767 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9768
9769         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9770         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9771         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9772         All uses changed.
9773
9774 2006-01-26  Simon Josefsson  <jas@extundo.com>
9775
9776         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9777         prototype is visible on mingw32.
9778
9779         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9780         for mingw32.
9781
9782         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9783         mingw32).
9784
9785 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9786
9787         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9788         attempt to open for write; this always fails, at least on POSIX
9789         hosts.  This reinstates the 2006-01-09 change, which was
9790         inadvertently removed.
9791
9792 2006-01-26  Bruno Haible  <bruno@clisp.org>
9793
9794         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9795         Reported by Paul Eggert.
9796
9797 2006-01-26  Bruno Haible  <bruno@clisp.org>
9798             Paul Eggert  <eggert@cs.ucla.edu>
9799
9800         * lib/stdbool_.h (_Bool)
9801         [(! (defined __cplusplus || defined __BEOS__)
9802           && !defined __GNUC__
9803           && !(defined __HP_cc || defined __xlc__
9804                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9805                || defined __sgi))]:
9806         #define to signed char in these cases too; this simplifies
9807         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9808         etc., separately) and makes it more conservative.
9809
9810 2006-01-25  Simon Josefsson  <jas@extundo.com>
9811
9812         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9813         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9814         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9815
9816 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9817
9818         * lib/argp-namefrob.h: Bugfix. Remove stray #
9819
9820 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9821
9822         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9823         so that we test the test.
9824         Check for yet another HP-UX cc bug involving *bool |= bool.
9825
9826 2006-01-25  Karl Berry  <karl@gnu.org>
9827
9828         * config/srclist.txt (vasnprintf.c): sync lost.
9829
9830 2006-01-25  Jim Meyering  <jim@meyering.net>
9831
9832         Sync from the stable (b5) branch of coreutils:
9833
9834         * lib/fts.c (fts_children): Don't let close() clobber errno from
9835         failed fchdir().
9836
9837         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9838         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9839         a dangling symlink.  That can also happen at least for ELOOP.
9840         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9841         FYI, this bug predates the inclusion of fts.c in coreutils.
9842
9843         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9844         in their own block, so pre-c99 compilers don't object.
9845
9846         Avoid the double-free (first in fts_read, second in fts_close) that
9847         would occur when an `active' directory is made inaccessible (e.g.,
9848         via chmod a-x) during a traversal.
9849         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9850         before returning.  Reproduce this failure by
9851         mkdir -p a/b; cd a; chmod a-x . b
9852         Reported by Stavros Passas.
9853
9854 2006-01-25  Jim Meyering  <jim@meyering.net>
9855
9856         * lib/fileblocks.c: Remove more useless parentheses.
9857         * lib/readutmp.h: Likewise.
9858
9859 2006-01-25  Bruno Haible  <bruno@clisp.org>
9860
9861         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9862         warnings.
9863         Reported by Paul Eggert.
9864
9865 2006-01-25  Bruno Haible  <bruno@clisp.org>
9866
9867         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9868         rid of a trap command. For Solaris sh.
9869         Reported by Mark D. Baushke <mdb@gnu.org>.
9870
9871 2006-01-24  Simon Josefsson  <jas@extundo.com>
9872
9873         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9874         Bruno.
9875
9876 2006-01-24  Karl Berry  <karl@gnu.org>
9877
9878         * config/srclist.txt (argp-namefrob.h): sync lost.
9879
9880 2006-01-24  Jim Meyering  <jim@meyering.net>
9881
9882         * modules/openat (Files): Add lib/intprops.h.
9883         From Mark D. Baushke.
9884
9885 2006-01-24  Jim Meyering  <jim@meyering.net>
9886
9887         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9888         Reported by Mark D. Baushke.
9889
9890 2006-01-24  Jim Meyering  <jim@meyering.net>
9891
9892         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9893
9894 2006-01-24  Bruno Haible  <bruno@clisp.org>
9895
9896         * modules/strnlen (Maintainer): Change from glibc to all.
9897
9898 2006-01-24  Bruno Haible  <bruno@clisp.org>
9899
9900         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9901         Patch by Paul Eggert.
9902
9903 2006-01-24  Bruno Haible  <bruno@clisp.org>
9904
9905         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9906         already has it.
9907         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9908         2005-11-26.
9909
9910         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9911         'signed char' to avoid problems with the built-in _Bool type.
9912         Reported by Paul Eggert on 2005-11-26.
9913
9914 2006-01-24  Bruno Haible  <bruno@clisp.org>
9915
9916         * gnulib-tool (func_import): Avoid constructing complicated sed
9917         expressions inside backquote.
9918         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9919
9920 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9921
9922         These changes imported from libc.
9923         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9924         test and two separate function calls.
9925         * lib/strndup.c (__strndup): Add libc_hidden_def.
9926
9927 2006-01-23  Simon Josefsson  <jas@extundo.com>
9928
9929         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9930         Remove the test_*_SOURCES variable: automake infers it by default.
9931         * modules/tls-tests: Likewise.
9932
9933 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9934
9935         Work around porting bugs reported by Dieter in
9936         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9937         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9938         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9939         Include "getopt.h" first, to check interface.
9940         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9941         !HAVE_DECL_GETENV.
9942         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9943         (__strndup): Revert to K&R-style function dfns, the glibc style.
9944         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9945         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9946         Include strnlen.h first, to get prototype properly.
9947         (strnlen): Renamed from __strnlen.
9948         Remove weak alias.
9949
9950 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9951
9952         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9953
9954 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9955
9956         * config/srclist.txt: Adjust to reflect glibc reorganization.
9957         This affects only comments.
9958
9959 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9960
9961          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9962          Reported by Bruce Korb <bkorb@gnu.org>.
9963
9964 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9965
9966         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9967         to pacify gcc -Wswitch-default.
9968
9969 2006-01-22  Bruno Haible  <bruno@clisp.org>
9970
9971         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9972         temporary buffer for sprintf, take into account the precision also
9973         for 'd', 'i', 'u', 'o', 'x', 'X'.
9974
9975 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9976
9977         * modules/argp-tests: New module
9978         * tests/test-argp.c: New file
9979         * tests/test-argp-2.sh: New file
9980
9981 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9982
9983         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9984         (__argp_base_name): Removed
9985         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9986         typo.
9987         (__argp_base_name): Provide macro definition or extern declaration
9988         depending on the configuration
9989
9990 2006-01-20  Simon Josefsson  <jas@extundo.com>
9991
9992         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9993
9994 2006-01-20  Simon Josefsson  <jas@extundo.com>
9995
9996         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9997
9998 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9999
10000         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10001         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10002         Suggested by Bruno Haible.
10003
10004 2006-01-20  Karl Berry  <karl@gnu.org>
10005
10006         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10007         until changes propagate, I guess.
10008
10009 2006-01-19  Simon Josefsson  <jas@extundo.com>
10010
10011         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10012
10013 2006-01-19  Simon Josefsson  <jas@extundo.com>
10014
10015         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10016
10017 2006-01-19  Simon Josefsson  <jas@extundo.com>
10018
10019         * gnulib-tool: Set check_PROGRAMS.
10020
10021         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10022         modules/des-tests, modules/gc-arcfour-tests,
10023         modules/gc-arctwo-tests, modules/gc-des-tests,
10024         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10025         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10026         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10027         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10028         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10029         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10030         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10031         test_*_SOURCES.
10032
10033 2006-01-18  Simon Josefsson  <jas@extundo.com>
10034
10035         * modules/socklen (Depends-on): Depend on sys_socket.
10036
10037 2006-01-18  Simon Josefsson  <jas@extundo.com>
10038
10039         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10040         modules/des-tests, modules/gc-arcfour-tests,
10041         modules/gc-arctwo-tests, modules/gc-des-tests,
10042         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10043         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10044         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10045         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10046         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10047         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10048         $(EXEEXT) to automake TESTS variable, for mingw32.
10049
10050 2006-01-17  Simon Josefsson  <jas@extundo.com>
10051
10052         * modules/socklen (Include): Need sys/socket.h.
10053
10054 2006-01-17  Bruno Haible  <bruno@clisp.org>
10055
10056         * modules/ssize_t (Include): Add <sys/types.h>.
10057
10058 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10059
10060         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10061         it's not portable and it doesn't work with cross-compiles.
10062         Problem reported by Bruno Haible.  Fix missing-$ typo in
10063         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10064         -zignore from being used with Sun's C compiler.
10065
10066 2006-01-12  Simon Josefsson  <jas@extundo.com>
10067
10068         * lib/base64.c: Fix warning, reported by Bruno Haible
10069         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10070
10071 2006-01-12  Bruno Haible  <bruno@clisp.org>
10072
10073         * modules/ldd: New file.
10074         * build-aux/ldd.sh.in: New file.
10075         * MODULES.html.sh (Support for building libraries and executables): Add
10076         ldd.
10077
10078 2006-01-12  Bruno Haible  <bruno@clisp.org>
10079
10080         * m4/ldd.m4: New file.
10081
10082 2006-01-12  Bruno Haible  <bruno@clisp.org>
10083
10084         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10085         endless loop while replacing $auxdir with build-aux.
10086
10087 2006-01-11  Simon Josefsson  <jas@extundo.com>
10088
10089         * lib/stdint_.h (SIZE_MAX): Add missing (.
10090
10091 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10092
10093         Sync from coreutils.
10094         * lib/md5.c: Fix commentary typos.
10095         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10096         * lib/md5.h (__attribute__): Remove; unused.
10097         * lib/sha1.c: Fix commentary to match md5 better.
10098         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10099         so that we don't need to worry about alignment.  All uses changed.
10100         This merges the 2005-10-28 md5 change into sha1.
10101
10102 2006-01-11  Jim Meyering  <jim@meyering.net>
10103
10104         Sync from coreutils.
10105         * lib/md5.c (OP): Fix spacing.
10106
10107 2006-01-11  Bruno Haible  <bruno@clisp.org>
10108
10109         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10110         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10111         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10112
10113 2006-01-11  Bruno Haible  <bruno@clisp.org>
10114
10115         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10116         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10117         the "early" section as well.
10118
10119 2006-01-11  Bruno Haible  <bruno@clisp.org>
10120
10121         Avoid "ar: no archive members specified" error on MacOS X.
10122         * gnulib-tool (func_modules_add_dummy): New function.
10123         (func_import, func_create_testdir): Invoke it.
10124
10125 2006-01-11  Bruno Haible  <bruno@clisp.org>
10126
10127         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10128         with $auxdir in AC_CONFIG_FILES statements.
10129
10130 2006-01-11  Bruno Haible  <bruno@clisp.org>
10131
10132         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10133         Initialize also noinst_HEADERS to empty.
10134
10135 2006-01-11  Bruno Haible  <bruno@clisp.org>
10136
10137         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10138         variables.
10139         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10140         autoreconf.
10141
10142 2006-01-11  Bruno Haible  <bruno@clisp.org>
10143
10144         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10145         overridable by the user.
10146         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10147
10148 2006-01-10  Simon Josefsson  <jas@extundo.com>
10149
10150         * modules/sys_socket: New file.
10151
10152 2006-01-10  Simon Josefsson  <jas@extundo.com>
10153
10154         * m4/sys_socket_h.m4: New file.
10155
10156 2006-01-10  Simon Josefsson  <jas@extundo.com>
10157
10158         * lib/socket_.h: New file.
10159
10160 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10161
10162         * modules/readutmp (Maintainer): Add myself.
10163
10164 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10165
10166         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10167         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10168         People who are still concerned with buggy memcmp implementations
10169         can invoke gl_FUNC_MEMCMP themselves.
10170
10171 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10172
10173         * lib/regex_internal.h (BITSET_WORD_BITS):
10174         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10175         preprocessor mishandles large unsigned values as if they were signed.
10176         Problem reported by Claudio Fontana in
10177         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10178
10179 2006-01-10  Jim Meyering  <jim@meyering.net>
10180
10181         Avoid the double-free (first in fts_read, second in fts_close) that
10182         would occur when an `active' directory is made inaccessible (e.g.,
10183         via chmod a-x) during a traversal.
10184         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10185         before returning.  Reproduce this failure by
10186         mkdir -p a/b; cd a; chmod a-x . b
10187         Reported by Stavros Passas.
10188
10189         Sync from coreutils.
10190         * lib/sha1.c: Tweak grammar in a comment.
10191
10192 2006-01-10  Jim Meyering  <jim@meyering.net>
10193
10194         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10195         Patch by Joerg Sonnenberger.
10196
10197 2006-01-10  Bruno Haible  <bruno@clisp.org>
10198
10199         * modules/readutmp: Depend on module free.
10200         * modules/strtok_r: Depend on module restrict.
10201
10202 2006-01-10  Bruno Haible  <bruno@clisp.org>
10203
10204         * modules/gettext (configure.ac): Add an invocation of
10205         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10206
10207 2006-01-10  Bruno Haible  <bruno@clisp.org>
10208
10209         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10210         Reported by Werner Lemberg <wl@gnu.org>.
10211
10212 2006-01-10  Bruno Haible  <bruno@clisp.org>
10213
10214         * lib/localcharset.c: Update from GNU gettext.
10215
10216 2006-01-10  Bruno Haible  <bruno@clisp.org>
10217
10218         * lib/argp.h (__const): Remove macro. Use const instead.
10219         * lib/argp-fmtstream.h (__const): Likewise.
10220         * lib/glob_.h (__const): Remove macro.
10221         * lib/glob-libc.h: Use const instead of __const.
10222
10223 2006-01-10  Bruno Haible  <bruno@clisp.org>
10224
10225         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10226         variable.
10227         Needed to avoid an automake error regarding the 'gettext' module.
10228
10229 2006-01-09  Simon Josefsson  <jas@extundo.com>
10230
10231         * modules/inet_ntop (Depends-on): Add restrict.
10232
10233 2006-01-09  Simon Josefsson  <jas@extundo.com>
10234
10235         * modules/gc-rijndael-tests (License): Put under LGPL.
10236
10237         * modules/gc-des-tests (License): Likewise.
10238
10239         * modules/gc-arcfour-tests (License): Likewise.
10240
10241         * modules/gc-arctwo-tests (License): Likewise.
10242
10243         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10244
10245         * modules/gc-hmac-sha1-tests (Files): Likewise.
10246
10247         * modules/gc-hmac-md5-tests (License): Likewise.
10248
10249         * modules/gc-sha1-tests (License): Likewise.
10250
10251         * modules/gc-md5-tests (License): Likewise.
10252
10253         * modules/gc-md4-tests (License): Likewise.
10254
10255         * modules/gc-md2-tests (License): Likewise.
10256
10257         * modules/gc-tests (License): Likewise.
10258
10259         * modules/des-tests (License): Likewise.
10260
10261         * modules/md4-tests (License): Likewise.
10262
10263         * modules/md2-tests (License): Likewise.
10264
10265 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10266
10267         Sync from coreutils:
10268
10269         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10270         * modules/lib-ignore: New file.
10271         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10272         chdir-safer.m4, lchmod.m4.
10273         * modules/openat: Add mkdirat.c, openat-priv.h.
10274
10275 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10276
10277         Sync from coreutils.
10278         * m4/lib-ignore.m4: New file.
10279         * m4/lchmod.m4: New file.
10280
10281 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10282
10283         Sync from coreutils.
10284         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10285         for write access: POSIX says that must fail.
10286         * lib/fts.c (diropen): Likewise.
10287         * lib/save-cwd.c (save_cwd): Likewise.
10288         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10289         well, for minor improvements on hosts that lack O_DIRECTORY.
10290         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10291         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10292         Fall back on chown if open failed with EACCES.
10293
10294         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10295         Report an error at compile-time if only a 1-second nominal clock
10296         resolution is found.
10297
10298         * lib/lchmod.h: New file.
10299         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10300         (make_dir_parents): Use lchown rather than chown, and
10301         lchmod rather than chmod.
10302
10303         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10304         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10305         "proc" reported by n0dalus.
10306
10307         * lib/mountlist.c: Include <limits.h>.
10308         (dev_from_mount_options)
10309         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10310         New function.  It no longer assumes "dev=" has the System V meaning
10311         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10312         (read_file_system_list)
10313         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10314         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10315         dev= in that case.
10316
10317         * lib/posixtm.h (PDS_PRE_2000): New macro.
10318         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10319         allow_century.  All usages changed.  Reject dates outside the range
10320         1969-1999 if PDS_PRE_2000 is used.
10321
10322 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10323
10324         Sync from coreutils.
10325         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10326         (Time of day items): Mention the possibility of leap seconds.
10327         Problem reported by Dr. David Alan Gilbert.
10328
10329 2006-01-09  Jim Meyering  <jim@meyering.net>
10330
10331         Sync from coreutils.
10332
10333         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10334
10335         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10336
10337         * lib/modechange.c (mode_compile): Reject an invalid mode string
10338         that starts with an octal digit.  From Andreas Gruenbacher.
10339
10340         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10341         and dup to open_safer and dup_safer, respectively.
10342         (openat_permissive): Fix typo in comment.
10343
10344         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10345         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10346         (_): Remove; no longer needed.
10347         (openat): Renamed from rpl_openat; no need for rpl_openat
10348         since openat.h renames openat for us.
10349         Replace most of the body with a call to openat_permissive,
10350         to avoid duplicate code.
10351         Port to (probably hypothetical) environments were mode_t is
10352         wider than int.
10353         (openat_permissive): Require mode arg, so that we can check
10354         types better.  Put it just after flags.  Change cwd failure
10355         indicator from pointer-to-bool to pointer-to-errno-value.
10356         All callers changed.
10357         Invoke openat_save_fail and/or openat_restore_fail if
10358         cwd_errno is null, so that openat can call us.
10359         (openat_permissive, fdopendir, fstatat, unlinkat):
10360         Simplify errno handling to avoid some duplicate code,
10361         as it's OK to set errno on success.
10362         * lib/openat.h: Revamp code so that function macros depend on
10363         __OPENAT_PREFIX only, not also on AT_FDCWD.
10364         (openat_ro): Remove.  Caller changed to use openat_permissive.
10365         (openat_permissive): Now a macro, if not a function.
10366         (openat_restore_fail, openat_save_fail): Now always functions,
10367         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10368
10369         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10370         and openat.c.
10371         * lib/mkdirat.c: Include openat-priv.h.
10372         Remove definitions of macros defined therein.
10373         * lib/openat.c: Likewise.
10374
10375         * lib/mkdirat.c (mkdirat): New file and function.
10376         * lib/openat.h (mkdirat): Declare.
10377
10378         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10379
10380         * lib/openat.h (openat_permissive): Declare.
10381         (openat_ro): Define.
10382
10383         * lib/openat.c (EXPECTED_ERRNO): New macro.
10384         (openat_permissive): New function -- used in remove.c rewrite.
10385         (all functions): Set errno just before returning, only if there
10386         was an actual failure.
10387         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10388
10389         Emulate openat-family functions using Linux's procfs, if possible.
10390         Idea and some code based on Ulrich Drepper's glibc changes.
10391
10392         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10393         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10394         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10395         before falling back on save_cwd and restore_cwd.
10396         (fdopendir, fstatat, unlinkat): Likewise.
10397
10398         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10399         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10400
10401         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10402         as second argument to va_arg.  Otherwise, some versions of gcc
10403         warn that `if this code is reached, the program will abort'.
10404
10405 2006-01-09  Jim Meyering  <jim@meyering.net>
10406
10407         Sync from coreutils.
10408         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10409         Require openat-priv.h.
10410
10411 2006-01-09  Bruno Haible  <bruno@clisp.org>
10412
10413         * modules/strnlen (Include): Use strnlen.h.
10414
10415 2006-01-09  Bruno Haible  <bruno@clisp.org>
10416
10417         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10418
10419 2006-01-09  Bruno Haible  <bruno@clisp.org>
10420
10421         * lib/sysexit_.h (EX_OK): New macro.
10422         Suggested by Martin Lambers <marlam@marlam.de>.
10423
10424 2006-01-09  Bruno Haible  <bruno@clisp.org>
10425
10426         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10427         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10428
10429 2006-01-09  Bruno Haible  <bruno@clisp.org>
10430
10431         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10432         numbers.
10433
10434 2006-01-09  Bruno Haible  <bruno@clisp.org>
10435
10436         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10437         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10438         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10439         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10440
10441 2006-01-09  Bruno Haible  <bruno@clisp.org>
10442
10443         * build-aux/javacomp.sh.in: New file, moved from lib/.
10444         * modules/javacomp-script (Files): Update.
10445         (configure.ac): Add AC_CONFIG_FILES invocation.
10446         (EXTRA_DIST): Remove variable.
10447
10448         * build-aux/javaexec.sh.in: New file, moved from lib/.
10449         * modules/javaexec (Files): Update.
10450         (configure.ac): Add AC_CONFIG_FILES invocation.
10451         (EXTRA_DIST): Remove javaexec.sh.in.
10452
10453         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10454         * modules/csharpcomp-script (Files): Update.
10455         (configure.ac): Add AC_CONFIG_FILES invocation.
10456         (EXTRA_DIST): Remove variable.
10457
10458         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10459         * modules/csharpexec (Files): Update.
10460         (configure.ac): Add AC_CONFIG_FILES invocation.
10461         (EXTRA_DIST): Remove csharpexec.sh.in.
10462
10463 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10464
10465         Sync from coreutils.
10466
10467         Add POSIX ACL support
10468         * lib/acl.h (copy_acl, set_acl): Add declarations.
10469         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10470         systems other than Linux.
10471         (chmod_or_fchmod): New function: use fchmod when possible,
10472         and chmod otherwise.
10473         (file_has_acl): Add a POSIX ACL implementation, with a
10474         Linux-specific subcase.
10475         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10476         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10477         acls are unsupported.
10478         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10479         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10480         are unsupported.
10481
10482 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10483
10484         Sync from coreutils.
10485         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10486
10487 2006-01-07  Bruno Haible  <bruno@clisp.org>
10488
10489         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10490         gl_EARLY.
10491
10492 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10493
10494         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10495         Problem reported for Mingw by Mark Junker.
10496
10497 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10498
10499         * README: Gnulib normally doesn't generate a tarball.
10500
10501 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10502
10503         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10504         long int, not int, for nanosecond counts, so that people who are
10505         used to POSIX struct timespec won't be surprised.  Reported by Jim
10506         Meyering.
10507
10508 2005-12-28  Bruno Haible  <bruno@clisp.org>
10509
10510         * build-aux/config.rpath: Update from GNU gettext.
10511
10512 2005-12-16  Jim Meyering  <jim@meyering.net>
10513
10514         * modules/fprintftime: New module.
10515         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10516
10517 2005-12-16  Jim Meyering  <jim@meyering.net>
10518
10519         * m4/fprintftime.m4: New file.
10520
10521 2005-12-16  Jim Meyering  <jim@meyering.net>
10522
10523         * lib/fprintftime.c, lib/fprintftime.h: New files.
10524
10525 2005-12-15  Simon Josefsson  <jas@extundo.com>
10526
10527         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10528         new m4/socklen.m4.
10529
10530 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10531
10532         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10533         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10534
10535 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10536
10537         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10538         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10539         struct uparams is valid. Fall back to the default values if it is
10540         not.
10541
10542 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10543
10544         * modules/argp (Files): Add argp-pin.c
10545         (Depends-on): dirname
10546         (lib_SOURCES): Add argp-pin.c
10547
10548 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10549
10550         * m4/argp.m4:  Check if program_invocation_name and
10551         program_invocation_short_name are declared and define appropriate
10552         macros if they are not.
10553
10554 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10555
10556         * lib/argp-help.c (__argp_base_name): New function
10557         (__argp_short_program_name): Rewrite using __argp_base_name
10558         * lib/argp-namefrob.h: Define program_invocation_name and
10559         program_invocation_short_name if requested
10560         (__argp_base_name): Add prototype
10561         * lib/argp-parse.c (argp_def): Use gettext wrappers
10562         (argp_default_parser): Use __argp_base_name
10563         * lib/argp-pin.c: New file. Defines program_invocation_name and
10564         program_invocation_short_name on systems that lack them.
10565
10566 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10567
10568         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10569         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10570         porting problem reported by Georg Schwarz in
10571         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10572
10573 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10574
10575         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10576         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10577         porting problem reported by Georg Schwarz in
10578         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10579
10580 2005-12-05  Bruno Haible  <bruno@clisp.org>
10581
10582         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10583         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10584         Reported by Mark Junker <mjscod@gmx.de>.
10585
10586 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10587
10588         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10589         Use implementation from Albert Chin, with some
10590         comments/corrections by Stepan Kasal and myself.
10591
10592 2005-12-02  Bruno Haible  <bruno@clisp.org>
10593
10594         * gnulib-tool (func_import): Accept GPLed build tool modules when
10595         --lgpl is given.
10596         * modules/csharpcomp-script: New file.
10597         * modules/csharpcomp: Depend on it.
10598         * modules/javacomp-script: New file.
10599         * modules/javacomp: Depend on it.
10600         Suggested by Simon Josefsson.
10601
10602 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10603
10604         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10605         statement, to work around an HP-UX 10.20 compiler bug reported by
10606         Peter O'Gorman.
10607
10608 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10609
10610         * modules/savedir (Depends-on): Add openat.
10611
10612 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10613
10614         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10615         (uintmax_t) [defined uintmax_t]: Do not declare.
10616         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10617         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10618         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10619         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10620         sake of portability to weird hosts that C allows (though we don't
10621         know of any practical examples).
10622
10623         * lib/savedir.h (fdsavedir): New decl.
10624         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10625         contains most of the former guts of savedir.
10626         (savedir): Use savedirstream.
10627         Include "openat.h".
10628
10629 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10630
10631         * modules/obstack (Files): Add m4/ulonglong.m4.
10632         Problem reported by Davide Angelocola.
10633
10634 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10635
10636         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10637         coreutils no longer futzes with rounding modes.
10638
10639 2005-11-14  Jim Meyering  <jim@meyering.net>
10640
10641         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10642         replacement of mkstemp.
10643
10644 2005-11-10  Simon Josefsson  <jas@extundo.com>
10645
10646         * lib/readline.c: Remove EOL.
10647
10648 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10649
10650         * modules/gethrxtime (Depends-on): Add gettime.
10651
10652 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10653
10654         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10655         or gettimeofday; no longer needed.
10656
10657 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10658
10659         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10660         time business.
10661         (gethrxtime) [! (HAVE_NANOUPTIME
10662         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10663         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10664         our own approximation.
10665
10666 2005-11-08  Eric Blake  <ebb9@byu.net>
10667
10668         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10669
10670 2005-11-08  Eric Blake  <ebb9@byu.net>
10671
10672         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10673
10674 2005-11-04  Bruno Haible  <bruno@clisp.org>
10675
10676         * gnulib-tool: Implement --update mode.
10677
10678 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10679
10680         Fix porting problem reported by Theodoros V. Kalamatianos.
10681         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10682         Don't assume that futimes failing means we must fail.
10683
10684 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10685
10686         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10687         variables to suggest the intended function of the PATH_MAX check.
10688
10689 2005-10-30  Kean Johnston  <jkj@sco.com>
10690
10691         Trivial changes to support SCO systems.
10692         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10693         as PATH_MAX.
10694         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10695         where __ptr is null when no I/O is pending.
10696
10697 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10698
10699         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10700         leave errno alone.  Problem reported by Dmitry V. Levin.
10701
10702 2005-10-28  Simon Josefsson  <jas@extundo.com>
10703
10704         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10705         Test more.
10706
10707         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10708
10709         * modules/md2, modules/md2-tests: New files.
10710
10711 2005-10-28  Simon Josefsson  <jas@extundo.com>
10712
10713         * m4/inet_ntop.m4: More tests.
10714
10715         * m4/gc-md2.m4, md2.m4: New file.
10716
10717 2005-10-28  Simon Josefsson  <jas@extundo.com>
10718
10719         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10720         "restrict" keywords, as per POSIX.  Protect the function
10721         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10722         Don't use K&R prototypes.  Check the sprintf return values.
10723         Re-define EAFNOSUPPORT if not present.  Indent.
10724
10725         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10726         suggested by Bruno Haible <bruno@clisp.org>.
10727
10728         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10729
10730         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10731
10732         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10733         libgcrypt).
10734
10735         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10736
10737         * lib/md2.h, lib/md2.c: New files.
10738
10739 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10740
10741         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10742         errno alone.  Problem reported by Frederic Jolliton.
10743
10744 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10745
10746         * modules/verify (License): Change from GPL to LGPL.  This is a
10747         tiny module and there are apparently near-equivalents that are
10748         under the BSD license.
10749
10750 2005-10-24  Simon Josefsson  <jas@extundo.com>
10751
10752         * modules/sha1: Relicense to LGPL.
10753
10754 2005-10-24  Simon Josefsson  <jas@extundo.com>
10755
10756         * lib/md4.h: Shrink buffer size, now that we changed the type.
10757
10758 2005-10-23  Simon Josefsson  <jas@extundo.com>
10759
10760         * gnulib-tool (func_import): Fix --tests-base.
10761
10762 2005-10-22  Simon Josefsson  <jas@extundo.com>
10763
10764         * modules/arcfour (Depends-on): Need stdint.
10765
10766 2005-10-22  Simon Josefsson  <jas@extundo.com>
10767
10768         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10769         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10770
10771 2005-10-22  Simon Josefsson  <jas@extundo.com>
10772
10773         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10774         suggested by Bruno Haible <bruno@clisp.org>.
10775
10776 2005-10-22  Simon Josefsson  <jas@extundo.com>
10777
10778         * lib/crc.h: Include stddef.h, for size_t.
10779
10780 2005-10-22  Simon Josefsson  <jas@extundo.com>
10781
10782         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10783         arcfour_context struct (simplify test vector testing in GNU
10784         Shishi).
10785
10786 2005-10-21  Simon Josefsson  <jas@extundo.com>
10787
10788         * modules/des, modules/des-tests: New files.
10789
10790         * modules/gc-des, modules/gc-des-tests: New files.
10791
10792         * tests/test-des.c, tests/test-gc-des.c: New file.
10793
10794 2005-10-21  Simon Josefsson  <jas@extundo.com>
10795
10796         * modules/arctwo, modules/arctwo-tests: New files.
10797
10798         * tests/test-arctwo.c: New file.
10799
10800         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10801
10802         * tests/test-gc-arctwo.c: New file.
10803
10804 2005-10-21  Simon Josefsson  <jas@extundo.com>
10805
10806         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10807         Bruno Haible <bruno@clisp.org>.
10808
10809         * m4/gc-des.m4: New file.
10810
10811 2005-10-21  Simon Josefsson  <jas@extundo.com>
10812
10813         * m4/arctwo.m4: New file.
10814
10815         * m4/gc-arctwo.m4: New file.
10816
10817 2005-10-21  Simon Josefsson  <jas@extundo.com>
10818
10819         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10820         block.
10821
10822 2005-10-21  Simon Josefsson  <jas@extundo.com>
10823
10824         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10825         <bruno@clisp.org>.
10826
10827         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10828
10829         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10830         Bruno Haible <bruno@clisp.org>.
10831
10832         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10833         <bruno@clisp.org>.
10834
10835 2005-10-21  Simon Josefsson  <jas@extundo.com>
10836
10837         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10838
10839 2005-10-21  Simon Josefsson  <jas@extundo.com>
10840
10841         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10842
10843 2005-10-21  Simon Josefsson  <jas@extundo.com>
10844
10845         * lib/des.h, lib/des.c: New files.
10846
10847         * lib/gc-gnulib.c: Support DES.c
10848
10849 2005-10-21  Simon Josefsson  <jas@extundo.com>
10850
10851         * lib/arctwo.h, lib/arctwo.c: New files.
10852
10853         * lib/gc-gnulib.c: Support ARCTWO.
10854
10855 2005-10-21  Simon Josefsson  <jas@extundo.com>
10856
10857         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10858         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10859
10860 2005-10-21  Simon Josefsson  <jas@extundo.com>
10861
10862         * gnulib-tool (func_import, func_create_testdir): Define automake
10863         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10864         Makefile.am snippet),
10865         suggested by Bruno Haible <bruno@clisp.org>.
10866
10867         * modules/gc (Makefile.am): Use it.
10868
10869 2005-10-21  Bruno Haible  <bruno@clisp.org>
10870
10871         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10872         patch.
10873
10874 2005-10-19  Simon Josefsson  <jas@extundo.com>
10875
10876         * tests/test-gc-rijndael.c: New file.
10877
10878         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10879
10880 2005-10-19  Simon Josefsson  <jas@extundo.com>
10881
10882         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10883         interface too.
10884
10885 2005-10-19  Simon Josefsson  <jas@extundo.com>
10886
10887         * tests/test-gc-arcfour.c: New file.
10888
10889         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10890
10891 2005-10-19  Simon Josefsson  <jas@extundo.com>
10892
10893         * modules/gc-md4, modules/gc-md4-tests: New file.
10894
10895         * tests/test-gc-md4.c: New file.
10896
10897 2005-10-19  Simon Josefsson  <jas@extundo.com>
10898
10899         * m4/gc-md4.m4: New file.
10900
10901 2005-10-19  Simon Josefsson  <jas@extundo.com>
10902
10903         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10904         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10905         <kasal@ucw.cz>.
10906
10907 2005-10-19  Simon Josefsson  <jas@extundo.com>
10908
10909         * m4/gc-arcfour.m4: New file.
10910
10911         * m4/gc-rijndael.m4: New file.
10912
10913 2005-10-19  Simon Josefsson  <jas@extundo.com>
10914
10915         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10916
10917 2005-10-19  Simon Josefsson  <jas@extundo.com>
10918
10919         * lib/gc-gnulib.c: Support ARCFOUR.
10920
10921 2005-10-19  Simon Josefsson  <jas@extundo.com>
10922
10923         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10924         support.
10925
10926         * lib/gc.h: Add ECB enum type.
10927
10928         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10929
10930 2005-10-18  Simon Josefsson  <jas@extundo.com>
10931
10932         * tests/test-md5.c: New file.
10933
10934         * modules/md5-tests: New file.
10935
10936 2005-10-18  Simon Josefsson  <jas@extundo.com>
10937
10938         * tests/test-md4.c: New file.
10939
10940         * modules/md4, modules/md4-tests: New files.
10941
10942 2005-10-18  Simon Josefsson  <jas@extundo.com>
10943
10944         * m4/md4.m4: New file.
10945
10946 2005-10-18  Simon Josefsson  <jas@extundo.com>
10947
10948         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10949
10950 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10951
10952         * gnulib-tool (func_create_testdir): Omit the second check whether
10953         BUILT_SOURCES in nonempty.
10954
10955 2005-10-17  Simon Josefsson  <jas@extundo.com>
10956
10957         * tests/test-rijndael.c: New file.
10958
10959 2005-10-17  Simon Josefsson  <jas@extundo.com>
10960
10961         * modules/sha1: Depend on stdint instead of md5.
10962
10963         * modules/md5: Depend on stdint, remove uint32_t.
10964
10965 2005-10-17  Simon Josefsson  <jas@extundo.com>
10966
10967         * modules/gc-sha1-tests: New file.
10968
10969         * tests/test-gc-sha1.c: New file.
10970
10971 2005-10-17  Simon Josefsson  <jas@extundo.com>
10972
10973         * m4/md5.m4: Remove call to uint32_t.m4.
10974
10975 2005-10-17  Simon Josefsson  <jas@extundo.com>
10976
10977         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10978
10979         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10980         md5.h.
10981
10982         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10983
10984         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10985
10986 2005-10-17  Simon Josefsson  <jas@extundo.com>
10987
10988         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10989
10990 2005-10-17  Simon Josefsson  <jas@extundo.com>
10991
10992         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10993
10994 2005-10-17  Simon Josefsson  <jas@extundo.com>
10995
10996         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10997
10998         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10999
11000 2005-10-17  Bruno Haible  <bruno@clisp.org>
11001
11002         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11003         that it can also be used in a test.
11004
11005 2005-10-16  Bruno Haible  <bruno@clisp.org>
11006
11007         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11008         TESTS_ENVIRONMENT, so that individual tests can augment it.
11009
11010         * gnulib-tool (func_create_testdir): Use an intermediate target for
11011         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11012         macros, like $(ALLOCA_H), which cannot be passed through the command
11013         line.
11014
11015 2005-10-15  Simon Josefsson  <jas@extundo.com>
11016
11017         * modules/rijndael-tests: New file.
11018
11019         * modules/rijndael: New file.
11020
11021 2005-10-15  Simon Josefsson  <jas@extundo.com>
11022
11023         * m4/rijndael.m4: New file.
11024
11025 2005-10-15  Simon Josefsson  <jas@extundo.com>
11026
11027         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11028
11029         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11030
11031 2005-10-14  Simon Josefsson  <jas@extundo.com>
11032
11033         * tests/test-arcfour.c: New file.
11034
11035         * modules/arcfour, modules/arcfour-tests: New files.
11036
11037 2005-10-14  Simon Josefsson  <jas@extundo.com>
11038
11039         * m4/arcfour.m4: New file.
11040
11041 2005-10-14  Simon Josefsson  <jas@extundo.com>
11042
11043         * lib/arcfour.h, lib/arcfour.c: New files.
11044
11045 2005-10-14  Roland McGrath  <roland@redhat.com>
11046
11047         Import from libc.  [BZ #1331]
11048         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11049         macro argument.
11050         Reported by Matej Vela <vela@debian.org>.
11051
11052 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11053
11054         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11055         include <wchar.h>; no longer needed.
11056
11057 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11058
11059         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11060
11061 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11062         and  Ulrich Drepper  <drepper@redhat.com>
11063
11064         Import from libc.
11065         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11066         instead of inline stream orientation test and two separate
11067         function calls.  Pay no attention to USE_IN_LIBIO.
11068
11069 2005-10-13  Simon Josefsson  <jas@extundo.com>
11070
11071         * modules/gc-hmac-md5-tests: New file.
11072
11073         * tests/test-gc-hmac-sha1.c: New file.
11074
11075         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11076
11077         * modules/gc-hmac-md5-tests: New file.
11078
11079         * tests/test-gc-md5.c: New file.
11080
11081         * modules/gc-md5-tests: New file.
11082
11083 2005-10-13  Simon Josefsson  <jas@extundo.com>
11084
11085         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11086         Move memory allocation outside of loop.
11087
11088 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11089
11090         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11091         intermediate directory is in a read-only file system.  Problem
11092         reported by Eric Blake.
11093
11094 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11095
11096         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11097
11098 2005-10-12  Simon Josefsson  <jas@extundo.com>
11099
11100         * tests/test-hmac-sha1.c: New file.
11101
11102         * modules/hmac-sha1-tests: New file.
11103
11104         * modules/hmac-sha1: New file.
11105
11106 2005-10-12  Simon Josefsson  <jas@extundo.com>
11107
11108         * modules/gc-sha1: New file.
11109
11110 2005-10-12  Simon Josefsson  <jas@extundo.com>
11111
11112         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11113
11114         * tests/test-gc-pbkdf2-sha1.c: New file.
11115
11116 2005-10-12  Simon Josefsson  <jas@extundo.com>
11117
11118         * modules/gc-md5, modules/gc-hmac-md5: New files.
11119
11120         * modules/gc (Files): Remove md5, memxor and hmac files.
11121
11122 2005-10-12  Simon Josefsson  <jas@extundo.com>
11123
11124         * m4/gc-pbkdf2-sha1.m4: New file.
11125
11126         * m4/gc-hmac-sha1.m4: New file.
11127
11128         * m4/gc-sha1: New file.
11129
11130         * m4/hmac-sha1.m4: New file.
11131
11132 2005-10-12  Simon Josefsson  <jas@extundo.com>
11133
11134         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11135
11136         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11137
11138 2005-10-12  Simon Josefsson  <jas@extundo.com>
11139
11140         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11141         suggested by Bruno Haible <bruno@clisp.org>.
11142
11143 2005-10-12  Simon Josefsson  <jas@extundo.com>
11144
11145         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11146
11147 2005-10-12  Simon Josefsson  <jas@extundo.com>
11148
11149         * lib/gc-pbkdf2-sha1.c: New file.
11150
11151         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11152
11153 2005-10-12  Simon Josefsson  <jas@extundo.com>
11154
11155         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11156
11157         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11158
11159 2005-10-12  Simon Josefsson  <jas@extundo.com>
11160
11161         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11162         GC_USE_HMAC_MD5, respectively.
11163
11164         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11165         (gc_md5): Fix typo.
11166
11167         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11168
11169         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11170
11171         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11172
11173 2005-10-12  Bruno Haible  <bruno@clisp.org>
11174
11175         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11176         Reported by Stepan Kasal <kasal@ucw.cz>.
11177
11178 2005-10-11  Simon Josefsson  <jas@extundo.com>
11179
11180         * tests/test-crc.c: New file.
11181
11182         * modules/crc, modules/crc-tests: New files.
11183
11184 2005-10-11  Simon Josefsson  <jas@extundo.com>
11185
11186         * m4/crc.m4: New file.
11187
11188 2005-10-11  Simon Josefsson  <jas@extundo.com>
11189
11190         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11191
11192         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11193
11194         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11195
11196 2005-10-11  Simon Josefsson  <jas@extundo.com>
11197
11198         * lib/crc.h, lib/crc.c: New files.
11199
11200         * lib/gc.h (gc_hash_buffer): Add doc.
11201
11202 2005-10-11  Bruno Haible  <bruno@clisp.org>
11203
11204         * modules/c-strcasestr: New file.
11205         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11206
11207 2005-10-11  Bruno Haible  <bruno@clisp.org>
11208
11209         * modules/c-strcase: New file.
11210         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11211
11212 2005-10-11  Bruno Haible  <bruno@clisp.org>
11213
11214         * lib/strcasecmp.c: Include limits.h.
11215         (strcasecmp): Avoid integer overflow on exotic platforms.
11216         * lib/strncasecmp.c: Include limits.h.
11217         (strncasecmp): Avoid integer overflow on exotic platforms.
11218         Reported by Paul Eggert.
11219
11220 2005-10-11  Bruno Haible  <bruno@clisp.org>
11221
11222         * lib/c-strcasestr.h: New file, from GNU gettext.
11223         * lib/c-strcasestr.c: New file, from GNU gettext.
11224
11225 2005-10-11  Bruno Haible  <bruno@clisp.org>
11226
11227         * lib/c-strcase.h: New file, from GNU gettext.
11228         * lib/c-strcasecmp.c: New file, from GNU gettext.
11229         * lib/c-strncasecmp.c: New file, from GNU gettext.
11230
11231 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11232
11233         * modules/mempcpy (License): GPL -> LGPL.
11234         * modules/strchrnul (License): Likewise.
11235         * modules/sysexits (License): Likewise.
11236
11237 2005-10-08  Simon Josefsson  <jas@extundo.com>
11238
11239         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11240
11241 2005-10-07  Simon Josefsson  <jas@extundo.com>
11242
11243         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11244
11245 2005-10-06  Simon Josefsson  <jas@extundo.com>
11246
11247         * tests/test-hmac-md5.c: New file.
11248
11249         * modules/hmac-md5-tests: New file.
11250
11251         * modules/hmac-md5: New file.
11252
11253 2005-10-06  Simon Josefsson  <jas@extundo.com>
11254
11255         * m4/hmac-md5.m4: New file.
11256
11257         * m4/memxor.m4: Require gl_C_RESTRICT.
11258
11259 2005-10-06  Simon Josefsson  <jas@extundo.com>
11260
11261         * lib/memxor.c (memxor): Avoid casts and warnings.
11262
11263 2005-10-06  Simon Josefsson  <jas@extundo.com>
11264
11265         * lib/hmac-md5.c: New file.
11266
11267         * lib/hmac.h: New file.
11268
11269 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11270
11271         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11272         promotes to int, not unsigned int, to catch the AIX 5.3
11273         compiler bug.
11274
11275 2005-10-05  Simon Josefsson  <jas@extundo.com>
11276
11277         * modules/memxor: New file.
11278
11279         * modules/iconv (Files): Move config.rpath to havelib, it is used
11280         there.
11281
11282         * modules/havelib (Files): Add config.rpath.
11283
11284 2005-10-05  Simon Josefsson  <jas@extundo.com>
11285
11286         * m4/memxor.m4: New file.
11287
11288 2005-10-05  Simon Josefsson  <jas@extundo.com>
11289
11290         * lib/memxor.c (memxor): Fix compiler error.
11291
11292         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11293         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11294
11295         * lib/memxor.h, lib/memxor.c: New files.
11296
11297         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11298         we assume all systems have it, suggested by Jim Meyering
11299         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11300         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11301         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11302         same reasons.
11303
11304 2005-10-05  Simon Josefsson  <jas@extundo.com>
11305
11306         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11307
11308 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11309
11310         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11311         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11312         needed, since the source code now assumes these .h files.
11313
11314 2005-10-05  Derek Price  <derek@ximbiot.com>
11315
11316         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11317
11318 2005-10-05  Bruno Haible  <bruno@clisp.org>
11319
11320         * modules/stdint (License): Change to LGPL.
11321
11322 2005-10-04  Simon Josefsson  <jas@extundo.com>
11323
11324         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11325         D. Baushke" <mdb@gnu.org>.
11326
11327 2005-10-04  Bruno Haible  <bruno@clisp.org>
11328
11329         * lib/verify.h (verify_true): Provide alternative definition for C++.
11330
11331 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11332
11333         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11334         (SSIZE_MAX): New macro, if not already defined.
11335         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11336         than 2 GiB.
11337
11338 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11339
11340         Sync from coreutils.
11341         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11342         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11343         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11344         ULLONG_MAX doesn't work with 2.7.2.1.
11345
11346 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11347
11348         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11349         From Ben Pfaff.
11350
11351         * modules/exclude (Depends-on): Depend on verify.
11352         * modules/strtoimax (Depends-on): Likewise.
11353         * modules/utimecmp (Depends-on): Likewise.
11354
11355 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11356
11357         * lib/exclude.c: Include verify.h.
11358         (verify): Remove.  All callers changed to use verify.h's version.
11359         * lib/strtoimax.c: Likewise.
11360         * lib/utimecmp.c: Likewis.e
11361
11362         Sync from coreutils.
11363         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11364         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11365         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11366         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11367         bother returning ENOSYS if settimeofday or stime fails; just let
11368         them return whatever errno they want to return.
11369         * lib/utimens.c: Include unistd.h, for dup2.
11370         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11371         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11372
11373 2005-10-02  Jim Meyering  <jim@meyering.net>
11374
11375         Sync from coreutils.
11376         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11377         from glibc-2.2.5 that fails for read-only files.
11378
11379 2005-10-02  Jim Meyering  <jim@meyering.net>
11380
11381         Sync from coreutils.
11382         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11383         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11384         `#if HAVE_CONFIG_H'.
11385         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11386         Remove AT_FDCWD test.
11387         Do not consume the fd unless successful.
11388         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11389         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11390         block, so that we don't even try to compile it if settimeofday is
11391         available.  This works around a compilation failure on OSF1 V5.1,
11392         due to stime requiring a `long int*' while tv_sec is `int'.
11393
11394 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11395
11396         Sync from coreutils.
11397         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11398         against `yes', rather than just testing for nonempty.
11399
11400 2005-10-01  Simon Josefsson  <jas@extundo.com>
11401
11402         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11403         and Darwin.
11404
11405         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11406         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11407         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11408         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11409         Check if struct addrinfo is declared.
11410
11411 2005-10-01  Simon Josefsson  <jas@extundo.com>
11412
11413         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11414         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11415         AI_* and EAI_* definitions.  Protect function declarations.
11416
11417 2005-10-01  Jim Meyering  <jim@meyering.net>
11418
11419         Sync from coreutils.
11420
11421         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11422         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11423         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11424         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11425         in the inet and nsl libraries.  Required on Solaris 5.7.
11426
11427 2005-10-01  Jim Meyering  <jim@meyering.net>
11428
11429         Sync from coreutils.
11430         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11431         in the inet and nsl libraries.  Required on Solaris 5.7.
11432
11433 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11434
11435         * lib/getdelim.c (getdelim): Remove unused variables.
11436
11437 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11438
11439         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11440         so that the code works even with ancient cpp.  Portability problem
11441         with GCC 2.7.2.1 reported by Thomas M.Ott.
11442
11443 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11444
11445         * modules/regex (Depends-on): Add strcase.
11446
11447         * modules/gethostname (Licence): Change from GPL to LGPL, since
11448         gethostname.c is a trivial implementation of a standard library
11449         function.
11450         * modules/poll (License): Change from GPL to LGPL, since it's
11451         derived from LGPL code.
11452
11453 2005-09-27  Jim Meyering  <jim@meyering.net>
11454
11455         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11456         HAVE_CONFIG_H.
11457
11458         * lib/intprops.h (signed_type_or_expr__): Define.
11459         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11460         for unsigned types.
11461
11462 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11463
11464         * lib/verify.h (verify_expr): Remove, replacing with:
11465         (verify_true): New macro that returns true instead of void.
11466         (verify_type__): Remove.
11467         (verify): Use verify_true rather than verify_type__.
11468
11469 2005-09-26  Bruno Haible  <bruno@clisp.org>
11470
11471         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11472         is necessary.
11473         (lib_SOURCES): Remove mbchar.c.
11474         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11475         (Files): Add m4/mbrtowc.m4.
11476         * modules/mbiter: Likewise.
11477         * modules/mbuiter: Likewise.
11478
11479 2005-09-26  Bruno Haible  <bruno@clisp.org>
11480
11481         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11482         compile mbchar.c if they are not both present.
11483         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11484         * m4/mbiter.m4 (gl_MBITER): Likewise.
11485         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11486         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11487         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11488
11489 2005-09-25  Jim Meyering  <jim@meyering.net>
11490
11491         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11492         also uses socklen_t.
11493
11494 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11495
11496         * lib/utimens.c (ENOSYS): Define if not already defined.
11497         (futimens): Support having a null PATH if the file descriptor
11498         is nonnegative.
11499
11500         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11501         Remove.
11502         (__attribute): Define to empty unless GCC 3.1 or later.
11503         This works around a core dump on OpenBSD 3.4, which has GCC
11504         2.95.3, which dumps core when given __attribute__(()).  It also
11505         simplifies other tests, since we really don't want to bother with
11506         worrying about which ancient version of GCC supported what.
11507         Original problem reported by Yoann Vandoorselaere, with part of
11508         the fix suggested by Derek Price.
11509
11510 2005-09-24  Jim Meyering  <jim@meyering.net>
11511
11512         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11513         so we can once again use a positive bitfield width of 1 -- now we
11514         don't have to explain why we were using a bitfield width of 2.
11515
11516 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11517
11518         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11519         and similarly for the other external symbols.  Problem reported
11520         by James Gallager.
11521
11522         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11523         bug reported by Jim Meyering.
11524
11525         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11526         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11527         not needed, since socklen is a prerequisite module.
11528
11529 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11530
11531         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11532         Problem reported by Eric Blake.
11533         (getaddrinfo): Initialize se so that it's not garbage.
11534         Redo internal storage allocation so that it doesn't make unportable
11535         assumptions about alignment.
11536         Fix a memory leak.
11537
11538         * lib/utimens.c (futimens): Use futimesat if available.
11539         Prefer it to futimes since it doesn't have the futimes bug.
11540
11541         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11542         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11543         Instead, declare a function that returns a pointer to an array,
11544         and use verify_type__ to declare the size of the array.
11545         Problem and germ of a solution reported by Bruno Haible.
11546         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11547         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11548
11549 2005-09-23  Jim Meyering  <jim@meyering.net>
11550
11551         Sync from coreutils.
11552         Correct build failure (socklen_t not defined) on at least
11553         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11554         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11555
11556 2005-09-23  Jim Meyering  <jim@meyering.net>
11557
11558         * modules/getaddrinfo (Depends-on): Add socklen.
11559
11560 2005-09-23  Bruno Haible  <bruno@clisp.org>
11561
11562         * tests/test-verify.c: New file.
11563
11564 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11565
11566         Sync from coreutils.
11567
11568         * modules/argmatch (Depends-on): Add verify.
11569         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11570         unistd-safer.
11571         * modules/save-cwd (Depends-on): Likewise.
11572
11573         * modules/openat (Files): Add lib/openat-die.c.
11574         (Depends-on): Remove error, exitfail.
11575         Add dirname.
11576
11577         * modules/verify: New file.
11578         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11579         with "verify" module.
11580
11581 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11582
11583         Sync from coreutils.
11584
11585         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11586         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11587         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11588         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11589         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11590         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11591         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11592         Don't bother checking for string.h, stdlib.h, unistd.h.
11593         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11594         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11595         module's job.
11596         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11597         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11598
11599         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11600         (gl_GETDATE): Use it.
11601
11602         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11603
11604 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11605
11606         Sync from coreutils.
11607
11608         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11609         stat-time.h.
11610         * lib/argmatch.h: Include verify.h
11611         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11612         (ARGMATCH_ASSERT): Remove; unused.
11613         * lib/canonicalize.c: Assume STDC_HEADERS.
11614         * lib/exclude.c: Include "strcase.h".
11615         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11616         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11617         and stdio-safer.h.
11618         (getusershell): Call fopen, not fopen_safer.
11619         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11620         Do not include unistd-safer.h.
11621         (save_cwd): Don't call fd_safer; no longer needed
11622         now that we include fcntl--.h.
11623
11624         * lib/getdate.y (relative_time): New type.
11625         (RELATIVE_TIME_0): New constant.
11626         (parser_control): Use relative_time instead of doing it ourselves.
11627         (%union): Add new relative_time rel member.
11628         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11629         Now typeless.
11630         (relunit, relunit_snumber): Now of type rel.
11631         (zone, rel, relunit, get_date): Adjust to above changes.
11632
11633         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11634         Do not include unistd-safer.h.
11635         (getloadavg): Don't call fd_safer; no longer needed
11636         now that we include fcntl--.h.
11637
11638         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11639         (make_dir_parents): Treat ENOSYS like EEXIST.
11640
11641         Improve quality of diagnostics on restore_cwd failure.
11642         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11643         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11644         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11645         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11646         each time through the loop.  Do not diagnose restore_cwd failure;
11647         that is the caller's job (and perhaps the caller does not care).
11648
11649         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11650         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11651         If the file already exists but is not a directory, don't bother
11652         to try to make its parents.
11653         Close potential file descriptor leak if we can't chdir("/") (!).
11654         Don't always return true if chdir($PWD) fails; return true only
11655         if the requested action was done successfully (except for the
11656         chdir($PWD)).
11657         Don't log final directory unless we actually made it.
11658         Refactor to avoid duplicate code to fix up permissions.
11659         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11660
11661         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11662         to make it a bit faster and (I hope) clearer.
11663         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11664         Fix bug in formats like %2N.
11665
11666         * lib/verify.h: New file.
11667
11668 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11669
11670         Sync from coreutils.
11671         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11672
11673 2005-09-22  Jim Meyering  <jim@meyering.net>
11674
11675         Sync from coreutils.
11676
11677         * m4/lstat.m4 (gl_FUNC_LSTAT):
11678         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11679         Remove obsolete comment.
11680         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11681         * m4/xstrtod.m4: Likewise.
11682
11683         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11684
11685 2005-09-22  Jim Meyering  <jim@meyering.net>
11686
11687         Sync from coreutils.
11688
11689         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11690
11691         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11692         the .tm_year member, since otherwise gcc-4.0 would now warn about
11693         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11694
11695         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11696         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11697
11698         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11699         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11700         when run in a time zone for which daylight savings time is in effect
11701         for the starting date.
11702
11703         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11704         stop us from restricting permissions of just-created absolute-named
11705         directories.
11706         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11707         to restore initial working directory.
11708         * lib/mkdir-p.c (make_dir_parents): New parameter:
11709         different_working_dir, to tell caller if/when we change the working
11710         directory and are unable to return to the initial one.
11711         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11712         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11713         `return false'.  This fixes a bug introduced on 2004-07-30.
11714
11715         * lib/openat.c (fdopendir): Be sure to close the supplied
11716         file descriptor before returning.  This makes our replacement
11717         implementation a little closer to Solaris's, where fdopendir
11718         ties the file descriptor to the returned DIR* pointer.
11719         * lib/openat.c (unlinkat): New function.
11720         * lib/openat.h (unlinkat): Add prototype.
11721         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11722         (openat_restore_fail): Rename from openat_restore_die.
11723         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11724
11725         Provide an alternative to exiting immediately upon save_cwd or
11726         restore_cwd failure.  Now, an application can arrange e.g.,
11727         to perform a longjump in that case.
11728         * lib/openat.c: Include dirname.h.
11729         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11730         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11731         and openat_restore_die rather than calling error directly.
11732         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11733
11734         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11735         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11736         define.
11737
11738         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11739         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11740                             int utc, int nanoseconds);
11741         Background:
11742         date should not have to allocate a megabyte of virtual memory to
11743         handle a format argument like +%1048575T.  When implemented with
11744         strftime, it must allocate such a buffer, use strftime to fill it
11745         in, print it, then free it.
11746         With fprintftime, it simply prints everything and exits.
11747         With no need for memory allocation, that's one fewer way to fail.
11748         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11749         optional field width, not before, so we accept %9:z, not %:9z.
11750         (my_strftime): Be sure to use L_('x') for literals.
11751
11752         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11753         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11754         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11755         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11756         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11757         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11758         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11759         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11760         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11761         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11762         * lib/xgethostname.c, lib/xreadlink.c:
11763         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11764
11765         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11766         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11767         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11768         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11769         and don't include <sys/file.h>).
11770
11771 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11772
11773         Sync from coreutils.
11774
11775         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11776         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11777         [!LDAV_DONE]: Avoid unused variable warning.
11778
11779 2005-09-21  Bruno Haible  <bruno@clisp.org>
11780
11781         * lib/unicodeio.h (unicode_to_mb): New declaration.
11782
11783 2005-09-20  Derek Price  <derek@ximbiot.com>
11784
11785         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11786         getaddrinfo.h.
11787
11788 2005-09-20  Bruno Haible  <bruno@clisp.org>
11789
11790         * gnulib-tool: Remove trailing slashes from the values specified for
11791         --source-base, --m4-base, --tests-base, --aux-dir.
11792         Suggested by Simon Josefsson <jas@extundo.com>.
11793
11794 2005-09-20  Bruno Haible  <bruno@clisp.org>
11795
11796         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11797         func_modules_to_filelist, func_import, func_create_testdir): Make all
11798         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11799         change when gnulib-tool is invoked in a different locale.
11800
11801 2005-09-19  Simon Josefsson  <jas@extundo.com>
11802
11803         * m4/socklen.m4: Fix typo.
11804
11805 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11806
11807         Use a consistent style for including <config.h>.
11808         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11809         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11810         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11811         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11812         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11813         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11814         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11815         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11816         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11817         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11818         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11819         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11820         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11821         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11822         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11823         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11824         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11825         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11826         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11827         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11828         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11829         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11830         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11831         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11832         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11833         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11834         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11835         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11836         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11837         lib/xstrtoumax.c, lib/yesno.c:
11838         Standardize inclusion of config.h.
11839         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11840         lib/inttostr.h:  Removed inclusion of config.h from header files.
11841         * lib/inttostr.c:  Adjusted in-tree users.
11842         * lib/timespec.h: Remove superfluous warning to include config.h.
11843         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11844         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11845         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11846         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11847         config.h with HAVE_CONFIG_H.
11848
11849 2005-09-19  Jim Meyering  <jim@meyering.net>
11850
11851         * modules/pathmax (License): Change to LGPL.
11852
11853 2005-09-19  Derek Price  <derek@ximbiot.com>
11854
11855         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11856
11857 2005-09-19  Bruno Haible  <bruno@clisp.org>
11858
11859         * gnulib-tool (import): Provide default for --tests-base.
11860
11861 2005-09-19  Bruno Haible  <bruno@clisp.org>
11862
11863         * doc/quote.texi: New file, extracted from gnulib.texi.
11864         * doc/ctime.texi: New file, extracted from gnulib.texi.
11865         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11866         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11867         * doc/gnulib.texi: Include them.
11868
11869 2005-09-18  Bruno Haible  <bruno@clisp.org>
11870
11871         Portability fix.
11872         * gnulib-tool (func_readlink): New function.
11873         (func_ln_if_changed): Use it.
11874
11875 2005-09-18  Bruno Haible  <bruno@clisp.org>
11876
11877         * gnulib-tool: Support --with-tests also with --import.
11878         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11879         (func_import): Use variables $testsbase and $inctests. Emit a
11880         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11881         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11882         SUBDIRS += $testsdir.
11883         (func_create_testdir): Update.
11884
11885 2005-09-18  Bruno Haible  <bruno@clisp.org>
11886
11887         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11888         instead of $dry_run.
11889         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11890         (func_ln_if_changed): Don't handle dry-run here.
11891         (func_import): In dry-run mode, detect more precisely which actions
11892         would be performed, and don't use "...ing" verbs.
11893
11894 2005-09-18  Bruno Haible  <bruno@clisp.org>
11895
11896         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11897         (func_import): Use join on two temporary files instead of three nested
11898         loops, in order to determine which files are new or old.
11899
11900 2005-09-18  Bruno Haible  <bruno@clisp.org>
11901
11902         * gnulib-tool (func_import): Comment out code that spits out the
11903         new files with --dry-run.
11904
11905 2005-09-18  Bruno Haible  <bruno@clisp.org>
11906
11907         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11908
11909 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11910
11911         * lib/stat-time.h: New file.
11912         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11913         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11914         in a different way.
11915         (timespec_cmp): New function.
11916         * lib/utimecmp.c: Include stat-time.h.
11917         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11918         members exist, not on the obsolescent ST_MTIM_NSEC.
11919         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11920
11921 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11922
11923         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11924
11925 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11926
11927         * MODULES.html.sh (File system functions): Add stat-time.
11928         * modules/stat-time: New file.
11929         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11930         is now done in a different way, by the stat-time module.
11931         * modules/utimecmp (Depends-on): Add stat-time.
11932
11933 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11934
11935         * m4/st_mtim.m4: Remove.  Superseded by...
11936         * m4/stat-time.m4: New file.
11937         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11938         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11939
11940 2005-09-15  Derek Price  <derek@ximbiot.com>
11941
11942         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11943
11944 2005-09-15  Derek Price  <derek@ximbiot.com>
11945
11946         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11947         * lib/regex_internal.c: Ditto, using this...
11948         (__GNUC_PREREQ): ...new macro.
11949         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11950         using...
11951         (__GNUC_PREREQ): ...this new macro.
11952
11953         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11954
11955 2005-09-15  Derek Price  <derek@ximbiot.com>
11956             Paul Eggert  <eggert@cs.ucla.edu>
11957
11958         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11959         changes, consolidating in...
11960         * lib/regex_internal.h: ...this file.
11961
11962 2005-09-13  Jim Meyering  <jim@meyering.net>
11963
11964         * lib/canon-host.c: Filter through gnu indent and reword comments
11965         slightly.
11966         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11967
11968 2005-09-13  Derek Price  <derek@ximbiot.com>
11969
11970         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11971         failure.
11972         Reported by Jim Meyering  <jim@meyering.net>.
11973
11974 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11975
11976         * lib/base64.c: Typo.
11977         (base64_encode): Put b64str in initialized data section.
11978
11979 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11980
11981         Merge glibc and coreutils changes into gnulib, plus a few
11982         extra fixes.
11983         * lib/md5.c: Use #error rather than a string.
11984         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11985         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11986         (__attribute__): Define to empty for non recent-GCC.
11987         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11988         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11989         Renamed from their non-__ counterparts, with new macros replacing
11990         them if not _LIBC.  Add __THROW attribute.
11991         (rol): Remove.
11992         (struct md5_ctx): Align buffer if using GCC.
11993         * lib/sha1.h (struct sha1_ctx): Likewise.
11994         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11995         The old name was backwards.
11996         (NOTSWAP): Remove; not used.
11997         (rol): New macro, moved here from md5.h.
11998         (sha1_process_block): Remove a FIXME that doesn't make sense.
11999
12000 2005-09-12  Derek Price  <derek@ximbiot.com>
12001
12002         Return usable errors from canon-host.
12003         * lib/canon-host.h: New file.
12004         * lib/canon-host.c (canon_host): Wrap...
12005         (canon_host_r): ...this new function, which now relies exclusively on
12006         getaddrinfo.
12007         (ch_strerror): New function.
12008         (last_cherror): New global.
12009         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12010         interface.
12011         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12012         void *.
12013         (freeaddrinfo): Free ai->ai_canonname when set.
12014
12015 2005-09-12  Derek Price  <derek@ximbiot.com>
12016
12017         Make canon-host require getaddrinfo.
12018         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12019         AC_LIBSOURCE canon-host.h.  Call...
12020         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12021         gl_GETADDRINFO.
12022         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12023
12024 2005-09-12  Derek Price  <derek@ximbiot.com>
12025
12026         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12027         LGPL.
12028         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12029
12030 2005-09-12  Derek Price  <derek@ximbiot.com>
12031
12032         * lib/gai_strerror.c: Include config.h when available.  Include
12033         getaddrinfo.h before other headers to test interface.
12034         Reported by Larry Jones <lawrence.jones@ugs.com>.
12035
12036 2005-09-12  Derek Price  <derek@ximbiot.com>
12037             Paul Eggert  <eggert@cs.ucla.edu>
12038
12039         * modules/glob (Files): Add glob-libc.h.
12040
12041 2005-09-12  Derek Price  <derek@ximbiot.com>
12042             Paul Eggert  <eggert@cs.ucla.edu>
12043
12044         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12045         glob_.h, glob-libc.h.
12046         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12047
12048 2005-09-12  Derek Price  <derek@ximbiot.com>
12049             Paul Eggert  <eggert@cs.ucla.edu>
12050
12051         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12052         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12053         protecting things that should be done only in gnulib contexts.
12054         * lib/glob_.h: New file, containing only the glob things needed for
12055         gnulib.
12056         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12057         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12058         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12059         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12060         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12061         and to respect the namespace rules better.
12062
12063 2005-09-08  Simon Josefsson  <jas@extundo.com>
12064
12065         * modules/socklen: New file.
12066
12067 2005-09-08  Simon Josefsson  <jas@extundo.com>
12068
12069         * m4/socklen.m4: New file.
12070
12071 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12072
12073         * modules/utimens (Files): Add m4/utimbuf.m4, since
12074         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12075         Reported by Sergey Poznyakoff.
12076
12077 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12078
12079         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12080         definitions, since that's the preferred style in glibc.
12081         Fix a minor spacing issue, and update copyright notice to match
12082         glibc's.
12083
12084 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12085
12086         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12087
12088 2005-09-06  Simon Josefsson  <jas@extundo.com>
12089
12090         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12091         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12092
12093 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12094
12095         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12096         warning.
12097
12098 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12099
12100         * config/srclist.txt: Add glibc bug 1302.
12101
12102 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12103
12104         Change bitset word type from unsigned int to unsigned long int,
12105         as this has better performance on typical 64-bit hosts.
12106         Port bitset code to hosts with unusual word sizes.
12107         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12108         (build_collating_symbol):
12109         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12110         argument is a bitset.  This is merely a style issue, but it makes
12111         it clearer that an entire array is expected.
12112         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12113         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12114         Port to the case where bitset_word is not the same as unsigned int.
12115         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12116         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12117         Likewise.
12118         * lib/regexec.c (check_dst_limits_calc_pos_1,
12119         check_subexp_matching_top):
12120         (build_trtable, group_nodes_into_DFAstates):
12121         Likewise.
12122         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12123         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12124         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12125         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12126         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12127         * lib/regcomp.c (optimize_subexps, lower_subexp):
12128         Work even if bitset_word has holes in its bitwise representation.
12129         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12130         * lib/regexec.c (check_dst_limits_calc_pos_1,
12131         check_subexp_matching_top):
12132         Likewise.
12133         * lib/regex_internal.c (re_string_reconstruct):
12134         Don't assume UCHAR_MAX == 255.
12135         * lib/regex_internal.h (bitset_set_all): Likewise.
12136         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12137         All uses changed.
12138         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12139         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12140         All uses changed.
12141         (BITSET_WORD_MAX): New macro.
12142         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12143         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12144         (bitset_empty, bitset_copy):
12145         Prefer sizeof (bitset) to multiplying it out ourselves.
12146         (bitset_not_merge): Remove; unused.
12147         (bitset_contain): Return bool, not unsigned int with one bit on.
12148         All callers changed.
12149         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12150         alignment than re_node_set; do this by defining a new internal
12151         type struct dests_alloc and using it to allocate memory.
12152
12153 2005-09-05  Bruno Haible  <bruno@clisp.org>
12154
12155         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12156         links.
12157
12158 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12159
12160         * modules/size_max (Makefile.am): Add size_max.h
12161
12162 2005-09-04  Derek Price  <derek@ximbiot.com>
12163
12164         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12165
12166 2005-09-03  Simon Josefsson  <jas@extundo.com>
12167
12168         * gnulib-tool: Fix typo.
12169
12170 2005-09-03  Simon Josefsson  <jas@extundo.com>
12171
12172         * config/srclist.txt: Add glibc bug 1293.
12173
12174 2005-09-03  Derek Price  <derek@ximbiot.com>
12175
12176         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12177         From Larry Jones <lawrence.jones@ugs.com>.
12178
12179 2005-09-02  Simon Josefsson  <jas@extundo.com>
12180
12181         * modules/socklen: New file.
12182
12183 2005-09-02  Simon Josefsson  <jas@extundo.com>
12184
12185         * modules/havelib: New module.
12186
12187         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12188         Use havelib.
12189
12190 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12191
12192         Check for arithmetic overflow when calculating sizes, to prevent
12193         some buffer-overflow issues.  These patches are conservative, in the
12194         sense that when I couldn't determine whether an overflow was possible,
12195         I inserted a run-time check.
12196         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12197         macros.
12198         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12199         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12200         (re_xnrealloc, re_x2nrealloc): New inline functions.
12201         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12202         parse_bracket_exp):
12203         (build_equiv_class, build_charclass): Check for arithmetic overflow
12204         in size expression calculations.
12205         * lib/regex_internal.c (re_string_realloc_buffers):
12206         (build_wcs_upper_buffer, re_node_set_add_intersect):
12207         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12208         (re_dfa_add_node, register_state): Likewise.
12209         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12210         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12211         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12212         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12213
12214 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12215
12216         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12217         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12218
12219 2005-09-02  Bruno Haible  <bruno@clisp.org>
12220
12221         Support for lib vs. lib64 distinction on biarch platforms.
12222         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12223         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12224         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12225
12226 2005-09-02  Bruno Haible  <bruno@clisp.org>
12227
12228         * gnulib-tool (import): In the other first-use case, provide defaults
12229         as well.
12230
12231 2005-09-02  Bruno Haible  <bruno@clisp.org>
12232
12233         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12234         patches not yet found in the latest gettext release.
12235
12236 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12237
12238         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12239         to avoid a collision with bits/local_lim.h in glibc.
12240         All uses changed.  Problem reported by Dmitry V. Levin in
12241         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12242
12243         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12244         bugs in int versus size_t comparisons.
12245         (re_string_context_at): Fix bug where the code assumed that
12246         Idx is signed.
12247
12248         Use bool where appropriate.
12249         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12250         All callers changed.
12251         (calc_eclosure_iter): Likewise, for ROOT arg.
12252         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12253         (build_charclass_op): Likewise, for NON_MATCH arg.
12254         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12255         (re_string_construct_common): Likewise, for ICASE arg.
12256         * lib/regexec.c (re_search_2_stub, re_search_stub):
12257         Likewise, for RET_LEN arg.
12258         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12259         (set_regs): Likewise, for FL_BACKTRACK arg.
12260         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12261         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12262         (calc_eclosure_iter, parse_bracket_exp):
12263         Use bool for internal variables that are booleans.
12264         * lib/regexec.c (re_search_internal, check_matching,
12265         proceed_next_node):
12266         (set_regs, build_sifted_states, sift_states_bkref):
12267         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12268         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12269         (find_collation_sequence_value):
12270         Likewise.
12271         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12272         (re_node_set_compare):
12273         Return bool, not int. All callers changed.
12274         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12275         (build_trtable, check_node_accept): Likewise.
12276         * lib/regex_internal.h: Include stdbool.h.
12277
12278         Fix bugs uncovered when converting to bool.
12279         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12280         failure instead of charging ahead blindly.
12281         * lib/regex_internal.c (register_state): Likewise.
12282         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12283         for freeing internal storage.
12284         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12285         bitset pieces used as boolean, to avoid undefined behavior
12286         on hosts that do int overflow checking.
12287
12288 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12289
12290         * config/srclist.txt: Add glibc bugs 1285-1287.
12291
12292 2005-09-01  Jim Meyering  <jim@meyering.net>
12293
12294         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12295         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12296         Require gl_STAT_MACROS, too.
12297
12298 2005-09-01  Bruno Haible  <bruno@clisp.org>
12299
12300         * gnulib-tool (import): In the first-use case, provide defaults.
12301
12302 2005-09-01  Bruno Haible  <bruno@clisp.org>
12303
12304         * gnulib-tool (func_import): Remove the .tmp files.
12305
12306 2005-09-01  Bruno Haible  <bruno@clisp.org>
12307
12308         * gnulib-tool (func_import): Fix handling of symbolic links.
12309
12310 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12311
12312         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12313         old glibc regex code mishandles strings longer than 2**31 bytes.
12314         This patch fixes this when the regex code is used in gnulib
12315         (i.e., outside glibc).
12316
12317         This patch should not affect the use of the regex code inside
12318         glibc.  No doubt this problem also needs to be handled for glibc
12319         as well, but the result will be an incompatible change to the
12320         glibc ABI, and the old ABI will have to be supported too.  That
12321         can be the the subject for another patch.
12322
12323         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12324         governing whether the rest of this patch is active.  By default,
12325         the macro is disabled and the patch has no effect.
12326         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12327         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12328         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12329         (re_match_2, re_set_registers): Use the new types.
12330         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12331         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12332         New macros.
12333         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12334         (re_string_context_at, bin_tree_t, re_dfastate_t):
12335         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12336         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12337         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12338         (re_string_char_size_at, re_string_wchar_at):
12339         (re_string_elem_size_at):
12340         Use the new types and macros to port to 64-bit hosts.
12341         Use unsigned types for internal values, so that the code
12342         mostly works even for arrays larger than SSIZE_MAX.
12343         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12344         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12345         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12346         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12347         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12348         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12349         (calc_inveclosure, parse_dup_op, build_range_exp):
12350         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12351         (fetch_number, create_token_tree, mark_opt_subexp):
12352         Likewise.
12353         * lib/regex_internal.c (re_string_construct_common,
12354         create_ci_newstate):
12355         (create_cd_newstate, re_string_allocate, re_string_construct):
12356         (re_string_realloc_buffers, build_wcs_upper_buffer):
12357         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12358         (re_string_reconstruct, re_string_peek_byte_case):
12359         (re_string_fetch_byte_case, re_string_context_at):
12360         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12361         (re_node_set_init_copy, re_node_set_add_intersect):
12362         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12363         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12364         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12365         (re_acquire_state, re_acquire_state_context, register_state):
12366         Likewise.
12367         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12368         search_cur_bkref_entry):
12369         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12370         (re_search_internal, re_search_2_stub, re_search_stub)
12371         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12372         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12373         (update_cur_sifted_state, check_dst_limits):
12374         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12375         (check_subexp_limits, sift_states_bkref, merge_state_array):
12376         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12377         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12378         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12379         (expand_bkref_cache, check_node_accept_bytes):
12380         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12381         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12382         (acquire_init_state_context, check_halt_node_context):
12383         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12384         (sift_states_backward, clean_state_log_if_needed):
12385         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12386         (find_recover_state, transit_state_sb, transit_state_mb):
12387         (transit_state_bkref, build_trtable, match_ctx_clean):
12388         Likewise.
12389         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12390         to work around an assumption that REG_MISSING is negative.
12391
12392         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12393         (seek_collating_symbol_entry) [defined _LIBC]:
12394         (lookup_collation_sequence_value) [defined _LIBC]:
12395         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12396         Use prototypes rather than old-style function definitions.
12397         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12398         (transit_state_sb) [0]:
12399         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12400
12401         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12402         rm_eo.
12403
12404         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12405         (optimize_subexps, lower_subexp):
12406         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12407         since the signed shift might overflow.  Use 1u<<31 instead.
12408         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12409         Likewise.
12410         * lib/regexec.c (check_dst_limits_calc_pos_1,
12411         check_subexp_matching_top): Likewise.
12412
12413         * lib/regcomp.c (optimize_subexps, lower_subexp):
12414         Use CHAR_BIT rather than 8, for clarity.
12415         * lib/regexec.c (check_dst_limits_calc_pos_1):
12416         (check_subexp_matching_top): Likewise.
12417         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12418         have to worry about portability issues when shifting it left.
12419         Remove no-longer-needed test for table_size > 0.
12420         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12421         in a word, as the resulting behavior is undefined.
12422         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12423         in one case, a <= should have been an <, and in another case the
12424         whole test was missing.
12425         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12426         the standard name CHAR_BIT.
12427         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12428         this is not true on one's complement and signed-magnitude hosts.
12429
12430         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12431         next_last_offset.
12432         (struct re_dfa_t): Remove unused member states_alloc.
12433         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12434
12435 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12436
12437         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12438         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12439         and large-file glibc and in 32-bit large-file Solaris.
12440
12441 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12442
12443         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12444         lengths fit in regoff_t; this isn't true if regoff_t is the same
12445         width as size_t.
12446         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12447         (= START + RANGE) instead of RANGE.  This avoids overflow
12448         problems when regoff_t is the same width as size_t.
12449         All callers changed.
12450         (re_search_2_stub): Check for overflow when adding the
12451         sizes of the two strings.
12452         (re_search_stub): Check for overflow when adding START
12453         to RANGE; if it occurs, substitute the extreme value.
12454
12455 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12456
12457         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12458
12459 2005-08-31  Jim Meyering  <jim@meyering.net>
12460
12461         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12462         a pointer-to-const.
12463         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12464         (register_state): Likewise.
12465         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12466         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12467         (group_nodes_into_DFAstates): Likewise.
12468
12469 2005-08-31  Jim Meyering  <jim@meyering.net>
12470
12471         * check-module: Add a FIXME comment.
12472
12473 2005-08-31  Eric Blake  <ebb9@byu.net>
12474
12475         * modules/unistd-safer (Files): Add unistd--.h.
12476         * modules/stdio-safer (Files): Add stdio--.h.
12477
12478 2005-08-31  Derek Price  <derek@ximbiot.com>
12479
12480         * lib/getdelim.c (getdelim): Return EOF on EOF.
12481         Reported by Larry Jones <lawrence.jones@ugs.com>.
12482
12483 2005-08-31  Bruno Haible  <bruno@clisp.org>
12484
12485         Avoid unnecessary diffs in the generated lib/Makefile.am.
12486         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12487         the generated files.
12488         (func_import): Don't set cmd.
12489
12490 2005-08-31  Bruno Haible  <bruno@clisp.org>
12491
12492         * lib/strstr.c: Include <stddef.h>, for NULL.
12493         * lib/strcasestr.c: Likewise.
12494         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12495
12496 2005-08-31  Bruno Haible  <bruno@clisp.org>
12497
12498         * gnulib-tool: New option --macro-prefix.
12499         (func_import): Use macro_prefix.
12500         (import): Handle option --macro-prefix.
12501
12502 2005-08-31  Bruno Haible  <bruno@clisp.org>
12503
12504         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12505         Also use new variables cached_lgpl, cached_libtool.
12506
12507 2005-08-31  Bruno Haible  <bruno@clisp.org>
12508
12509         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12510         always instantiating them.
12511
12512 2005-08-31  Bruno Haible  <bruno@clisp.org>
12513
12514         * gnulib-tool (func_import): Read the previous cached settings
12515         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12516         earlier added by gnulib but are now dropped. Warn when a gnulib file
12517         overwrites a non-gnulib file.
12518
12519 2005-08-31  Bruno Haible  <bruno@clisp.org>
12520
12521         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12522         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12523         projects that don't keep autogenerated files in CVS. Put into
12524         actioncmd only the specified modules, not the transitive closure.
12525
12526 2005-08-31  Bruno Haible  <bruno@clisp.org>
12527
12528         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12529         Create directories that shall be filled.
12530         (import): Don't look for gl_* macros in configure.ac. Recurse across
12531         all directories containing a gnulib-cache.m4 files, if meaningful.
12532
12533 2005-08-31  Bruno Haible  <bruno@clisp.org>
12534
12535         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12536         (import): Set seen_libtool when we see gl_LIBTOOL.
12537
12538 2005-08-31  Bruno Haible  <bruno@clisp.org>
12539
12540         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12541         declaration macro definitions from generated gnulib.m4.
12542
12543 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12544
12545         * lib/iconvme.h: Add prototype for iconv_alloc.
12546
12547 2005-08-29  Simon Josefsson  <jas@extundo.com>
12548
12549         * lib/iconvme.c: Fix errno.
12550
12551 2005-08-29  Bruno Haible  <bruno@clisp.org>
12552
12553         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12554         that it works when the directory contains spaces.
12555
12556 2005-08-29  Bruno Haible  <bruno@clisp.org>
12557
12558         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12559
12560 2005-08-29  Bruno Haible  <bruno@clisp.org>
12561
12562         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12563         Emit more advice.
12564
12565 2005-08-29  Bruno Haible  <bruno@clisp.org>
12566         and Stepan Kasal  <kasal@ucw.cz>
12567
12568         * check-module: If more parameters are given, check each of them
12569         separately; add more exceptions, as noted by Jim Meyering.
12570         (check_module): New procedure.
12571         (%exempt_header): Now contains all exceptions.
12572
12573 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12574
12575         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12576
12577 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12578
12579         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12580
12581 2005-08-28  Bruno Haible  <bruno@clisp.org>
12582
12583         * m4/gnulib-tool.m4: New file.
12584
12585 2005-08-27  Jim Meyering  <jim@meyering.net>
12586
12587         * modules/unistd-safer (Files): Add pipe-safer.c.
12588         * modules/fcntl-safer (Files): Add creat-safer.c.
12589
12590 2005-08-27  Jim Meyering  <jim@meyering.net>
12591
12592         * m4/stdlib-safer.m4: New file.  From coreutils.
12593         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12594         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12595         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12596         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12597         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12598
12599 2005-08-27  Jim Meyering  <jim@meyering.net>
12600
12601         * lib/fopen-safer.c: Merge minor changes from coreutils.
12602         * lib/dup-safer.c: Likewise.
12603         * lib/fd-safer.c: Likewise.
12604
12605         Merge from coreutils.
12606         * lib/stdio--.h: New file.
12607         * lib/stdlib--.h: New file.
12608         * lib/mkstemp-safer.c: New file.
12609
12610         GNU tar needs these.
12611         * lib/pipe-safer.c: New file.
12612         * lib/creat-safer.c: New file.
12613         * lib/fcntl--.h (creat): Define to creat_safer.
12614         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12615         * lib/unistd--.h (pipe): Define to pipe_safer.
12616         * lib/unistd-safer.h: Declare pipe_safer.
12617
12618 2005-08-26  Simon Josefsson  <jas@extundo.com>
12619
12620         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12621         Haible <bruno@clisp.org>.
12622
12623 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12624
12625         * lib/regex_internal.h: Remove all references to
12626         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12627         or better.
12628         (bitset_not, bitset_merge, bitset_not_merge):
12629         (bitset_mask, re_string_allocate, re_string_construct):
12630         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12631         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12632         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12633         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12634         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12635         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12636         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12637         (re_acquire_state_context):
12638         Remove unnecessary forward decls.
12639         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12640         Put __attribute at function definition,
12641         now that the function decl has been removed.
12642         * lib/regex_internal.c (re_string_peek_byte_case):
12643         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12644         Likewise.
12645
12646 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12647
12648         * m4/regex.m4: Add AC_PREREQ(2.50).
12649         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12650
12651 2005-08-25  Simon Josefsson  <jas@extundo.com>
12652
12653         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12654         __fsetlocking.
12655
12656 2005-08-25  Simon Josefsson  <jas@extundo.com>
12657
12658         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12659         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12660         GLIBC specific code.
12661
12662 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12663
12664         Make regex safe for g++.  This fixes one real bug (an "err"
12665         that should have been "*err").  g++ problem reported by
12666         Sam Steingold.
12667         * lib/regex_internal.h (re_calloc): New macro, consistent with
12668         re_malloc etc.  All callers of calloc changed to use re_calloc.
12669         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12670         not int.  All callers changed.
12671         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12672         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12673         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12674         (find_recover_state): Change "err" to "*err"; this fixes what
12675         appears to be a real bug.
12676         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12677         versus int.
12678
12679 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12680
12681         * modules/regex (Depends-on): Add malloc, since the code
12682         assumes that !malloc(0) means failure.
12683
12684 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12685
12686         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12687
12688         alloca modernization/simplification for regex.
12689         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12690         needs to be at the start of the file, and can be moved into
12691         regex_internal.h and simplified.
12692         * lib/regex_internal.h: Include <alloca.h>.
12693         (__libc_use_alloca) [!defined _LIBC]: New macro.
12694         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12695         now works outside glibc.
12696
12697 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12698
12699         * config/srclist.txt: Add glibc bugs 1241, 1245.
12700
12701 2005-08-25  Jim Meyering  <jim@meyering.net>
12702
12703         * lib/open-safer.c: Include <config.h>.
12704         Otherwise, we'd lose LARGEFILE support in any file using
12705         e.g. "fcntl--.h"
12706
12707 2005-08-25  Bruno Haible  <bruno@clisp.org>
12708
12709         * m4/minmax.m4: Require autoconf 2.52.
12710         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12711         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12712         alternatives of translit over the alphabet.
12713         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12714
12715 2005-08-24  Simon Josefsson  <jas@extundo.com>
12716
12717         * tests/test-getpass.c: New file.
12718
12719 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12720
12721         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12722         for GNU regex features.
12723
12724 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12725
12726         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12727         * lib/regex.h (regerror): Likewise.
12728
12729         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12730         requires this.  (The code never needed it.)
12731
12732         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12733         All uses of recently-renamed identifiers changed to use the new,
12734         POSIX-compliant names.  The code will build and run just fine
12735         without these changes, but it's better to eat our own dog food
12736         and use the standard-conforming names.
12737
12738         * lib/regex.h: Fix a multitude of POSIX name space violations.
12739         These changes have an effect only for programs that define
12740         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12741         do not change anything for programs compiled in the normal way.
12742         Also, there is no effect on the ABI.
12743
12744         (_REGEX_SOURCE): New macro.
12745         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12746         defined and _GNU_SOURCE is not; this fixes a name space violation.
12747
12748         Rename the following macros to obey POSIX requirements.
12749         The old names are still visible as macros if _REGEX_SOURCE is defined.
12750         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12751         RE_BACKSLASH_ESCAPE_IN_LISTS.
12752         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12753         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12754         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12755         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12756         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12757         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12758         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12759         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12760         (REG_INTERVALS): renamed from RE_INTERVALS.
12761         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12762         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12763         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12764         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12765         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12766         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12767         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12768         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12769         RE_UNMATCHED_RIGHT_PAREN_ORD.
12770         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12771         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12772         (REG_DEBUG): renamed from RE_DEBUG.
12773         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12774         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12775         unusual, since we can't clash with the POSIX REG_ICASE.
12776         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12777         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12778         (REG_NO_SUB): renamed from RE_NO_SUB.
12779         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12780         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12781         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12782         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12783         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12784         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12785         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12786         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12787         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12788         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12789         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12790         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12791         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12792         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12793         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12794         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12795         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12796         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12797         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12798         (REG_FIXED): Renamed from REGS_FIXED.
12799         (REG_NREGS): Renamed from RE_NREGS.
12800
12801         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12802         of other REG_* macros, since POSIX says the user is allowed to
12803         #undef these macros selectively.
12804
12805         (reg_errcode_t): Update comment stating what other tables need
12806         to be consistent.
12807
12808         Rename the following enum values to obey POSIX requirements.
12809         The old names are still visible as macros.
12810         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12811         is not defined, since GNU is supposed to be a superset of POSIX as
12812         much as possible, and since we want reg_errcode_t to be a signed
12813         type for implementation consistency.
12814         (_REG_NOERROR): Renamed from REG_NOERROR.
12815         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12816         (_REG_BADPAT): Renamed from REG_BADPAT.
12817         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12818         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12819         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12820         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12821         (_REG_EBRACK): Renamed from REG_EBRACK.
12822         (_REG_EPAREN): Renamed from REG_EPAREN.
12823         (_REG_EBRACE): Renamed from REG_EBRACE.
12824         (_REG_BADBR): Renamed from REG_BADBR.
12825         (_REG_ERANGE): Renamed from REG_ERANGE.
12826         (_REG_ESPACE): Renamed from REG_ESPACE.
12827         (_REG_BADRPT): Renamed from REG_BADRPT.
12828         (_REG_EEND): Renamed from REG_EEND.
12829         (_REG_ESIZE): Renamed from REG_ESIZE.
12830         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12831         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12832         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12833         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12834         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12835
12836         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12837         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12838         changed.  But support the old name if the new one is not defined
12839         and if _REGEX_SOURCE.
12840
12841         Change the following member names in struct re_pattern_buffer.
12842         The old names are still supported if !_REGEX_SOURCE.
12843         The new names are always supported, regardless of _REGEX_SOURCE.
12844         (re_buffer): Renamed from buffer.
12845         (re_allocated): Renamed from allocated.
12846         (re_used): Renamed from used.
12847         (re_syntax): Renamed from syntax.
12848         (re_fastmap): Renamed from fastmap.
12849         (re_translate): Renamed from translate.
12850         (re_can_be_null): Renamed from can_be_null.
12851         (re_regs_allocated): Renamed from regs_allocated.
12852         (re_fastmap_accurate): Renamed from fastmap_accurate.
12853         (re_no_sub): Renamed from no_sub.
12854         (re_not_bol): Renamed from not_bol.
12855         (re_not_eol): Renamed from not_eol.
12856         (re_newline_anchor): Renamed from newline_anchor.
12857
12858         Change the following member names in struct re_registers.
12859         The old names are still supported if !_REGEX_SOURCE.
12860         The new names are always supported, regardless of _REGEX_SOURCE.
12861         (rm_num_regs): Renamed from num_regs.
12862         (rm_start): Renamed from start.
12863         (rm_end): Renamed from end.
12864
12865         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12866         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12867         Prepend __ to parameter names.
12868
12869         Undo yesterday's changes.
12870
12871 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12872
12873         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12874         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12875         lib/regex.c.
12876
12877 2005-08-24  Jim Meyering  <jim@meyering.net>
12878
12879         Sync from coreutils.
12880         * m4/fcntl-safer.m4: New file.
12881
12882         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12883         and object files for this module.
12884
12885 2005-08-24  Jim Meyering  <jim@meyering.net>
12886
12887         Sync from coreutils.
12888         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12889
12890 2005-08-24  Jim Meyering  <jim@meyering.net>
12891
12892         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12893         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12894
12895 2005-08-24  Jim Meyering  <jim@meyering.net>
12896
12897         * modules/fcntl-safer: New module.
12898         * modules/fts (Depends-on): Add fcntl-safer.
12899         * MODULES.html.sh (File descriptor based Input/Output):
12900         Add fcntl-safer.
12901
12902 2005-08-24  Bruno Haible  <bruno@clisp.org>
12903
12904         Support for unit test modules.
12905         * modules/README: Mention tests modules.
12906         * modules/TEMPLATE-TESTS: New file.
12907         * gnulib-tool: New options --extract-tests-module, --with-tests and
12908         --tests-base (unused for the moment).
12909         (testsbase, inctests): New variables.
12910         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12911         (func_verify_module): Exclude TEMPLATE-TESTS.
12912         (func_verify_nontests_module, func_verify_tests_module): New functions.
12913         (func_get_dependencies): Add implicit dependency for tests modules.
12914         (func_get_tests_module): New function.
12915         (func_modules_transitive_closure): When --with-tests was specified,
12916         include the unit tests as well, unless explicitly avoided.
12917         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12918         (func_emit_tests_Makefile_am): New function.
12919         (func_create_testdir): When --with-tests was specified, emit a
12920         tests/ directory.
12921         * MODULES.html.sh (Future developments): Update.
12922
12923 2005-08-24  Bruno Haible  <bruno@clisp.org>
12924
12925         * modules/tls-tests: New file.
12926         * tests/test-tls.c: New file, from GNU gettext.
12927
12928 2005-08-24  Bruno Haible  <bruno@clisp.org>
12929
12930         * modules/lock-tests: New file.
12931         * tests/test-lock.c: New file, from GNU gettext.
12932
12933 2005-08-24  Bruno Haible  <bruno@clisp.org>
12934
12935         * lib/lock.h: Add multiple inclusion guard.
12936         * lib/tls.h: Add multiple inclusion guard.
12937
12938 2005-08-24  Bruno Haible  <bruno@clisp.org>
12939
12940         * gnulib-tool: Add support for the --aux-dir option to
12941         --create-testdir, --create-megatestdir, --test, --megatest.
12942         (func_create_testdir, func_create_megatestdir): Optionally emit a
12943         AC_CONFIG_AUX_DIR directive.
12944         (create-testdir, create-megatestdir, test, megatest): Provide a
12945         default value for $auxdir.
12946
12947 2005-08-24  Bruno Haible  <bruno@clisp.org>
12948
12949         * gnulib-tool (import): Use compound statement instead of subshell
12950         where possible.
12951
12952 2005-08-24  Bruno Haible  <bruno@clisp.org>
12953
12954         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12955
12956 2005-08-24  Bruno Haible  <bruno@clisp.org>
12957
12958         * gnulib-tool (func_version): Update.
12959
12960 2005-08-24  Bruno Haible  <bruno@clisp.org>
12961
12962         * gnulib-tool (func_import, func_create_testdir,
12963         func_create_megatestdir): Quote all autoconf macro arguments.
12964
12965 2005-08-24  Bruno Haible  <bruno@clisp.org>
12966
12967         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12968         option --force, because --force causes the aclocal.m4 of each
12969         subdirectory to be newer than the corresponding config.h.in.
12970
12971 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12972
12973         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12974         All contents moved to gl_REGEX.
12975         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12976         assume that it does.
12977
12978 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12979
12980         * lib/regex.h (REG_NOSYS)
12981         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12982         Define, since POSIX requires it as of 2001.
12983         (_REG_ENOSYS)
12984         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12985         New private symbol, used to keep the enum signed in all cases.
12986         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12987         Youngman in
12988         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12989
12990         * lib/regex_internal.c (re_string_skip_chars, register_state):
12991         (calc_state_hash):
12992         Remove forward decls; no longer needed now that we use prototypes.
12993         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12994         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12995         (clean_state_log_if_needed): Likewise.
12996
12997 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12998
12999         * config/srclist.txt: Add glibc bugs 1231-1233.
13000
13001 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13002
13003         Fix problems reported by Sam Steingold in
13004         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13005         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13006         assumed that reg_errcode_t is a signed type, which is not
13007         necessarily true if _XOPEN_SOURCE is not defined.
13008         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13009         since some compilers warn about it otherwise.
13010
13011 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13012
13013         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13014         (init_word_char, create_initial_state, duplicate_node_closure):
13015         (fetch_token, peek_token_bracket, build_range_exp):
13016         (build_collating_symbol): Remove forward decls; no longer needed
13017         now that we use prototypes.
13018
13019         * lib/regcomp.c:
13020         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13021         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13022         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13023         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13024         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13025         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13026         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13027         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13028         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13029         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13030         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13031         (build_charclass, build_charclass_op, fetch_number, create_tree):
13032         (create_token_tree, mark_opt_subexp, duplicate_tree):
13033         Use prototypes rather than old-style definitions.
13034
13035         * lib/regex_internal.c:
13036         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13037         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13038         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13039         (re_string_reconstruct, re_string_peek_byte_case):
13040         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13041         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13042         (re_node_set_init_copy, re_node_set_add_intersect):
13043         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13044         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13045         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13046         (re_acquire_state, re_acquire_state_context, register_state):
13047         (create_ci_newstate, create_cd_newstate, free_state):
13048         Likewise.
13049         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13050         re_search_2):
13051         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13052         (re_search_internal, prune_impossible_nodes):
13053         (acquire_init_state_context, check_matching, static):
13054         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13055         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13056         (update_regs, sift_states_backward, build_sifted_states):
13057         (clean_state_log_if_needed, merge_state_array):
13058         (update_cur_sifted_state, add_epsilon_src_nodes):
13059         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13060         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13061         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13062         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13063         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13064         (check_arrival, check_arrival_add_next_nodes):
13065         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13066         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13067         (check_node_accept_bytes, check_node_accept, extend_buffers):
13068         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13069         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13070         (sift_ctx_init):
13071         Likewise.
13072
13073         * lib/regex_internal.h:
13074         (re_string_allocate, re_string_construct, re_string_reconstruct):
13075         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13076         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13077         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13078         (re_string_context_at, re_string_peek_byte_case):
13079         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13080         is defined, since we now use prototypes always.
13081
13082         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13083         C89 or better.  All uses removed.
13084
13085 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13086
13087         * config/srclist.txt: Add glibc bugs 1220-1227.
13088
13089 2005-08-20  Jim Meyering  <jim@meyering.net>
13090
13091         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13092         of unused local, dfa.
13093
13094 2005-08-20  Bruno Haible  <bruno@clisp.org>
13095
13096         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13097
13098 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13099
13100         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13101         (re_node_set_insert_last, re_dfa_add_node):
13102         Rename local variables to avoid GCC shadowing warnings.
13103
13104 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13105
13106         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13107         [defined lint]: Suppress bogus uninitialized-variable warnings.
13108
13109         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13110         and let the caller return REG_ESPACE if out of space.  This
13111         removes an uninitialied-variable warning with GCC 4.0.1, and also
13112         avoids taking the address of a local variable.  All callers
13113         changed.
13114
13115 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13116
13117         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13118         $LIBCSRC/posix/regexec.c.
13119         Add glibc bug 1217 for regcomp.c.
13120
13121 2005-08-19  Jim Meyering  <jim@meyering.net>
13122
13123         * lib/regexec.c (proceed_next_node): Redo local variables to
13124         avoid GCC shadowing warnings.
13125
13126 2005-08-18  Bruno Haible  <bruno@clisp.org>
13127
13128         * lib/strstr.c (strstr): Fix return value in multibyte case.
13129         * lib/strcasestr.c (strcasestr): Likewise.
13130
13131 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13132
13133         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13134
13135 2005-08-17  Jim Meyering  <jim@meyering.net>
13136
13137         Make the %s format (seconds since the epoch) work for a negative
13138         number and when used with a zero-padded field width, e.g. %015s.
13139
13140         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13141         label so that it precedes the code to set `digits'.  Otherwise,
13142         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13143         print `00-22'.  Now, it prints `-0022', as it should.
13144
13145 2005-08-17  Bruno Haible  <bruno@clisp.org>
13146
13147         * modules/strstr (Files): Add m4/mbrtowc.m4.
13148         (Depends-on): Add mbuiter.
13149
13150 2005-08-17  Bruno Haible  <bruno@clisp.org>
13151
13152         * modules/strcasestr: New file.
13153         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13154         strcasestr.
13155
13156 2005-08-17  Bruno Haible  <bruno@clisp.org>
13157
13158         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13159
13160 2005-08-17  Bruno Haible  <bruno@clisp.org>
13161
13162         * modules/mbuiter: New file.
13163         * MODULES.html.sh (Extended multibyte and wide character utilities):
13164         Add mbuiter.
13165
13166 2005-08-17  Bruno Haible  <bruno@clisp.org>
13167
13168         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13169         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13170
13171 2005-08-17  Bruno Haible  <bruno@clisp.org>
13172
13173         * m4/strcasestr.m4: New file.
13174
13175 2005-08-17  Bruno Haible  <bruno@clisp.org>
13176
13177         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13178         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13179
13180 2005-08-17  Bruno Haible  <bruno@clisp.org>
13181
13182         * lib/strcasestr.h: New file.
13183         * lib/strcasestr.c: New file.
13184
13185 2005-08-17  Bruno Haible  <bruno@clisp.org>
13186
13187         * lib/strcasecmp.c: Use mbuiter.h.
13188
13189 2005-08-17  Bruno Haible  <bruno@clisp.org>
13190
13191         * lib/mbuiter.h: New file.
13192
13193 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13194
13195         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13196         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13197         and gl_GETOPT are both invoked via different paths (as happens
13198         with GNU tar CVS because it uses both argp and getopt), the former
13199         wins.
13200
13201 2005-08-16  Bruno Haible  <bruno@clisp.org>
13202
13203         * modules/tls: New file.
13204         * MODULES.html.sh (Multithreading): Add tls.
13205
13206 2005-08-16  Bruno Haible  <bruno@clisp.org>
13207
13208         * modules/strnlen1: New file.
13209         * MODULES.html.sh (String handling): Add strnlen1.
13210
13211 2005-08-16  Bruno Haible  <bruno@clisp.org>
13212
13213         * modules/strcase (Files): Add m4/mbrtowc.m4.
13214         (Depends-on): Add strnlen1, mbchar.
13215
13216 2005-08-16  Bruno Haible  <bruno@clisp.org>
13217
13218         * modules/mbiter: New file.
13219         * MODULES.html.sh (Extended multibyte and wide character utilities):
13220         Add mbiter.
13221
13222 2005-08-16  Bruno Haible  <bruno@clisp.org>
13223
13224         * modules/mbfile: New file.
13225         * MODULES.html.sh (Extended multibyte and wide character utilities):
13226         Add mbfile.
13227
13228 2005-08-16  Bruno Haible  <bruno@clisp.org>
13229
13230         * modules/mbchar: New file.
13231         * MODULES.html.sh (Extended multibyte and wide character utilities):
13232         New section.
13233
13234 2005-08-16  Bruno Haible  <bruno@clisp.org>
13235
13236         * m4/tls.m4: New file, from GNU gettext.
13237
13238 2005-08-16  Bruno Haible  <bruno@clisp.org>
13239
13240         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13241         always.
13242         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13243
13244 2005-08-16  Bruno Haible  <bruno@clisp.org>
13245
13246         * m4/mbiter.m4: New file.
13247
13248 2005-08-16  Bruno Haible  <bruno@clisp.org>
13249
13250         * m4/mbfile.m4: New file.
13251
13252 2005-08-16  Bruno Haible  <bruno@clisp.org>
13253
13254         * m4/mbchar.m4: New file.
13255
13256 2005-08-16  Bruno Haible  <bruno@clisp.org>
13257
13258         * lib/tls.h: New file, from GNU gettext.
13259         * lib/tls.c: New file, from GNU gettext.
13260
13261 2005-08-16  Bruno Haible  <bruno@clisp.org>
13262
13263         * lib/strnlen1.h: New file.
13264         * lib/strnlen1.c: New file.
13265
13266 2005-08-16  Bruno Haible  <bruno@clisp.org>
13267
13268         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13269         (mbi_init): Update.
13270         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13271         NUL byte, not after it.
13272
13273 2005-08-16  Bruno Haible  <bruno@clisp.org>
13274
13275         * lib/strcase.h (strcasecmp): Add note in comments.
13276         * lib/strncasecmp.c: Use code from strcasecmp.c.
13277         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13278         (strcasecmp): Work correctly in multibyte locales.
13279
13280 2005-08-16  Bruno Haible  <bruno@clisp.org>
13281
13282         * lib/mbiter.h: New file.
13283
13284 2005-08-16  Bruno Haible  <bruno@clisp.org>
13285
13286         * lib/mbfile.h: New file.
13287
13288 2005-08-16  Bruno Haible  <bruno@clisp.org>
13289
13290         * lib/mbchar.h: New file.
13291         * lib/mbchar.c: New file.
13292
13293 2005-08-16  Bruno Haible  <bruno@clisp.org>
13294
13295         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13296         the valid ones. Makes the comparison operations transitive:
13297         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13298         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13299
13300 2005-08-15  Simon Josefsson  <jas@extundo.com>
13301
13302         * modules/ssize_t (License): Change to 'unlimited'.
13303
13304         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13305
13306 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13307
13308         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13309         Add comments for each pending glibc patch.
13310
13311 2005-08-15  Bruno Haible  <bruno@clisp.org>
13312
13313         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13314         __cplusplus is defined.
13315
13316 2005-08-14  Jim Meyering  <jim@meyering.net>
13317
13318         Sync from coreutils.
13319
13320         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13321         Use the hash-table-based cycle-detection code not just when
13322         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13323         Reported by James Youngman in
13324         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13325         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13326         FTS_TIGHT_CYCLE_CHECK.
13327         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13328         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13329         once again.
13330         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13331         * lib/fts.c (fd_safer): Remove decl.
13332         Include fcntl--.h rather than unistd-safer.h
13333         (fts_safe_changedir): Don't call fd_safer; no longer needed
13334         now that we include fcntl--.h.
13335
13336 2005-08-12  Simon Josefsson  <jas@extundo.com>
13337
13338         * modules/getndelim2: Use ssize_t module.
13339         * modules/getnline: Likewise.
13340         * modules/safe-read: Likewise.
13341         * modules/xreadlink: Likewise.
13342
13343         * modules/ssize_t: New file.
13344
13345 2005-08-12  Simon Josefsson  <jas@extundo.com>
13346
13347         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13348
13349 2005-08-12  Simon Josefsson  <jas@extundo.com>
13350
13351         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13352         ssize_t.
13353
13354 2005-08-12  Simon Josefsson  <jas@extundo.com>
13355
13356         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13357         readline, getdelim and check_version.
13358         (Support for systems lacking ISO C 99: Sizes of integer types):
13359         Add size_max.
13360
13361 2005-08-12  Bruno Haible  <bruno@clisp.org>
13362
13363         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13364
13365 2005-08-11  Simon Josefsson  <jas@extundo.com>
13366
13367         * modules/readline: New file.
13368
13369         * modules/strnlen (Files): Add strnlen.h.
13370
13371 2005-08-11  Simon Josefsson  <jas@extundo.com>
13372
13373         * m4/readline.m4: New file.
13374
13375 2005-08-11  Simon Josefsson  <jas@extundo.com>
13376
13377         * lib/readline.h, readline.c: New file.
13378
13379 2005-08-11  Simon Josefsson  <jas@extundo.com>
13380
13381         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13382         gl_AVOID.
13383
13384 2005-08-11  Bruno Haible  <bruno@clisp.org>
13385
13386         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13387
13388 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13389
13390         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13391
13392 2005-08-10  Simon Josefsson  <jas@extundo.com>
13393
13394         * tests/test-iconvme.c: New file.
13395
13396 2005-08-10  Simon Josefsson  <jas@extundo.com>
13397
13398         * m4/strnlen.m4: New file.
13399
13400         * m4/strndup.m4: Don't check for strnlen declaration, done in
13401         strnlen.m4.
13402
13403 2005-08-10  Simon Josefsson  <jas@extundo.com>
13404
13405         * lib/strndup.c: Use strnlen.h.
13406
13407         * lib/strnlen.h: New file.
13408
13409 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13410
13411         * README: Typos.
13412
13413 2005-08-02  Simon Josefsson  <jas@extundo.com>
13414
13415         * modules/readline: New file.
13416
13417 2005-08-02  Simon Josefsson  <jas@extundo.com>
13418
13419         * modules/getdelim: New file.
13420
13421         * modules/getline: Rewrite, don't use getndelim2.
13422
13423 2005-08-02  Simon Josefsson  <jas@extundo.com>
13424
13425         * m4/getline.m4: Separate out getdelim stuff into separate module.
13426
13427         * m4/getdelim.m4: New file.
13428
13429 2005-08-02  Simon Josefsson  <jas@extundo.com>
13430
13431         * lib/getline.h, getline.c: Rewrite.
13432
13433         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13434
13435 2005-07-31  Bruno Haible  <bruno@clisp.org>
13436
13437         * lib/lock.h (gl_lock_initializer): New macro.
13438         (gl_lock_define_initialized): Use it.
13439         (gl_rwlock_initializer): New macro.
13440         (gl_rwlock_define_initialized): Use it.
13441         (gl_recursive_lock_initializer): New macro.
13442         (gl_recursive_lock_define_initialized): Use it.
13443
13444 2005-07-30  Karl Berry  <karl@gnu.org>
13445
13446         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13447         Report from Ben Pfaff, regarding getopt.
13448
13449 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13450
13451         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13452         normal way.
13453         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13454         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13455         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13456         (gl_GETOPT): Use the new macros.  Most of the implementation
13457         is moved to the new macros.  This is for programs like Emacs
13458         that don't want all the functionality of gl_GETOPT.
13459
13460 2005-07-26  Bruno Haible  <bruno@clisp.org>
13461
13462         * m4/lock.m4: Update from GNU gettext.
13463
13464 2005-07-26  Bruno Haible  <bruno@clisp.org>
13465
13466         * lib/lock.h: Update from GNU gettext.
13467         * lib/lock.c: Update from GNU gettext.
13468
13469 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13470
13471         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13472         obsolescent AC_TRY_RUN.  Include the default includes files, for
13473         'exit'.
13474
13475 2005-07-24  Bruno Haible  <bruno@clisp.org>
13476
13477         * modules/visibility: New file.
13478         * MODULES.html.sh (Misc): Add visibility.
13479
13480 2005-07-24  Bruno Haible  <bruno@clisp.org>
13481
13482         * m4/visibility.m4: New file.
13483
13484 2005-07-24  Bruno Haible  <bruno@clisp.org>
13485
13486         * doc/visibility.texi: New file.
13487
13488 2005-07-22  Bruno Haible  <bruno@clisp.org>
13489
13490         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13491         $(ALLOCA_H), redundant through BUILT_SOURCES.
13492         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13493         redundant through BUILT_SOURCES.
13494         * modules/byteswap (Makefile.am): Remove explicit dependency on
13495         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13496         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13497         $(FNMATCH_H), redundant through BUILT_SOURCES.
13498         * modules/getopt (Makefile.am): Remove explicit dependency on
13499         $(GETOPT_H), redundant through BUILT_SOURCES.
13500         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13501         redundant through BUILT_SOURCES.
13502         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13503         redundant through BUILT_SOURCES.
13504         * modules/stdbool (Makefile.am): Remove explicit dependency on
13505         $(STDBOOL_H), redundant through BUILT_SOURCES.
13506         * modules/stdint (Makefile.am): Remove explicit dependency on
13507         $(STDINT_H), redundant through BUILT_SOURCES.
13508         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13509         Remove explicit dependency on $(SYSEXITS_H).
13510         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13511
13512 2005-07-18  Simon Josefsson  <jas@extundo.com>
13513
13514         * lib/check-version.c (check_version): Accept identical versions too.
13515
13516 2005-07-18  Bruno Haible  <bruno@clisp.org>
13517
13518         * modules/lock: New file.
13519         * MODULES.html.sh (Multithreading): New section.
13520
13521 2005-07-18  Bruno Haible  <bruno@clisp.org>
13522
13523         * m4/lock.m4: New file, from GNU gettext.
13524
13525 2005-07-18  Bruno Haible  <bruno@clisp.org>
13526
13527         * lib/lock.h: New file, from GNU gettext.
13528         * lib/lock.c: New file, from GNU gettext.
13529
13530 2005-07-18  Bruno Haible  <bruno@clisp.org>
13531
13532         * lib/lock.h (gl_once_t): New type.
13533         (gl_once_define, gl_once): New macros.
13534         * lib/lock.c (fresh_once): New variable.
13535         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13536         functions.
13537
13538 2005-07-16  Simon Josefsson  <jas@extundo.com>
13539
13540         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13541         workaround, suggested by Bruno.
13542
13543 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13544
13545         * modules/xalloc (Depends-on): Add xalloc-die.
13546         * modules/xvasprintf (Depends-on): Add xalloc-die.
13547
13548 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13549
13550         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13551         with a minor change.
13552
13553 2005-07-15  Bruno Haible  <bruno@clisp.org>
13554
13555         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13556         When using lib/poll.c, define poll as rpl_poll.
13557
13558 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13559
13560         * modules/argp (Depends-on): Remove unlocked-io.
13561
13562 2005-07-14  Derek Price  <derek@ximbiot.com>
13563
13564         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13565         for glob symlink bug.
13566
13567 2005-07-14  Bruno Haible  <bruno@clisp.org>
13568
13569         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13570         Instead, test for *_unlocked function declarations directly.
13571
13572 2005-07-11  Simon Josefsson  <jas@extundo.com>
13573
13574         * modules/size_max: New file.
13575
13576         * modules/xsize: Depend on size_max module for size_max.m4.
13577
13578 2005-07-11  Simon Josefsson  <jas@extundo.com>
13579
13580         * lib/size_max.h: New file.
13581
13582 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13583
13584         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13585         copyright symbol and the year.
13586         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13587         (version_etc_va): Use parameterized copyright notice.
13588         Reword to conform to the current GNU coding standards.
13589
13590 2005-07-11  Karl Berry  <karl@gnu.org>
13591
13592         * doc/gnulib.texi (Quoting): new node.
13593         (Initial import): more info, from Patrice.
13594
13595 2005-07-11  Bruno Haible  <bruno@clisp.org>
13596
13597         * gnulib-tool (func_usage): Document option --avoid.
13598         (Command line options): Handle --avoid.
13599         (func_acceptable): New function.
13600         (func_modules_transitive_closure): Use it.
13601
13602 2005-07-11  Bruno Haible  <bruno@clisp.org>
13603
13604         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13605         Reported by Jim Meyering.
13606
13607 2005-07-10  Bruno Haible  <bruno@clisp.org>
13608
13609         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13610         Needed when size_t is smaller than 'unsigned int'.
13611         Reported by Paul Eggert.
13612
13613 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13614
13615         * modules/argp (Depends-on): Add unlocked-io
13616
13617 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13618
13619         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13620         block of defines.
13621
13622 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13623
13624         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13625         fix now.
13626
13627 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13628         and Paul Eggert  <eggert@cs.ucla.edu>
13629
13630         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13631         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13632
13633 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13634
13635         * modules/regex (Files): Add lib/regex_internal.c,
13636         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13637         (Depends-on): Add extensions.
13638         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13639
13640 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13641
13642         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13643         pathconf.
13644         * m4/same.m4 (gl_SAME): Likewise.
13645         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13646
13647         * m4/regex.m4: Adjust to new libc regex implementation.
13648         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13649         all the .c and .h parts of (the new) regex.
13650         Quote the m4 stuff better.
13651         Check for RE_ICASE bug of old gnulib.
13652         Check for REG_STARTEND of recent libc.
13653         Rename local variables from jm_* to gl_*.
13654         Quote operand of "test -f".
13655         Say "recent enough" version of libc, not "version 2".
13656         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13657         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13658         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13659         Remove check for btowc, isascii.
13660         Require AM_LANGINFO_CODESET.
13661
13662 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13663
13664         * lib/regex.c, regex.h: Sync from libc.
13665         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13666         * lib/regexec.c:
13667         New files, synced from libc, except that regex_internal.h
13668         currently has a small porting fix.
13669
13670 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13671
13672         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13673         regex_internal.c, regexec.c.
13674         Add regex_internal.h too, but as a comment, since the libc version
13675         is currently broken in gnulib mode.
13676
13677 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13678
13679         Support programs like Emacs that use gnulib but not gettext.
13680         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13681         * modules/gettext-h: New file.
13682         * modules/gettext (Files): Remove lib/gettext.h.
13683         (Depends-on): Add gettext-h.
13684         (Makefile.am): Remove lib_SOURCES.
13685         * modules/argmatch, modules/c-stack, modules/closeout:
13686         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13687         * modules/execute, modules/file-type, modules/getaddrinfo:
13688         * modules/getopt, modules/human, modules/javacomp:
13689         * modules/javaexec, modules/mkdir-p, modules/obstack:
13690         * modules/openat, modules/pagealign_alloc, modules/pipe:
13691         * modules/quotearg, modules/regex, modules/rpmatch:
13692         * modules/unicodeio, modules/userspec, modules/version-etc:
13693         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13694         * modules/xsetenv:
13695         Depend on gettext-h, not gettext.
13696
13697 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13698
13699         * gnulib-tool (func_import): Add support for 'public domain' license.
13700         * modules/alloca, modules/atexit, modules/memmove:
13701         Now public domain, not GPL.
13702         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13703         * modules/realloc, modules/strerror, modules/strtod:
13704         Now LGPL, not GPL.
13705
13706 2005-07-05  Bruno Haible  <bruno@clisp.org>
13707
13708         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13709         autoconf CVS. Needed for mingw.
13710
13711 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13712
13713         Remove the dependency of the strftime module on the tzset module.
13714         * modules/strftime (Depends-on): Remove dependency on tzset.
13715
13716 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13717
13718         Remove the dependency of the strftime module on the tzset module.
13719         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13720         gl_FUNC_TZSET_CLOBBER.
13721
13722 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13723
13724         Remove the dependency of the strftime module on the tzset module.
13725         * lib/strftime.c (my_strftime)
13726         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13727         Copy the input structure, to work around some of the bug with
13728         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13729         Solaris releases, you should also use the tzset module, but we won't
13730         require it as a dependency any more since we don't want LGPLed code
13731         to depend on GPLed code.
13732
13733 2005-07-02  Jim Meyering  <jim@meyering.net>
13734
13735         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13736         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13737         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13738         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13739
13740 2005-07-02  Jim Meyering  <jim@meyering.net>
13741
13742         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13743
13744 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13745
13746         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13747         declares only 'struct timespec;' (!).
13748
13749 2005-07-01  Jim Meyering  <jim@meyering.net>
13750
13751         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13752         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13753         * lib/save-cwd.c, tempname.c:
13754         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13755         and don't include <sys/file.h>).
13756
13757 2005-06-29  Jim Meyering  <jim@meyering.net>
13758
13759         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13760         type name.  Use the variable name instead.
13761         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13762         Likewise.
13763
13764 2005-06-28  Simon Josefsson  <jas@extundo.com>
13765
13766         * modules/check-version (Files): Add check-version.m4.
13767
13768 2005-06-28  Simon Josefsson  <jas@extundo.com>
13769
13770         * m4/check-version.m4: New file, suggested by Jim Meyering
13771         <jim@meyering.net>.
13772
13773 2005-06-28  Simon Josefsson  <jas@extundo.com>
13774
13775         * lib/check-version.h, lib/check-version.c: New files.
13776
13777 2005-06-28  Simon Josefsson  <jas@extundo.com>
13778
13779         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13780         collision with global variable.  Better indentation.  Don't
13781         increment buffer pointer beyond buffer end.  Based on comments
13782         from Paul Eggert <eggert@cs.ucla.edu>.
13783
13784         * lib/base64.h: Indent.
13785
13786 2005-06-28  Simon Josefsson  <jas@extundo.com>
13787
13788         * doc/gnulib.texi (Library version handling): New section.
13789
13790 2005-06-28  Jim Meyering  <jim@meyering.net>
13791
13792         * check-module (find_included_lib_files): Hard-code another
13793         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13794         but modules/fts-lgpl (correctly) does not list those files.
13795
13796         * modules/canonicalize (Files): Add lib/pathmax.h.
13797
13798 2005-06-25  Simon Josefsson  <jas@extundo.com>
13799
13800         * modules/check-version: New file.
13801
13802 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13803
13804         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13805         initializer of struct addrinfo, as an indication that we don't
13806         care how many members the structure has.
13807
13808 2005-06-24  Derek Price  <derek@ximbiot.com>
13809         and Bruno Haible  <bruno@clisp.org>
13810
13811         Remove stat module & update lstat.
13812         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13813         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13814         * m4/stat.m4: Remove this file.
13815
13816 2005-06-24  Derek Price  <derek@ximbiot.com>
13817         and Bruno Haible  <bruno@clisp.org>
13818
13819         Remove stat module & update lstat.
13820         * lib/stat.c: Remove this file...
13821         (slash_aware_lstat): ...moving this content and its support...
13822         * lib/lstat.c (rpl_lstat): ...into here.
13823         * lib/lstat.h: New file.
13824
13825 2005-06-24  Derek Price  <derek@ximbiot.com>
13826         and Bruno Haible  <bruno@clisp.org>
13827
13828         Remove stat module & update lstat.
13829         * config/srclist.txt (libc sources): Remove stat.
13830
13831 2005-06-24  Derek Price  <derek@ximbiot.com>
13832         and Bruno Haible  <bruno@clisp.org>
13833
13834         Remove stat module & update lstat.
13835         * MODULES.html.sh (stat): Remove.
13836         * MODULES.html: Regenerated.
13837         * modules/lstat (Description): Correct function name.
13838         (Files): Add "lstat.h".
13839         (Depends-on): Remove stat, add xalloc, stat-macros.
13840         * modules/stat: Remove this file.
13841         (Include): Add "lstat.h", remove <sys/stat.h>.
13842
13843 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13844
13845         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13846         (ranged_convert): Don't save conversion in a temporary struct.
13847         This causes a warning with GCC 4.0.0, and anyway in the typical
13848         case it's not worth the extra 100 bytes or so of code.
13849         (ranged_convert, __mktime_internal): When calling a function via a
13850         pointer P, use P () rather than (*P) (), as we now assume C89 or
13851         better.
13852
13853 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13854
13855         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13856         "who -r" failed to give output.  Problem reported by Tim Waugh.
13857
13858         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13859         (xcalloc): Use it to avoid needless tests.
13860         Problem reported by Jim Meyering.
13861
13862 2005-06-20  Derek Price  <derek@ximbiot.com>
13863
13864         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13865         unnecessary for Autoconfs > 2.59c.
13866
13867 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13868
13869         * lib/argp.h (__option_is_short): Check upper limit of
13870         __key. Isprint() requires its argument to have the value
13871         of an unsigned char or EOF.
13872
13873 2005-06-16  Jim Meyering  <jim@meyering.net>
13874
13875         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13876         when either N or S is zero.
13877
13878 2005-06-16  Derek Price  <derek@ximbiot.com>
13879
13880         * m4/bison.m4: Declare YACC & YFLAGS precious.
13881
13882 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13883
13884         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13885         multibyte string or pattern, fall back on unibyte matching.
13886         Problem reported by James Youngman.
13887
13888 2005-06-08  Bruno Haible  <bruno@clisp.org>
13889
13890         * modules/csharpcomp: New file.
13891         * MODULES.html.sh (C#): Add csharpcomp.
13892
13893 2005-06-08  Bruno Haible  <bruno@clisp.org>
13894
13895         * m4/csharpcomp.m4: New file, from GNU gettext.
13896
13897 2005-06-08  Bruno Haible  <bruno@clisp.org>
13898
13899         * lib/csharpcomp.h: New file, from GNU gettext.
13900         * lib/csharpcomp.c: New file, from GNU gettext.
13901         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13902
13903 2005-06-08  Bruno Haible  <bruno@clisp.org>
13904
13905         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13906         warning on mingw.
13907
13908 2005-06-07  Derek Price  <derek@ximbiot.com>
13909
13910         Sync from CVS.
13911         * lib/glob_.h: Indent nested #ifdef.
13912
13913 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13914
13915         Sync from coreutils.
13916         Use "file name" when talking about file names, instead of "filename"
13917         or "path", as per the GNU coding standards.
13918         * lib/mkdir-p.c: Renamed from makepath.c.
13919         (make_dir_parents): Renamed from make_path.  All callers changed.
13920         * lib/mkdir-p.h: Likewise.  All includers changed.
13921         * lib/filenamecat.c: Renamed from path-concat.c.
13922         (file_name_concat): Renamed from path_concat.  All callers changed.
13923         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13924         * lib/filenamecat.h: Likewise.  All includers changed.
13925         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13926         in comments or local variable names.
13927         * lib/basename.c: Likewise.
13928         * lib/canonicalize.c, canonicalize.h: Likewise.
13929         * lib/dirname.c, dirname.h: Likewise.
13930         * lib/euidaccess.c: Likewise.
13931         * lib/exclude.c: Likewise
13932         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13933         * lib/fsusage.c, fsuage.h: Likewise.
13934         * lib/fts.c, fts_.h: Likewise.
13935         * lib/getcwd.c: Likewise.
13936         * lib/getloadavg.c: Likewise.
13937         * lib/mkstemp.c: Likewise.
13938         * lib/mountlist.c, mountlist.h: Likewise.
13939         * lib/openat.c, openat.h: Likewise.
13940         * lib/readlink-stub.c: Likewise.
13941         * lib/readutmp.c, readutmp.h: Likewise.
13942         * lib/rename.c: Likewise.
13943         * lib/rmdir.c: Likewise.
13944         * lib/same.c: Likewise.
13945         * lib/savedir.c: Likewise.
13946         * lib/stripslash.c: Likewise.
13947         * lib/tempname.c: Likewise.
13948         * lib/xreadlink.c: Likewise.
13949         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13950         All uses changed.
13951         * lib/exclude.h: Likewise.
13952
13953         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13954         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13955         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13956         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13957         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13958         files have been getting away with it for years (MORE/BSD 4.3
13959         is extinct now).
13960         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13961         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13962
13963         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13964         Define to 256, not 255, as per modern POSIX.
13965
13966 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13967
13968         Sync from coreutils.
13969         Use "file name" when talking about file names, instead of "filename"
13970         or "path", as per the GNU coding standards.
13971         * MODULES.html.sh: mkdir-p renamed from makepath.
13972         filenamecat renamed from path-concat.
13973         * modules/filenamecat: Renamed from modules/path-concat.
13974         (Files): filenamecat.h and filenamecat.c renamed from
13975         path-concat.h and path-concat.c.
13976         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13977         (Include): filenamecat.h, not path-concat.h.
13978         * modules/mkdir-p: Renamed from modules/makepath.
13979         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13980         makepath.c.
13981         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13982         (Include): mkdir-p.h, not makepath.h.
13983
13984 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13985
13986         Sync from coreutils.
13987         * m4/mkdir-p.m4: Renamed from makepath.m4.
13988         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13989         Rename files from makepath.c to mkdir-p.c, and from
13990         makepath.h to mkdir-p.h.
13991         * m4/filenamecat.m4: Renamed from path-concat.m4.
13992         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13993         Rename files from path-concat.c to filenamecat.c,
13994         and from path-concat.h to filenamecat.h.
13995         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13996         "file name" in local variables or comments.
13997         * m4/rename.m4: Likewise.
13998
13999 2005-06-01  Bruno Haible  <bruno@clisp.org>
14000
14001         * modules/csharpexec: New file.
14002         * MODULES.html.sh (C#): New section.
14003
14004 2005-06-01  Bruno Haible  <bruno@clisp.org>
14005
14006         * m4/csharp.m4: New file, from GNU gettext.
14007         * m4/csharpexec.m4: New file, from GNU gettext.
14008
14009 2005-06-01  Bruno Haible  <bruno@clisp.org>
14010
14011         * lib/csharpexec.h: New file, from GNU gettext.
14012         * lib/csharpexec.c: New file, from GNU gettext.
14013         * lib/csharpexec.sh.in: New file, from GNU gettext.
14014
14015 2005-05-31  Derek Price  <derek@ximbiot.com>
14016             Paul Eggert  <eggert@cs.ucla.edu>
14017
14018         Sync from cvs.
14019         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14020
14021 2005-05-31  Derek Price  <derek@ximbiot.com>
14022             Paul Eggert  <eggert@cs.ucla.edu>
14023
14024         Sync from cvs.
14025         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14026
14027 2005-05-29  Derek Price  <derek@ximbiot.com>
14028
14029         * config/srclist.txt (glob_.h, glob.c): Add these files.
14030
14031 2005-05-29  Derek Price  <derek@ximbiot.com>
14032
14033         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14034         * modules/glob: New file.
14035         * modules/getlogin_r: Add link to POSIX spec in description.
14036
14037 2005-05-29  Derek Price  <derek@ximbiot.com>
14038             Paul Eggert  <eggert@cs.ucla.edu>
14039
14040         * m4/glob.m4: New file.
14041
14042 2005-05-29  Derek Price  <derek@ximbiot.com>
14043             Paul Eggert  <eggert@cs.ucla.edu>
14044
14045         * lib/glob_.h, lib/glob.c: New files.
14046
14047 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14048
14049         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14050         * modules/fts-lgpl (Depends-on): Remove gettext.
14051
14052 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14053
14054         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14055         and don't require gt_INTTYPES_PRI.
14056
14057 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14058
14059         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14060
14061         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14062         the configuration hassle isn't worth it.
14063         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14064         (LONGEST_MODIFIER, PRIuMAX): Remove.
14065
14066 2005-05-27  Bruno Haible  <bruno@clisp.org>
14067
14068         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14069
14070 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14071
14072         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14073         _POSIX_PTHREAD_SEMANTICS for Solaris.
14074
14075 2005-05-25  Derek Price  <derek@ximbiot.com>
14076
14077         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14078
14079 2005-05-25  Derek Price  <derek@ximbiot.com>
14080             Paul Eggert  <eggert@cs.ucla.edu>
14081
14082         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14083         * lib/getlogin_r.c, getlogin_r.h: New files.
14084
14085 2005-05-25  Bruno Haible  <bruno@clisp.org>
14086             Derek Price  <derek@ximbiot.com>
14087
14088         * lib/getlogin_r.h: Simplify API documentation.
14089
14090 2005-05-23  Derek Price  <derek@ximbiot.com>
14091
14092         * modules/minmax (Files): Add m4/minmax.m4.
14093         (configure.ac): Add gl_MINMAX.
14094
14095 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14096
14097         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14098         so that unistd-safer.h (GPL'ed code) need not be included.
14099
14100 2005-05-22  Bruno Haible  <bruno@clisp.org>
14101
14102         * m4/minmax.m4: New file.
14103         Based on a patch by Derek Price <derek@ximbiot.com>.
14104
14105 2005-05-22  Bruno Haible  <bruno@clisp.org>
14106
14107         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14108         (INT64_MIN): Fix definition.
14109         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14110
14111         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14112         NEED_SIGNED_INT_TYPES.
14113
14114         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14115         HAVE_SYSTEM_INTTYPES.
14116
14117 2005-05-22  Bruno Haible  <bruno@clisp.org>
14118
14119         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14120         Also include <sys/param.h> if it defines MIN, MAX.
14121         Based on a patch by Derek Price <derek@ximbiot.com>.
14122
14123 2005-05-21  Jim Meyering  <jim@meyering.net>
14124
14125         * modules/fts (Files): Add m4/inttypes-pri.m4.
14126         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14127
14128 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14129
14130         New fts module.
14131         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14132         (setup_dir, free_dir): New functions.
14133         (enter_dir, leave_dir): Define trivial
14134         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14135         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14136         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14137         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14138         Move to fts-cycle.c.
14139         (fts_open): Use setup_dir.
14140         (fts_close): Use free_dir.
14141         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14142         This adds a label and some gotos, but the alternatives were messier.
14143         Check for memory allocation failure when entering a dir.
14144         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14145         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14146         (FTS): New member fts_cycle, that is a union that contains the
14147         old active_dir_ht and cycle_state.  All uses changed to mention
14148         fts_cycle.ht and fts_cycle.state.
14149         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14150         fts.c, with the following changes:
14151         (setup_dir, free_dir): New functions.
14152         (enter_dir): Now returns bool.  Return true if successful, false
14153         if memory exhausted.  All callers changed.
14154         Do not bother partly cleaning up on
14155         memory allocation failure; that is free_dir's job.
14156         However, free ad if hash_insert fails, to avoid memory leak.
14157         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14158         fts->fts_options to see which union member to use.
14159
14160 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14161
14162         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14163         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14164
14165 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14166
14167         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14168
14169 2005-05-20  Jim Meyering  <jim@meyering.net>
14170
14171         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14172         Now a macro, to pacify GCC.
14173
14174 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14175
14176         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14177         of -1.
14178
14179 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14180
14181         * lib/chown.c (rpl_chown): Return -1 on failure.
14182
14183 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14184
14185         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14186         Don't check for stddef.h.
14187         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14188         don't use its results.
14189         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14190         since we include them unconditionally.  Don't require
14191         AM_STDBOOL_H, since stdbool is a prerequisite.
14192         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14193         since we assume C89 or better.
14194         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14195         as we don't use their results.
14196         Don't check for fchdir, memmove, memset, strrchr, as we use
14197         them unconditionally.
14198         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14199         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14200
14201 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14202
14203         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14204         Include <stddef.h> unconditionally, since we assume C89 now.
14205         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14206         * lib/fts.c: Include fts_.h first, to check interface.
14207         Do not include intprops.h; no longer needed.
14208         Include cycle-check.h and hash.h, since fts_.h no longer does.
14209         Remove unnecessary casts of closedir to void.
14210         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14211         decide whether to decrement nlinks.
14212         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14213         (FTS): Use struct hash_table * instead of Hash_table, so that
14214         we no longer need to include hash.h here.
14215
14216 2005-05-18  Jim Meyering  <jim@meyering.net>
14217
14218         * modules/dirfd (License): Change to LGPL.  Most of the code
14219         is already in the public domain.
14220
14221 2005-05-18  Jim Meyering  <jim@meyering.net>
14222
14223         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14224         Reported by Yoann Vandoorselaere.
14225
14226 2005-05-17  Jim Meyering  <jim@meyering.net>
14227
14228         * m4/fts.m4: New file, from coreutils.
14229
14230 2005-05-17  Jim Meyering  <jim@meyering.net>
14231
14232         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14233
14234 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14235
14236         Sync from coreutils.
14237         * m4/unlinkdir.m4: New file.
14238
14239 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14240
14241         Sync from coreutils.
14242         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14243         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14244         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14245         White space changes only.
14246         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14247         special.
14248         * lib/yesno.c: Include getline.h, not ctype.h.
14249         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14250         Use getline to remove arbitrary restriction on response length.
14251
14252 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14253
14254         * config/srclist-update: Spell out "Street" in FSF postal
14255         mail address; this is the style the FSF seems to prefer.
14256
14257         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14258         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14259         this updates FSF postal mail address.
14260
14261         Sync from coreutils.
14262         * modules/unlinkdir: New file.
14263         * modules/yesno (Depends-on): Add getline.
14264         * MODULES.html.sh (File system functions): Add unlinkdir.
14265
14266 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14267
14268         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14269         lib/strsep.h:
14270         Change the initial comment to refer to GPL, not LGPL.
14271         gnulib-tool will change it to LGPL as needed.
14272
14273         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14274         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14275         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14276         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14277         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14278         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14279         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14280         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14281         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14282         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14283         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14284         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14285         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14286         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14287         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14288         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14289         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14290         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14291         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14292         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14293         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14294         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14295         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14296         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14297         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14298         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14299         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14300         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14301         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14302         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14303         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14304         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14305         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14306         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14307         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14308         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14309         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14310         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14311         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14312         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14313         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14314         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14315         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14316         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14317         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14318         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14319         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14320         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14321         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14322         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14323         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14324         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14325         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14326         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14327         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14328         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14329         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14330         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14331         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14332         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14333         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14334         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14335         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14336         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14337         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14338         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14339         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14340         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14341         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14342         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14343         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14344         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14345         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14346         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14347         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14348         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14349         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14350         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14351         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14352         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14353         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14354         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14355         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14356         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14357         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14358         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14359         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14360         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14361         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14362         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14363         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14364         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14365         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14366         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14367         lib/yesno.c, lib/yesno.h:
14368         Update FSF postal mail address.
14369
14370 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14371
14372         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14373         tests/test-memmem.c, tests/test-stpncpy.c:
14374         Update FSF postal mail address.
14375
14376 2005-05-13  Bruno Haible  <bruno@clisp.org>
14377
14378         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14379         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14380         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14381         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14382         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14383         Add support for 64-bit integers in the MSVC compiler.
14384
14385 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14386
14387         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14388
14389 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14390
14391         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14392
14393 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14394
14395         * doc/getdate.texi (General date syntax): Don't say that date
14396         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14397         Problem reported by Nic Ferrier.
14398
14399 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14400
14401         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14402         specified in ai_socktype. Fix invalid ai_protocol
14403         check. ai_protocol is usually set to 0 or depending on
14404         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14405         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14406         ai_socktype / ai_protocol in the returned addrinfo structure.
14407
14408 2005-05-10  Simon Josefsson  <jas@extundo.com>
14409
14410         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14411         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14412
14413 2005-05-10  Karl Berry  <karl@gnu.org>
14414
14415         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14416         (from http://www.gnu.org/licenses).
14417         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14418         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14419         fdl.texi suffices.
14420
14421 2005-05-10  Karl Berry  <karl@gnu.org>
14422
14423         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14424         (COPYING.DOC): remove.
14425
14426         * config/srclist-update: new FSF address.
14427
14428 2005-05-10  Derek Price  <derek@ximbiot.com>
14429
14430         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14431         possible.
14432
14433 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14434             Bruno Haible  <bruno@clisp.org>
14435
14436         * modules/inet_ntop: New file.
14437         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14438         inet_ntop.
14439
14440 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14441             Bruno Haible  <bruno@clisp.org>
14442
14443         * m4/inet_ntop.m4: New file.
14444
14445 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14446             Bruno Haible  <bruno@clisp.org>
14447
14448         * lib/inet_ntop.h: New file.
14449         * lib/inet_ntop.c: New file, from glibc with modifications.
14450
14451 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14452
14453         * modules/time_r (License): Change to LGPL.
14454         * modules/extensions (License): Change to LGPL.  Actually,
14455         the license is more permissive than that, but currently gnulib-tool
14456         doesn't know how to handle more-permissive licenses.
14457
14458         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14459         Problem reported by Dave Love.
14460
14461 2005-05-08  Jim Meyering  <jim@meyering.net>
14462
14463         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14464         blank.
14465
14466 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14467
14468         * modules/argmatch (Depends-on): Add stdbool.
14469         * modules/backupfile (Depends-on): Likewise.
14470         * modules/chdir-long (Depends-on): Likewise.
14471         * modules/closeout (Depends-on): Likewise.
14472         * modules/cycle-check (Depends-on): Likewise.
14473         * modules/dirname (Depends-on): Likewise.
14474         * modules/fnmatch (Depends-on): Likewise.
14475         * modules/fsusage (Depends-on): Likewise.
14476         * modules/fwriteerror (Depends-on): Likewise.
14477         * modules/getcwd (Depends-on): Likewise.
14478         * modules/getloadavg (Depends-on): Likewise.
14479         * modules/hard-locale (Depends-on): Likewise.
14480         * modules/makepath (Depends-on): Likewise.
14481         * modules/mountlist (Depends-on): Likewise.
14482         * modules/nanosleep (Depends-on): Likewise.
14483         * modules/posixtm (Depends-on): Likewise.
14484         * modules/quotearg (Depends-on): Likewise.
14485         * modules/readtokens (Depends-on): Likewise.
14486         * modules/readtokens0 (Depends-on): Likewise.
14487         * modules/readutmp (Depends-on): Likewise.
14488         * modules/save-cwd (Depends-on): Likewise.
14489         * modules/strftime (Depends-on): Likewise.
14490         * modules/userspec (Depends-on): Likewise.
14491         * modules/utimecmp (Depends-on): Likewise.
14492         * modules/xgetcwd (Depends-on): Likewise.
14493         * modules/xnanosleep (Depends-on): Likewise.
14494         * modules/xstrtod (Depends-on): Likewise.
14495         * modules/yesno (Depends-on): Likewise.
14496
14497 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14498
14499         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14500         needless checks.
14501
14502 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14503
14504         Merge from coreutils.  Among other things,
14505         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14506         * lib/fd-safer.c: New file.
14507         * lib/fcntl-safer.h, open-safer.c: Remove.
14508         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14509         * lib/dup-safer.c: Include unistd-safer.h first.
14510         Don't include errno.h.
14511         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14512         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14513         * lib/file-type.c: Rely on file-type.h change.
14514         * lib/getloadavg.c: Include unistd-safer.h.
14515         (getloadavg): Use safer open.
14516         * lib/getusershell.c: Include "stdio-safer.h".
14517         (getusershell): Use safer fopen.
14518         * lib/long-options.c (long_options): Use NULL rather than 0.
14519         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14520         'free'.
14521         * lib/modechange.c: Likewise.
14522         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14523         (MODE_DONE): New constant.
14524         (struct mode_change): Remove 'next' member.
14525         (make_node_op_equals): New function; like the old one of the
14526         same name, except it allocates an array.
14527         (mode_compile, mode_create_from_ref): Use it.
14528         (mode_compile): Allocate result as an array, not a linked list.
14529         Parse octal string ourself, so that we catch mistakes like "+0".
14530         (mode_adjust): Arg is an array, not a linked list.
14531         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14532         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14533         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14534         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14535         Remove.  This is now stat-macros.h's job.
14536         (talloc): Remove.  All callers replaced by xalloc, so that
14537         our invokers don't have to worry about reporting memory failures.
14538         (make_node_op_equals): Remove.
14539         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14540         New constants.
14541         (struct mode_change): Moved here from modechange.h.
14542         (mode_append_entry): Remove.
14543         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14544         apps to have incorrect behavior.  Use simpler algorithm for head
14545         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14546         Detect more invalid usages rather than having somewhat-random behavior.
14547         Don't insert an "a=" action, as that leads to incorrect behavior.
14548         (mode_compile, mode_create_from_ref): Return NULL on error instead
14549         of an enum, since now there's only one way to have an error.  All
14550         callers changed.
14551         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14552         at the correct time.  Simplify calculation of "+u" and its ilk.
14553         Don't mishandle "+X".
14554         (mode_free): Remove "register" and localize decls.
14555         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14556         (struct mode_change): Move to modechange.c; callers don't
14557         need to see this stuff.
14558         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14559         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14560         (mode_change, mode_adjust): Reflect the new signatures noted above.
14561         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14562         that might redefine system include files.
14563         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14564         (my_usleep): Use NULL rather than (void *) 0.
14565         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14566         Use siginterrupt to specify that system calls should be interrupted.
14567         (rpl_nanosleep): Move initialization of suspended closer to call of
14568         my_usleep.
14569         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14570         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14571         (desirable_utmp_entry): New function.
14572         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14573         using x2nrealloc, to simplify logic.
14574         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14575         size calculation.  Do not assume utmp file is a regular file.
14576         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14577         (READ_UTMP_CHECK_PIDS): New constant.
14578         * lib/save-cwd.c: Include unistd-safer.h.
14579         (save_cwd): Use fd_safer.
14580         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14581         [!_LIBC] Include "stat-macros.h" instead.
14582         * lib/unistd-safer.h (fd_safer): New decl.
14583
14584 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * modules/getloadavg (Depends-on): Add unistd-safer.
14587         * modules/getusershell (Depends-on): Add stdio-safer.
14588         * modules/lstat (Depends-on): Remove xalloc.
14589         * modules/mkstemp (Depends-on): Add stat-macros.
14590         * modules/modechange (Depends-on): Remove xstrtol.
14591         Add stat-macros, xalloc.
14592         * modules/save-cwd (Depends-on): Add unistd-safer.
14593         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14594         * modules/unistd-safer (Files): Add lib/fd-safer.c
14595         (Makefile.am): Remove lib_SOURCES.
14596
14597         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14598         Remove fcntl-safer; unistd-safer supersedes it.
14599
14600 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14601
14602         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14603         AC_HEADER_STAT.
14604         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14605         (gl_PREREQ_CHOWN): Remove.
14606         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14607         it.  Don't require AC_HEADER_STAT.
14608         (gl_PREREQ_LSTAT): Remove.
14609         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14610         Don't require AC_HEADER_STAT.
14611         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14612         (gl_PREREQ_RMDIR): Remove.
14613         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14614         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14615         the stat-macros module a prerequisite.
14616         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14617         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14618         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14619         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14620         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14621         variable names.
14622         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14623         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14624         variable prefixes.
14625         * m4/fcntl-safer.m4: Remove.
14626         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14627         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14628         Invoke gl_PREREQ_FD_SAFER.
14629         (gl_PREREQ_FD_SAFER): New macro.
14630         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14631         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14632         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14633         Remove duplicate call to AC_LIBOBJ(readutmp).
14634         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14635
14636         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14637         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14638
14639 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14640
14641         * MODULES.html.sh (Misc): Add byteswap.
14642
14643 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14644
14645         * modules/getcwd (Depends-on): Add extensions.
14646         * modules/openat (Depends-on): Likewise.
14647
14648 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14649
14650         * modules/byteswap: New file.
14651
14652 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14653
14654         * m4/byteswap.m4: New file.
14655
14656 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14657
14658         * lib/byteswap_.h: New file.
14659
14660 2005-04-25  Karl Berry  <karl@gnu.org>
14661
14662         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14663
14664 2005-04-25  Albert Chin  <china@thewrittenword.com>
14665
14666         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14667         Toolkit C bug.
14668
14669 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14670
14671         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14672         (func_ln_if_changed) Remove forcibly for no error message
14673         in case file does not exist.
14674
14675 2005-04-19  Simon Josefsson  <jas@extundo.com>
14676
14677         * gnulib-tool (Options): Make --symlink mean --symbolic.
14678
14679 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14680
14681         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14682
14683 2005-04-16  Simon Josefsson  <jas@extundo.com>
14684
14685         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14686
14687 2005-04-15  Simon Josefsson  <jas@extundo.com>
14688
14689         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14690
14691 2005-04-15  Simon Josefsson  <jas@extundo.com>
14692
14693         * gnulib-tool: Rename --symlink to --symbolic.
14694
14695 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14696
14697         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14698         symbolic links to files instead of copying/moving.  Add --aux-dir,
14699         specifying directory relative --dir where auxiliary build tools
14700         are placed.
14701
14702 2005-04-14  Bruno Haible  <bruno@clisp.org>
14703
14704         * modules/allocsa (License): Change to LGPL.
14705         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14706
14707 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14708
14709         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14710         that "UTC +1 second" continues to work.  Problem reported
14711         by Dmitry V. Levin.
14712         (relunit_snumber): New rule.
14713         (relunit): Use it.
14714
14715 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * lib/getdate.y (universal_time_zone_table): New constant.
14718         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14719         universal_time_zone_table.
14720         (lookup_zone): Prefer universal_time_zone_table to
14721         local_time_zone_table, so that "GMT" time stamps are allowed in
14722         London during the summer.  Problem reported by Ian Abbott.
14723
14724 2005-04-12  Jim Meyering  <jim@meyering.net>
14725
14726         * lib/human.c (humblock): Set *options even when returning due to
14727         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14728         warning from gcc-4.
14729
14730 2005-04-09  Jim Meyering  <jim@meyering.net>
14731
14732         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14733         -Wuninitialized: initialize tm0.tm_year.
14734
14735 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14736
14737         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14738         count, since there's no maximum.  All uses changed.
14739         Add member dsts_seen.
14740         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14741         not being INT_MAX.
14742         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14743         Use pc_rels_seen to decide whther a date is absolute.
14744
14745         * lib/getdate.y (number): Don't overwrite year.
14746         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14747         check.
14748
14749 2005-04-02  Simon Josefsson  <jas@extundo.com>
14750
14751         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14752         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14753
14754 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14755
14756         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14757         where no absolute path name can be longer than PATH_MAX.
14758
14759 2005-03-27  Jim Meyering  <jim@meyering.net>
14760
14761         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14762
14763 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14764
14765         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14766         "one's complement" -> "ones' complement" in comment, as per Knuth.
14767         "value of type" -> "type or expression" in comment.
14768         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14769
14770 2005-03-26  Jim Meyering  <jim@meyering.net>
14771
14772         Comment nits.
14773         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14774         Correct typos: s/or/of/.
14775
14776 2005-03-26  Jim Meyering  <jim@meyering.net>
14777
14778         * modules/check-include-files: Move to ../ and rename to...
14779         * check-module: ...this.
14780
14781 2005-03-25  Jim Meyering  <jim@meyering.net>
14782
14783         * modules/xvasprintf (Files): Add xalloc.h.
14784
14785 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14786
14787         * modules/gettext (Files): config/config.rpath ->
14788         build-aux/config.rpath
14789         * modules/iconv (Files): Likewise.
14790         Problem reported by Oskar Liljeblad.
14791
14792 2005-03-23  Jim Meyering  <jim@meyering.net>
14793
14794         * modules/check-include-files: New script to check for
14795         missing dependencies, multiple includes, etc.
14796
14797         * modules/c-strtold (Depends-on): Add xalloc.
14798         * modules/c-strtod (Depends-on): Add xalloc.
14799         * modules/hash (Depends-on): Add xalloc.
14800         (Files): Remove lib/xalloc.h.
14801
14802         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14803         * modules/userspec (Files): Add lib/inttostr.h.
14804
14805 2005-03-23  Jim Meyering  <jim@meyering.net>
14806
14807         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14808
14809 2005-03-22  Jim Meyering  <jim@meyering.net>
14810
14811         * modules/stat-macros: New module.
14812         * modules/canonicalize, modules/euidaccess, modules/file-type,
14813         * modules/filemode, modules/lchown, modules/makepath,
14814         * modules/rmdir, modules/stat: Depend on new stat-macros module
14815         rather than listing lib/stat-macros.h manually.
14816         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14817
14818 2005-03-22  Jim Meyering  <jim@meyering.net>
14819
14820         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14821
14822 2005-03-22  Bruno Haible  <bruno@clisp.org>
14823
14824         * config/srclist.txt: Replace target directory 'config' with
14825         'build-aux'.
14826         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14827         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14828         ../build-aux/.
14829
14830 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14831
14832         * modules/chdir-long (Depends-on): Add mempcpy.
14833
14834         * modules/acl, modules/backupfile, modules/c-strtod,
14835         modules/c-strtold, modules/canon-host, modules/canonicalize,
14836         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14837         modules/exclude, modules/exitfail, modules/file-type,
14838         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14839         modules/getdate, modules/getline, modules/getpagesize,
14840         modules/getpass, modules/getugroups, modules/group-member,
14841         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14842         modules/inttostr, modules/long-options, modules/makepath,
14843         modules/md5, modules/memcasecmp, modules/memcoll,
14844         modules/modechange, modules/mountlist, modules/path-concat,
14845         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14846         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14847         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14848         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14849         modules/strftime, modules/strndup, modules/strverscmp,
14850         modules/timespec, modules/unlocked-io, modules/userspec,
14851         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14852         modules/yesno:
14853         Remove lib_SOURCES line from Makefile.am section, as this is now
14854         done automatically by the corresponding Autoconf macro.
14855
14856 2005-03-21  Jim Meyering  <jim@meyering.net>
14857
14858         Changes imported from coreutils.
14859
14860         * lib/cycle-check.c: Don't include xalloc.h.
14861
14862         * lib/path-concat.c: Don't include assert.h.
14863         (path_concat): Remove assertion that would have triggered
14864         for ABASE starting with more than one slash.
14865         Reported by Andreas Schwab.
14866
14867         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14868         properly when ABASE is an absolute file name.
14869         Correct the description of this function.
14870         Include <assert.h>.
14871         Add an assertion and a test driver.
14872         This fixes a bug introduced on 2004-07-02.
14873         Andreas Schwab reported the resulting failure of cp --parents:
14874         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14875
14876 2005-03-21  Jim Meyering  <jim@meyering.net>
14877
14878         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14879         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14880
14881 2005-03-21  Jim Meyering  <jim@meyering.net>
14882         and  Paul Eggert  <eggert@cs.ucla.edu>
14883
14884         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14885         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14886         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14887         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14888         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14889         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14890         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14891         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14892         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14893         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14894         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14895         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14896         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14897         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14898         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14899         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14900         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14901         for these modules.
14902
14903 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14906         (which shouldn't happen), generate nothing instead of returning 0
14907         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14908
14909 2005-03-16  Bruno Haible  <bruno@clisp.org>
14910
14911         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14912         HAVE_LONGLONG_64BIT.
14913
14914 2005-03-16  Bruno Haible  <bruno@clisp.org>
14915
14916         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14917         HAVE_LONGLONG_64BIT.
14918
14919 2005-03-16  Bruno Haible  <bruno@clisp.org>
14920
14921         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14922         HAVE_LONGLONG_64BIT.
14923
14924 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14925
14926         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14927         reliably distinguish strftime failure from empty output on POSIX
14928         hosts.
14929
14930 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14931
14932         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14933         (iconv_string): Don't guess a size-zero buffer, as that might cause
14934         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14935         result would be 'too large', where 'too large' is (heuristically)
14936         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14937         overflow concerns.  This will prevent some unwanted malloc failures
14938         when the inputs are very large.
14939
14940 2005-03-15  Karl Berry  <karl@gnu.org>
14941
14942         * config/srclist.txt (config.rpath): from gettext.
14943         * config/config.rpath: update.
14944
14945 2005-03-15  Bruno Haible  <bruno@clisp.org>
14946
14947         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14948         to 'negate'.
14949
14950         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14951         variable.
14952
14953         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14954         results.
14955
14956 2005-03-14  Simon Josefsson  <jas@extundo.com>
14957
14958         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14959         <fx@gnu.org>.
14960
14961 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14962
14963         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14964         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14965         intprops.h.
14966         * lib/strtol.c: Likewise.
14967
14968 2005-03-14  Jim Meyering  <jim@meyering.net>
14969
14970         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14971         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14972         to be nonzero so that we (and caller) can detect the difference
14973         between a valid zero-length expansion and an error return, even
14974         when the underlying strftime fails before writing anything into
14975         that location.
14976
14977 2005-03-14  Bruno Haible  <bruno@clisp.org>
14978
14979         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14980         Update from GNU gettext 0.14.3.
14981
14982 2005-03-10  Jim Meyering  <jim@meyering.net>
14983
14984         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14985
14986 2005-03-10  Jim Meyering  <jim@meyering.net>
14987
14988         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14989         so that this module works on systems without fchdir.
14990
14991 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14992
14993         Factor int-properties macros into a single file, except for
14994         glibc-related files.
14995         * lib/intprops.h: New file.
14996         * lib/getloadavg.c: Include it instead of limits.h.
14997         (INT_STRLEN_BOUND): Remove.
14998         * lib/human.c: Include intprops.h.
14999         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15000         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15001         302/1000.
15002         * lib/inttostr.h: Include intprops.h instead of limits.h.
15003         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15004         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15005         for consistency with intprops.h.
15006         (time_t_is_integer, twos_complement_arithmetic): Use them.
15007         * lib/sig2str.h: Include <signal.h>, intprops.h.
15008         (INT_STRLEN_BOUND): Remove.
15009         * lib/strftime.c (TYPE_SIGNED): Remove.
15010         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15011         * lib/strtol.c: Adjust comments to match intprops.h.
15012         * lib/userspec.c: Include intprops.h.
15013         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15014         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15015         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15016         instead of rolling our own expressions.
15017         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15018
15019         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15020         instead of int.
15021         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15022         the right thing even if adding 1900 would overflow.  Similarly
15023         for tm_mon + 1 and tm_yday + 1.
15024         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15025         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15026         (DO_SIGNED_NUMBER): New macro.
15027         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15028
15029 2005-03-07  Bruno Haible  <bruno@clisp.org>
15030
15031         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15032
15033 2005-03-07  Bruno Haible  <bruno@clisp.org>
15034
15035         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15036
15037 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15038
15039         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15040         (func_import): Only replace files via --import when they have actually
15041         changed.
15042
15043 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15044
15045         * m4/mmap-anon.m4: New file.
15046         * m4/pagealign_alloc.m4: New file.
15047
15048 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15049             Bruno Haible  <bruno@clisp.org>
15050
15051         * modules/pagealign_alloc: New file.
15052         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15053
15054 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15055             Bruno Haible  <bruno@clisp.org>
15056
15057         * lib/pagealign_alloc.h: New file.
15058         * lib/pagealign_alloc.c: New file.
15059
15060 2005-03-03  Bruno Haible  <bruno@clisp.org>
15061
15062         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15063         Use an all-permissive copyright notice, recommended by RMS.
15064
15065 2005-03-02  Bruno Haible  <bruno@clisp.org>
15066
15067         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15068         of AIX, the replacement has to be done only after <string.h> is
15069         included, therefore not in config.h. stpncpy.h does the replacement,
15070         and stpncpy.c uses it.
15071
15072 2005-03-02  Bruno Haible  <bruno@clisp.org>
15073
15074         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15075         stpncpy.c uses it.
15076
15077 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15078
15079         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15080         The workaround isn't strictly needed for POSIX conformance, and
15081         it's too much of a pain to configure and maintain.  We'll ask
15082         people to fix their kernels instead.
15083         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15084         (NANOSLEEP_BUG_WORKAROUND): Remove.
15085         (xnanosleep): Remove the workaround.
15086
15087 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15088
15089         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15090         Reported by Derek Price.
15091         (Include): Add "timespec.h".
15092
15093         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15094
15095 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15096
15097         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15098         to detect nanosleep bug.
15099
15100 2005-03-01  Bruno Haible  <bruno@clisp.org>
15101
15102         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15103
15104 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15105
15106         * modules/gethrxtime: New file.
15107         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15108         (Depends-on): Add gethrxtime.
15109         (configure.ac): Add gl_XNANOSLEEP.
15110         (Makefile.am): Remove lib_SOURCES line.
15111
15112 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15113
15114         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15115         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15116
15117 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15120         * lib/timespec.h (gettime): Return void, since it always
15121         succeeds now.  All uses changed.
15122         * lib/gettime.c (gettime) Likewise.
15123         [HAVE_NANOTIME]: Prefer nanotime.
15124         Assume gettimeofday succeeds, as POSIX requires.
15125         Assime time () succeeds, since other code already does.
15126         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15127         (timespec_subtract): Remove.
15128         (NANOSLEEP_BUG_WORKAROUND): New constant.
15129         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15130         things considerably.  Use it only on GNU/Linux hosts, since the
15131         workaround shouldn't be needed elsewhere.
15132
15133 2005-02-24  Bruno Haible  <bruno@clisp.org>
15134
15135         * modules/gettext (Files): Add m4/glibc2.m4.
15136
15137 2005-02-24  Bruno Haible  <bruno@clisp.org>
15138
15139         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15140         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15141         * m4/progtest.m4:
15142         Update from GNU gettext 0.14.2.
15143         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15144
15145 2005-02-24  Bruno Haible  <bruno@clisp.org>
15146
15147         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15148         * lib/config.charset: Update from GNU gettext 0.14.2.
15149
15150 2005-02-24  Bruno Haible  <bruno@clisp.org>
15151
15152         * lib/gettext.h: Update from GNU gettext 0.14.2.
15153
15154 2005-02-23  Simon Josefsson  <jas@extundo.com>
15155
15156         * m4/iconvme.m4: New file.
15157
15158 2005-02-23  Jim Meyering  <jim@meyering.net>
15159
15160         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15161         change.
15162         Thanks to Bruno Haible for catching it.
15163
15164 2005-02-22  Simon Josefsson  <jas@extundo.com>
15165
15166         * modules/iconvme: New file.
15167
15168         * MODULES.html.sh: Add iconvme.
15169
15170 2005-02-22  Simon Josefsson  <jas@extundo.com>
15171
15172         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15173
15174 2005-02-22  Simon Josefsson  <jas@extundo.com>
15175
15176         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15177
15178 2005-02-22  Jim Meyering  <jim@meyering.net>
15179
15180         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15181         s/ifndef/ifdef/.
15182
15183 2005-02-20  Neil Conway  <neilc@samurai.com>
15184
15185         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15186         returned by OSX/Darwin if the specified buffer is not large
15187         enough for the hostname.
15188
15189 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15190
15191         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15192         pass it to _help, otherwise the latter coredumps trying to
15193         dereference state.root_argp.
15194
15195 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15196
15197         * modules/chdir-long (Depends-on): Add memrchr.
15198         * modules/memrchr (Files): Add lib/memrchr.h.
15199         (Include): "memrchr.h".
15200
15201 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15202
15203         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15204
15205 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15206
15207         * lib/memrchr.h: New file.
15208         * lib/chdir-long.c: Include it.
15209         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15210         Don't bother including stddef.h.
15211
15212 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15213
15214         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15215         inclusion.
15216         Include <sys/types.h>, for dev_t.
15217         (ME_DUMMY, ME_REMOTE): Move from here....
15218         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15219         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15220         Dmitry V. Levin.
15221         Include mountlist.h first, to test the interface.
15222
15223 2005-01-29  Bruno Haible  <bruno@clisp.org>
15224
15225         * lib/progname.c (program_name): Initialize.
15226         Needed when linking statically on MacOS X.
15227
15228 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15229
15230         Sync from coreutils.
15231         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15232         (Depends-on): Add c-strtod.
15233         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15234
15235 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15236
15237         Sync from coreutils.
15238         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15239
15240         Remove files that are specific to coreutils.
15241         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15242
15243 2005-01-28  Bruno Haible  <bruno@clisp.org>
15244
15245         * modules/javacomp: New file.
15246         * MODULES.html.sh (Java): Add javacomp.
15247
15248 2005-01-28  Bruno Haible  <bruno@clisp.org>
15249
15250         * m4/javacomp.m4: New file, from GNU gettext.
15251
15252 2005-01-28  Bruno Haible  <bruno@clisp.org>
15253
15254         * lib/javacomp.sh.in: New file, from GNU gettext.
15255         * lib/javacomp.h: New file, from GNU gettext.
15256         * lib/javacomp.c: New file, from GNU gettext.
15257
15258 2005-01-26  Simon Josefsson  <jas@extundo.com>
15259
15260         * lib/gai_strerror.c: Use GPL in header.
15261
15262 2005-01-26  Bruno Haible  <bruno@clisp.org>
15263
15264         * modules/javaexec: New file.
15265         * MODULES.html.sh (Java): Add javaexec.
15266
15267 2005-01-26  Bruno Haible  <bruno@clisp.org>
15268
15269         * m4/javaexec.m4: New file, from GNU gettext.
15270
15271 2005-01-26  Bruno Haible  <bruno@clisp.org>
15272
15273         * lib/javaexec.sh.in: New file, from GNU gettext.
15274         * lib/javaexec.h: New file, from GNU gettext.
15275         * lib/javaexec.c: New file, from GNU gettext.
15276
15277 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15278
15279         * modules/lchown (Depends-on): Remove lchown.h
15280
15281 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15282
15283         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15284         must be defined if the header file was not found, in order
15285         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15286
15287 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15288
15289         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15290         initializers for struct pentry_state.
15291         (__argp_error): Check return value of __asprintf
15292         (__argp_failure): Translate error message
15293
15294         * lib/argp-parse.c: Removed braces around the expansion of N_()
15295
15296 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15297
15298         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15299         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15300         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15301         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15302         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15303         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15304         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15305         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15306         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15307         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15308         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15309         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15310         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15311         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15312         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15313         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15314         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15315         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15316         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15317         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15318         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15319         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15320         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15321         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15322         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15323         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15324         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15325         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15326         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15327         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15328         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15329         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15330         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15331         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15332         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15333         Use an all-permissive copyright notice, recommended by RMS.
15334
15335 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15336
15337         * modules/chdir-long (Depends-on): Remove mempcpy.
15338
15339 2005-01-21  Jim Meyering  <jim@meyering.net>
15340
15341         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15342         same value as for Solaris 9.
15343
15344         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15345         component length.  This included changing the parameter to be
15346         of type `char *' rather than `char const *'.
15347         * lib/chdir-long.h (chdir_long): Update prototype.
15348
15349         * lib/openat.c (fdopendir, fstatat): New functions.
15350         * lib/openat.h: Include headers required for use of DIR and struct
15351         stat.
15352         [AT_SYMLINK_NOFOLLOW]: Define.
15353         (fdopendir, fstatat): Add prototypes.
15354
15355 2005-01-21  Bruno Haible  <bruno@clisp.org>
15356
15357         * modules/classpath: New file.
15358         * MODULES.html.sh (Java): Add classpath.
15359
15360 2005-01-21  Bruno Haible  <bruno@clisp.org>
15361
15362         * lib/classpath.h: New file, from GNU gettext.
15363         * lib/classpath.c: New file, from GNU gettext.
15364
15365 2005-01-20  Simon Josefsson  <jas@extundo.com>
15366
15367         * modules/version-etc-fsf: New file.
15368
15369 2005-01-20  Simon Josefsson  <jas@extundo.com>
15370
15371         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15372         * lib/version-etc.c: Remove version_etc_copyright.
15373         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15374         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15375
15376 2005-01-20  Simon Josefsson  <jas@extundo.com>
15377
15378         * lib/base64.h (isbase64): Add.
15379
15380         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15381         using a unsigned prototype, don't inline.
15382         (base64_decode): Use it.
15383
15384 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15385
15386         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15387         it.
15388
15389 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15390
15391         * lib/save-cwd.c (save_cwd): Remove code to support the case
15392         where fchdir is missing or flaky.
15393
15394 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15395
15396         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15397
15398 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15399
15400         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15401         AC_LIBSOURCES now does this.
15402         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15403         with new ullong_max module.
15404
15405 2005-01-19  Bruno Haible  <bruno@clisp.org>
15406
15407         * modules/sh-quote: New file.
15408         * MODULES.html.sh (Executing programs): Add sh-quote.
15409
15410 2005-01-19  Bruno Haible  <bruno@clisp.org>
15411
15412         * lib/sh-quote.h: New file, from GNU gettext.
15413         * lib/sh-quote.c: New file, from GNU gettext.
15414
15415 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15416
15417         Merge from coreutils.
15418         * m4/ullong_max.m4: New file.
15419         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15420         (gl_MACROS): Assume localeconv exists.
15421
15422 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15423
15424         Merge changes from coreutils, as described below in several
15425         changelogs dated today.
15426
15427         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15428         (O_DIRECTORY): Remove; not needed here, since "." must be
15429         a directory.  All uses removed.
15430         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15431         universal on Suns, and we also need to test for IRIX.
15432         Revamp code to use 'if' rather than '#if'.
15433         Avoid unnecessary comparison of cwd->desc to 0.
15434
15435         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15436         for known valid error numbers rather than observed invalid ones.
15437
15438 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15439
15440         * modules/ullong_max: New file.
15441
15442         * modules/chdir-long, modules/openat: New files.
15443         * modules/save-cwd (Depends-on): Depend on chdir-long.
15444         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15445
15446 2005-01-18  Jim Meyering  <jim@meyering.net>
15447
15448         Merge from coreutils.
15449         * m4/chdir-long.m4, m4/openat.m4: New files.
15450         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15451         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15452         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15453         is sane and DOES follow symlinks.  Besides, testing 20 different
15454         systems found no broken chown implementations.
15455         Prompted by a change in rsync's copy of this macro.
15456         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15457
15458         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15459
15460         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15461         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15462         NULL-means-set-to-current-time semantics.
15463         Remove temporary file immediately, rather than waiting
15464         for configure's at-exit trap code to do it.
15465
15466 2005-01-18  Jim Meyering  <jim@meyering.net>
15467
15468         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15469
15470         * lib/utimens.c (futimens): Account for the fact that futimes
15471         can also fail with errno == ENOSYS or errno == ENOENT.
15472         Patch from Dmitry V. Levin.
15473
15474         Change the name of the robust chdir function from chdir to chdir_long.
15475         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15476         (restore_cwd): Use chdir_long, not chdir.
15477         * lib/chdir-long.c: Renamed from chdir.c.
15478         * lib/chdir-long.h: Renamed from chdir.h.
15479         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15480         Hurd.
15481
15482 2005-01-18  Bruno Haible  <bruno@clisp.org>
15483
15484         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15485         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15486         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15487         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15488         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15489         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15490         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15491         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15492         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15493         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15494         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15495         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15496         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15497         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15498         Use an all-permissive copyright notice, recommended by RMS.
15499
15500 2005-01-18  Bob Proulx  <bob@proulx.com>
15501
15502         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15503         simplify offsetof() macro construct to avoid compile failure with
15504         native HP-UX 11.0 ANSI C compiler.
15505
15506 2005-01-17  Bruno Haible  <bruno@clisp.org>
15507
15508         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15509         redundant because stpncpy.m4 takes care of it.
15510
15511 2005-01-17  Bruno Haible  <bruno@clisp.org>
15512
15513         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15514
15515 2005-01-17  Bruno Haible  <bruno@clisp.org>
15516
15517         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15518         used.
15519
15520 2005-01-17  Bruno Haible  <bruno@clisp.org>
15521
15522         * lib/fwriteerror.h (fwriteerror): Change specification to include
15523         fclose.
15524         * lib/fwriteerror.c: Include <stdbool.h>.
15525         (fwriteerror): At the end, close the file stream. Record whether
15526         stdout was already closed.
15527
15528 2005-01-17  Bruno Haible  <bruno@clisp.org>
15529
15530         * lib/execute.c (environ): Declare if needed.
15531         * lib/pipe.c (environ): Likewise.
15532         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15533
15534 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15535
15536         * modules/argp: Depend on vsnprintf
15537
15538 2005-01-10  Jim Meyering  <jim@meyering.net>
15539
15540         * modules/closeout (Depends-on): Add atexit.
15541
15542 2005-01-06  Bruno Haible  <bruno@clisp.org>
15543
15544         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15545
15546 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15547
15548         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15549         definitions to be after all include files, to avoid collisions.
15550         Problem reported by Bob Proulx.
15551
15552 2005-01-04  Jim Meyering  <jim@meyering.net>
15553
15554         Changes imported from coreutils.
15555         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15556         as the mkstemp template, use a temporary directory and an
15557         8.3-friendly template to avoid trouble on systems like DJGPP.
15558         Reported by Juan M. Guerrero via Stepan Kasal.
15559         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15560         close. Remove the temporary directory right away, rather than waiting
15561         for configure's at-exit trap code to do it.
15562         Suggestion from Stepan Kasal.
15563
15564 2005-01-01  Simon Josefsson  <jas@extundo.com>
15565
15566         * gnulib-tool: Print #include directives when --import'ing.
15567
15568 2004-12-28  Simon Josefsson  <jas@extundo.com>
15569
15570         * tests/test-base64.c: Include required header files.  Remove
15571         unused variables.
15572
15573 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         * modules/error (Depends-on): Remove gettext.
15576
15577 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15578
15579         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15580         not needed.  This removes a dependency on the gettext module.
15581         [defined _LIBC]: Do not include <libintl.h>; not needed.
15582
15583 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15584
15585         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15586         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15587
15588 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15589
15590         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15591         HAVE_DECL_STRTOLD.
15592
15593 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15594
15595         * modules/getdate (Depends-on): Remove alloca-opt.
15596
15597 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15598
15599         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15600
15601 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15602
15603         * lib/argp-parse.c: Include <stddef.h>.
15604         (alignof, alignto): New macros.
15605         (parser_init): Don't assume that void * is aligned sufficiently
15606         for struct option.
15607
15608         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15609         need to extend the stack.
15610         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15611         large.
15612
15613 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15614
15615         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15616
15617 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15618
15619         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15620         (2004-10-24) change.  Apparently this was a false alarm.
15621
15622         * modules/getdate: Depend on alloca-opt, not alloca.
15623
15624 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15625
15626         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15627         Remove now-obsolete comment about AIX.
15628         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15629         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15630         (YYMAXDEPTH): New macro.
15631
15632 2004-12-18  Simon Josefsson  <jas@extundo.com>
15633
15634         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15635
15636 2004-12-18  Bruno Haible  <bruno@clisp.org>
15637
15638         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15639
15640 2004-12-18  Bruno Haible  <bruno@clisp.org>
15641
15642         * lib/fatal-signal.c (fatal_signals): Make non-const.
15643         (init_fatal_signals): New function.
15644         (uninstall_handlers, install_handlers): Ignore signals that were set to
15645         SIG_IGN.
15646         (at_fatal_signal): Call init_fatal_signals.
15647         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15648         SIG_IGN.
15649         Reported by Paul Eggert.
15650
15651 2004-12-18  Bruno Haible  <bruno@clisp.org>
15652
15653         * doc/alloca.texi: New file.
15654         * doc/alloca-opt.texi: New file.
15655
15656 2004-12-17  Jim Meyering  <jim@meyering.net>
15657
15658         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15659         Otherwise, install-sh could exit with improper exit status when
15660         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15661
15662 2004-12-16  Simon Josefsson  <jas@extundo.com>
15663
15664         * tests/test-base64.c: Add license.
15665
15666 2004-12-15  Stepan Kasal  <address@hidden>
15667
15668         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15669
15670 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15671
15672         * modules/getcwd (Files): Add m4/d-ino.m4.
15673         Suggested by Mark D. Baushke.
15674
15675 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15676
15677         * lib/getdate.y (textint): New member "negative".
15678         (time_zone_hhmm): New function.
15679         Expect 14 shift-reduce conflicts, not 13.
15680         (o_colon_minutes): New rule.
15681         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15682         (yylex): Set the "negative" member of signed numbers.
15683
15684 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15685
15686         * doc/getdate.texi (Time of day items, Time zone items):
15687         Describe new formats +00:00, UTC+00:00.
15688
15689 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15690
15691         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15692         spurious "-l"s.  Problem reported by Stepan Kasal.
15693
15694 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15695
15696         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15697         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15698
15699 2004-12-04  Simon Josefsson  <jas@extundo.com>
15700
15701         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15702         Vandoorselaere <yoann@prelude-ids.org>.
15703
15704 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15705
15706         Changes imported from coreutils.
15707         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15708         exist.
15709         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15710
15711 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15712
15713         Changes imported from coreutils.
15714         * lib/hard-locale.c: Assume <locale.h> exists.
15715         Include "strdup.h".
15716         (GLIBC_VERSION): New macro.
15717         (hard_locale): Assume setlocale exists.
15718         Rewrite to avoid #ifdef.
15719         Use strdup rather than malloc + strcpy.
15720         * lib/human.c: Assume <locale.h> exists.
15721         (human_readable): Assume localeconv exists.
15722
15723 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15724
15725         * modules/hard-locale (Depends-on): Add strdup.
15726
15727 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15728
15729         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15730         convert T2, not T.  (Imported from libc.)
15731
15732 2004-11-30  Simon Josefsson  <jas@extundo.com>
15733
15734         * modules/restrict (License): Change to LGPL.
15735
15736 2004-11-30  Simon Josefsson  <jas@extundo.com>
15737
15738         * m4/restrict.m4: Add copyright and copying conditions.
15739
15740 2004-11-30  Simon Josefsson  <jas@extundo.com>
15741
15742         * m4/base64.m4: New file.
15743
15744 2004-11-30  Simon Josefsson  <jas@extundo.com>
15745
15746         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15747         base64.
15748
15749         * tests/test-base64.c: New file.
15750
15751         * modules/base64: New file.
15752
15753 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15754
15755         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15756         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15757
15758         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15759
15760 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15761
15762         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15763         (__getcwd.c): Don't restore errno; glibc doesn't.
15764         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15765         first, falling back to our code only if its results look suspicious.
15766         Ensure that the resulting buffer is only as large as necessary.
15767
15768         * lib/readutmp.c: Include readutmp.h first.
15769         Include <errno.h>, since readutmp.h no longer does that.
15770         * lib/readutmp.h: Don't include <errno.h>,
15771         <sys/param.h>, <time.h>; not needed to establish interface.
15772         (errno): Remove decl.
15773         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15774         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15775         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15776
15777 2004-11-28  Simon Josefsson  <jas@extundo.com>
15778
15779         * lib/base64.h, base64.c: New file.
15780
15781 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15782
15783         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15784
15785 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15786
15787         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15788         (Depends-on): Remove pathmax, same.  Add mempcpy.
15789         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15790         (Makefile.am): Append getcwd.h to lib_SOURCES.
15791         (Include): Add getcwd.h.
15792         (Maintainer): Change from Jim Meyering to "all, glibc",
15793         since getdate now uses intended-for-glibc code.
15794         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15795         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15796
15797 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15798
15799         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15800         HP's ANSI C compiler.
15801         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15802         Declaring int functions causes warnings on some modern systems and
15803         shouldn't be needed to compile on ancient ones.
15804         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15805         defined.
15806
15807         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15808         with the following changes.
15809         (__set_errno): Parenthesize properly.
15810         Include <stdbool.h>.
15811         (MIN, MAX, MATCHING_INO): New macros.
15812         (__getcwd): Define with prototype, not K&R form.
15813         Use heuristics to allocate default buffer on stack if possible.
15814         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15815         behavior, and to avoid the PATH_MAX limit when computing
15816         ../../../../...
15817         Use MATCHING_INO to compare inode number to file.
15818         Check for arithmetic overflow in size calculations.
15819         Fix bug in reallocation of dot array that caused getcwd to fail
15820         on directories nested deeper than 75.
15821         Be more careful about saving errno on error.
15822         Do not use realloc; use only free+malloc, as this is a bit
15823         more flexible and avoids a needless copy operation.
15824         Do not inspect st_dev and st_ino for symbolic links; POSIX
15825         doesn't specify the latter.
15826         Check for closedir errors.
15827         Avoid needless casts.
15828         Use "#ifdef weak_alias" around weak_alias, to be like other
15829         glibc code.
15830         The following changes to getcwd.c have effect only when used in
15831         gnulib; they have no effect inside glibc proper.
15832         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15833         as alloca isn't used.
15834         (alloca, __alloca): Likewise.
15835         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15836         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15837         unconditionally, as gnulib assumes C89 or better.
15838         Do not include <sys/param.h>.
15839         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15840         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15841         better.
15842         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15843         Include <dirent.h> in a way that is compatible with modern Autoconf.
15844         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15845         New macros, if not already defined.
15846         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15847         Use "_LIBC", not "defined _LIBC", for consistency.
15848         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15849         a mempcpy module.
15850         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15851         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15852         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15853         credit only to Jim Meyering and adjust the copyright dates.
15854         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15855         <stdlib.h>, <unistd.h>, "pathmax.h".
15856         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15857         (INITIAL_BUFFER_SIZE): Remove.
15858         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15859
15860 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15861
15862         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15863         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15864         Use the _ONCE methods, for efficiency.
15865         Check for fcntl.h.  In test program, include <errno.h>
15866         and <fcntl.h> if available.  Remove old K&R cruft from
15867         test program.  Check for common errors in GNU/Linux,
15868         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15869         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15870         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15871         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15872         name accordingly.
15873         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15874         accommodate new getcwd.c.
15875         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15876         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15877         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15878         that's all we need now.
15879
15880 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15881
15882         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15883         argp-parse.c depends on getopt internals, that means we should
15884         always use our getopt, to be on the safe side.
15885         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15886         order not to spoil the result of an eventual previous invocation
15887         of gl_GETOPT_SUBSTITUTE.
15888
15889 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15890
15891         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15892         redefinition warnings. To avoid them, include the defines
15893         in `#if !defined __need_getopt ... #endif'. The only place
15894         where __getopt_argv_const is used is in definitions
15895         of getopt_long and getopt_long_only below, which are as well
15896         protected by `#ifndef __need_getopt'.
15897         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15898         __need_getopt after including <stdio.h> and <unistd.h> These
15899         headers might have defined it.
15900
15901 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15902
15903         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15904
15905 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15906
15907         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15908         (futimens): New function, which uses futimes if available.
15909         (futimens, utimens): Support timespec==NULL, with same semantics
15910         as utime and utimens.
15911         * lib/utimens.h (futimens): New decl.
15912
15913 2004-11-23  Jim Meyering  <jim@meyering.net>
15914
15915         * lib/getopt_.h: Remove trailing blanks.
15916
15917 2004-11-23  Jim Meyering  <jim@meyering.net>
15918
15919         * lib/__fpending.c: Add comment.
15920
15921 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15922
15923         * modules/canonicalize (Depends-on): Add xreadlink.
15924         Problem reported by James Youngman.
15925
15926 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15929         New macros.
15930         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15931         optopt): Use them instead of invoking ## directly; otherwise, the
15932         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15933
15934 2004-11-19  Bruno Haible  <bruno@clisp.org>
15935
15936         * lib/strtok_r.c: Move comments from here...
15937         * lib/strtok_r.h: ... to here.
15938
15939 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15940
15941         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15942         implementations that mishandle size_t overflow.
15943
15944 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15945
15946         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15947         might fail.  Problem reported by Yoann Vandoorselaere.
15948         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15949         implementations that mishandle size_t overflow.
15950
15951 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15952
15953         * modules/canon-host (Depends-on): Add strdup.
15954
15955 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15958
15959 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15960
15961         * lib/canon-host.c: Include "strdup.h".
15962         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15963         Use strdup instead of malloc/strcpy to duplicate strings.
15964
15965         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15966         (human_space_before_unit): New constant.
15967         * lib/human.c (human_readable): Support it.
15968
15969         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15970         (xgetcwd): Set errno correctly when failing.
15971         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15972         the failure is actually due to a PATH_MAX problem.
15973
15974         Further getopt changes to make it more likely that glibc will
15975         buy the changes back.
15976         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15977         (getopt): Use it, so to preserve glibc semantic
15978         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15979         when compiling for libc.
15980         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15981         (getopt_long, getopt_long_only): Use it.
15982
15983         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15984         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15985         (getopt): Argv is now char * const *, as per standard.
15986         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15987         not char *__getopt_argv_const *.
15988         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15989         _getopt_long_only_r): Likewise.
15990         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15991         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15992         _getopt_long_r, _getopt_long_only_r): Likewise.
15993         * lib/getopt_.h (__getopt_argv_const): Remove.
15994         (getopt): Argv is now char * const *, as per standard.
15995
15996         * lib/getdate.y (tORDINAL): New token.
15997         (day, relunit): Allow it for relative times.
15998         (relative_time_table): Use tORDINAL for ordinals.
15999
16000 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16001
16002         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16003         Document that "second" isn't allowed as an ordinal number.
16004
16005 2004-11-16  Jim Meyering  <jim@meyering.net>
16006
16007         * modules/closeout (Depends-on): Add fpending.
16008
16009 2004-11-15  Jim Meyering  <jim@meyering.net>
16010
16011         * lib/closeout.c: Include "__fpending.h" once again.
16012         Include <stdbool.h>.
16013         (close_stdout): Don't fail just because stdout was closed initially,
16014         since some programs don't write to stdout in the normal course of
16015         operation (other than --version and --help), and we don't want this
16016         function to make e.g. `touch file >&-' fail.
16017         But do fail if it was closed and someone has tried to write to it.
16018         E.g., `printf foo >&-' must fail.
16019
16020 2004-11-13  Jim Meyering  <jim@meyering.net>
16021
16022         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16023
16024 2004-11-12  Simon Josefsson  <jas@extundo.com>
16025
16026         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16027         small doc fix is still pending.
16028
16029 2004-11-11  Simon Josefsson  <jas@extundo.com>
16030
16031         * modules/strtok_r: New file.
16032
16033         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16034         strtok_r.
16035
16036 2004-11-11  Simon Josefsson  <jas@extundo.com>
16037
16038         * m4/strtok_r.m4: New file.
16039
16040         * m4/getopt.m4: Replace opterr.
16041
16042 2004-11-11  Simon Josefsson  <jas@extundo.com>
16043
16044         * lib/strtok_r.h, strtok_r.c: New file.
16045
16046 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16047
16048         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16049         of replacing opterr, getopt, etc.  This should handle the
16050         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16051
16052 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16053
16054         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16055         we can stop lying to compilers about the constness of argv when we
16056         are compiled outside glibc.
16057         (getopt, getopt_long, getopt_long_only): Use it.
16058         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16059         _getopt_internal, getopt): Likewise.
16060         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16061         _getopt_long_only_r): Likewise.
16062         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16063         _getopt_long_r, _getopt_long_only_r): Likewise.
16064
16065         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16066         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16067         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16068         the other external symbols.
16069         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16070         declaration, since the above renaming now works around collisions.
16071
16072 2004-11-11  Jim Meyering  <jim@meyering.net>
16073
16074         * lib/linebreak.c: Remove trailing blanks.
16075         * lib/alloca_.h: Likewise.
16076         * lib/acosl.c: Likewise.
16077         * lib/euidaccess.c: Likewise.
16078         * lib/allocsa.h: Likewise.
16079
16080 2004-11-10  Simon Josefsson  <jas@extundo.com>
16081
16082         * m4/getaddrinfo.m4: New file.
16083
16084 2004-11-10  Simon Josefsson  <jas@extundo.com>
16085
16086         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16087
16088 2004-11-10  Simon Josefsson  <jas@extundo.com>
16089
16090         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16091         getaddrinfo.
16092
16093         * modules/getaddrinfo: New file.
16094
16095 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16096
16097         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16098
16099 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16100
16101         * lib/mktime.c (SHR): New macro, which is a portable
16102         substitute for >> that should work even on Crays.
16103         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16104         Problem reported by Mark D. Baushke in
16105         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16106         * lib/getdate.y (SHR): Likewise.
16107         (tm_diff): Use it.
16108         * lib/strftime.c (SHR): Likewise.
16109         (tm_diff): Use it.
16110         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16111         quote_these_too, so that right shifts are well defined.  All uses
16112         changed.
16113
16114 2004-11-10  Jim Meyering  <jim@meyering.net>
16115
16116         Ensure that no close failure goes unreported.
16117         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16118         return early when it seems there's nothing to flush.
16119         Don't include __fpending.h.
16120
16121 2004-11-10  Jim Meyering  <jim@meyering.net>
16122
16123         * modules/closeout (Depends-on): Remove fpending.
16124
16125 2004-11-10  Jim Meyering  <jim@meyering.net>
16126
16127         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16128
16129 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16130
16131         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16132         gl_FUNC_STRFTIME.
16133         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16134         and AC_REQUIRE when possible, to avoid duplicate checks.
16135         Check for <wchar.h>.
16136
16137 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16138
16139         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16140
16141 2004-11-09  Bruno Haible  <bruno@clisp.org>
16142
16143         * m4/sockpfaf.m4: New file.
16144
16145 2004-11-05  Bruno Haible  <bruno@clisp.org>
16146
16147         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16148         Reported by Mark D. Baushke <mdb@cvshome.org>.
16149
16150 2004-11-04  Bruno Haible  <bruno@clisp.org>
16151
16152         2004-09-11  Bruno Haible  <bruno@clisp.org>
16153                 * allocsa.valgrind: New file.
16154         2004-02-06  Bruno Haible  <bruno@clisp.org>
16155                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16156                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16157                 Reported by Christopher Seip <chris.seip@hp.com>.
16158
16159 2004-11-04  Bruno Haible  <bruno@clisp.org>
16160
16161         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16162         (Makefile.am): Distribute it.
16163
16164 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16165
16166         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16167         with errno == ERANGE if the buffer is too small.
16168         Problem reported by Mark D. Baushke.
16169
16170 2004-11-03  Albert Chin  <china@thewrittenword.com>
16171             Paul Eggert  <eggert@cs.ucla.edu>
16172
16173         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16174         equivalent, substitute $ac_type for equivalent type rather than
16175         blindly using uint32_t *always* which won't work if uint32_t is not
16176         available.  Define _UINT32_T to work around typedef of uint32_t if
16177         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16178         2.5.1.
16179
16180 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16181
16182         * m4/jm-macros.m4: Sync from coreutils.
16183         (gl_MACROS): Check for mbrlen, for pathchk.
16184         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16185
16186 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16187
16188         * lib/xreadlink.c (MAXSIZE): New macro.
16189         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16190         size does not exceed MAXSIZE.  Avoid cast.
16191         As suggested by Mark D. Baushke in
16192         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16193         if readlink fails with buffer size just under MAXSIZE, try again
16194         with MAXSIZE.
16195
16196 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16197
16198         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16199
16200 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16201         and  Paul Eggert  <eggert@cs.ucla.edu>
16202
16203         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16204         (get_date): Overparenthesize to avoid GCC warning.
16205
16206 2004-11-02  Bruno Haible  <bruno@clisp.org>
16207
16208         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16209         returns void.
16210
16211 2004-11-02  Bruno Haible  <bruno@clisp.org>
16212
16213         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16214         function returns void.
16215
16216 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16217
16218         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16219         fflush_unlocked, flockfile, funlockfile, funlockfile,
16220         fputs_unlocked, putc_unlocked.
16221
16222 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16223
16224         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16225         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16226         already declared.
16227
16228 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16229
16230         * modules/getdate (Files): Add doc/getdate.texi.
16231         (Depends-on): Add setenv, xalloc.
16232
16233 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16234
16235         * lib/getdate.y: Add support for TZ="foo" within a date string.
16236         Fix some bugs near time_t boundaries.  Reject dates with
16237         out-of-range components, e.g., "Sept 31".
16238         Include <stdlib.h>, "setenv.h", "xalloc.h".
16239         (ISDIGIT_LOCALE): Remove; unused.
16240         Note that the TZ and time functions used here are not reentrant.
16241         (mktime_ok, get_tz): New functions.
16242         (TZBUFSIZE): New constant.
16243         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16244         This requires that we sometimes generate our own TZ="XXX..." setting.
16245
16246 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16247
16248         * doc/getdate.texi: New file, from coreutils with modifications for
16249         the new TZ parsing.
16250
16251 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16252
16253         * lib/mktime.c (not_equal_tm): Remove redundant check.
16254
16255 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16256
16257         * modules/regex (lib_SOURCES): Add regex.c.
16258         Reported by James Youngman in
16259         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16260
16261 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16262
16263         * lib/getdate.y: Use Bison 1.875 features, and some minor
16264         code cleanups.  This change does not affect semantics.
16265         Don't include <stdlib.h>; no longer needed.
16266         Don't include unlocked-io.h; only the "#if TEST" code uses
16267         stdio, and performance isn't crucial there.
16268         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16269         Bison 1.875 features as described below.
16270         All uses of "PC." replaced by "pc->".
16271         (YYSTYPE): Add a forward declaration.
16272         (yylex, yyerror): Use full prototypes in forward decls.
16273         Use "%pure-parser" rather than obsolescent "%pure_parser".
16274         Use %parse-param and %lex-param instead of obsolescent
16275         YYPARSE_PARAM and YYLEX_PARAM.
16276         (meridian_table, month_and_day_table, time_units_table,
16277         relative_time_table, time_zone_table, military_table,
16278         lookup_zone, lookup_word, get_date):
16279         Use NULL instead of 0 where appropriate.
16280         (to_hour): Avoid abort (), to avoid a dependency on
16281         stdlib.h.
16282         (yyerror, yylex): Now accepts parser_control * arg.
16283         (main) [TEST]: Use '\0' rather than 0 for char.
16284
16285 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16286
16287         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16288
16289 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16290
16291         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16292         It's now the caller's responsibility to handle the case where
16293         !HAVE_GETPAGESIZE && !defined getpagesize.
16294
16295         * lib/mktime.c (leapyear): Arg is long int, not int.
16296
16297 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16298
16299         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16300
16301 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16302
16303         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16304         missing.  Problem reported by James Youngman.
16305
16306 2004-10-16  Simon Josefsson  <jas@extundo.com>
16307
16308         * gnulib-tool: Fix comments.  Fix parse problem.
16309         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16310
16311 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16312
16313         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16314         implementation of getopt_long.  Problem reported by Alexander Taler in:
16315         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16316
16317 2004-10-15  Bruno Haible  <bruno@clisp.org>
16318
16319         * gnulib-tool: Untabify. Initialize supplied_libname.
16320         (func_usage): More homogenous output.
16321         (func_modules_transitive_closure, func_modules_to_filelist,
16322         func_emit_lib_Makefile_am): New functions.
16323         (func_import): New function, extracted from big case statement. Use
16324         func_get_license, func_modules_transitive_closure,
16325         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16326         opt_lgpl. Don't use test -a, as it's not portable.
16327         (func_create_testdir): Use func_modules_transitive_closure,
16328         func_modules_to_filelist, func_emit_lib_Makefile_am.
16329
16330 2004-10-15  Bruno Haible  <bruno@clisp.org>
16331
16332         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16333
16334 2004-10-15  Bruno Haible  <bruno@clisp.org>
16335
16336         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16337         the portions belonging to each module.
16338         Suggested by Derek Robert Price <derek@ximbiot.com>.
16339
16340 2004-10-12  Simon Josefsson  <jas@extundo.com>
16341
16342         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16343         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16344         to real functions.
16345
16346 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16347
16348         * modules/vsnprintf: New file.
16349
16350 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16351
16352         * m4/vsnprintf.m4: New file.
16353
16354 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16355
16356         * lib/vsnprintf.h: New file.
16357         * lib/vsnprintf.c: New file.
16358
16359 2004-10-11  Bruno Haible  <bruno@clisp.org>
16360
16361         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16362         vsnprintf.
16363
16364 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16365
16366         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16367
16368 2004-10-07  Bruno Haible  <bruno@clisp.org>
16369
16370         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16371         fits into the provided buffer.
16372
16373 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16374
16375         * lib/diacrit.c, diacrit.h: Add GPL notice.
16376
16377         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16378         notice.
16379         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16380         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16381         This avoids a potential constant-folding bug.
16382
16383 2004-10-05  Bruno Haible  <bruno@clisp.org>
16384
16385         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16386         for the declaration of strsep.
16387
16388 2004-10-05  Bruno Haible  <bruno@clisp.org>
16389
16390         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16391
16392 2004-10-04  Simon Josefsson  <jas@extundo.com>
16393
16394         * modules/memmem: New file.
16395         * tests/test-memmem.c: New file.
16396         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16397
16398 2004-10-04  Simon Josefsson  <jas@extundo.com>
16399
16400         * m4/memmem.m4: New file.
16401
16402 2004-10-04  Simon Josefsson  <jas@extundo.com>
16403
16404         * lib/memmem.h: New file.
16405         * lib/memmem.c: New file, taken from glibc.
16406
16407 2004-10-04  Simon Josefsson  <jas@extundo.com>
16408
16409         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16410         '#ifdef USE_UNLOCKED_IO'.
16411
16412 2004-10-04  Simon Josefsson  <jas@extundo.com>
16413
16414         * config/srclist.txt: Add memmem from glibc.
16415
16416 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16417
16418         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16419
16420         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16421         modules/exclude, modules/getdate, modules/getline,
16422         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16423         modules/getusershell, modules/linebuffer, modules/md5,
16424         modules/mountlist, modules/posixtm, modules/readtokens,
16425         modules/readutmp, modules/regex, modules/sha1,
16426         modules/version-etc, modules/yesno:
16427         Remove dependency on unlocked-io.
16428
16429 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16430
16431         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16432
16433         * m4/unlocked-io.m4: Add copyright notice.
16434         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16435
16436 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16437
16438         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16439         * lib/xmalloc.c (xmemdup): Likewise.
16440         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16441         XFREE): Remove these long-obsolescent macros.
16442         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16443         * lib/xstrdup.c: Remove.
16444
16445         * lib/regex.c (re_comp): Cast gettext return value to char *,
16446         Problem reported by Martin Neitzel via Mark D. Baushke.
16447
16448 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16449
16450         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16451         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16452         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16453         regex.c, sha1.c, version-etc.c, yesno.c:
16454         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16455         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16456         the includer's responsibility.
16457
16458         Sync from coreutils.
16459
16460         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16461         points to the start of a string, as the C Standard says the
16462         resulting behavior is undefined.
16463
16464         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16465         simple -> simple_backups, numbered_existing ->
16466         numbered_existing_backups, numbered -> numbered_backups
16467         to avoid shadowing problems.  All uses changed.
16468         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16469         * lib/backupfile.c (check_extension, numbered_backup):
16470         Rename locals to avoid shadowing 'basename'.
16471         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16472         once.
16473
16474         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16475         * lib/.cvsignore: Add getopt.h.
16476
16477 2004-10-04  Bruno Haible  <bruno@clisp.org>
16478
16479         * modules/README: New file.
16480         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16481         not a module.
16482
16483 2004-10-02  Jim Meyering  <jim@meyering.net>
16484
16485         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16486
16487 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16488
16489         * modules/strsep: New file.
16490
16491 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16492
16493         * m4/strsep.m4: New file.
16494
16495 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16496
16497         * lib/strsep.h: New file.
16498         * lib/strsep.c: New file.
16499
16500 2004-10-01  Simon Josefsson  <jas@extundo.com>
16501
16502         * lib/snprintf.c (snprintf): Handle size==0.
16503
16504 2004-10-01  Simon Josefsson  <jas@extundo.com>
16505             Bruno Haible  <bruno@clisp.org>
16506
16507         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16508         (snprintf): Declare 'args'.
16509
16510 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16511
16512         * lib/snprintf.c: Remove comments as to why each header is needed.
16513
16514 2004-10-01  Bruno Haible  <bruno@clisp.org>
16515
16516         * MODULES.html.sh: Add strsep.
16517
16518 2004-09-30  Simon Josefsson  <jas@extundo.com>
16519
16520         * modules/snprintf: New file.
16521
16522 2004-09-30  Simon Josefsson  <jas@extundo.com>
16523
16524         * m4/snprintf.m4: New file.
16525
16526 2004-09-30  Simon Josefsson  <jas@extundo.com>
16527
16528         * lib/snprintf.h, lib/snprintf.c: New files.
16529
16530 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16531
16532         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16533         (hol_entry_help): Never translate an empty string.
16534         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16535         * lib/argp.h (OPTION_NO_TRANS): New option.
16536
16537 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16538
16539         * modules/argp (Maintainer): Replace Simon Josefsson
16540         by Sergey Poznyakoff.
16541
16542 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16543
16544         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16545         changes merged back into glibc.
16546
16547 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16548
16549         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16550
16551 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16552
16553         * lib/xvasprintf.c: Include xalloc.h.
16554         (xvasprintf): Use xalloc_die, not xmalloc_die.
16555
16556 2004-09-29  Bruno Haible  <bruno@clisp.org>
16557
16558         * modules/alloca-opt: New file, derived from modules/alloca.
16559         * modules/allocsa: Depend on alloca-opt instead of alloca.
16560         * modules/setenv: Likewise.
16561         * modules/vasnprintf: Likewise.
16562         * MODULES.html.sh: Add alloca-opt.
16563
16564 2004-09-28  Simon Josefsson  <jas@extundo.com>
16565
16566         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16567         LGPL, and to replace license template from GPL to LGPL.
16568
16569 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16570
16571         * modules/dummy: Change license to LGPL.
16572
16573 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16574
16575         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16576
16577 2004-09-24  Simon Josefsson  <jas@extundo.com>
16578
16579         * modules/minmax (License): Change from GPL to LGPL.
16580
16581 2004-09-23  Simon Josefsson  <jas@extundo.com>
16582
16583         * gnulib-tool (--import): Typo.
16584
16585 2004-09-23  Simon Josefsson  <jas@extundo.com>
16586
16587         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16588
16589 2004-09-22  Bruno Haible  <bruno@clisp.org>
16590
16591         * modules/*: Add 'License' field.
16592         * gnulib-tool: Accept --extract-license option.
16593         (func_get_license): New function.
16594
16595 2004-09-21  Bruno Haible  <bruno@clisp.org>
16596
16597         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16598         Reported by Simon Josefsson.
16599
16600 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16601
16602         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16603         gl_AC_TYPE_LONG_LONG.
16604
16605 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16606
16607         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16608
16609 2004-09-18  Simon Josefsson  <jas@extundo.com>
16610         and  Paul Eggert  <eggert@cs.ucla.edu>
16611
16612         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16613         calls with autoreconf.  Define GL_LIB.
16614
16615 2004-09-14  Karl Berry  <karl@gnu.org>
16616
16617         * config/srclist.txt: unsync setenv.c, sigh.
16618
16619 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16620
16621         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16622         Problem reported by Bruno Haible in:
16623         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16624
16625 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16626
16627         * config/srclist.txt: Comment out argp-pvh.c.
16628
16629 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16630
16631         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16632         in case some system header has #define'd it.  Problem reported by
16633         Soeren D. Schulze in
16634         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16635
16636 2004-09-09  Karl Berry  <karl@gnu.org>
16637
16638         * regex.[ch]: delete from the root.  These were supposed to be
16639                 synced with emacs cvs, but this has not happened for about
16640                 a year, and anyway nothing else uses emacs regex.[ch].
16641                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16642                 lib/regex[.ch] is untouched.
16643
16644 2004-09-09  Bruno Haible  <bruno@clisp.org>
16645
16646         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16647
16648 2004-09-09  Bruno Haible  <bruno@clisp.org>
16649
16650         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16651         modifications.
16652         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16653
16654 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16655
16656         * modules/xvasprintf: New file.
16657         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16658
16659 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16660
16661         * lib/xvasprintf.h: New file.
16662         * lib/xvasprintf.c: New file.
16663         * lib/xasprintf.c: New file.
16664
16665 2004-09-08  Bruno Haible  <bruno@clisp.org>
16666
16667         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16668
16669 2004-09-08  Bruno Haible  <bruno@clisp.org>
16670
16671         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16672         length is > INT_MAX.
16673         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16674         more.
16675
16676 2004-09-08  Bruno Haible  <bruno@clisp.org>
16677
16678         * lib/stdint_.h: New file, taken from GNU clisp.
16679
16680 2004-09-08  Bruno Haible  <bruno@clisp.org>
16681             Oskar Liljeblad  <oskar@osk.mine.nu>
16682
16683         * modules/stdint: New file.
16684         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16685
16686 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16687
16688         Import from coreutils.
16689         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16690         strings on unbounded length.  alloca's performance benefits aren't
16691         that important here.
16692         (V_STRDUP): Remove.
16693         (parse_with_separator): New function, with most of the internals
16694         of the old parse_user_spec.  Allow user to omit both user and group,
16695         for compatibility with FreeBSD.
16696         Clone only the user name, not the entire spec.
16697         Do not set *uid, *gid unless entirely successful.
16698         Avoid memory leak in some failing cases.
16699         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16700         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16701         (parse_user_spec): Rewrite to use parse_with_separator.
16702
16703 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16704
16705         * modules/userspec: Don't depend on alloca.
16706
16707 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16708
16709         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16710
16711 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16712
16713         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16714         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16715         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16716
16717 2004-08-16  Simon Josefsson  <jas@extundo.com>
16718
16719         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16720         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16721         Add --dry-run for --import.
16722         Let user provided command line parameters override configure.ac
16723         settings.
16724
16725 2004-08-12  Simon Josefsson  <jas@extundo.com>
16726
16727         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16728         as discussed with Paul Eggert in threads rooted at
16729         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16730         and
16731         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16732         Before, the test was empty, and relied on ELIDE_CODE in source
16733         code.)
16734         (gl_PREREQ_GETOPT): New macro.
16735         (gl_GETOPT): Use them.
16736
16737 2004-08-12  Simon Josefsson  <jas@extundo.com>
16738
16739         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16740         * lib/getopt_.h: Renamed from getopt.h.
16741
16742 2004-08-12  Simon Josefsson  <jas@extundo.com>
16743
16744         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16745         Change default library name from libfoo to libgnu.
16746         Now, if you have a configure.ac that says:
16747                 gl_SOURCE_BASE(gl)
16748                 gl_M4_BASE(gl/m4)
16749                 gl_MODULES(error getopt etcetera)
16750                 gl_INIT
16751         you can import all you need by running:
16752                 ../gnulib/gnulib-tool --import
16753
16754         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16755         (Makefile.am): Rewrite, use logic from argz.
16756         (Include): Use <getopt.h> instead of "getopt.h".
16757
16758 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16759
16760         * modules/argp (Files): Add m4/unlocked-io.m4.
16761         (Depends-on): Add extensions.
16762
16763 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16764
16765         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16766         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16767         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16768         Check for program_invocation_name, program_invocation_short_name,
16769         flockfile, funlockfile, features.h, _getopt_long_only_r.
16770
16771 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16772
16773         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16774         its complicated substitute.
16775         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16776         and program_invocation_name.
16777         (__argp_basename) [!_LIBC]: Remove; the only use was
16778         replaced by its body.
16779         (__argp_short_program_name): Change condition from
16780         !defined __argp_short_program_name to
16781         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16782         to match argp-namefrob.h.
16783         (__argp_failure): Don't assume strerror_r returns char *.
16784         * lib/argp-parse.c (N_): Define unconditionally.
16785         (argp_default_options): Fill out initializers with 0 to avoid
16786         gcc warnings.
16787
16788 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16789
16790         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16791         getopt1.c.
16792
16793 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16794
16795         Merge from coreutils.
16796
16797         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16798
16799         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16800         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16801
16802 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16803
16804         Merge from coreutils.
16805
16806         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16807         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16808         for Reliant Unix 5.43.
16809
16810         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16811         (union fooround): Use uintmax_t, not long int.
16812         The rest is a merge from libc:
16813         [defined _LIBC]: Include <shlib-compat.h>.
16814         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16815
16816         * lib/settime.c (settime): Recode to avoid warning with
16817         Sun Forte C 6U2.
16818
16819         * lib/strverscmp.c: Convert to UTF-8.
16820
16821 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16822
16823         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16824         m4/uintmax_t.m4.
16825
16826 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16827
16828         * modules/xalloc-die: New file.
16829         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16830
16831         * modules/md5 (Files): Add m4/uint32_t.m4.
16832         * modules/sha1: Renamed from modules/sha.
16833         (Files):
16834         Rename lib/sha.h to lib/sha1.h.
16835         Rename lib/sha.c to lib/sha1.c.
16836         Rename m4/sha.m4 to m4/sha1.m4.
16837         (lib_SOURCES): Likewise.
16838         (configure.ac): Rename gl_SHA to gl_SHA1.
16839         (Include): sha.h -> sha1.h.
16840
16841 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16842
16843         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16844         * m4/sha1.m4: Renamed from sha.m4.
16845         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16846
16847 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16848
16849         * lib/obstack.h (obstack_empty_p):
16850         Don't assume that chunk->contents is suitably aligned.
16851         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16852         Likewise. Problem reported by Benno in
16853         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16854
16855         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16856         readable.  This could be improved further but it'd take some work.
16857
16858 2004-08-08  Simon Josefsson  <jas@extundo.com>
16859
16860         * modules/xgethostname (Depends-on): Remove exit and error (not
16861         used).
16862
16863         * modules/getpass-gnu: Add getpass.h.
16864         (Depends-on): Add stdbool.
16865         * modules/getpass: Add getpass.h.
16866
16867 2004-08-08  Simon Josefsson  <jas@extundo.com>
16868
16869         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16870         Check getpass declaration.
16871
16872 2004-08-08  Simon Josefsson  <jas@extundo.com>
16873
16874         * lib/xgethostname.c: Don't include error.h (not used).
16875
16876         * lib/getpass.h: Add.
16877         * lib/getpass.c: Include getpass.h first.
16878
16879 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16880
16881         * lib/xalloc-die.c: New file.
16882         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16883         All uses removed.
16884         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16885         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16886         xalloc-die.c.
16887         (_, N_, xalloc_die): Move to xalloc-die.c.
16888         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16889         so that we needn't mess with xalloc_msg_memory_exhausted.
16890
16891         * lib/sha1.h: Renamed from sha.h.
16892         (SHA1_H): Renamed from _SHA_H.
16893         (sha1_ctx): Renamed from sha_ctx.
16894         (sha1_init_ctx): Renamed from sha_init_ctx.
16895         (sha1_process_block): Renamed from sha_process_block.
16896         (sha1_process_bytes): Renamed from sha_process_bytes.
16897         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16898         (sha1_read_ctx): Renamed from sha_read_ctx.
16899         (sha1_stream): Renamed from sha_stream.
16900         (sha1_buffer): Renamed from sha_buffer.
16901         * lib/sha1.c: Likewise; renamed from sha.c.
16902         Do not include <sys/types.h>.
16903         Include <stddef.h> rather than <stdlib.h>.
16904
16905 2004-08-08  Bruno Haible  <bruno@clisp.org>
16906
16907         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16908         FILESYSTEM_PREFIX_LEN.
16909         * lib/progreloc.c: Likewise.
16910         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16911
16912 2004-08-06  Simon Josefsson  <jas@extundo.com>
16913
16914         * modules/progname (Depends-on): Don't depend on stdbool.
16915
16916 2004-08-06  Simon Josefsson  <jas@extundo.com>
16917
16918         * modules/getsubopt: New file.
16919         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16920         getsubopt.
16921
16922 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16923
16924         More merge from coreutils.
16925
16926         * m4/utimens.m4, m4/utimecmp.m4: New files.
16927         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16928         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16929         prereq.m4, sha.m4: Import changes from coreutils.
16930
16931 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16932
16933         More merge from coreutils.
16934         * modules/raise, modules/readtokens0, modules/utimens:
16935         * modules/utimecmp, module/xnanosleep: New files.
16936         * modules/strftime: Add lib/strftime.h.
16937         Change include from <time.h> to "strftime.h".
16938         * modules/yesno: Add lib/yesno.h.
16939         * modules/backupfile: Remove lib/addext.c.
16940         * modules/euidaccess: Add stat-macros.h.
16941         * modules/canonicalize, modules/euidaccess,
16942         modules/filemode, modules/lchown, modules/makepath,
16943         modules/rmdir, modules/stat: Likewise.
16944
16945 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16946
16947         Merge from tar.
16948         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16949         SIZE_MAX is a valid preprocessor constant.
16950         (__argp_basename): Change from "#ifndef _LIBC"
16951         to "#ifndef __argp_short_program_name", so that
16952         we don't compile these functions for tar.
16953
16954         More merges from coreutils.
16955         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16956         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16957         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16958         * lib/addext.c: Remove; no longer needed.
16959         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16960         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16961         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16962         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16963         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16964         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16965         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16966         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16967         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16968         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16969         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16970         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16971         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16972         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16973         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16974         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16975         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16976         Import changes from coreutils.
16977
16978 2004-08-05  Simon Josefsson  <jas@extundo.com>
16979
16980         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16981
16982 2004-08-05  Simon Josefsson  <jas@extundo.com>
16983
16984         * m4/getsubopt.m4: New file.
16985
16986 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16987
16988         Merge from coreutils.
16989
16990         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16991         * m4/getcwd-path-max.m4: New files.
16992
16993         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16994         FILESYSTEM_PREFIX_LEN ->
16995         FILE_SYSTEM_PREFIX_LEN.
16996         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16997         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16998         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16999         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17000
17001         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17002         prerequisite modules now handle the DOS stuff.
17003         Don't check for unistd.h.
17004
17005 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17006
17007         Merge from coreutils.
17008
17009         * lib/.gdb-history: Remove; this doesn't belong here.
17010
17011         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17012         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17013         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17014         * lib/getcwd.c: New files.
17015
17016         * lib/dirname.h: Include <stdbool.h>.
17017         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17018         for consistency with POSIX terminology.  All uses changed.
17019         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17020         (strip_trailing_slashes): Use bool for booleans.
17021         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17022
17023         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17024         sometimes returns a positive errno value even when it succeeds.
17025         (print_errno_message) [!LIBC]: Fall back on strerror if
17026         __strerror_r fails.
17027
17028         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17029         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17030         (longest_relative_suffix): New function.
17031         (path_concat): Use it.  Assume first argument is not NULL.
17032         Port to DOS.  Omit redundant separators.
17033         Report an error instead of returning NULL.
17034         Use mempcpy instead of memcpy.
17035         (xpath_concat): Remove: not declared or used.
17036
17037         * lib/same.h: Include <stdbool.h>
17038         (same_name): Return bool, not int.
17039         * lib/same.c (same_name): Likewise.
17040         (errno): Don't declare; we assume C89 or better now.
17041
17042         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17043         if not already defined.
17044
17045         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17046         * lib/dup-safer.c (errno): Likewise.
17047
17048 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17049
17050         Merge from coreutils.
17051         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17052         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17053         * modules/path-concat: Don't depend on strdup.
17054
17055 2004-08-03  Simon Josefsson  <jas@extundo.com>
17056
17057         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17058         * lib/progname.h: Don't include stdbool.h.
17059
17060 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17061
17062         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17063         * MODULES.html.sh (func_all_modules): Remove fatal.
17064
17065 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17066
17067         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17068
17069 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17070
17071         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17072         working.
17073
17074 2004-08-02  Simon Josefsson  <jas@extundo.com>
17075
17076         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17077         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17078         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17079
17080 2004-08-01  Simon Josefsson  <jas@extundo.com>
17081
17082         * lib/xgetdomainname.c: Include stdlib.h, for free().
17083
17084 2004-07-19  Bruno Haible  <bruno@clisp.org>
17085
17086         * MODULES.html.sh (func_all_modules): Add dummy.
17087
17088 2004-07-16  Simon Josefsson  <jas@extundo.com>
17089
17090         * modules/dummy: New file.
17091
17092 2004-07-16  Simon Josefsson  <jas@extundo.com>
17093
17094         * lib/dummy.c: New file.
17095
17096 2004-07-16  Bruno Haible  <bruno@clisp.org>
17097
17098         * lib/backupfile.h: Add extern "C" for C++.
17099         * lib/closeout.h: Likewise.
17100         * lib/copy-file.h: Likewise.
17101         * lib/findprog.h: Likewise.
17102         * lib/full-write.h: Likewise.
17103         * lib/pathname.h: Likewise.
17104         * lib/progname.h: Likewise.
17105         * lib/stpcpy.h: Likewise.
17106         * lib/stpncpy.h: Likewise.
17107         * lib/strcase.h: Likewise.
17108         * lib/strstr.h: Likewise.
17109         * lib/xalloc.h: Likewise.
17110
17111         * lib/mbswidth.h: Add extern "C" for C++.
17112         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17113
17114 2004-07-13  Robert Millan  <robertmh@gnu.org>
17115
17116         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17117
17118 2004-07-09  Simon Josefsson  <jas@extundo.com>
17119
17120         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17121         failed without this.)
17122
17123 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17124
17125         * modules/chown (Files): Add lib/fchown-stub.c, since
17126         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17127
17128 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17129
17130         * lib/fchown-stub.c: New file.
17131
17132 2004-06-24  Jim Meyering  <jim@meyering.net>
17133
17134         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17135
17136 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17137
17138         * modules/argz: Omit "#include".
17139
17140         * MODULES.html.sh (func_all_modules): Add calloc, to match
17141         2004-06-01 addition of calloc module.
17142
17143 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17144
17145         * m4/argz.m4: New file, which is autoupdated from libtool.
17146
17147 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17148
17149         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17150         libtool.
17151
17152 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17153
17154         * config/srclist-update: Don't insist on "USA." before the
17155         close-comment, as libtool omits the period and puts the */ on a
17156         separate line.
17157         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17158         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17159
17160 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17161
17162         * modules/argz: New file.
17163         * MODULES.html.sh (func_all_modules): Add argz.
17164
17165 2004-06-12  Jim Meyering  <jim@meyering.net>
17166         and  Paul Eggert  <eggert@cs.ucla.edu>
17167
17168         * modules/hash (Files): Add lib/xalloc.h.
17169         * modules/pipe (Depends-on): Add wait-process.
17170         * modules/stat (Depends-on): Add xalloc.
17171         * modules/userspec (Files): Add lib/userspec.h.
17172         * modules/xstrto
17173
17174         Upgrade from gettext-0.13.
17175         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17176         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17177         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17178
17179 2004-06-10  Jim Meyering  <jim@meyering.net>
17180
17181         * lib/calloc.c: New file.
17182
17183 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17184
17185         * lib/getdate.y (yylex): Allow space between sign and number.
17186         Problem reported by Dan Jacobson.
17187
17188 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17189
17190         Merge from coreutils CVS.
17191
17192         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17193         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17194         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17195         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17196         xstrtol.m4: Fix copyright date and/or serial number.
17197
17198         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17199         See if we need an fchown replacement.
17200         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17201         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17202         and use the replacement function if we detect either defect.
17203
17204         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17205         gl_UTIMECMP.
17206
17207 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17208         and  Jim Meyering  <jim@meyering.net>
17209
17210         Merge from coreutils CVS.
17211
17212         * lib/stat-macros.h: New file, with contents from file-type.h
17213         and coreutils' system.h.
17214         * lib/file-type.c: Include "stat-macros.h".
17215         * lib/file-type.h (file_type): Move all macro definitions to new file,
17216         stat-macros.h.
17217
17218         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17219         Wrap old code with this conditional.
17220         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17221         function that does not dereference symlinks.
17222         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17223
17224         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17225         dependency problems.
17226         (xreadlink): Accept new arg SIZE, for efficiency.
17227         All decls and uses changed.
17228         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17229
17230         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17231         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17232
17233         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17234         sysexits.h.
17235
17236 2004-06-01  Jim Meyering  <jim@meyering.net>
17237
17238         * m4/calloc.m4: New file.
17239
17240 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17241
17242         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17243         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17244         Also, fix a typo in a diagnostic.
17245
17246 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17247
17248         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17249         or AC_FUNC_REALLOC.
17250
17251 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17252
17253         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17254         macros to be defined.
17255         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17256         the allocator returns NULL because the requested size is zero.
17257
17258 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17259
17260         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17261         var.  Add comment explaining why libc still defines it.  This
17262         merges the following patch from glibc:
17263         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17264
17265 2004-05-20  Andreas Schwab  <schwab@suse.de>
17266
17267         * m4/free.m4: Replace free if it not known to work, not the other
17268         way round.
17269
17270 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17271
17272         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17273         present in glibc since revision 1.1 of this file.
17274         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17275         obstack_alignment_mask, obstack_alloc, obstack_base,
17276         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17277         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17278         obstack_grow0, obstack_init, obstack_int_grow,
17279         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17280         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17281         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17282         nonexistent functions.
17283
17284 2004-05-18  Karl Berry  <karl@gnu.org>
17285
17286         * config/srclist.txt: break link for vasnprintf.c.
17287
17288 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17289
17290         Port obstack to the AS/400, where pointers are 16 bytes wide and
17291         you cannot cast an integer to a valid pointer.  This patch is
17292         currently waiting to be integrated into glibc; see
17293         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17294
17295         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17296         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17297         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17298         (struct obstack): temp member is now a union of a pointer and
17299         an integer, instead of an integer.  All integer uses changed.
17300         This does not affect the physical layout of struct obstack,
17301         except on hosts (like the AS/400) where the size or alignment of
17302         void * is greater than that of ptrdiff_t.
17303         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17304         __STDC__)]: Store temporary in pointer member of union, not
17305         integer member.
17306         * lib/obstack.c: Include <stddef.h>, for offsetof.
17307         (struct fooalign): Remove; it doesn't need a name.
17308         (union fooround): Change double to long double, and add void *.
17309         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17310         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17311         not a macro.  Hence the values are always int; so remove all
17312         casts-to-int in uses.
17313
17314 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17315
17316         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17317         we can get this patch merged into glibc.
17318
17319 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17320             Paul Eggert  <eggert@cs.ucla.edu>
17321
17322         * m4/argp: Depend on alloca.
17323
17324 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17325             Paul Eggert  <eggert@cs.ucla.edu>
17326
17327         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17328         freecoding.
17329
17330 2004-05-17  Bruno Haible  <bruno@clisp.org>
17331
17332         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17333         precision that consists of a '.' followed by an empty digit string.
17334         Patch by Tor Lillqvist <tml@iki.fi>.
17335
17336 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17337
17338         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17339         for backward compatibility with older code.  We need our own
17340         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17341         it under some other name, and our alloca.h will define it.
17342
17343 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17344             Derek Price  <derek@ximbiot.com>
17345
17346         * lib/alloca.c: Include <alloca.h>, to get our interface.
17347         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17348         include <alloca.h> first.  Use C89 prototype for alloca; this
17349         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17350         Use #elif for simplicity, since we can assume C89 now.
17351         Don't try to source the system alloca.h since it will not be found
17352         and to prevent recursively including its replacement.
17353         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17354         * lib/regex.c: Likewise.
17355
17356 2004-05-16  Derek Price  <derek@ximbiot.com>
17357             Paul Eggert  <eggert@cs.ucla.edu>
17358
17359         getline cleanup.  This changes the getndelim2 API: both order of
17360         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17361         no delimiter).
17362
17363         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17364         interface does that.
17365         (getline): Always use getdelim, so that we don't have two
17366         copies of this code.
17367         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17368         if available.
17369         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17370         (GETNDELIM2_MAXIMUM): New macro.
17371         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17372         instead of the old practice of delim2==0.  All callers changed.
17373         Return -1 on overflow, instead of returning junk.
17374         Do not set *linesize unless allocation succeeds.
17375         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17376         that we include sys/types.h.
17377         * lib/getnline.h: Likewise.
17378         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17379         (getndelim2): Reorder arguments.
17380         * lib/getnline.c (getnline, getndelim):
17381         Don't discard the NMAX argument.
17382         (getnline): Invoke getndelim, to avoid code duplication.
17383         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17384         of (size_t) -1 by callers of the getnline family.
17385
17386 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17387
17388         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17389         Check for gettimeofday.
17390         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17391         Check for settimeofday, stime.
17392
17393 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17394
17395         * lib/nanosleep.c (suspended): Change its type from int to
17396         sig_atomic_t volatile.
17397         (first_call): Make it private to rpl_nanosleep, and have it
17398         be zero initially as that's a bit faster.
17399         (my_usleep): Round up fractional times instead of truncating them,
17400         as this is the usual meaning for 'sleep'.
17401
17402         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17403         doesn't work.
17404         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17405         (ENOSYS): Define if not defined.
17406         (settime): Fall back on stime if it exists and settimeofday fails.
17407         But don't bother with fallbacks if a method fails with errno == EPERM.
17408
17409 2004-05-11  Jim Meyering  <jim@meyering.net>
17410
17411         Prior to this change, the save_cwd caller required read access to the
17412         current directory on most systems (ones with the fchdir function).
17413
17414         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17415         fails, try write-only, and finally, resort to using xgetcwd.
17416
17417 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17418
17419         * lib/obstack.c, obstack.h: Import changes from libc.
17420
17421 2004-04-28  Bruno Haible  <bruno@clisp.org>
17422
17423         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17424         also implicitly appends .exe to executables.
17425         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17426         accepts Windows pathnames.
17427         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17428         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17429         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17430         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17431         Reported by Derek Robert Price <derek@ximbiot.com>.
17432
17433 2004-04-21  Karl Berry  <karl@gnu.org>
17434
17435         * config/srclist.txt (localcharset.c): break sync.
17436
17437 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17438
17439         * m4/host-os.m4: Add a copyright notice.
17440
17441 2004-04-20  Jim Meyering  <jim@meyering.net>
17442
17443         Change UTILS_ to gl_ in AC_DEFINE'd names.
17444         Change utils_- and jm_-prefixed variables, too.
17445         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17446         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17447         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17448
17449         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17450         Don't emit trailing blanks.
17451         Also rename jm_-prefixed variables to have gl_ prefix.
17452
17453         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17454         Also rename jm_-prefixed variables to have gl_ prefix.
17455
17456         * m4/jm-macros.m4: Reflect the renamings.
17457         * m4/prereq.m4: Likewise.
17458
17459 2004-04-20  Jim Meyering  <jim@meyering.net>
17460
17461         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17462         memory.
17463
17464 2004-04-20  Jim Meyering  <jim@meyering.net>
17465             Bruno Haible  <bruno@clisp.org>
17466
17467         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17468         memory when realloc fails.
17469
17470 2004-04-19  Jim Meyering  <jim@meyering.net>
17471
17472         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17473         now that readutmp.c may call `free (0)'.
17474
17475 2004-04-19  Bruno Haible  <bruno@clisp.org>
17476
17477         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17478         * m4/inttypes_h.m4: Likewise.
17479         * m4/stdint_h.m4: Likewise.
17480         * m4/intmax_t.m4: Likewise.
17481         * m4/uintmax_t.m4: Likewise.
17482
17483 2004-04-18  Jim Meyering  <jim@meyering.net>
17484
17485         * m4/prereq.m4: Don't forbid jm_ prefix.
17486
17487         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17488         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17489         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17490         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17491         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17492         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17493         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17494         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17495         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17496         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17497         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17498         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17499         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17500         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17501         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17502         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17503         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17504         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17505         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17506
17507 2004-04-18  Jim Meyering  <jim@meyering.net>
17508
17509         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17510         failure, don't leak memory and do call END_UTMP_ENT.
17511
17512 2004-04-16  Jim Meyering  <jim@meyering.net>
17513
17514         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17515         coreutils' stat program.
17516         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17517
17518 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17519
17520         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17521         C89.
17522         (CHAR_BIT): Remove, since we assume C89.
17523         Include <stdint.h> if available, as per current Autoconf CVS advice.
17524
17525 2004-03-31  Jim Meyering  <jim@meyering.net>
17526
17527         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17528         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17529         * m4/xalloc.m4: Likewise.
17530
17531 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17532
17533         Merge from coreutils.
17534
17535         * m4/inttostr.m4: New file.
17536         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17537         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17538         Require gl_CLOCK_TIME.
17539         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17540
17541 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17542
17543         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17544         not bool, to be more consistent with Unix conventions.
17545         Suggested by Bruno Haible.
17546
17547         Merge from coreutils.
17548
17549         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17550         * lib/umaxtostr.c: New files.
17551
17552         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17553         the usual <time.h> dance.
17554         (get_date): Change signature to support fractional time stamps.
17555         All callers changed.
17556         * lib/getdate.y: Include "getdate.h" first, as we can now
17557         assume C89 and don't need to worry about 'const'.
17558         Similarly, include "unlocked-io.h" near start, not in middle.
17559         Include <limits.h>.
17560         (textint.value): Use long int rather than int.
17561         (textint.digits): Use size_t rather than int.
17562         (BILLION, LOG10_BILLION): New constants.
17563         (parser_control): New member rel_ns.  Members day_ordinal,
17564         time_zone, month, day, hour, minutes, rel_year, rel_month,
17565         rel_day, rel_hour, rel_minutes, rel_seconds
17566         are now long int, not int.  Member seconds is now struct timespec,
17567         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17568         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17569         not int.
17570         (%union.intval): Now long int, not int.
17571         New member timespec.
17572         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17573         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17574         (spec): Now is a timespec or an item list.
17575         (timespec, items): New nonterminals.
17576         (time, rel, relunit, number, get_date):
17577         Add support for fractional seconds.
17578         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17579         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17580         (to_hour): First arg is now long int, not int.
17581         (to_year): Returns long int, not int.
17582         Don't treat year -70 like 70.
17583         (tm_diff): Returns long int, not int.
17584         (lookup_word): Use bool instead of int when appropriate.
17585         (yylex): Use size_t for count, not int.
17586         Detect overflow when parsing large integer constants.
17587         Add support for fractions.
17588         (get_date): Make pointers 'const' if possible.
17589         Use more-portable code to detect integer overflow.
17590         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17591         Don't use ctime; it's not reliable if the year has >4 digits.
17592
17593         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17594         This is for compatibility with BSD.
17595
17596         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17597         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17598         From coreutils' system.h.
17599
17600         * lib/userspec.c: Don't include "posixver.h".
17601         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17602         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17603         compatible extension.  Simplify code by removing a boolean int
17604         that was always nonzero if a string was nonnull.
17605
17606 2004-03-30  Jim Meyering  <jim@meyering.net>
17607
17608         Merge from coreutils.
17609
17610         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17611         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17612         on some systems one must include <grp.h> before it.
17613         Reported by Christian Krackowizer.
17614
17615 2004-03-30  Jim Meyering  <jim@meyering.net>
17616
17617         Merge from coreutils.
17618
17619         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17620
17621         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17622         an empty input stream.
17623
17624         * lib/readtokens.c: Include <stdbool.h>.
17625         (readtoken): Use `size_t' rather than int/long.
17626         All callers adjusted.
17627         Use `bool' rather than `int' where appropriate.
17628         Use memset rather than an explicit loop.
17629         Use x2nrealloc rather than xrealloc.
17630         Allow the use of `\0' as a delimiter.
17631         (readtokens): Likewise.
17632         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17633
17634 2004-03-30  Jim Meyering  <jim@meyering.net>
17635
17636         * m4/realloc.m4: Remove file, since now it does no more than
17637         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17638         the `configure.ac' section of module/realloc.
17639         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17640
17641 2004-03-30  Bruno Haible  <bruno@clisp.org>
17642
17643         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17644         nonnull.
17645
17646 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17647
17648         Merge changes to getloadavg.c from coreutils and Emacs.
17649
17650         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17651         Define to an expression, not to the empty string.
17652         Include cloexec.h and xalloc.h.
17653         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17654         Use set_cloexec_flag rather than rolling our own.
17655         * lib/cloexec.c, lib/cloexec.h: New files.
17656
17657 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17658
17659         * m4/cloexec.m4: New file.
17660
17661 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17662
17663         * lib/getopt.h: Sync with libc CVS.
17664
17665 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17666             Bruno Haible  <bruno@clisp.org>
17667
17668         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17669         mbswidth.
17670
17671 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17672             Bruno Haible  <bruno@clisp.org>
17673
17674         * lib/mbswidth.h: Include <wchar.h> only if
17675         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17676         <wchar.h>.
17677         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17678
17679 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17680
17681         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17682         Sync with libc CVS.
17683         * lib/getopt_int.h: New file, also synced from libc.
17684
17685 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17686
17687         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17688         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17689         Bring back getopt.c, getopt.h, getopt1.c.
17690
17691 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17692
17693         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17694         All uses changed.  Check for sa_sigaction member; this fixes
17695         a bug first reported by Jason Andrade in
17696         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17697
17698 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17699
17700         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17701         '#if' expressions.  Unlike the code it replaces, it does not
17702         depend on (defined _SC_PAGESIZE).  However, it does depend on
17703         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17704         first reported by Jason Andrade in
17705         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17706
17707 2004-02-25  Simon Josefsson  <jas@extundo.com>
17708
17709         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17710
17711 2004-02-25  Simon Josefsson  <jas@extundo.com>
17712
17713         * lib/strdup.h: New file.
17714         * lib/strdup.c: Include it.
17715         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17716         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17717
17718 2004-02-23  Karl Berry  <karl@gnu.org>
17719
17720         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17721         (from fencepost.gnu.org:/gd/gnuorg).
17722
17723 2004-02-23  Karl Berry  <karl@gnu.org>
17724
17725         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17726         * config/srclist.txt: add maintain/standards documents.
17727
17728 2004-02-18  Bruno Haible  <bruno@clisp.org>
17729
17730         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17731         Reported by Derek Robert Price <derek@ximbiot.com>.
17732
17733 2004-02-16  Karl Berry  <karl@gnu.org>
17734
17735         * config/mkinstalldirs, install-sh: update from automake.
17736
17737 2004-02-06  Karl Berry  <karl@gnu.org>
17738
17739         * m4/po.m4: update from gettext 0.14.1.
17740
17741 2004-02-06  Karl Berry  <karl@gnu.org>
17742
17743         * lib/config.charset: update from gettext 0.14.1.
17744
17745 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17746
17747         Add comments and code, prompted by suggestions from Bruno Haible
17748         for sh-quote.
17749         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17750         describing the enum quoting_style values.
17751         * lib/quotearg.c (quotearg_alloc): New function.
17752         (quotearg_buffer_restyled): Treat lone { and } as special.
17753         Treat = as special.  Work around bug with older shells
17754         that "see" a '\' that is really the 2nd byte of a multibyte char.
17755         Quote empty string with shell_quoting_style.
17756
17757 2004-02-03  Bruno Haible  <bruno@clisp.org>
17758
17759         * m4/pipe.m4: New file, from GNU gettext.
17760
17761 2004-02-03  Bruno Haible  <bruno@clisp.org>
17762
17763         * lib/pipe.h: New file, from GNU gettext.
17764         * lib/pipe.c: New file, from GNU gettext.
17765
17766 2004-01-27  Bruno Haible  <bruno@clisp.org>
17767
17768         * m4/execute.m4: New file, from GNU gettext.
17769
17770 2004-01-27  Bruno Haible  <bruno@clisp.org>
17771
17772         * lib/execute.h: New file, from GNU gettext.
17773         * lib/execute.c: New file, from GNU gettext.
17774         * lib/w32spawn.h: New file, from GNU gettext.
17775
17776 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17777
17778         Merge from diffutils.
17779
17780         * lib/file-type.c (file_type): Add typed memory objects.
17781         * lib/file-type.h (S_TYPEISTMO): New macro.
17782
17783         * lib/c-stack.h (c_stack_action): Remove argv argument.
17784         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17785         (die): Don't calculate message unless segv_action returns.
17786         (get_stack_location, min_address_from_argv, max_address_from_argv,
17787         volatile stack_base, volatile_stack_size): Remove.
17788         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17789         that every segmentation violation is a stack overflow.  (Ouch!)
17790         See Debian bug 136249 (still outstanding) for more info about why
17791         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17792
17793 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17794
17795         Exit-status fix from coreutils.
17796
17797         Use exit_failure consistently in place of EXIT_FAILURE,
17798         so that program exit statuses are consistent on failure.
17799
17800         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17801         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17802         * lib/argmatch.h: Comment fix to match the above.
17803         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17804         Now a macro referring to exit_failure, instead of a separate
17805         variable.  Include "exitfail.h" to get it.
17806         * lib/xstrtol.h: Include "exitfail.h".
17807         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17808
17809         * lib/long-options.c (parse_long_options): Use prototype
17810         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17811         for clarity.
17812
17813 2004-01-21  Jim Meyering  <jim@meyering.net>
17814
17815         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17816         so as not to conflict with a different-sized __mktime_internal
17817         function in GNU libc.
17818         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17819         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17820
17821 2004-01-20  Karl Berry  <karl@gnu.org>
17822
17823         * config/config.guess: update from config.
17824
17825         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17826
17827 2004-01-20  Bruno Haible  <bruno@clisp.org>
17828
17829         Safer stack allocation.
17830         * lib/setenv.c: Include allocsa.h.
17831         (alloca): Remove fallback definition.
17832         (freea): Remove macro.
17833         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17834         instead of freea.
17835
17836 2004-01-20  Bruno Haible  <bruno@clisp.org>
17837
17838         * m4/eealloc.m4: New file, from GNU gettext.
17839
17840 2004-01-20  Bruno Haible  <bruno@clisp.org>
17841
17842         * m4/allocsa.m4: New file, from GNU gettext.
17843
17844 2004-01-20  Bruno Haible  <bruno@clisp.org>
17845
17846         * lib/xallocsa.h: New file, from GNU gettext.
17847         * lib/xallocsa.c: New file, from GNU gettext.
17848
17849 2004-01-20  Bruno Haible  <bruno@clisp.org>
17850
17851         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17852
17853 2004-01-20  Bruno Haible  <bruno@clisp.org>
17854
17855         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17856         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17857         specially.
17858
17859 2004-01-20  Bruno Haible  <bruno@clisp.org>
17860
17861         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17862         patch.
17863
17864 2004-01-20  Bruno Haible  <bruno@clisp.org>
17865
17866         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17867
17868 2004-01-20  Bruno Haible  <bruno@clisp.org>
17869
17870         * lib/eealloc.h: New file.
17871
17872 2004-01-20  Bruno Haible  <bruno@clisp.org>
17873
17874         * lib/binary-io.h: Avoid warnings on Cygwin.
17875
17876 2004-01-20  Bruno Haible  <bruno@clisp.org>
17877
17878         * lib/allocsa.h: New file, from GNU gettext.
17879         * lib/allocsa.c: New file, from GNU gettext.
17880
17881 2004-01-18  Karl Berry  <karl@gnu.org>
17882
17883         * doc/gpl.texi, doc/lgpl.texi: new files.
17884
17885 2004-01-18  Karl Berry  <karl@gnu.org>
17886
17887         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17888         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17889
17890 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17891
17892         Merge from coreutils.
17893
17894         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17895         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17896         (gl_DEFAULT_POSIX2_VERSION): Move
17897         the documentation from 'configure' into 'config.hin',
17898         so that 'configure --help' isn't burdened by it and
17899         we don't have to worry about its formatting there.
17900         Reword the documentation so that it's more succinct
17901         and can be run together into a single paragraph.
17902         * m4/same.m4 (gl_SAME): Check for pathconf.
17903
17904 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17905
17906         Merge from coreutils.
17907
17908         * lib/posixver.c: Include posixver.h.
17909
17910         * lib/same.c: Include <stdbool.h>, <limits.h>.
17911         (_POSIX_NAME_MAX): Define if not defined.
17912         (MIN): New macro.
17913         (same_name): If file names are silently truncated, report
17914         that the file names are the same if they are the same after
17915         the silent truncation.
17916
17917         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17918         conversion function.
17919         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17920         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17921         longer needed.
17922
17923 2004-01-15  Jim Meyering  <jim@meyering.net>
17924
17925         Merge from coreutils.
17926
17927         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17928         if no library is required.
17929         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17930         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17931         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17932         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17933         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17934         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17935         value, $ac_cv_search_crypt, if it's "none required".
17936         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17937         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17938         not gl_FUNC_GETLOADAVG.
17939         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17940         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17941
17942 2004-01-15  Jim Meyering  <jim@meyering.net>
17943
17944         Merge from coreutils.
17945
17946         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17947         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17948         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17949
17950         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17951         optional configure-time default.
17952
17953         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17954
17955         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17956
17957 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17958
17959         Merge from coreutils.
17960
17961         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17962         value, $ac_cv_search_nanosleep, if it's "none required".
17963
17964 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17965
17966         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17967         with like-named macro in fnmatch.c.
17968         (EXT): Use an internal constant instead.
17969
17970         Merge fnmatch patches from glibc.
17971         * lib/fnmatch.c (mbsinit): Remove define.
17972         Add libc_hidden_ver (__fnmatch, fnmatch).
17973         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17974         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17975
17976 2004-01-14  Karl Berry  <karl@gnu.org>
17977
17978         * config/install-sh: update from automake.
17979
17980 2004-01-13  Karl Berry  <karl@gnu.org>
17981
17982         * config/install-sh: update from automake.
17983
17984 2004-01-09  Karl Berry  <karl@gnu.org>
17985
17986         * config/install-sh: update from automake.
17987
17988 2004-01-05  Karl Berry  <karl@gnu.org>
17989
17990         * config/config.{sub,guess}: update from config.
17991
17992 2003-12-31  Karl Berry  <karl@gnu.org>
17993
17994         * config/depcomp: update from automake.
17995
17996 2003-12-14  Karl Berry  <karl@gnu.org>
17997
17998         * lib/config.charset: update from gettext-runtime.
17999
18000 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18001
18002         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18003         Bug reported by Alfred M. Szmidt.
18004
18005 2003-12-03  Bruno Haible  <bruno@clisp.org>
18006
18007         * m4/gettext.m4: Upgrade from gettext-0.13.
18008         * m4/po.m4: Upgrade from gettext-0.13.
18009         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18010         * m4/intmax.m4: New file, from gettext-0.13.
18011         * m4/printf-posix.m4: New file, from gettext-0.13.
18012
18013 2003-11-29  Karl Berry  <karl@gnu.org>
18014
18015         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18016
18017 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18018             Bruno Haible  <bruno@clisp.org>
18019
18020         * lib/printf-parse.h: Don't include sys/types.h.
18021         (ARG_NONE): New macro.
18022         (char_directive): Change type of *arg_index fields to size_t.
18023         * lib/printf-parse.c: Don't include sys/types.h.
18024         (SSIZE_MAX): Remove macro.
18025         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18026         Remove unnecessary overflow check.
18027         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18028         fields.
18029
18030 2003-11-25  Bruno Haible  <bruno@clisp.org>
18031
18032         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18033
18034 2003-11-25  Bruno Haible  <bruno@clisp.org>
18035
18036         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18037         gt_TYPE_SSIZE_T.
18038
18039 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18040
18041         * modules/alloca: Remove dependency on xalloc.
18042
18043 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18044
18045         * lib/alloca.c: Remove dependency on xalloc module.
18046         (xalloc_die): Remove.
18047         (memory_full) [!defined emacs]: New macro.
18048         [!defined emacs]: Don't include xalloc.h.
18049         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18050         address arithmetic overflows.  Change datatypes a bit to avoid
18051         unnecessary casts.
18052
18053 2003-11-22  Jim Meyering  <jim@meyering.net>
18054
18055         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18056         s/size/size_t/.
18057
18058 2003-11-21  Karl Berry  <karl@gnu.org>
18059
18060         * config/config.{sub,guess}: update from config.
18061
18062 2003-11-18  Karl Berry  <karl@gnu.org>
18063
18064         * config/config.{sub,guess}: update from config.
18065
18066         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18067
18068 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18069
18070         * README: Mention that S+T cannot overflow if S is the size of
18071         an existing object and T is sufficiently small.
18072
18073 2003-11-17  Jim Meyering  <jim@meyering.net>
18074
18075         On systems without utime and without a utimes function capable of
18076         dealing with a NULL struct utimbuf* argument, this utime replacement
18077         could -- in unusual circumstances -- leak a file descriptor.
18078         * lib/utime.c: Include <unistd.h> and <errno.h>.
18079         (utime_null): Be sure to close `fd' and to preserve errno.
18080         Reported by Geoff Collyer via Arnold Robbins.
18081
18082 2003-11-17  Bruno Haible  <bruno@clisp.org>
18083
18084         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18085         (Depends-on): Add xsize.
18086
18087 2003-11-17  Bruno Haible  <bruno@clisp.org>
18088
18089         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18090
18091 2003-11-17  Bruno Haible  <bruno@clisp.org>
18092
18093         * lib/vasnprintf.c (alloca): Remove fallback definition.
18094         (freea): Remove definition.
18095         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18096         Reported by Paul Eggert.
18097
18098 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18099             Bruno Haible  <bruno@clisp.org>
18100
18101         Protect against address arithmetic overflow.
18102         * lib/printf-args.h: Include stddef.h.
18103         (arguments): Change type of field 'count' to size_t.
18104         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18105         'unsigned int' where appropriate.
18106         * lib/printf-parse.h: Include sys/types.h.
18107         (char_directive): Change type of *arg_index fields to ssize_t.
18108         (char_directives): Change type of fields 'count', max_*_length to
18109         size_t.
18110         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18111         (SSIZE_MAX): Define fallback value.
18112         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18113         instead of 'int' where appropriate. Check a_allocated, d_allocated
18114         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18115         * lib/vasnprintf.c: Include xsize.h.
18116         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18117         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18118         overflow. Avoid wraparound when converting a width or precision from
18119         decimal to binary.
18120
18121 2003-11-16  Bruno Haible  <bruno@clisp.org>
18122
18123         Update from GNU gettext.
18124         * lib/printf-parse.c: Generalize to it can be compiled for wide
18125         strings.
18126         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18127         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18128         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18129         SNPRINTF): New macros.
18130         Don't include <alloca.h> if the file is used inside libintl.
18131         (local_wcslen): New function, for Solaris 2.5.1.
18132         (VASNPRINTF): Use it instead of wcslen.
18133
18134 2003-11-16  Bruno Haible  <bruno@clisp.org>
18135
18136         * lib/xsize.h (xmax): New function.
18137         (xsum, xsum3, xsum4): Declare as "pure" functions.
18138
18139 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18140
18141         * modules/xalloc (Files): Undo latest change, since xalloc.h
18142         no longer needs SIZE_MAX or PTRDIFF_MAX.
18143
18144 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18145
18146         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18147         gl_PTRDIFF_MAX.
18148
18149 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18150
18151         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18152         "return", to pacify some unknown compiler.  Problem reported
18153         by Joerg Schilling.
18154
18155 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18156
18157         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18158         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18159         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18160         heuristic is just as accurate as far as we know, and it removes a
18161         dependency on size_max.m4 and ptrdiff_max.m4.
18162
18163 2003-11-11  Bruno Haible  <bruno@clisp.org>
18164
18165         * modules/xsize (Files): Add m4/size_max.m4.
18166         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18167
18168 2003-11-11  Bruno Haible  <bruno@clisp.org>
18169
18170         * m4/size_max.m4: New file.
18171         * m4/ptrdiff_max.m4: New file.
18172         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18173         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18174         (gl_XALLOC): Invoke it.
18175
18176 2003-11-11  Bruno Haible  <bruno@clisp.org>
18177
18178         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18179         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18180         defined.
18181
18182 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18183
18184         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18185         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18186         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18187         From Bruno Haible.
18188         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18189         not (size_t) -1, since it's defined here.
18190
18191 2003-11-09  Karl Berry  <karl@gnu.org>
18192
18193         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18194
18195 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18196
18197         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18198         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18199         Reject sizes of exactly SIZE_MAX bytes.
18200         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18201         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18202
18203 2003-11-05  Bruno Haible  <bruno@clisp.org>
18204
18205         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18206         SIZE_MAX defined in <limits.h> on Solaris.
18207
18208 2003-11-04  Jim Meyering  <jim@meyering.net>
18209
18210         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18211         variable names, rather than @VAR@.
18212         * modules/poll: Likewise.
18213
18214 2003-11-04  Bruno Haible  <bruno@clisp.org>
18215
18216         * modules/xsize: New file.
18217         * modules/linebreak: Depend on xsize.
18218         * MODULES.html.sh (func_all_modules): Add xsize.
18219
18220 2003-11-04  Bruno Haible  <bruno@clisp.org>
18221
18222         * m4/xsize.m4: New file.
18223
18224 2003-11-04  Bruno Haible  <bruno@clisp.org>
18225
18226         * lib/xsize.h: New file.
18227         * lib/linebreak.c: Include xsize.h.
18228         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18229         argument for overflow.
18230         Suggested by Paul Eggert.
18231
18232 2003-11-03  Karl Berry  <karl@gnu.org>
18233
18234         * config/config.{guess,sub}: update from config.
18235
18236 2003-11-03  Jim Meyering  <jim@meyering.net>
18237
18238         * modules/userspec (lib_SOURCES): Add userspec.h.
18239         (Include): Add "userspec.h".
18240         Improve description.
18241
18242 2003-11-03  Jim Meyering  <jim@meyering.net>
18243
18244         * lib/userspec.c: Include "userspec.h".
18245         * lib/userspec.h: New file.
18246
18247 2003-11-03  Bruno Haible  <bruno@clisp.org>
18248
18249         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18250
18251 2003-11-03  Bruno Haible  <bruno@clisp.org>
18252
18253         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18254         available, to avoid (extremely rare) race condition.
18255         Suggested by Paul Eggert.
18256
18257 2003-11-02  Karl Berry  <karl@gnu.org>
18258
18259         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18260
18261 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18262
18263         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18264         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18265         (read_filesystem_list): Set and use me_type_malloced.
18266         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18267         whatever the type happens to be), for brevity and consistency.
18268         Check for size calculation overflow on Alphas running OSF/1.
18269
18270 2003-10-31  Jim Meyering  <jim@meyering.net>
18271
18272         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18273
18274         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18275
18276 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18277             Bruno Haible  <bruno@clisp.org>
18278
18279         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18280         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18281
18282 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18283
18284         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18285         netbsd*-gnu*.  Suggested by Robert Millan.
18286
18287 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18288
18289         * modules/group-member: Depend on stdbool.
18290
18291 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18292
18293         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18294
18295 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18296
18297         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18298         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18299         after the 'gnu' in these cases.  This fixes some bugs in the
18300         previous change, and is based on suggestions by Robert Millan.
18301
18302 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18303
18304         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18305         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18306         no longer needed.
18307         * lib/quotearg.c (quotearg_n_options): Use it.
18308         * lib/group-member.c: Include <stdbool.h>.
18309         (free_group_info): Arg is now const *; don't free arg.
18310         (get_group_info): Now returns bool and accepts struct group_info *,
18311         rather than returning a malloc'ed struct group_info *.
18312         All uses changed.  Check for overflow in internal size calculation.
18313
18314         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18315         rather than xmalloc/xrealloc.
18316         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18317         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18318         conformance bug: the old code used a pointer after freeing the
18319         storage that it addressed.
18320         * lib/hash.c (hash_initialize): Simplify the code by using
18321         xalloc_oversized rather than doing it by hand.
18322         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18323         the buffer preserved.  Use free and xmalloc instead.
18324         * lib/quotearg.c (quotearg_n_options): Likewise.
18325         Use a simpler test for size overflow.  Don't use xalloc_oversized
18326         because unsigned int might be wider than size_t (!); this suggests
18327         that we should switch from unsigned int to size_t for slot numbers.
18328
18329 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18330
18331         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18332         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18333         NetBSD kernels.  Requested by Richard Stallman.
18334
18335 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18336
18337         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18338         to allocate the returned structure.  Do not allocate a subarray,
18339         as x2nrealloc will do that.
18340         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18341         instead of xnrealloc.
18342         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18343
18344 2003-10-27  Bruno Haible  <bruno@clisp.org>
18345
18346         * lib/stdbool_.h: Better support for BeOS.
18347
18348 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18349
18350         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18351         now uses inline.
18352
18353 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18354
18355         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18356         callers that want to do their own size-overflow checking.  Include
18357         <stdbool.h>, since xalloc_oversized returns bool.
18358         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18359         to use xalloc_oversized.
18360
18361         Add two functions x2realloc, x2nrealloc, for programs that grow
18362         arrays dynamically by doubling their sizes.
18363         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18364         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18365         New functions.
18366
18367         Port to C99 semantics for 'inline' of external functions.
18368         Bug reported by Bruno Haible.
18369         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18370         with the old contents of xnmalloc.
18371         (xnmalloc, xmalloc): Use it.
18372         (xnrealloc_inline): New static inline function,
18373         with the old contents of xnrealloc.
18374         (xnrealloc, xrealloc): Use it.
18375
18376         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18377         that.
18378
18379 2003-10-26  Karl Berry  <karl@gnu.org>
18380
18381         * config/srclist.txt (COPYING.DOC): no longer available from
18382         /gd/gnuorg; don't know where the ultimate source is.
18383
18384 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18385
18386         Fix several address-calculation bugs in the hash modules,
18387         plus some minor code cleanup.
18388
18389         * lib/hash.h: Include <stdbool.h>, for bool.
18390         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18391         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18392         hash_get_n_entries, hash_get_max_bucket_length,
18393         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18394         hash_rehash): Use size_t rather than unsigned.
18395         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18396         hash_get_n_buckets_used, hash_get_n_entries,
18397         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18398         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18399         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18400         Likewise.
18401         (SIZE_MAX): Define if not defined.
18402         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18403         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18404         hash_print):
18405         Use const * when possible.
18406         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18407         (check_tuning): Fix bug: if tuning parameters were very close to
18408         0 or 1, rounding errors could have caused subscript violations.
18409         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18410         (hash_initialize): Add 'fail:' label
18411         to free table and return NULL, and use it to simplify code.
18412         Use calloc rather than clearing the storage ourself.
18413         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18414         buffer size calculations.
18415         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18416         Include <stddef.h>, for size_t.
18417         * lib/hash-pjw.c (hash_pjw): Likewise.
18418         Switch to method described by Bruno Haible.
18419         Include <limits.h>, for CHAR_BIT.
18420         (SIZE_BITS): New macro.
18421
18422 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18423
18424         * m4/getline.m4 (AM_FUNC_GETLINE):
18425         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18426         hosts.  Problem reported by Derek Robert Price in
18427         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18428         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18429         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18430
18431 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18432
18433         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18434         ceiling the allocation at NMAX bytes rather than silently
18435         discarding input bytes before NMAX is reached.  This makes
18436         a difference only if NMAX exceeds SIZE_MAX / 2.
18437
18438         * lib/obstack.c: Merge from glibc.
18439         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18440         Add libc_hidden_def (_obstack_newchunk).
18441         (_obstack_free) [! defined _LIBC]: Remove.
18442         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18443         a clone of the function body.
18444         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18445         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18446
18447         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18448         glibc.
18449         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18450         arg to memcpy.
18451
18452         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18453         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18454         Don't use lvalue casts, as GCC plans to remove support for them
18455         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18456         was also present in the non-GCC version, indicating that this
18457         code had always been buggy and had never been widely used.
18458         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18459         Use the fast variant of each macro, rather than copying the
18460         definiens of the fast variant; that way, we'll be more likely to
18461         catch future bugs in the fast variants.
18462
18463 2003-10-20  Bruno Haible  <bruno@clisp.org>
18464
18465         * modules/wait-process: New file.
18466         * MODULES.html.sh (func_all_modules): Add wait-process.
18467
18468 2003-10-20  Bruno Haible  <bruno@clisp.org>
18469
18470         * m4/wait-process.m4: New file.
18471
18472 2003-10-20  Bruno Haible  <bruno@clisp.org>
18473
18474         * lib/wait-process.h: New file, from GNU gettext.
18475         * lib/wait-process.c: New file, from GNU gettext.
18476
18477 2003-10-19  Jim Meyering  <jim@meyering.net>
18478
18479         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18480         HPUX 10.20.
18481
18482 2003-10-18  Karl Berry  <karl@gnu.org>
18483
18484         * config/config.guess: update from config.
18485
18486 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18487
18488         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18489         (getgroups): First arg is int, not size_t.
18490         Don't let 'free' mangle errno.
18491
18492 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18493
18494         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18495
18496 2003-10-16  Karl Berry  <karl@gnu.org>
18497
18498         * config/config.{guess,sub}: update from config.
18499
18500 2003-10-16  Jim Meyering  <jim@meyering.net>
18501
18502         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18503         memcpy.
18504
18505 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18506
18507         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18508         (SIZE_MAX): Remove.
18509         (new_exclude, add_exclude_file): Initial size no longer needs to
18510         be a power of 2.
18511         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18512         our own address arithmetic overflow checking.
18513
18514         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18515         (fnmatch): Do not alloca more than 2000 wide characters;
18516         instead, use malloc for large buffers.
18517         Check for address arithmetic overflow, and return -1
18518         with errno set to ENOMEM in that case.
18519         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18520         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18521         instead, return -1.  Check for address arithmetic overflow.
18522
18523 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18524
18525         Handle invalid suffixes and overflow independently, so that
18526         callers can treat them independently as needed.  Fix some bugs in
18527         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18528         suffix for a human-readable blocksize.  The major caller-visible
18529         change is the addition of a new
18530         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18531         that both overflow and suffix chars were found.
18532
18533         * lib/human.c (humblock): Don't check separately for invalid suffix
18534         char; that is xstrtoumax's job (now that its bug is fixed).
18535         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18536         INTMAX_MAX]: New macros.
18537         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18538         TYPE_MAXIMUM): New macros.
18539         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18540         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18541         if overflow occurs, as it's what __strtol does and it's more useful
18542         in practice.
18543         (__xstrtol): If __strtol reports some error other than ERANGE,
18544         reflect it to the caller as LONGINT_INVALID.  If it reports
18545         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18546         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18547         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18548         value.
18549         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18550         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18551         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18552         [defined UINTMAX_MAX]: New macros.
18553
18554 2003-10-14  Bruno Haible  <bruno@clisp.org>
18555
18556         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18557
18558 2003-10-14  Bruno Haible  <bruno@clisp.org>
18559
18560         * m4/sig_atomic_t: New file, from GNU gettext.
18561         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18562
18563 2003-10-14  Bruno Haible  <bruno@clisp.org>
18564
18565         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18566         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18567         Also use volatile where needed.
18568
18569 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18570
18571         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18572         Change maintainer from Bruno Haible to 'all'.
18573
18574 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18575
18576         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18577
18578 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18579
18580         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18581         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18582         and define in terms of the other primitives.
18583         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18584         (SIZE_MAX): Define if not already defined.
18585         (array_size_overflow): New function.
18586         (xalloc_die): Abort instead of exiting if 'error' returns.
18587         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18588         (xmalloc, xrealloc): Use them.
18589         (xcalloc): Check for address arithmetic overflow.
18590         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18591         a bit faster than strcpy.
18592
18593 2003-10-10  Simon Josefsson  <jas@extundo.com>
18594
18595         * modules/argp (Depends-on): Add restrict and strcase.
18596
18597 2003-10-10  Simon Josefsson  <jas@extundo.com>
18598
18599         * m4/argp.m4: Add AC_C_INLINE.
18600
18601 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18602
18603         Merge getpass from libc, plus a few fixes.
18604
18605         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18606         Include <stdbool.h>.
18607         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18608         __fsetlocking to empty.
18609         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18610         do include <bits/libc-lock.h>.
18611         Do not include <fcntl.h>; not needed.
18612         [_LIBC]: Include <wchar.h>.
18613         (NOTCANCEL_MODE): New macro.
18614         (flockfile, funlockfile) [_LIBC]: New macros.
18615         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18616         [!_LIBC]: New macros.
18617         (call_fclose): New function.
18618         (getpass): Use it.  Save tty stream separately; this simplifies the
18619         code and makes it more reliable if stdin happens to equal stdout.
18620         Invoke __fsetlocking on tty.
18621         Handle thread cancellation if needed.
18622         Namespace cleanup (use __tcgetattr, __getline).
18623         Use bool for Booleans.
18624         [USE_IN_LIBIO]: Handle wide streams.
18625         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18626         stream might go where.
18627
18628         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18629         doesn't have to include <stdio.h> before us.
18630         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18631         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18632         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18633         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18634         if not declared, so that we can use getpass.c code from libc without
18635         rewriting it.
18636         (flockfile, ftrylockfile, funlockfile): New macros.
18637
18638 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18639
18640         * modules/getpass: Depend on stdbool.
18641
18642 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18643
18644         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18645
18646 2003-10-07  Karl Berry  <karl@gnu.org>
18647
18648         * config/config.{guess,sub}: update from config.
18649
18650 2003-10-06  Jim Meyering  <jim@meyering.net>
18651             Bruno Haible  <bruno@clisp.org>
18652
18653         This lets translators provide better translations for the
18654         "Written by ..." part of --version output.
18655         * lib/version-etc.h: Include stdarg.h.
18656         (version_etc_copyright): Declare as readonly.
18657         (version_etc): Make this function variadic with a NULL-terminated list
18658         of author name strings.
18659         (version_etc_va): New declaration.
18660         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18661         (version_etc_copyright): Declare as readonly.
18662         (version_etc_va): New function. Provide a different translatable string
18663         for each possible number of authors < 10. Abbreviate when there are 10
18664         authors or more.
18665         (version_etc): Make this function variadic. Call version_etc_va.
18666         Suggestion from Gary V. Vaughan.
18667
18668         * lib/long-options.h (parse_long_options): Change prototype: the
18669         authors string is moved to the end and becomes variadic.
18670         * lib/long-options.c: Include stdarg.h.
18671         (parse_long_options): Make this function variadic, too.
18672         Call version_etc_va, not version_etc.
18673
18674 2003-10-06  Bruno Haible  <bruno@clisp.org>
18675
18676         * modules/version-etc-2: Remove file.
18677         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18678
18679 2003-10-06  Bruno Haible  <bruno@clisp.org>
18680
18681         * modules/fatal-signal: New file.
18682         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18683
18684 2003-10-06  Bruno Haible  <bruno@clisp.org>
18685
18686         * m4/fatal-signal.m4: New file.
18687         * m4/signalblocking.m4: New file, from GNU gettext.
18688
18689 2003-10-06  Bruno Haible  <bruno@clisp.org>
18690
18691         * lib/version-etc-2.h: Remove file.
18692         * lib/version-etc-2.c: Remove file.
18693
18694 2003-10-06  Bruno Haible  <bruno@clisp.org>
18695
18696         * lib/fatal-signal.h: New file, from GNU gettext.
18697         * lib/fatal-signal.c: New file, from GNU gettext.
18698
18699 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18700
18701         * README: Rework advice for preventing empty .o files.
18702         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18703         not <sys/types.h>.
18704
18705 2003-10-04  Karl Berry  <karl@gnu.org>
18706
18707         * lib/argp*: update from libc.
18708
18709 2003-10-04  Karl Berry  <karl@gnu.org>
18710
18711         * config/config.{guess,sub}: update from config.
18712
18713 2003-10-02  Bruno Haible  <bruno@clisp.org>
18714
18715         * modules/lchown (Include): Add lchown.h.
18716         * modules/time_r (Include): Use "..." syntax.
18717         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18718
18719 2003-10-01  Simon Josefsson  <jas@extundo.com>
18720
18721         * MODULES.html.sh (func_all_modules): Move gethostname from section
18722         'based on' to section 'lacking' POSIX:2001.
18723
18724 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18725
18726         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18727         to output mode on the same stream.
18728
18729 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18730
18731         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18732         Fix arg typo in previous patch.
18733
18734 2003-09-28  Jim Meyering  <jim@meyering.net>
18735
18736         * lib/error.c: Correct cpp indentation.
18737
18738 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18739
18740         * modules/free: New file.
18741
18742 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18743
18744         * m4/free.m4: New file.
18745
18746 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18747
18748         * lib/minmax.h (MIN, MAX)
18749         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18750         Omit the special code that used __typeof__, since we worry that
18751         it could be more trouble than it's worth.  See:
18752         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18753         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18754
18755         * lib/free.c: New file.
18756
18757 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18758
18759         Trivial fixes to Makefile.am parts of module listings.
18760         * modules/strstr: Append strstr.h to lib_SOURCES.
18761         * modules/strcase: Likewise, for strcase.h.
18762
18763 2003-09-27  Karl Berry  <karl@gnu.org>
18764
18765         * config/mkinstalldirs: update from automake.
18766
18767 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18768
18769         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18770         (error_tail): Do not loop, reallocating temporary buffer, since
18771         the output cannot contain more wide characters than the input
18772         contains bytes, the size must be big enough already.  This avoids
18773         one potential size overflow calculation.  Check for size overflow
18774         when calculating temporary buffer size.  Free temporary buffer
18775         when done, if it was allocated with malloc; this plugs a memory
18776         leak.  Remove casts from void * to pointers, that are no longer
18777         needed now that we're assuming C89 or better.
18778
18779         Merge error changes from glibc.
18780
18781         * lib/error.c, error.h: Update copyright notice header to match glibc.
18782         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18783         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18784         Disable cancellation while printing error.
18785         * lib/error.h: Prepend __ to parameter names.
18786
18787 2003-09-26  Jim Meyering  <jim@meyering.net>
18788
18789         * lib/error.c (error_tail): Move some declarations
18790         into inner scope where the local variables are used.
18791
18792 2003-09-26  Bruno Haible  <bruno@clisp.org>
18793
18794         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18795         stpncpy().
18796         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18797
18798 2003-09-26  Bruno Haible  <bruno@clisp.org>
18799
18800         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18801         (stpncpy): Define as alias for gnu_stpncpy.
18802         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18803
18804 2003-09-25  Simon Josefsson  <jas@extundo.com>
18805
18806         * lib/xgetdomainname.h: New file.
18807         * lib/xgetdomainname.c: New file.
18808
18809 2003-09-25  Simon Josefsson  <jas@extundo.com>
18810             Bruno Haible  <bruno@clisp.org>
18811
18812         * modules/getdomainname: New file.
18813         * modules/xgetdomainname: New file.
18814         * MODULES.html.sh (func_all_modules): Add getdomainname,
18815         xgetdomainname.
18816
18817 2003-09-25  Simon Josefsson  <jas@extundo.com>
18818             Bruno Haible  <bruno@clisp.org>
18819
18820         * m4/getdomainname.m4: New file.
18821
18822 2003-09-25  Simon Josefsson  <jas@extundo.com>
18823             Bruno Haible  <bruno@clisp.org>
18824
18825         * lib/getdomainname.h: New file.
18826         * lib/getdomainname.c: New file.
18827
18828 2003-09-25  Karl Berry  <karl@gnu.org>
18829
18830         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18831
18832 2003-09-25  Karl Berry  <karl@gnu.org>
18833
18834         * config/install-sh: update from automake.
18835
18836 2003-09-25  Bruno Haible  <bruno@clisp.org>
18837
18838         * modules/version-etc-2: New file, from modules/version-etc with
18839         modifications.
18840         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18841
18842 2003-09-25  Bruno Haible  <bruno@clisp.org>
18843
18844         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18845         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18846
18847 2003-09-24  Simon Josefsson  <jas@extundo.com>
18848
18849         * modules/xgethostname: Add xgethostname.h.
18850
18851 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18852
18853         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18854         the buffer associated with the argument.  Bug reported by
18855         Simon Josefsson.
18856
18857 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18858
18859         * README: Document assumptions that 'int' is at least 32 bits
18860         wide, that integer arithmetic is 2's complement without overflow,
18861         that there are no holes in integer values, that adding sizes of
18862         two nonoverlapping objects can't overflow, and that all-bits-zero
18863         yields scalar zero.  Fix spelling and capitalization typos.
18864
18865 2003-09-19  Karl Berry  <karl@gnu.org>
18866
18867         * lib/argp.h: update from libc.
18868
18869 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18870
18871         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18872         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18873         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18874
18875 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18876
18877         * gnulib-tool: Use "test -h", not "test -L", for portability
18878         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18879         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18880         (sed_extract_prog): Issue s commands one-by-one, rather than
18881         using \| in one s command.
18882
18883 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18884
18885         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18886         input error, instead of returning NULL the next time we are called
18887         (and therefore losing track of errno).
18888
18889 2003-09-16  Bruno Haible  <bruno@clisp.org>
18890
18891         * gnulib-tool (func_create_testdir): Warn about duplicated
18892         dependencies.
18893
18894 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18895
18896         * modules/argmatch, modules/fatal, modules/obstack,
18897         modules/xalloc, modules/xgethostname: Sort dependencies by
18898         importance, not alphabetically.
18899
18900 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18901
18902         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18903         fails, so that the caller gets the proper errno.
18904
18905         * lib/readutmp.c (read_utmp): Likewise.
18906         Check for fstat error.  Close stream and free storage
18907         when failing.
18908
18909 2003-09-14  Karl Berry  <karl@gnu.org>
18910
18911         * config/srclist.txt (strdup.c): disable for c89 changes.
18912
18913 2003-09-14  Jim Meyering  <jim@meyering.net>
18914
18915         * lib/getloadavg.c: Correct cpp indentation.
18916         * lib/strdup.c: Likewise.
18917         * lib/vasnprintf.c: Likewise.
18918
18919 2003-09-14  Bruno Haible  <bruno@clisp.org>
18920
18921         * modules/fwriteerror: New file.
18922         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18923
18924 2003-09-14  Bruno Haible  <bruno@clisp.org>
18925
18926         * lib/fwriteerror.h: New file.
18927         * lib/fwriteerror.c: New file.
18928
18929 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18930
18931         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18932         modules/xgethostname, modules/xalloc: Depend on exit.
18933
18934 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18935
18936         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18937
18938         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18939         and AC_MINIX, too, so that their extensions are available.
18940
18941         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18942         This macro has been superseded by gl_BACKUPFILE.
18943
18944         More patches to assume C89 or better.
18945
18946         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18947
18948         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18949         unconditionally.
18950         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18951         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18952         Include <string.h>, <stdlib.h> unconditionally.
18953         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18954         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18955         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18956         headers or for string.h.
18957         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18958         or strtoul.
18959
18960         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18961         headers.
18962         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18963         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18964         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18965         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18966         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18967         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18968         memcpy, memset.
18969         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18970         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18971         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18972         strtol.
18973         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18974         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18975         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18976         strtoul.
18977
18978 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18979
18980         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18981         * lib/obstack.c [!defined _LIBC]: Likewise.
18982         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18983         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18984         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18985
18986         More changes to assume C89 or better.
18987
18988         * lib/error.c (error_tail): Assume vprintf.
18989
18990         * lib/argmatch.c (getenv): Remove decl.
18991         * lib/progreloc.c (get_full_program_name): Define via prototype.
18992         * lib/setenv.c (clearenv): Likewise.
18993         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18994         needed.
18995         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18996         (malloc, memcpy): Remove decls.
18997         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18998         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18999         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19000         (memcpy): Remove macro.
19001         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19002         (__P): Remove.  All uses removed.
19003         (PTR): Remove.  All uses changed to void *.
19004         (CHAR_BIT, NULL): Remove.
19005         (spaces, zeros, memset_space, memset_zero)
19006         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19007         Remove.
19008         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19009         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19010         Define with prototype.
19011         Remove now-unnecessary prototype decl.
19012         (extra_args_spec): Assume ANSI C.  All uses changed.
19013         (extra_args_spec_iso): Remove.
19014         (my_strftime, emacs_strftimeu): Define via prototype.
19015         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19016         unconditionally.
19017         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19018         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19019         (strtoul, strtol): Remove decls.
19020         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19021         LONG_MAX): Remove.
19022         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19023         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19024         (LOCALE_PARAM_PROTO): New macro.
19025         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19026         (INTERNAL (strtol), strtol): Define with a prototype.
19027         (PARAMS): Remove.  All uses removed.
19028         * lib/tempname.c: Include <string.h> unconditionally.
19029         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19030         * lib/xgethostname.c (main): Define with a prototype.
19031         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19032         Include <stdlib.h> unconditionally.
19033         (calloc, malloc, realloc, free): Remove decls.
19034         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19035         Include <stdlib.h> unconditionally.  Sort include file names.
19036         (strtod): Remove.
19037         (xstrtod): Define with a prototype.
19038         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19039         (strtol, strtoul): Remove decls.
19040
19041 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19042
19043         More patches to assume C89 or better.
19044         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19045         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19046         string.h, memchr, STDC_HEADERS.
19047
19048 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19049
19050         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19051         Include <stdlib.h>, <string.h> unconditionally.
19052         Remove now-unnecessary cast to char *.
19053         * lib/strnlen.c: Include <string.h> unconditionally.
19054         * lib/yesno.c (yesno): Define with a prototype.
19055
19056 2003-09-11  Bruno Haible  <bruno@clisp.org>
19057
19058         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19059
19060 2003-09-10  Jim Meyering  <jim@meyering.net>
19061
19062         * lib/error.c: Correct indentation of cpp directives.
19063
19064 2003-09-10  Bruno Haible  <bruno@clisp.org>
19065
19066         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19067         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19068         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19069         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19070         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19071         <stdlib.h> and <string.h> checks.
19072         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19073         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19074
19075 2003-09-10  Bruno Haible  <bruno@clisp.org>
19076
19077         * lib/strcspn.c: Include <string.h> unconditionally.
19078         * lib/strpbrk.c: Include <string.h> unconditionally.
19079         * lib/strstr.c: Include <string.h> unconditionally.
19080         * lib/unicodeio.c: Include <string.h> unconditionally.
19081         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19082         * lib/unsetenv.c: Likewise.
19083         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19084         * lib/yesno.c: Include <stdlib.h> unconditionally.
19085         (rpmatch): Add prototype.
19086
19087 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19088
19089         More patches to assume C89 or better.
19090         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19091         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19092         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19093         or for string.h.
19094         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19095         stdlib.h.
19096         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19097         C headers.
19098         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19099         string.h.
19100         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19101         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19102         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19103         or for string.h.
19104         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19105         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19106         C headers.
19107         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19108         memcpy.
19109         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19110         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19111         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19112         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19113         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19114         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19115         string.h, free.
19116         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19117         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19118         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19119         C headers, or for string.h.
19120         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19121         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19122         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19123         headers, memory.h, stdlib.h, string.h, strings.h.
19124         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19125         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19126         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19127         strchr.
19128         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19129         headers, memory.h, string.h.
19130         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19131         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19132         free.
19133         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19134         headers.
19135         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19136         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19137         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19138         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19139         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19140
19141 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19142
19143         More K&R removal.
19144
19145         * lib/acosl.c (main): Use a prototype.
19146         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19147         tanl.c: Likewise.
19148
19149         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19150
19151         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19152         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19153         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19154         with a prototype.
19155         * lib/getopt.c (const): Remove macro.
19156         Include <string.h> unconditionally.
19157         (my_index): Remove; all uses changed to strchr.
19158         (strlen): Remove decl.
19159         (exchange): Remove forward decl; no longer needed.
19160         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19161         Define with prototype.
19162         * lib/getopt1.c (const): Remove macro.
19163         (getopt_long, getopt_long_only, main): Define with prototype.
19164
19165         * lib/getugroups.c: Include <string.h> unconditionally.
19166
19167         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19168         (getusershell, setusershell, endusershell, readname, main):
19169         Define with prototypes.
19170
19171         * lib/group-member.c: Include group-member.h first.
19172         Include <stdlib.h> unconditionally.
19173
19174         * lib/hard-locale.c: Include hard-locale.h first.
19175         Include <stdlib.h>, <string.h> unconditionally.
19176
19177         * lib/hash.c (free, malloc): Remove decls.
19178         Include <stdlib.h> unconditionally.
19179
19180         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19181         (getenv): Do not declare.
19182
19183         * lib/idcache.c: Include <string.h> unconditionally.
19184
19185         * lib/long-options.c: Include long-options.h first, to test interface.
19186         Include <stdlib.h> unconditionally.
19187
19188         * lib/makepath.c: Include makepath.h first, to test interface.
19189         Include <stdlib.h> and <string.h> unconditionally.
19190
19191         * lib/linebuffer.c: Include <stdlib.h>.
19192         (free): Remove decl.
19193
19194         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19195         stddef.h. rpl_malloc returns void *, not char *.
19196         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19197         prototype.
19198
19199         * lib/md5.h: Include <limits.h> unconditionally.
19200         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19201         (__P): Remove; all uses removed.
19202         * lib/md5.c: Include "md5.h" first.
19203         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19204         md5_buffer, md5_process_bytes, md5_process_block):
19205         Define with prototypes.
19206         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19207         * lib/sha.c: Include "sha.h" first.
19208         Include <stdlib.h>, <string.h> unconditionally.
19209
19210         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19211         * lib/memcmp.c (__ptr_t): Likewise.
19212         * lib/memrchr.c (__ptr_t): Likewise.
19213         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19214         Include <string.h> unconditionally.
19215         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19216         * lib/memchr.c: Include <stdlib.h> unconditionally.
19217         * lib/memchr.c (LONG_MAX): Remove.
19218         * lib/memrchr.c (LONG_MAX): Likewise.
19219         * lib/memchr.c (__memchr): Define via a prototype.
19220         * lib/memrchr.c (__memrchr): Likewise.
19221         * lib/memcmp.c (__P): Remove, and remove all uses.
19222         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19223         Remove forward decls; no longer needed.
19224         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19225         Use types required by C89 in prototype.
19226
19227         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19228         * lib/savedir.c: Likewise.
19229         * lib/mkdir.c (free): Remove decl.
19230         * lib/rmdir.c (rmdir): Define with a prototype.
19231         * lib/savedir.c: Include savedir.h first, to test interface.
19232
19233         * lib/mktime.c (STDC_HEADERS): Remove.
19234         Include <stdlib.h>, <string.h> unconditionally.
19235
19236         * lib/modechange.c: Include <stdlib.h> unconditionally.
19237         (malloc): Remove decl.
19238
19239         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19240         (free): Remove decl.
19241
19242         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19243         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19244         (This type really should be intptr_t, but that's a C99ism.)
19245         (_obstack_memcpy): Remove: all uses changed to memcpy.
19246         Include <string.h> unconditionally.
19247         (struct obstack): Assume __STDC__ for types of members
19248         chunkfun, freefun, extra_arg.
19249         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19250         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19251         obstack_begin, obstack_specify_allocation,
19252         obstack_specify_allocation_with_arg, obstack_chunkfun,
19253         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19254         Remove unprototyped decls and the macros that use them.
19255         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19256         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19257         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19258         (defined __STDC__ && __STDC__)]:
19259         Remove nonprototyped code.
19260         Include <stdlib.h> unconditionally.
19261         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19262         _obstack_allocated_p, _obstack_free, obstack_free,
19263         _obstack_memory_used, print_and_abort):
19264         Define using prototypes.
19265         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19266         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19267         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19268         obstack_next_free, obstack_object_size, obstack_room) [0]:
19269         Remove unused, unprototyped code.
19270
19271         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19272
19273         * lib/physmem.c (physmem_total, physmem_available, main): Define
19274         with prototypes.
19275
19276         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19277         (main): Define with a prototype.
19278
19279         * lib/posixver.c (getenv): Remove decl.
19280
19281         * lib/putenv.c (malloc): Returns void *, not char *.
19282         Include <string.h> unconditionally.
19283         (strchr, memcpy, NULL): Do not define.
19284
19285         * lib/readtokens.c: Include readtokens.h first, to test interface.
19286         Include <stdlib.h>, <string.h> unconditionally.
19287         (init_tokenbuffer): Define with a prototype.
19288
19289         * lib/regex.c (PARAMS): Remove.  All uses removed.
19290         All uses of _RE_ARGS removed, too.
19291         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19292         unconditionally.
19293         (bzero): Assume memset exists.
19294         (memcmp, memcpy, NULL): Remove.
19295         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19296         char, or assignments to local vars of type signed char.
19297         (init_syntax_once, PREFIX(extract_number_and_incr),
19298         PREFIX(print_partial_compiled_pattern),
19299         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19300         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19301         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19302         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19303         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19304         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19305         wcs_compile_range, byte_compile_range, truncate_wchar,
19306         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19307         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19308         count_mbs_length, wcs_re_match_2_internal,
19309         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19310         PREFIX(alt_match_null_string_p),
19311         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19312         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19313         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19314         now-unnecessary declaration, if any.
19315         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19316         regcomp, regexec):
19317         Remove now-unnecessary casts among pointer types.
19318         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19319
19320         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19321         (free): Remove decl.
19322
19323         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19324
19325         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19326         (free): Remove decl.
19327
19328         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19329         * lib/xgetcwd.c: Likewise.
19330
19331         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19332         (free): Remove decl.
19333
19334         * lib/strchrnul.c (strchrnul): Define with a prototype.
19335         Fix bug: c_in was not converted to char before searching.
19336
19337         The following changes are not K&R related:
19338
19339         * lib/group-member.h: Include <sys/types.h>, so that this file is
19340         self-contained.
19341         * lib/makepath.h: Likewise.
19342
19343         * lib/getusershell.c (readname, default_index, line_size, readname):
19344         Use size_t, not int, for sizes.
19345         (readname): If the size overflows, report an error instead of
19346         looping forever.
19347
19348 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19349
19350         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19351         libc.
19352
19353 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19354
19355         * README: New section: portability guidelines.
19356
19357 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19358
19359         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19360         C89 spec.
19361
19362 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19363
19364         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19365
19366 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19367
19368         Assume C89 or better; remove K&R cruft.
19369         A few of these changes were first proposed by Derek Robert Price
19370         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19371
19372         * lib/addext.c: Include <string.h> unconditionally.
19373         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19374         Don't declare getenv or malloc.
19375
19376         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19377         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19378         (NULL): Remove.
19379         (find_stack_direction, alloca): Use prototypes.
19380
19381         * lib/atexit.c (atexit): Define using a prototype.
19382
19383         * lib/basename.c, dirname.c, stripslash.c:
19384         Include <string.h> unconditionally.
19385
19386         * lib/bcopy.c: Include <stddef.h>.
19387         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19388
19389         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19390
19391         * lib/error.h (error, error_at_line, error_print_progname)
19392         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19393         * lib/error.c: Include error.h first, to check interface.
19394         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19395         (VA_START): Remove; all uses changeed to va_start.
19396         (exit, strerror): Remove decls.
19397         (error_print_progname): Prototype uncondionally.
19398         Don't include <errno.h>; no longer needed.
19399         (private_strerror): Remove.
19400         (error_tail): Always define.
19401         (error, error_at_line): Assume C89 or better; always use prototypes.
19402         * lib/fatal.c: Include "fatal.h" first, to test interface.
19403         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19404         (VA_START): Remove; all uses changed to va_start.
19405         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19406         this case.
19407         (exit): Remove decl.
19408         (fatal): Prototype unconditionally.  Assume va_start works.
19409         Abort at end, to pacify gcc.
19410
19411         * lib/euidaccess.c (main): Define with a prototype.
19412
19413         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19414
19415         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19416
19417         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19418         prototypes.
19419         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19420         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19421         (getenv): Remove decl.
19422         (fnmatch): Define using a prototype.
19423         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19424         (FCT): Define using a prototype.
19425
19426         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19427
19428         * lib/gethostname.c: Include <stddef.h>.
19429         (gethostname): Define with prototype.  Length is size_t, not int.
19430
19431 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19432
19433         Assume C89 or better; remove K&R cruft.
19434         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19435         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19436         string.h, getenv, malloc.
19437         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19438         headers.
19439         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19440         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19441         do not check for strerror.
19442         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19443         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19444         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19445         do not check for doprnt or vprintf.
19446         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19447         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19448
19449 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19450
19451         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19452         getversion.c should have been removed then, but was accidentally
19453         preserved.
19454
19455         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19456         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19457
19458 2003-09-08  Karl Berry  <karl@gnu.org>
19459
19460         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19461                 config, forget about prep.
19462
19463         * config/depcomp, missing: update from automake.
19464
19465 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19466
19467         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19468         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19469
19470 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19471
19472         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19473         copy_tm_result.  Bug reported by Simon Josefsson in
19474         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19475
19476 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19477
19478         * m4/time_r.m4: New file.
19479         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19480         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19481         is. Check for timegm declaration.
19482         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19483         Do not check for gmtime_r.
19484         Replace mktime if __mktime_internal does not exist and if mktime
19485         hasn't been replaced already.
19486
19487 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19488
19489         * lib/time_r.c, lib/time_r.h: New files.
19490
19491         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19492         __localtime_r.
19493         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19494         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19495
19496         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19497         __gmtime_r.
19498         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19499         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19500         Include <time_r.h>.
19501
19502         * lib/timegm.c: Switch to glibc implementation, with the following
19503         changes:
19504         [defined HAVE_CONFIG_H]: Include <config.h>.
19505         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19506         (__mktime_internal) [!defined _LIBC]: New decl.
19507         (__gmtime_r) [!defined _LIBC]: New macro and function.
19508         (timegm): Use a prototype, since gnulib assumes C89.
19509         Do not bother declaring tmp to be const, as it's not really usefu.
19510         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19511         (timegm): Declare only if HAVE_DECL_TIMEGM.
19512
19513 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19514
19515         * MODULES.html.sh (func_all_modules): Add time_r.
19516         * modules/time_r: New file.
19517         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19518         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19519
19520 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19521
19522         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19523         Bug reported by Lute Kamstra in
19524         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19525
19526         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19527         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19528         course with correspondingly smaller numbers for tomorrow and
19529         yesterday.  From Tadayoshi Funaba.  Originally installed into
19530         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19531         coreutils merge?).
19532
19533 2003-08-31  Simon Josefsson  <jas@extundo.com>
19534
19535         * modules/timegm: New file.
19536         * MODULES.html.sh (func_all_modules): Add timegm.
19537
19538 2003-08-31  Simon Josefsson  <jas@extundo.com>
19539
19540         * m4/timegm.m4: New file.
19541
19542 2003-08-31  Simon Josefsson  <jas@extundo.com>
19543
19544         * lib/timegm.h: New file.
19545         * lib/timegm.c: New file.  Based on
19546         wget-1.8.2/src/http.c:mktime_from_utc.
19547
19548 2003-08-31  Karl Berry  <karl@gnu.org>
19549
19550         * lib/argp.h: update from libc.
19551
19552 2003-08-28  Bruno Haible  <bruno@clisp.org>
19553
19554         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19555         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19556         followed by '#define fnmatch fnmatch_posix' gives an error.
19557
19558 2003-08-28  Bruno Haible  <bruno@clisp.org>
19559
19560         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19561         warning on QNX, which defines O_BINARY to 000000.
19562
19563 2003-08-27  Jim Meyering  <jim@meyering.net>
19564
19565         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19566         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19567         would fail after 32.  Reported by Danny Levinson.  Details here:
19568         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19569
19570 2003-08-24  Bruno Haible  <bruno@clisp.org>
19571
19572         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19573         MSVC7 <stdio.h> is included later.
19574
19575 2003-08-22  Simon Josefsson  <jas@extundo.com>
19576
19577         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19578
19579 2003-08-20  Karl Berry  <karl@gnu.org>
19580
19581         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19582
19583 2003-08-20  Bruno Haible  <bruno@clisp.org>
19584
19585         * modules/progname: New file.
19586         * MODULES.html.sh (func_all_modules): Add progname.
19587
19588 2003-08-20  Bruno Haible  <bruno@clisp.org>
19589
19590         * lib/progname.h: New file, from GNU gettext.
19591         * lib/progname.c: New file, from GNU gettext.
19592         * lib/progreloc.c: New file, from GNU gettext.
19593
19594 2003-08-19  Jim Meyering  <jim@meyering.net>
19595
19596         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19597         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19598
19599 2003-08-19  Bruno Haible  <bruno@clisp.org>
19600
19601         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19602         more.
19603
19604 2003-08-19  Bruno Haible  <bruno@clisp.org>
19605
19606         * lib/xstrdup.c: Assume <string.h> exists.
19607
19608 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19609
19610         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19611         in makefile rules.
19612
19613 2003-08-18  Jim Meyering  <jim@meyering.net>
19614
19615         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19616         * m4/lib-ld.m4: Likewise.
19617
19618 2003-08-18  Jim Meyering  <jim@meyering.net>
19619
19620         * lib/setenv.h: Indent nested cpp directive.
19621         * lib/vasnprintf.c: Remove trailing blanks.
19622
19623 2003-08-17  Simon Josefsson  <jas@extundo.com>
19624
19625         * modules/xstrndup: New file.
19626         * MODULES.html.sh (func_all_modules): Add xstrndup.
19627
19628 2003-08-17  Simon Josefsson  <jas@extundo.com>
19629
19630         * modules/argp: Fix autoconf macro name. Add more dependencies.
19631
19632 2003-08-17  Simon Josefsson  <jas@extundo.com>
19633
19634         * m4/xstrndup.m4: New file.
19635
19636 2003-08-17  Simon Josefsson  <jas@extundo.com>
19637
19638         * m4/argp.m4: New file.
19639
19640 2003-08-17  Simon Josefsson  <jas@extundo.com>
19641             Bruno Haible  <bruno@clisp.org>
19642
19643         * lib/xstrndup.h: New file.
19644         * lib/xstrndup.c: New file.
19645
19646 2003-08-17  Bruno Haible  <bruno@clisp.org>
19647
19648         * modules/strndup (Files, Include): Add lib/strndup.h.
19649
19650 2003-08-17  Bruno Haible  <bruno@clisp.org>
19651
19652         * modules/euidaccess (Files): Add lib/euidaccess.h.
19653
19654 2003-08-17  Bruno Haible  <bruno@clisp.org>
19655
19656         * lib/strndup.h: New file.
19657
19658 2003-08-17  Bruno Haible  <bruno@clisp.org>
19659
19660         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19661         like AC_GNU_SOURCE.
19662         * modules/extensions (configure.ac): Comment out the invocation of
19663         gl_USE_SYSTEM_EXTENSIONS.
19664
19665 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19666
19667         Merges from coreutils, etc.
19668         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19669         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19670         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19671         fixing a typo.
19672         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19673         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19674
19675 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19676
19677         Document merge from coreutils.
19678         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19679         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19680         * modules/utime: Add m4/utimes-null.m4.
19681
19682 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19683
19684         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19685         space, undoing this 2003-08-12 change:
19686         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19687
19688 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19689
19690         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19691         strtoul.c from libc, undoing this 2003-08-12 change:
19692         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19693
19694 2003-08-16  Jim Meyering  <jim@meyering.net>
19695
19696         Merges from coreutils.
19697         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19698         prefix.  Adjust cache variables similarly.  Create 500 rather than
19699         just 300 files, to exercise bug on Darwin6.5, too.
19700         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19701         $missing_dir.
19702         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19703         AM_SYS_POSIX_TERMIOS.
19704         Reported by mkc@mathdogs.com.
19705         Also change use of $am_cv_sys_posix_termios
19706         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19707         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19708         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19709         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19710         in /proc/mounts until it finds one with matching device number.  This
19711         is unnecessary when the FILE argument *is* a mount point.  No stat call
19712         is necessary in that case.  So, disable the statvfs-testing code on
19713         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19714         as RedHat bug# 84846.
19715         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19716         to 1MB, so as not to render systems with no stack size limit (e.g.,
19717         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19718         Include <unistd.h>.  On some systems,
19719         it is required for the definition of _SC_PAGESIZE.
19720
19721 2003-08-16  Jim Meyering  <jim@meyering.net>
19722
19723         Merge from coreutils.
19724         * lib/xstrtoimax.c: #else #if -> #elif.
19725         * lib/xstrtoumax.c: Likewise.
19726
19727 2003-08-16  Jim Meyering  <jim@meyering.net>
19728
19729         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19730         * m4/utimes.m4: Removed.
19731         * m4/utimes-null.m4: Renamed from utimes.m4.
19732
19733         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19734         to 1MB, so as not to render systems with no stack size limit (e.g.,
19735         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19736         Include <unistd.h>.  On some systems,
19737         it is required for the definition of _SC_PAGESIZE.
19738
19739 2003-08-16  Jim Meyering  <jim@meyering.net>
19740         and Paul Eggert  <eggert@cs.ucla.edu>
19741
19742         Merges from coreutils, etc.
19743
19744         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19745         using the latest version from cvs.  This avoids problems with #line
19746         directives using a vendor (Sun) compiler.
19747         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19748         Don't set GETGROUPS_LIB here; now it's
19749         done via getgroups.m4's wrapper function.
19750         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19751         rather than just in sh-util/configure.in, so that the
19752         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19753         same.
19754         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19755         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19756         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19757         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19758         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19759         Remove code that is now done by the newly-required macros.
19760         Append $(EXEEXT) to DF_PROG.
19761         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19762         Do not invoke or require the following here,
19763         since prereq.m4 or some gnulib .m4 now does this for us:
19764         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19765         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19766         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19767         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19768         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19769         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19770         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19771         AC_FUNC_OBSTACK.
19772         Do not replace the following functions, as this is now the job
19773         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19774         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19775         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19776         atexit getpass, strdup, getpagesize.
19777         Replace 'raise'.
19778         Do not check for the following functions, as this is now the job
19779         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19780         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19781         setregid.
19782         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19783         Check for sys/sysctl.h.
19784         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19785         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19786         of checking for ssize_t ourselves.
19787
19788         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19789         Require every macro that gnulib/modules/* suggests for us.
19790         (jm_PREREQ_ADDEXT): New macro.
19791         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19792         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19793
19794         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19795         (gl_PHYSMEM): Use it.
19796         Also check for `table' function.
19797         Check for new headers and functions.
19798         Add check for sys/sysmp.h.
19799         With suggestions from Kaveh Ghazi.
19800         Ignore headers that are present but cannot be compiled.  This
19801         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19802         C 5.4.
19803
19804 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19805
19806         Document merge from coreutils.
19807         * modules/userspec: Depend on posixver.
19808         * modules/strftime: Depend on tzset.
19809
19810 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19811
19812         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19813         rather than tab, after '#' in shell-script copyright notices.
19814         Suggested by Bruno Haible.
19815
19816 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19817
19818         * config/srclist-update: Use three spaces, rather than tab, after '#'
19819         in shell-script copyright notices.  Suggested by Bruno Haible.
19820         Remove unnecessary parenthesization in regular expression.
19821
19822 2003-08-15  Jim Meyering  <jim@meyering.net>
19823
19824         Merge from coreutils.
19825         * lib/xgethostname.c: Include <stdlib.h>.
19826         (xghostname): Don't exit for anything other than memory-related
19827         failure; just return NULL.
19828         * lib/userspec.c: Include "posixver.h".
19829         (parse_user_spec): Accept `.' as a separator only
19830         in pre-POSIX-200112 mode.
19831         * lib/strtoimax.c: Use #elif rather than #else #if.
19832         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19833         Remove function, now that we can rely on a working tzset function.
19834         [!_LIBC]: Ensure that the required autoconf test has been run.
19835         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19836         Use underlying_strftime for %r.
19837         * lib/sha.c: Merge in some clean-up and optimization changes from
19838         glibc.
19839         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19840         Ensure that it is a multiple of 64.
19841         Rearrange loop exit tests so as to avoid performing an
19842         additional fread after encountering an error or EOF.
19843         * lib/realloc.c: Update copyright date.
19844
19845 2003-08-15  Jim Meyering  <jim@meyering.net>
19846         and Paul Eggert  <eggert@twinsun.com>
19847
19848         Merge from coreutils.
19849         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19850         member but strut utmpx does not.  Needed for AIX 4.3.3.
19851         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19852
19853 2003-08-15  Jim Meyering  <jim@meyering.net>
19854         and Paul Eggert  <eggert@cs.ucla.edu>
19855
19856         Merges from coreutils, etc.
19857         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19858         Require gl_FUNC_TZSET_CLOBBER.
19859         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19860         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19861         members.
19862
19863 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19864
19865         Help the merge from coreutils.
19866         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19867         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19868         * m4/tzset.m4: Use it too.
19869
19870 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19871
19872         * modules/tzset: New file.
19873
19874 2003-08-14  Jim Meyering  <jim@meyering.net>
19875
19876         Merges from coreutils.
19877         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19878         variable names, rather than @FNMATCH_H@.
19879         * modules/alloca: Likewise for $(ALLOCA_H).
19880
19881         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19882         the three copies of the literal target, `fnmatch.h'.
19883         * modules/alloca (alloca.h): Likewise.
19884
19885 2003-08-14  Jim Meyering  <jim@meyering.net>
19886
19887         Merge from coreutils.
19888         * m4/tzset.m4: New file.
19889         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19890         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19891         otherwise, AIX 5.1 systems would end up using the latter.
19892         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19893         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19894         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19895         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19896
19897 2003-08-14  Jim Meyering  <jim@meyering.net>
19898
19899         Merge from coreutils.
19900         * lib/obstack.h: Whitespace changes.
19901         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19902         and xcalloc return values.
19903         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19904         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19905         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19906         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19907         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19908         error from mntctl.
19909         Use mntctl's return value to drive the entry-processing loop, since
19910         we can't rely on the value of the vmt_length member in the last
19911         entry.  On some systems doing so could result in exhausting
19912         virtual memory.  Based in part on a patch from Mike Jetzer.
19913
19914 2003-08-14  Jim Meyering  <jim@meyering.net>
19915         and Paul Eggert  <eggert@twinsun.com>
19916
19917         Merges from coreutils, plus other fixes.
19918         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19919         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19920         for credits and details.  Thanks to Kaveh Ghazi for helping
19921         to keep these files in sync.
19922         (ARRAY_SIZE): Define it.
19923         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19924         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19925         (memcasecmp): Don't assume size_t fits in unsigned int.
19926         Remove casts and duplicate code.
19927         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19928         (memcpy): Remove definition.
19929         Merge in some clean-up and optimization changes from glibc.
19930         [BLOCKSIZE]: Move definition to top of file.
19931         Ensure that it is a multiple of 64.
19932         Rearrange loop exit tests so as to avoid performing an
19933         additional fread after encountering an error or EOF.
19934         * lib/md5.h (md5_uintptr): Define.
19935         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19936         return to the initial working directory.  Preserve errno
19937         for caller.
19938         * lib/idcache.c: Include "xalloc.h".
19939         (xmalloc, xrealloc): Remove decls.
19940         (getuser): Remove casts no longer required in C89.
19941         * lib/human.c: Include stdio.h, for sprintf.
19942         * lib/group-member.c: Include "xalloc.h".
19943         (xmalloc, xrealloc): Remove decls.
19944         (get_group_info): Remove casts no longer required in C89.
19945         * lib/getusershell.c (readname): Remove casts no longer required in
19946         C89.
19947         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19948         * lib/getline.c: Whitespace fix, from coreutils.
19949
19950 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19951
19952         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19953         Check for isascii.
19954
19955         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19956         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19957         Undo previous (whitespace-only) change.
19958
19959 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19960
19961         * lib/exclude.c: Include <ctype.h>
19962         (IN_CTYPE_DOMAIN): New macro.
19963         (is_space): New fn.
19964         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19965         and empty lines.
19966
19967         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19968         Undo previous (whitespace-only) change.
19969
19970 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19971
19972         * config/srclist-update: Change update back to the old behavior,
19973         leaving whitespace alone.  Use one 'sed' command rather than a
19974         pipeline.
19975         (fixlicense): Now a variable, not a function.
19976         (remove_trailing_blanks): Remove.
19977         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19978         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19979         Undo previous (whitespace-only) change.
19980
19981 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19982
19983         Merge from coreutils.
19984         * modules/euidaccess: Add lib_SOURCES, include for new
19985         file euidaccess.h
19986
19987 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19988
19989         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19990         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19991         Normalize leading white space and remove trailing white space.
19992
19993         Merge from coreutils
19994         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19995
19996         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19997         0.12.1.  These files are now being upgraded automatically by
19998         ../config/srclist-update.
19999
20000 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20001
20002         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20003         Normalize leading white space and remove trailing white space.
20004         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20005         notice, as per ../config/srclist-update.
20006
20007         Merge from coreutils.
20008         * lib/euidaccess.h: New file.
20009         * lib/euidaccess.c: Include it.
20010         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20011         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20012         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20013
20014 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20015
20016         * config/srclist-update: Add copyright notice.
20017         (remove_id_lines, remove_trailing_blanks): New constants.
20018         (fixfile): Use them to normalize spacing a bit in copied files.
20019         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20020         Normalize leading white space and remove trailing white space.
20021
20022         * config/texinfo.tex: Sync with texinfo.
20023
20024         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20025         strtoul.c from libc, to merge coreutils whitespace changes.
20026
20027         * config/srclist.txt: Get the following m4 files from gettext:
20028         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20029         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20030         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20031         wint_t.m4.
20032
20033 2003-08-12  Karl Berry  <karl@gnu.org>
20034
20035         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20036         been made.
20037
20038 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20039
20040         * modules/gnu-source, m4/gnu-source.m4:
20041         Remove; we're assuming Autoconf 2.54 or later now.
20042         Suggested by Bruno Haible.
20043         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20044
20045 2003-08-11  Bruno Haible  <bruno@clisp.org>
20046
20047         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20048
20049 2003-08-11  Bruno Haible  <bruno@clisp.org>
20050
20051         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20052         (vasnprintf): Use it instead of wcslen.
20053
20054 2003-08-11  Bruno Haible  <bruno@clisp.org>
20055
20056         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20057         value to ensure that _Bool promotes to int. Use #define for _Bool when
20058         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20059
20060 2003-08-10  Karl Berry  <karl@gnu.org>
20061
20062         * lib/regex.h: update from libc (whitespace fix).
20063
20064 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20065
20066         Merge some files from coreutils.  These changes were
20067         originally made by Jim Meyering.
20068         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20069         many older Unixes require this.
20070         * lib/alloca.c (alloca): Remove cast to argument of free;
20071         no longer needed in C89.
20072         * lib/alloca_.h, regex.h: Fix white space to match
20073         what GNU indent does.
20074
20075 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20076
20077         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20078         apparently Emacs's Unicode mode got confused before my 2003-08-05
20079         checkin.
20080
20081 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20082
20083         * m4/extensions.m4: New file.
20084         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20085         Require gl_USE_SYSTEM_EXTENSIONS.
20086         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20087         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20088
20089 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20090
20091         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20092         * modules/extensions, modules/gnu-source: New files.
20093         * modules/timespec, modules/unlocked-io: Depend on extensions.
20094
20095 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20096
20097         * modules/restrict: New file.
20098         * MODULES.html.sh (func_all_modules): Add restrict.
20099         * modules/regex: Depend on restrict.
20100
20101 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20102
20103         * m4/restrict.m4: New file.
20104         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20105
20106 2003-08-07  Bruno Haible  <bruno@clisp.org>
20107
20108         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20109         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20110
20111 2003-08-07  Bruno Haible  <bruno@clisp.org>
20112
20113         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20114         makes the module 'getndelim2' compatible with the module 'getline'.
20115
20116 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20117
20118         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20119         byte with "\201" to avoid glitches when editing that source file
20120         with multi-gnome-terminal.
20121
20122 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20123
20124         * lib/bumpalloc.h: Remove.
20125
20126 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20127
20128         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20129         * modules/bumpalloc: Remove.
20130
20131 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20132
20133         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20134         GNU coding style.
20135
20136         Merge from coreutils.
20137         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20138         1. From glibc.
20139         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20140         from Karl Berry, implemented by Jim Meyering.
20141         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20142         from Dmitry V. Levin.
20143         Remove anachronistic cast of xrealloc.
20144         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20145         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20146         type. Otherwise, it wouldn't compile with at least /bin/cc on
20147         ymp-cray-unicos9.0.2.X.
20148         Combine two mostly-identical uses of alloca into one.
20149         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20150
20151 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20152
20153         [From Emacs.]
20154
20155         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20156         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20157         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20158         obsolete NLIST_NAME_UNION.
20159         [__GNU__]: Undef BSD and FSCALE.
20160         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20161
20162 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20163
20164         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20165         an enum type, so that it's guaranteed to promote to int.  See:
20166         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20167
20168 2003-08-03  Karl Berry  <karl@gnu.org>
20169
20170         * config/depcomp: update from automake.
20171
20172 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20173
20174         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20175         (strerror): Don't assume that a printable int fits in 14 bytes.
20176
20177 2003-07-31  Bruno Haible  <bruno@clisp.org>
20178
20179         * modules/getpass-gnu: New file.
20180         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20181
20182 2003-07-31  Bruno Haible  <bruno@clisp.org>
20183
20184         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20185
20186 2003-07-24  Karl Berry  <karl@gnu.org>
20187
20188         * config/missing: update from automake.
20189
20190 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20191             Bruno Haible  <bruno@clisp.org>
20192
20193         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20194         * lib/getline.c (getline, getdelim): Likewise.
20195         Remove _GNU_SOURCE define; now it's defined in config.h through
20196         m4/getline.m4.
20197
20198 2003-07-23  Karl Berry  <karl@gnu.org>
20199
20200         * config/config.sub: update from prep.
20201
20202 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20203
20204         * modules/xalloc (Depends-on): Add exitfail.
20205         * modules/xmemcoll: Likewise.
20206
20207 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20208
20209         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20210         over-parenthesization in macros.
20211
20212         Sync with coreutils.
20213
20214         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20215         required by C99.
20216
20217         Use `exit_failure' for xalloc and xmemcoll instead of their own
20218         private exit-failure variables.
20219         * lib/xalloc.h (xalloc_exit_failure): Remove.
20220         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20221         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20222         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20223         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20224         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20225
20226 2003-07-20  Jim Meyering  <jim@meyering.net>
20227
20228         * modules/closeout (Depends-on): Add exitfail.
20229         Suggestion from Bruno Haible.
20230
20231 2003-07-19  Karl Berry  <karl@gnu.org>
20232
20233         * config/config.sub: update from prep.
20234
20235 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20236
20237         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20238         Remove.
20239         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20240         to test that it can stand by itself.  Include "exitfail.h".
20241         Clients should set exit_failure instead.
20242         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20243
20244 2003-07-18  Bruno Haible  <bruno@clisp.org>
20245
20246         * modules/getndelim2: New file.
20247         * modules/getline: Share files with module getndelim2.
20248         * modules/getnline: Depend on getndelim2 instead of sharing files with
20249         it. Add getnline.c to lib_SOURCES.
20250         * MODULES.html.sh (func_all_modules): Add getndelim2.
20251
20252 2003-07-18  Bruno Haible  <bruno@clisp.org>
20253
20254         * m4/getndelim2.m4: New file.
20255         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20256         invoke gl_PREREQ_GETNDELIM2.
20257         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20258         gl_PREREQ_GETNDELIM2.
20259         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20260         gl_GETNDELIM2.
20261
20262 2003-07-18  Bruno Haible  <bruno@clisp.org>
20263
20264         * lib/getndelim2.h: New file.
20265         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20266         getndelim2.h.
20267         (getndelim2): Make non-static. Change return type to ssize_t.
20268         * lib/getline.h: Change argument names.
20269         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20270         * lib/getnline.c: Include getndelim2.h.
20271
20272 2003-07-18  Andreas Schwab  <schwab@suse.de>
20273
20274         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20275
20276 2003-07-17  Karl Berry  <karl@gnu.org>
20277
20278         * config/config.sub: update from prep.
20279
20280 2003-07-17  Bruno Haible  <bruno@clisp.org>
20281
20282         * modules/getnline: New file.
20283         * modules/getline: Add lib/getndelim2.c to source file list.
20284         * MODULES.html.sh (func_all_modules): Add getnline.
20285
20286 2003-07-17  Bruno Haible  <bruno@clisp.org>
20287
20288         * m4/getnline.m4: New file.
20289
20290 2003-07-17  Bruno Haible  <bruno@clisp.org>
20291
20292         * m4/Makefile.am.in: Remove file.
20293         * m4/Makefile.am: Remove file.
20294         * m4/Makefile.in: Remove file.
20295
20296 2003-07-17  Bruno Haible  <bruno@clisp.org>
20297
20298         * lib/getnline.h: New file.
20299         * lib/getnline.c: New file.
20300         * lib/getndelim2.c: New file, extracted from getline.c.
20301         (getndelim2): Renamed from getdelim2, with added nmax argument.
20302         * lib/getline.c: Include getndelim2.c.
20303         (getdelim2): Moved out to getndelim2.c.
20304         (getline, getdelim): Update.
20305
20306 2003-07-17  Bruno Haible  <bruno@clisp.org>
20307
20308         * lib/Makefile.am: Remove file.
20309         * lib/Makefile.in: Remove file.
20310
20311 2003-07-17  Bruno Haible  <bruno@clisp.org>
20312
20313         * configure.in: Remove file.
20314         * Makefile.in: Remove file.
20315
20316 2003-07-17  Bruno Haible  <bruno@clisp.org>
20317
20318         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20319
20320 2003-07-16  Karl Berry  <karl@gnu.org>
20321
20322         * config/srclist-update: was running fixlicense twice, which caused
20323                 texinfo.tex to be nullified for some reason.  Simplify,
20324                 $gplsrc is no longer needed as far as I can see?
20325
20326 2003-07-16  Jim Meyering  <jim@meyering.net>
20327
20328         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20329
20330 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20331
20332         * config/srclist.txt: Get the following files from gettext-runtime/intl
20333         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20334         ref-del.sin.  From Bruno Haible.
20335         * config/srclist-update (fixfile): Change grep pattern again, since the
20336         previous fix didn't work (there was another trailing $).  Use
20337         '[$]' to escape the $s.
20338
20339 2003-07-15  Karl Berry  <karl@gnu.org>
20340
20341         * lib/vasnprintf.c: update from gettext.
20342
20343 2003-07-15  Karl Berry  <karl@gnu.org>
20344
20345         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20346         gets expanded when surrounded by '$'.
20347
20348 2003-07-15  Jim Meyering  <jim@meyering.net>
20349
20350         * modules/save-cwd: Don't depend on error.  From Derek Price.
20351
20352 2003-07-15  Jim Meyering  <jim@meyering.net>
20353
20354         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20355
20356 2003-07-14  Simon Josefsson  <jas@extundo.com>
20357
20358         * modules/mempcpy: New file.
20359         * MODULES.html.sh (func_all_modules): Add mempcpy.
20360
20361 2003-07-14  Simon Josefsson  <jas@extundo.com>
20362
20363         * m4/mempcpy.m4: New file.
20364
20365 2003-07-14  Simon Josefsson  <jas@extundo.com>
20366
20367         * lib/mempcpy.h: New file.
20368         * lib/mempcpy.c: New file.
20369
20370 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20371
20372         * modules/getdate, modules/posixtm: Depend on mktime.
20373
20374 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20375
20376         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20377         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20378         unicodeio.c, unicodeio.h, unlocked-io.h:
20379         Switch from LGPL to GPL.
20380
20381 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20382
20383         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20384         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20385         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20386         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20387         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20388         updated automatically by ../config/srclist-update.  This changes
20389         their license from LPGL to GPL.
20390
20391 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20392
20393         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20394         assumed to refer to the root of the most recent stable gettext version.
20395         * config/srclistvars.sh: Add defaults for eggert.
20396         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20397         Match "This program" as well as "The program".  This is needed
20398         for gettext.
20399
20400 2003-07-14  Jim Meyering  <jim@meyering.net>
20401
20402         Don't emit diagnostics.  Let callers do that.
20403         * lib/save-cwd.c: Don't include "error.h".
20404         (save_cwd): Don't call error.  Ensure that errno is valid
20405         when returning nonzero.
20406
20407         * lib/save-cwd.h (restore_cwd): Update prototype.
20408         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20409         Simplify.  Don't call error upon failure.  Let callers do that.
20410         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20411         when auditing is enabled.  But don't bother updating the #if.
20412
20413 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20414
20415         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20416         it breaks C++ compilation.
20417         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20418
20419 2003-07-10  Simon Josefsson  <jas@extundo.com>
20420
20421         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20422
20423 2003-07-10  Jim Meyering  <jim@meyering.net>
20424
20425         * m4/clock_time.m4: Remove trailing blank.
20426         * m4/intmax_t.m4: Likewise.
20427
20428 2003-07-10  Jim Meyering  <jim@meyering.net>
20429
20430         * lib/vasnprintf.c: Remove trailing blanks.
20431         Make cpp indentation consistent.
20432
20433 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20434
20435         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20436         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20437         Switch from LGPL to GPL.
20438
20439 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20440
20441         * config/srclist.txt: Sort sublists.  Add
20442         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20443         that differ from gnulib for one reason or another; we'd like this list
20444         to be smaller but for now let's document what we have.
20445
20446 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20447
20448         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20449         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20450         and sweeter "eval x=$x".
20451         * config/srclist.txt: Get lib/argp* from glibc.
20452
20453 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20454
20455         * lib/mktime.c: Fix some boundary cases and remove need for floating
20456         point.
20457
20458         Issue a compile-time diagnostic if time_t is floating point, or if
20459         two's complement arithmetic is not in effect, or if arithmetic
20460         right shift does not propagate the sign.  These assumptions were
20461         all in the original code but they weren't checked.
20462
20463         (TIME_T_MIDPOINT, verify): New macros.
20464         (__isleap): Remove; it has integer overflow problems.
20465         (leapyear): New function, without those problems.
20466         (ydhms_tm_diff): Remove; splitting into two parts.
20467         (ydhms_diff): New function, containing the arithmetic part of
20468         the old ydhms_tm_diff function.  Issue a compile-time
20469         diagnostic if we are not using C99 integer division.
20470         Avoid casts when possible.
20471         (guess_time_tm): New function, containing the checking part of
20472         the old ydhms_tm_diff function.  Return the new value, rather than
20473         the difference between it and the old.  Accept a new argument T
20474         so that *T specifies the old value.  Check for overflow in the result.
20475
20476         (__mktime_internal): Use a time_t offset, not a long int offset.
20477         This undoes the 2003-06-04 change, which is no longer needed now
20478         that we have better overflow checking.
20479         (localtime_offset): Likewise.
20480
20481         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20482         and long are 64-bit but int is only 32-bit.
20483         (ydhms_diff): Use long int to store year1 and yday1.
20484         Issue a compile-time diagnostic if long int is not wide enough.
20485
20486         (__mktime_internal): Use long int to store adjusted year and yday.
20487         Use plain C rather than preprocessor commands, if that doesn't
20488         affect efficiency.
20489         Check for overflow (and try to repair) after each probe
20490         rather than checking only at the very end.  This avoids some bugs
20491         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20492         does not equal GMT offset at maximum time).
20493         Use integer to check for overflow rather than floating point; this
20494         is more portable to non-IEEE hosts, and is a tad faster.
20495         When we detect that we are oscillating between two values,
20496         don't check whether tm_isdst has the requested value, since
20497         we already know the answer.  When tm_isdst has the wrong value,
20498         use a different heuristic to find the right one, based on the
20499         extreme values actually observed in practice in tz2003a,
20500         rather than the (overly optimistic) "previous 3 calendar quarters".
20501
20502         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20503         "T const" to accommodate glibc style.
20504         (check_result): Use less-confusing report format.  "long" -> "long int.
20505         (main): Likewise.
20506         Don't loop if the iteration overflows time_t.
20507         Allow a negative step in the iteration.
20508
20509 2003-07-06  Karl Berry  <karl@gnu.org>
20510
20511         * config/depcomp: update from automake.
20512         * config/config.sub: update from prep.
20513
20514 2003-07-03  Karl Berry  <karl@gnu.org>
20515
20516         * config/config.guess: update from prep.
20517
20518 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20519
20520         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20521         xreadlink.c now includes it unconditionally.
20522
20523 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20524
20525         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20526         having it depend on HAVE_SYS_TYPES_H.
20527
20528 2003-07-01  Bruno Haible  <bruno@clisp.org>
20529
20530         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20531         <sys/types.h> should be sufficient.
20532         Reported by Paul Eggert.
20533
20534 2003-06-26  Karl Berry  <karl@gnu.org>
20535
20536         * config/depcomp: update from automake.
20537
20538 2003-06-26  Bruno Haible  <bruno@clisp.org>
20539
20540         * modules/human: Depend on module stdbool.
20541
20542 2003-06-25  Bruno Haible  <bruno@clisp.org>
20543
20544         * modules/readlink: New file.
20545         * modules/xreadlink: Depend on it.
20546         * MODULES.html.sh (func_all_modules): Add readlink.
20547
20548 2003-06-25  Bruno Haible  <bruno@clisp.org>
20549
20550         * m4/readlink.m4: New file.
20551
20552 2003-06-25  Bruno Haible  <bruno@clisp.org>
20553
20554         * lib/readlink.c: New file.
20555
20556 2003-06-22  Karl Berry  <karl@gnu.org>
20557
20558         * config/srclist.txt: update mkinstalldirs from automake.
20559         * config/mkinstalldirs: update.
20560
20561 2003-06-22  Bruno Haible  <bruno@clisp.org>
20562
20563         Portability to mingw32.
20564         * m4/ssize_t.m4: New file, from GNU gettext.
20565         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20566         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20567
20568 2003-06-22  Bruno Haible  <bruno@clisp.org>
20569
20570         * modules/safe-read: Add m4/ssize_t.m4.
20571         * modules/xreadlink: Add m4/ssize_t.m4.
20572
20573 2003-06-20  Bruno Haible  <bruno@clisp.org>
20574
20575         Assume C89, so PARAMS isn't needed.
20576         * lib/unicodeio.h (PARAMS): Remove.
20577         * lib/unicodeio.c: Don't use PARAMS.
20578
20579 2003-06-18  Karl Berry  <karl@gnu.org>
20580
20581         * config/config.{guess,sub}: update from prep.
20582
20583 2003-06-18  Jim Meyering  <jim@meyering.net>
20584
20585         Merge changes from coreutils.
20586         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20587         Remove explicit declarations of xmalloc and realloc.
20588         Include xalloc.h.
20589         (read_utmp): Remove anachronistic cast of xmalloc.
20590
20591 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20592
20593         Assume C89, so PARAMS isn't needed.
20594         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20595         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20596         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20597         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20598         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20599         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20600         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20601         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20602         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20603         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20604         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20605         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20606         no longer needed. Anyway, config.h should always be included before any
20607         other file.
20608
20609 2003-06-11  Simon Josefsson  <jas@extundo.com>
20610
20611         * modules/sysexits: New file.
20612         * MODULES.html.sh (func_all_modules): Add sysexits.
20613
20614 2003-06-11  Simon Josefsson  <jas@extundo.com>
20615
20616         * lib/sysexit_.h: New file.
20617
20618 2003-06-11  Derek Price  <derek@ximbiot.com>
20619
20620         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20621         necessary.
20622
20623 2003-06-11  Bruno Haible  <bruno@clisp.org>
20624
20625         * m4/sysexits.m4: New file.
20626
20627 2003-06-10  Simon Josefsson  <jas@extundo.com>
20628
20629         * lib/argp.h: New file, from glibc.
20630         * lib/argp-ba.c: New file, from glibc.
20631         * lib/argp-eexst.c: New file, from glibc.
20632         * lib/argp-fmtstream.c: New file, from glibc.
20633         * lib/argp-fmtstream.h: New file, from glibc.
20634         * lib/argp-fs-xinl.c: New file, from glibc.
20635         * lib/argp-help.c: New file, from glibc.
20636         * lib/argp-namefrob.h: New file, from glibc.
20637         * lib/argp-parse.c: New file, from glibc.
20638         * lib/argp-pv.c: New file, from glibc.
20639         * lib/argp-pvh.c: New file, from glibc.
20640         * lib/argp-xinl.c: New file, from glibc.
20641
20642 2003-06-10  Simon Josefsson  <jas@extundo.com>
20643
20644         * modules/strchrnul: New file.
20645
20646 2003-06-10  Simon Josefsson  <jas@extundo.com>
20647
20648         * modules/argp: New file.
20649
20650 2003-06-10  Simon Josefsson  <jas@extundo.com>
20651
20652         * m4/strchrnul.m4: New file.
20653
20654 2003-06-10  Simon Josefsson  <jas@extundo.com>
20655
20656         * lib/strchrnul.h: New file.
20657         * lib/strchrnul.c: New file.
20658
20659 2003-06-10  Bruno Haible  <bruno@clisp.org>
20660
20661         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20662
20663 2003-06-07  Karl Berry  <karl@gnu.org>
20664
20665         * config/config.{guess,sub}: update from prep.
20666
20667 2003-06-07  Jim Meyering  <jim@meyering.net>
20668
20669         * modules/strtod: Use $(...) notation, not @...@ for
20670         AC_REPLACE'd variables.
20671         * modules/localcharset: Likewise.
20672
20673 2003-06-07  Jim Meyering  <jim@meyering.net>
20674
20675         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20676         in place of my name in the copyright comment.
20677         Remove definition and uses of __P.
20678
20679         From coreutils.
20680         * lib/stat.c: Don't declare xmalloc explicitly.
20681         Instead, include "xalloc.h".
20682         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20683         xrealloc, and xcalloc return values.
20684         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20685         Improve comment.
20686         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20687
20688 2003-06-07  Bruno Haible  <bruno@clisp.org>
20689
20690         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20691         avoid AC_CONFIG_LINKS.
20692         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20693         fnmatch.h, to avoid AC_CONFIG_LINKS.
20694         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20695
20696 2003-06-07  Bruno Haible  <bruno@clisp.org>
20697
20698         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20699         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20700         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20701         directory.
20702         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20703         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20704         directory.
20705
20706 2003-06-06  Jim Meyering  <jim@meyering.net>
20707
20708         Merge from coreutils.
20709         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20710         Consolidate declarations and initializations of *_base* locals.
20711
20712         Merge from coreutils.
20713         This avoids a core dump on systems without GNU putenv,
20714         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20715         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20716         (unsetenv): New static function, from GNU libc.
20717         (rpl_putenv): Use it.
20718
20719         * lib/modechange.c: Remove trailing blanks.
20720
20721         Merge from coreutils.
20722         * lib/fsusage.c: Remove declaration of statfs.
20723         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20724
20725         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20726
20727 2003-06-06  Jim Meyering  <jim@meyering.net>
20728
20729         * lib/stdbool_.h: Renamed from stdbool.h.in.
20730
20731 2003-06-06  Jim Meyering  <jim@meyering.net>
20732             Bruno Haible  <bruno@clisp.org>
20733
20734         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20735         Adjust Makefile.am snippet not to redirect directly to target.
20736         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20737
20738 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20739
20740         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20741         mismatch, look in future quarters as well as past.  This fixes a
20742         bug when processing fall-backwards gaps immediately after a long
20743         period of daylight-saving time.
20744
20745         * lib/mktime.c: Assume freestanding C89 or better.
20746         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20747         (__P): Remove; not used.
20748         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20749         (mktime, not_equal_tm, print_tm, check_result,
20750         main): Use prototypes.  Use const * where appropriate.
20751         (main): Fix typo in testing code that uncovered by above changes.
20752         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20753
20754 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20755
20756         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20757         locale.h, localeconv.  This merges changes from coreutils.
20758
20759         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20760         It can be removed after the next Autoconf is released.
20761         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20762         needed.
20763
20764 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20765
20766         * lib/mktime.c: Fix Debian bug 177940
20767         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20768         (localtime_offset): Now long int, not time_t, because we want it
20769         to be guaranteed to be signed.  All uses changed.
20770         (__mktime_internal): If overflow would occur when adding offset,
20771         don't add it.
20772
20773         Merge 'human' changes from coreutils.  Rewrite to support
20774         locale-specific notations like thousands separators.
20775         * lib/human.c: Simplify authorship notice.
20776         Include human.h immediately after config.h.
20777         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20778         <limits.h>: Do not include, since human.h does.
20779         (SIZE_MAX, UINTMAX_MAX): New macros.
20780         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20781         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20782         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20783         (power_letter): Renamed from suffixes.
20784         (generate_suffix_backwards): Remove.
20785         (adjust_value): Now takes int style (because of human.h changes)
20786         and long double value (for greater precision on some platforms).
20787         (group_number): New function.
20788         (human_readable): Use it.  Use integer options, not enum.
20789         Put the options before the sizes in the arg list.
20790         Support all the new options.
20791         The old human_readable function has been removed;
20792         use inttostr.h instead.
20793         (human_readable, default_block_size, humblock):
20794         Use uintmax_t, not int, for block sizes.
20795         (human_readable_inexact, block_size_types): Remove.
20796         (block_size_opts): New constant.
20797         (human_options): Renamed from human_block_size, with new signature
20798         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20799         * lib/human.h: Add copyright and authorship notice.
20800         Include <limits.h> and <stdbool.h> unconditionally.
20801         (PARAMS): Remove.  All uses removed.
20802         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20803         (enum human_inexact_style): Remove tag; now a nameless enum.
20804         (human_floor, human_ceiling, human_round_to_even): Now have
20805         values 2, 0, 1 rather than -1, 1, 0.
20806         (human_group_digits, human_suppress_point_zero, human_autoscale,
20807         human_base_1024, human_SI, human_B): New constants.
20808         (human_readable_inexact, human_block_size): Remove.
20809         (human_readable): Size args are now uintmax_t, not int.
20810         (human_options): New decl.
20811
20812         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20813         unnecessary now that we assume C89 or better.  This change
20814         imported from coreutils.
20815
20816         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20817         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20818         in the 2003-05-30 sync from glibc.
20819
20820         .h files should stand alone, but we shouldn't include <sys/types.h>
20821         if we can get away with just <stddef.h>.
20822
20823         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20824         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20825         rather than <sys/types.h>, as we merely need size_t.
20826         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20827         to get size_t.
20828         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20829         Include <stdio.h>, to get FILE.
20830         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20831         memcasecmp.h has included <stddef.h> and all we need is size_t.
20832         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20833         our interface, instead of including <sys/types.h>
20834
20835 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20836
20837         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20838         now, as glibc mktime is buggy on non-glibc systems.
20839
20840 2003-06-03  Karl Berry  <karl@gnu.org>
20841
20842         * config/config.sub: update from prep.
20843
20844 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20845
20846         [from coreutils]
20847         Fix some minor time-related bugs with POSIX time arguments.
20848         Some valid time stamps were being rejected (notably -1, and
20849         time stamps before 1900 on 64-bit hosts).  And some invalid
20850         time stamps were being accepted, e.g. September 31.
20851
20852         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20853         that we can return (time_t) -1 successfully.
20854         * lib/posixtm.c: Likewise.
20855         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20856         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20857         (t): Remove static var.
20858         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20859         of static var.  All uses changed.
20860         (year): Do not reject years before 1900; they can occur with
20861         64-bit time_t.
20862         (posix_time_parse): Do not check for out-of-range components;
20863         that is now the caller's responsibility, since our checks were
20864         only approximations.
20865         (posixtime): Use mktime to check for out-of-range components,
20866         since it knows them exactly.
20867         If mktime returns (time_t) -1, check whether an error actually occurred
20868         by invoking localtime on -1.
20869         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20870         posixtime failures better.
20871         Improve the test data (in comments only).
20872
20873 2003-06-02  Karl Berry  <karl@gnu.org>
20874
20875         * config/mkinstalldirs (version): new variable.
20876         (--version): new option.
20877         (usage): improve message.
20878
20879 2003-05-30  Karl Berry  <karl@gnu.org>
20880
20881         * lib/mktime.c: update from libc.
20882
20883 2003-05-30  Bruno Haible  <bruno@clisp.org>
20884
20885         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20886         * config/config.rpath: Upgrade to gettext-0.12.1.
20887
20888 2003-05-30  Bruno Haible  <bruno@clisp.org>
20889
20890         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20891         * m4/nls.m4: New file, from gettext-0.12.1.
20892         * m4/po.m4: New file, from gettext-0.12.1.
20893         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20894
20895 2003-05-30  Bruno Haible  <bruno@clisp.org>
20896
20897         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20898         * lib/localcharset.h: Likewise.
20899         * lib/localcharset.c: Likewise.
20900
20901 2003-05-29  Karl Berry  <karl@gnu.org>
20902
20903         * config/config.rpath: update from gettext.
20904
20905 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20906
20907         Assume the headers required for C89 freestanding compilers.
20908         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20909         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20910         * m4/human.m4 (gl_HUMAN): Likewise.
20911         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20912         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20913         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20914         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20915         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20916         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20917
20918 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20919
20920         Assume the headers required for C89 freestanding compilers.
20921         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20922         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20923         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20924         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20925         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20926         define, since <limits.h> is guaranteed to do that.
20927         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20928         * lib/exclude.c: Include <stdbool.h> unconditionally.
20929         * lib/tempname.c: Include <stddef.h> unconditionally.
20930         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20931         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20932         <stddef.h> does that.
20933         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20934         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20935         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20936         needed.
20937         * lib/xstrtol.c: Likewise.
20938         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20939         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20940
20941         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20942         warnings on some platforms.
20943
20944         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20945         arbitrarily.
20946
20947 2003-05-26  Jim Meyering  <jim@meyering.net>
20948
20949         Merge in a change from coreutils:
20950         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20951         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20952         that condition, rather than `-1' which is slightly misleading.
20953         Change the name of the cache variable to have the gl_ prefix.
20954         Prompted by a patch from Richard Dawe for DJGPP.
20955
20956 2003-05-24  Karl Berry  <karl@gnu.org>
20957
20958         * config/config.guess: update from prep.
20959
20960 2003-05-22  Karl Berry  <karl@gnu.org>
20961
20962         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20963
20964 2003-05-20  Karl Berry  <karl@gnu.org>
20965
20966         * config/config.guess: update from prep.
20967
20968 2003-05-18  Karl Berry  <karl@gnu.org>
20969
20970         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20971         might actually be set by the user.
20972
20973         * config/depcomp, install-sh, mdate-sh: update from automake.
20974
20975 2003-05-17  Bruno Haible  <bruno@clisp.org>
20976
20977         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20978         invalid expansion for AC_EGREP_CPP.
20979         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20980         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20981         Suggested by Akim Demaille <akim@epita.fr> in
20982         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20983
20984 2003-05-12  Jim Meyering  <jim@meyering.net>
20985
20986         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20987         the space-padded-by-default conversion specifiers, %e, %k, %l.
20988
20989 2003-05-12  Bruno Haible  <bruno@clisp.org>
20990
20991         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20992         the string is longer than 4 KB.
20993
20994 2003-05-11  Karl Berry  <karl@gnu.org>
20995
20996         * config/config.{guess,sub}: update from prep.
20997
20998 2003-05-09  Bruno Haible  <bruno@clisp.org>
20999
21000         * modules/error: Add m4/strerror_r.m4 to file list.
21001
21002 2003-05-03  Bruno Haible  <bruno@clisp.org>
21003
21004         Upgrade to Unicode-4.0.
21005         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21006         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21007         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21008         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21009         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21010         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21011         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21012         Change width of U+E0100..U+E01EF from 1 to 0.
21013
21014 2003-04-25  Jim Meyering  <jim@meyering.net>
21015
21016         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21017         of type size_t, not int.
21018
21019 2003-04-25  Bruno Haible  <bruno@clisp.org>
21020
21021         * lib/copy-file.c: Include <stddef.h>, for size_t.
21022
21023 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21024
21025         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21026         code which expansion is under static control.  Patch imported from
21027         Akim Demaille's patch to Bison; see
21028         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21029
21030 2003-04-14  Bruno Haible  <bruno@clisp.org>
21031
21032         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21033
21034 2003-04-11  Jim Meyering  <jim@meyering.net>
21035
21036         Merge changes from Coreutils.
21037
21038         2003-03-22  Jim Meyering  <jim@meyering.net>
21039
21040         * lib/strftime.c (widen): Cast alloca return value to proper type.
21041
21042         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21043
21044         From GNU libc.
21045         * lib/strftime.c (my_strftime): Handle very large width
21046         specifications for numeric values correctly.  Improve checks for
21047         overflow.
21048
21049         2003-01-19  Jim Meyering  <jim@meyering.net>
21050
21051         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21052         definitions.
21053         (nl_get_alt_digit) [! defined my_strftime]: Define.
21054         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21055         _nl_get_alt_digit and _nl_get_walt_digit.
21056
21057         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21058         libc. These changes have no effect outside of _LIBC.
21059
21060 2003-04-10  Bruno Haible  <bruno@clisp.org>
21061
21062         * modules/findprog: New file.
21063         * MODULES.html.sh (func_all_modules): Add it.
21064
21065 2003-04-10  Bruno Haible  <bruno@clisp.org>
21066
21067         * m4/findprog.m4: New file.
21068         * m4/eaccess.m4: New file.
21069
21070 2003-04-10  Bruno Haible  <bruno@clisp.org>
21071
21072         * lib/findprog.h: New file, from GNU gettext.
21073         * lib/findprog.c: New file, from GNU gettext.
21074
21075 2003-04-05  Jim Meyering  <jim@meyering.net>
21076
21077         Merge changes from Coreutils.
21078
21079         * lib/exclude.h (PARAMS): Remove definition and uses.
21080         * lib/exclude.c: Remove uses of `PARAMS'.
21081
21082         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21083         Add test-cases for DOS filenames. Declare program_name.
21084         (main): Set up program_name.  Patch by Rich Dawe.
21085
21086         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21087         error from mntctl.
21088         Use mntctl's return value to drive the entry-processing loop, since
21089         we can't rely on the value of the vmt_length member in the last
21090         entry.  On some systems doing so could result in exhausting
21091         virtual memory.  Based in part on a patch from Mike Jetzer.
21092
21093 2003-04-04  Bruno Haible  <bruno@clisp.org>
21094
21095         * modules/linebreak: New file.
21096         * MODULES.html.sh (func_all_modules): Add it.
21097
21098 2003-04-04  Bruno Haible  <bruno@clisp.org>
21099
21100         * m4/linebreak.m4: New file.
21101
21102 2003-04-04  Bruno Haible  <bruno@clisp.org>
21103
21104         * lib/linebreak.h: New file, from GNU gettext.
21105         * lib/linebreak.c: New file, from GNU gettext with slight
21106         modifications.
21107         * lib/lbrkprop.h: New file, from GNU gettext.
21108
21109 2003-04-03  Bruno Haible  <bruno@clisp.org>
21110
21111         * modules/utf8-ucs4: New file.
21112         * modules/utf16-ucs4: New file.
21113         * modules/ucs4-utf8: New file.
21114         * modules/ucs4-utf16: New file.
21115         * MODULES.html.sh (func_all_modules): Add them.
21116
21117 2003-04-03  Bruno Haible  <bruno@clisp.org>
21118
21119         * m4/utf-ucs4.m4: New file.
21120         * m4/ucs4-utf.m4: New file.
21121
21122 2003-04-03  Bruno Haible  <bruno@clisp.org>
21123
21124         * lib/utf8-ucs4.h: New file, from GNU gettext.
21125         * lib/utf16-ucs4.h: New file, from GNU gettext.
21126         * lib/ucs4-utf8.h: New file, from GNU gettext.
21127         * lib/ucs4-utf16.h: New file, from GNU gettext.
21128
21129 2003-04-02  Bruno Haible  <bruno@clisp.org>
21130
21131         * modules/binary-io: New file.
21132         * MODULES.html.sh (func_all_modules): Add it.
21133
21134 2003-04-02  Bruno Haible  <bruno@clisp.org>
21135
21136         * lib/binary-io.h: New file, from GNU gettext.
21137
21138 2003-04-01  Bruno Haible  <bruno@clisp.org>
21139
21140         * modules/pathname: New file.
21141         * MODULES.html.sh (func_all_modules): Add it.
21142
21143 2003-04-01  Bruno Haible  <bruno@clisp.org>
21144
21145         * lib/pathname.h: New file, from GNU gettext.
21146         * lib/concatpath.c: New file, from GNU gettext.
21147
21148 2003-03-30  Bruno Haible  <bruno@clisp.org>
21149
21150         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21151
21152 2003-03-30  Bruno Haible  <bruno@clisp.org>
21153
21154         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21155         function chown() doesn't exist.
21156
21157 2003-03-28  Bruno Haible  <bruno@clisp.org>
21158
21159         * modules/copy-file: New file.
21160         * MODULES.html.sh (func_all_modules): Add it.
21161
21162 2003-03-28  Bruno Haible  <bruno@clisp.org>
21163
21164         * m4/copy-file.m4: New file.
21165
21166 2003-03-28  Bruno Haible  <bruno@clisp.org>
21167
21168         * lib/copy-file.h: New file, from GNU gettext.
21169         * lib/copy-file.c: New file, from GNU gettext.
21170
21171 2003-03-18  Jim Meyering  <jim@meyering.net>
21172
21173         * lib/quote.c (quote_n): Fix typo in comment.
21174
21175 2003-03-18  Bruno Haible  <bruno@clisp.org>
21176
21177         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21178         checking.
21179         * m4/onceonly_2_57.m4: Likewise.
21180
21181 2003-03-17  Bruno Haible  <bruno@clisp.org>
21182
21183         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21184         (m4_quote): Remove macro.
21185         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21186
21187 2003-03-14  Jim Meyering  <jim@meyering.net>
21188
21189         Merge changes from Coreutils.
21190         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21191         to be const, in order to avoid warnings.
21192         (obstack_room): Likewise.
21193         (obstack_empty_p): Likewise.
21194
21195 2003-03-14  Bruno Haible  <bruno@clisp.org>
21196
21197         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21198         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21199
21200 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21201
21202         Merge changes from Bison.
21203         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21204         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21205         when compiling Bison 1.875's `bitset bset = obstack_alloc
21206         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21207         * lib/hash.c: Include <stdbool.h> unconditionally.
21208
21209 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21210
21211         * m4/onceonly.m4 (m4_quote): New macro.
21212         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21213         Quote AC_FOREACH variable-expansions properly.
21214
21215 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21216
21217         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21218
21219 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21220
21221         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21222         Reported by Bruce Becker; see:
21223         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21224
21225 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21226             Bruno Haible  <bruno@clisp.org>
21227
21228         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21229         Reported by John Hughes, see
21230         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21231
21232 2003-02-20  Bruno Haible  <bruno@clisp.org>
21233
21234         * MODULES.html.sh (func_all_modules): Add poll.
21235
21236 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21237
21238         * modules/poll: New file.
21239
21240 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21241
21242         * lib/poll_.h: New file.
21243         * lib/poll.c: New file.
21244
21245 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21246
21247         * m4/poll.m4: New file.
21248
21249 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21250
21251         * modules/mathl: New file.
21252
21253 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21254
21255         * lib/mathl.h: New file.
21256         * lib/acosl.c: New file.
21257         * lib/asinl.c: New file.
21258         * lib/atanl.c: New file.
21259         * lib/ceill.c: New file.
21260         * lib/cosl.c: New file.
21261         * lib/expl.c: New file.
21262         * lib/floorl.c: New file.
21263         * lib/frexpl.c: New file.
21264         * lib/ldexpl.c: New file.
21265         * lib/logl.c: New file.
21266         * lib/sincosl.c: New file.
21267         * lib/sinl.c: New file.
21268         * lib/sqrtl.c: New file.
21269         * lib/tanl.c: New file.
21270         * lib/trigl.c: New file.
21271         * lib/trigl.h: New file.
21272
21273 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21274
21275         * m4/mathl.m4: New file.
21276
21277 2003-02-18  Bruno Haible  <bruno@clisp.org>
21278
21279         * MODULES.html.sh (func_all_modules): Add mathl.
21280
21281 2003-02-17  Bruno Haible  <bruno@clisp.org>
21282
21283         * modules/mkdtemp: New module.
21284         * MODULES.html.sh (func_all_modules): Add it.
21285
21286 2003-02-17  Bruno Haible  <bruno@clisp.org>
21287
21288         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21289
21290 2003-02-17  Bruno Haible  <bruno@clisp.org>
21291
21292         * lib/mkdtemp.h: New file, from GNU gettext.
21293         * lib/mkdtemp.c: New file, from GNU gettext.
21294
21295 2003-02-02  Jim Meyering  <jim@meyering.net>
21296
21297         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21298         e.g. glibc-2.2.93.
21299
21300 2003-01-31  Bruno Haible  <bruno@clisp.org>
21301
21302         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21303         'rpl_rename'.
21304         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21305         'rpl_strnlen'.
21306         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21307         'rpl_strtod'.
21308         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21309         'rpl_utime'.
21310
21311 2003-01-31  Bruno Haible  <bruno@clisp.org>
21312
21313         * lib/rename.c: #undef rename before defining rpl_rename.
21314         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21315
21316 2003-01-30  Bruno Haible  <bruno@clisp.org>
21317
21318         * modules/vasnprintf, modules/vasprintf: New modules.
21319         * MODULES.html.sh (func_all_modules): Add them.
21320
21321 2003-01-30  Bruno Haible  <bruno@clisp.org>
21322
21323         * m4/signed.m4: New file, from GNU gettext.
21324         * m4/longdouble.m4: New file, from GNU gettext.
21325         * m4/wchar_t.m4: New file, from GNU gettext.
21326         * m4/wint_t.m4: New file, from GNU gettext.
21327         * m4/vasnprintf.m4: New file.
21328         * m4/vasprintf.m4: New file.
21329
21330 2003-01-30  Bruno Haible  <bruno@clisp.org>
21331
21332         * lib/printf-args.h: New file, from GNU gettext.
21333         * lib/printf-args.c: New file, from GNU gettext.
21334         * lib/printf-parse.h: New file, from GNU gettext.
21335         * lib/printf-parse.c: New file, from GNU gettext.
21336         * lib/vasnprintf.h: New file, from GNU gettext.
21337         * lib/vasnprintf.c: New file, from GNU gettext.
21338         * lib/asnprintf.c: New file, from GNU gettext.
21339         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21340         * lib/vasprintf.c: New file, from GNU gettext.
21341         * lib/asprintf.c: New file, from GNU gettext.
21342
21343 2003-01-29  Bruno Haible  <bruno@clisp.org>
21344
21345         * modules/stpncpy: New module.
21346         * MODULES.html.sh (func_all_modules): Add it.
21347
21348 2003-01-29  Bruno Haible  <bruno@clisp.org>
21349
21350         * m4/stpncpy.m4: New file.
21351
21352 2003-01-29  Bruno Haible  <bruno@clisp.org>
21353
21354         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21355         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21356
21357 2003-01-28  Bruno Haible  <bruno@clisp.org>
21358
21359         * modules/c-ctype: New module.
21360         * MODULES.html.sh (func_all_modules): Add it.
21361
21362 2003-01-28  Bruno Haible  <bruno@clisp.org>
21363
21364         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21365         Paul Eggert.
21366         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21367         Paul Eggert.
21368
21369 2003-01-27  Bruno Haible  <bruno@clisp.org>
21370
21371         * modules/xsetenv: New module.
21372         * MODULES.html.sh (func_all_modules): Add it.
21373
21374 2003-01-27  Bruno Haible  <bruno@clisp.org>
21375
21376         * lib/xsetenv.h: New file, from GNU gettext.
21377         * lib/xsetenv.c: New file, from GNU gettext.
21378
21379 2003-01-23  Jim Meyering  <jim@meyering.net>
21380
21381         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21382         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21383
21384 2003-01-23  Bruno Haible  <bruno@clisp.org>
21385
21386         * modules/minmax: New module.
21387         * MODULES.html.sh (func_all_modules): Add it.
21388
21389 2003-01-23  Bruno Haible  <bruno@clisp.org>
21390
21391         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21392         Eggert.
21393
21394 2003-01-22  Bruno Haible  <bruno@clisp.org>
21395
21396         * modules/exit: New module.
21397         * MODULES.html.sh (func_all_modules): Add it.
21398
21399 2003-01-22  Bruno Haible  <bruno@clisp.org>
21400
21401         * lib/exit.h: New file, from GNU gettext.
21402
21403 2003-01-19  Bruno Haible  <bruno@clisp.org>
21404
21405         * gnulib-tool: Recognize option --extract-maintainer.
21406         (func_get_maintainer): New function.
21407         * modules/*: Add Maintainer entry.
21408
21409 2003-01-16  Jim Meyering  <jim@meyering.net>
21410
21411         * m4/regex.m4: The `regex' struct is both input and output.
21412         Initialize it before each use.  Patch by Tim Waugh.
21413
21414 2003-01-16  Bruno Haible  <bruno@clisp.org>
21415
21416         * MODULES.html.sh: Add a table of contents. Add the module name as
21417         leftmost column. Add hyperlinks.
21418
21419 2003-01-15  Bruno Haible  <bruno@clisp.org>
21420
21421         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21422
21423 2003-01-15  Bruno Haible  <bruno@clisp.org>
21424
21425         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21426         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21427         suffix.
21428
21429 2003-01-15  Bruno Haible  <bruno@clisp.org>
21430
21431         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21432
21433 2003-01-15  Bruno Haible  <bruno@clisp.org>
21434
21435         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21436         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21437
21438 2003-01-14  Jim Meyering  <jim@meyering.net>
21439
21440         * lib/same.c (same_name): Tweak a comment.
21441
21442 2003-01-14  Bruno Haible  <bruno@clisp.org>
21443
21444         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21445         when a string comparison is sufficient.
21446
21447 2003-01-14  Bruno Haible  <bruno@clisp.org>
21448
21449         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21450         'unsigned int'.
21451
21452 2003-01-14  Bruno Haible  <bruno@clisp.org>
21453
21454         * lib/hash-pjw.c: Add comment about low quality of this function.
21455
21456 2003-01-13  Bruno Haible  <bruno@clisp.org>
21457
21458         * modules/stpcpy: Distribute lib/stpcpy.h.
21459         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21460
21461 2003-01-13  Bruno Haible  <bruno@clisp.org>
21462
21463         * modules/*: Add a description.
21464         * modules/strpbrk: Fix Makefile.am snippet.
21465         * modules/strtoimax: Fix dependencies.
21466         * modules/strtoumax: Likewise.
21467
21468 2003-01-13  Bruno Haible  <bruno@clisp.org>
21469
21470         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21471         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21472         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21473
21474 2003-01-13  Bruno Haible  <bruno@clisp.org>
21475
21476         * gnulib-tool (func_create_testdir): Store config/* files in the main
21477         directory.
21478         * config.rpath: Move to ...
21479         * config/config.rpath: ... here.
21480         * modules/gettext: Contains config/config.rpath, not config.rpath.
21481         * modules/iconv: Likewise.
21482
21483 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21484
21485         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21486         to avoid collisions with libcurses and libreadline.
21487
21488         * m4/getstr.m4: Remove.
21489         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21490
21491 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21492
21493         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21494         to avoid collisions with libcurses and libreadline.
21495
21496         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21497         * lib/getstr.h, getstr.c: Remove.
21498         * lib/getline.c: Include "getline.h", to check interface.
21499         Move body of old getstr.c here: this defines MIN_CHUNK and
21500         declares getdelim2, which is renamed from getstr.
21501         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21502
21503         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21504         All uses changed.
21505         * lib/linebuffer.h: Likewise.
21506         (readline): Remove backward-compatibility macro.
21507
21508 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21509
21510         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21511         to avoid collisions with libcurses and libreadline.
21512         * getstr: Remove.
21513         * MODULES.html.sh: Remove getstr.
21514         * modules/getline: Depend on unlocked-io, not getstr.
21515
21516 2003-01-12  Jim Meyering  <jim@meyering.net>
21517
21518         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21519
21520 2003-01-10  Bruno Haible  <bruno@clisp.org>
21521
21522         * modules/alloca: Change Makefile.am requirements. Simplify Include
21523         requirements. Add lib/alloca_.h to file list.
21524
21525 2003-01-10  Bruno Haible  <bruno@clisp.org>
21526
21527         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21528
21529 2003-01-10  Bruno Haible  <bruno@clisp.org>
21530
21531         * lib/alloca_.h: New file.
21532         * lib/getdate.y: Unconditionally include alloca.h.
21533         * lib/makepath.c: Likewise.
21534         * lib/setenv.c: Likewise.
21535         * lib/userspec.c: Likewise.
21536
21537 2003-01-09  Karl Berry  <karl@gnu.org>
21538
21539         * MODULES.html.sh: include `dirname $0` in PATH, to find
21540         gnulib-tool.
21541
21542 2003-01-09  Bruno Haible  <bruno@clisp.org>
21543
21544         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21545         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21546
21547 2003-01-09  Bruno Haible  <bruno@clisp.org>
21548
21549         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21550
21551 2003-01-09  Bruno Haible  <bruno@clisp.org>
21552
21553         * lib/stdbool.h.in: New file.
21554
21555 2003-01-09  Bruno Haible  <bruno@clisp.org>
21556
21557         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21558         * MODULES.html.sh: Likewise.
21559
21560 2003-01-08  Jim Meyering  <jim@meyering.net>
21561
21562         * lib/full-write.c: Undefine and define-away `const' after inclusion
21563         of errno.h, not before.  Suggestion from Bruno Haible.
21564
21565 2003-01-08  Bruno Haible  <bruno@clisp.org>
21566
21567         * modules/full-read: Depend on full-write.
21568
21569 2003-01-08  Bruno Haible  <bruno@clisp.org>
21570
21571         * lib/safe-read.c: Include specification header first, to ensure its
21572         selfcontainedness.
21573         * lib/full-write.c: Likewise.
21574
21575 2003-01-07  Jim Meyering  <jim@meyering.net>
21576
21577         * lib/full-write.c: Rework so that it may serve to define full_read,
21578         too.
21579         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21580
21581 2003-01-07  Bruno Haible  <bruno@clisp.org>
21582
21583         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21584         <inttypes.h>.
21585         * lib/xstrtol.h: Likewise.
21586         * lib/xstrtoimax.c: Likewise.
21587         * lib/xstrtoumax.c: Likewise.
21588         * lib/human.h: Likewise.
21589
21590         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21591         on systems that have <inttypes.h> but not <stdint.h>.
21592
21593 2003-01-07  Bruno Haible  <bruno@clisp.org>
21594
21595         * MODULES.html.sh: Add copyright notice.
21596         (missed_files): Omit CVS directory entries.
21597         (func_module): Make it work with sed-3.02.
21598         * MODULES.txt: Remove file.
21599
21600 2003-01-06  Jim Meyering  <jim@meyering.net>
21601
21602         * lib/version-etc.c: Update year in translatable copyright string.
21603
21604 2003-01-03  Karl Berry  <karl@gnu.org>
21605
21606         * config/config.{guess,sub}: update from prep.
21607
21608 2003-01-02  Karl Berry  <karl@gnu.org>
21609
21610         * doc/COPYING.DOC: belatedly updated to 1.2.
21611
21612 2003-01-01  Karl Berry  <karl@gnu.org>
21613
21614         * gnulib-tool (func_verify_module): report module name $module in
21615         error message, not $1.
21616         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21617         be created, only if it doesn't exist.
21618         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21619
21620 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21621
21622         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21623
21624 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21625
21626         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21627         memcmp if strcoll doesn't work.
21628
21629 2002-12-31  Bruno Haible  <bruno@clisp.org>
21630
21631         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21632         nonempty.
21633
21634 2002-12-31  Bruno Haible  <bruno@clisp.org>
21635
21636         * lib/memcoll.c (STRCOLL): New macro.
21637         (memcoll): Use it.
21638
21639 2002-12-31  Bruno Haible  <bruno@clisp.org>
21640
21641         * lib/localcharset.h: New file.
21642         * lib/localcharset.c: Include it.
21643         * lib/unicodeio.c: Likewise.
21644
21645 2002-12-31  Bruno Haible  <bruno@clisp.org>
21646
21647         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21648         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21649
21650 2002-12-31  Bruno Haible  <bruno@clisp.org>
21651
21652         * lib/getline.h: Include <stddef.h>, for size_t.
21653
21654         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21655         * lib/unicodeio.c: Don't include <stddef.h>.
21656
21657 2002-12-31  Bruno Haible  <bruno@clisp.org>
21658
21659         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21660         HAVE_TM_ZONE.
21661
21662 2002-12-24  Karl Berry  <karl@gnu.org>
21663
21664         * config/config.guess: update from prep.
21665
21666 2002-12-24  Bruno Haible  <bruno@clisp.org>
21667
21668         General infrasructure.
21669         * m4/README: Rewritten.
21670         * m4/onceonly.m4: New file.
21671         * m4/onceonly_2_57.m4: New file.
21672
21673         Module atexit.
21674         * m4/atexit.m4: New file.
21675
21676         Module strtod.
21677         * m4/strtod.m4: New file.
21678
21679         Module strtol.
21680         * m4/strtol.m4: New file.
21681
21682         Module strtoul.
21683         * m4/strtoul.m4: New file.
21684
21685         Module memchr.
21686         * m4/memchr.m4: New file.
21687
21688         Module memcmp.
21689         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21690         (jm_FUNC_MEMCMP): Invoke it.
21691
21692         Module memcpy.
21693         * m4/memcpy.m4: New file.
21694
21695         Module memmove.
21696         * m4/memmove.m4: New file.
21697
21698         Module memset.
21699         * m4/memset.m4: New file.
21700
21701         Module strcspn.
21702         * m4/strcspn.m4: New file.
21703
21704         Module strpbrk.
21705         * m4/strpbrk.m4: New file.
21706
21707         Module strstr.
21708         * m4/strstr.m4: New file.
21709
21710         Module strerror.
21711         * m4/strerror.m4: New file.
21712
21713         Module mktime.
21714         * m4/mktime.m4: Renamed from jm-mktime.m4.
21715         (gl_PREREQ_MKTIME): New macro.
21716         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21717
21718         Module malloc.
21719         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21720         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21721         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21722
21723         Module realloc.
21724         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21725         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21726         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21727
21728         Module strftime.
21729         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21730         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21731         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21732         gl_TM_GMTOFF.
21733         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21734
21735         Module xalloc.
21736         * m4/xalloc.m4: New file.
21737
21738         Module alloca.
21739         * m4/alloca.m4: New file.
21740
21741         Module putenv.
21742         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21743         (jm_FUNC_PUTENV): Invoke it.
21744
21745         Module setenv.
21746         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21747         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21748         when invoked twice.
21749         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21750         gt_FUNC_SETENV.
21751
21752         Module memrchr.
21753         * m4/memrchr.m4: New file.
21754
21755         Module stpcpy.
21756         * m4/stpcpy.m4: New file.
21757
21758         Module strcase.
21759         * m4/strcase.m4: New file.
21760
21761         Module strdup.
21762         * m4/strdup.m4: New file.
21763
21764         Module strnlen.
21765         * m4/strnlen.m4: New file.
21766
21767         Module strndup.
21768         * m4/strndup.m4: New file.
21769
21770         Module xstrtod.
21771         * m4/xstrtod.m4: New file.
21772
21773         Module xstrtol.
21774         * m4/xstrtol.m4: New file.
21775
21776         Module getdate.
21777         * m4/getdate.m4: New file.
21778
21779         Module unlocked-io.
21780         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21781         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21782         * m4/jm-glibc-io.m4n: Remove file.
21783
21784         Module long-options.
21785         * m4/long-options.m4: New file.
21786
21787         Module md5.
21788         * m4/md5.m4: New file.
21789
21790         Module sha.
21791         * m4/sha.m4: New file.
21792
21793         Module getstr.
21794         * m4/getstr.m4: New file.
21795
21796         Module getline.
21797         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21798         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21799         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21800         simply getline. Infoke gl_PREREQ_GETLINE.
21801
21802         Module obstack.
21803         * m4/obstack.m4: New file.
21804
21805         Module hash.
21806         * m4/hash.m4: New file.
21807
21808         Module readtokens.
21809         * m4/readtokens.m4: New file.
21810
21811         Module strverscmp.
21812         * m4/strverscmp.m4: New file.
21813
21814         Module stdbool.
21815         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21816         OSF/1.
21817
21818         Module strtoll.
21819         * m4/strtoll.m4: New file.
21820
21821         Module strtoull.
21822         * m4/strtoull.m4: New file.
21823
21824         Module strtoimax.
21825         * m4/strtoimax.m4: New file.
21826
21827         Module strtoumax.
21828         * m4/strtoumax.m4: New file.
21829
21830         Module xstrtoimax.
21831         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21832         jm_AC_PREREQ_XSTRTOIMAX.
21833         Moved the strtol prerequisites to strtol.m4.
21834         Moved the strtoll prerequisites to strtoll.m4.
21835         Moved the strtoimax prerequisites to strtoimax.m4.
21836
21837         Module xstrtoumax.
21838         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21839         jm_AC_PREREQ_XSTRTOUMAX.
21840         Moved the strtoul prerequisites to strtoul.m4.
21841         Moved the strtoull prerequisites to strtoull.m4.
21842         Moved the strtoumax prerequisites to strtoumax.m4.
21843
21844         Module chown.
21845         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21846         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21847
21848         Module dup2.
21849         * m4/dup2.m4: New file.
21850
21851         Module ftruncate.
21852         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21853         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21854
21855         Module getgroups.
21856         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21857         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21858
21859         Module gettimeofday.
21860         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21861         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21862         gl_PREREQ_GETTIMEOFDAY.
21863
21864         Module mkdir.
21865         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21866         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21867
21868         Module mkstemp.
21869         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21870         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21871         jm_AC_TYPE_UINTMAX_T.
21872         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21873
21874         Module stat.
21875         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21876         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21877
21878         Module lstat.
21879         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21880         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21881
21882         Module timespec.
21883         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21884         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21885         * m4/st_mtim.m4: Indentation.
21886
21887         Module nanosleep.
21888         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21889         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21890         gl_PREREQ_NANOSLEEP.
21891
21892         Module regex.
21893         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21894         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21895         (gl_REGEX): New macro.
21896
21897         Module rename.
21898         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21899         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21900
21901         Module rmdir.
21902         * m4/rmdir.m4: New file.
21903
21904         Module utime.
21905         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21906         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21907         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21908
21909         Module dirname.
21910         * m4/dirname.m4: New file.
21911
21912         Module getopt.
21913         * m4/getopt.m4: New file.
21914
21915         Module unistd-safer.
21916         * m4/unistd-safer.m4: New file.
21917
21918         Module fnmatch.
21919         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21920         declaration.
21921         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21922         (gl_FUNC_FNMATCH_POSIX): New macro.
21923         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21924         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21925         simply fnmatch.
21926
21927         Module exclude.
21928         * m4/exclude.m4: New file.
21929
21930         Module human.
21931         * m4/human.m4: New file.
21932
21933         Module acl.
21934         * m4/acl.m4: Nop.
21935
21936         Module backupfile.
21937         * m4/backupfile.m4: New file.
21938         * m4/d-ino.m4: Indentation.
21939
21940         Module fsusage.
21941         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21942         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21943         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21944
21945         Module dirfd.
21946         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21947         requirements.
21948
21949         Module euidaccess.
21950         * m4/euidaccess.m4: New file.
21951
21952         Module file-type.
21953         * m4/file-type.m4: New file.
21954
21955         Module fileblocks.
21956         * m4/fileblocks.m4: New file.
21957
21958         Module filemode.
21959         * m4/filemode.m4: New file.
21960
21961         Module isdir.
21962         * m4/isdir.m4: New file.
21963
21964         Module lchown.
21965         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21966         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21967
21968         Module makepath.
21969         * m4/makepath.m4: New file.
21970
21971         Module modechange.
21972         * m4/modechange.m4: New file.
21973
21974         Module mountlist.
21975         * m4/mountlist.m4: New file.
21976         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21977         Indentation.
21978
21979         Module path-concat.
21980         * m4/path-concat.m4: New file.
21981
21982         Module pathmax.
21983         * m4/pathmax.m4: New file.
21984
21985         Module same.
21986         * m4/same.m4: New file.
21987
21988         Module save-cwd.
21989         * m4/save-cwd.m4: New file.
21990
21991         Module savedir.
21992         * m4/savedir.m4: New file.
21993
21994         Module xgetcwd.
21995         * m4/xgetcwd.m4: New file.
21996         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21997
21998         Module xreadlink.
21999         * m4/xreadlink.m4: New file.
22000
22001         Module safe-read.
22002         * m4/safe-read.m4: New file.
22003
22004         Module safe-write.
22005         * m4/safe-write.m4: New file.
22006
22007         Module closeout.
22008         * m4/closeout.m4: New file.
22009
22010         Module stdio-safer.
22011         * m4/stdio-safer.m4: New file.
22012
22013         Module getpass.
22014         * m4/getpass.m4: New file.
22015
22016         Module getugroups.
22017         * m4/getugroups.m4: New file.
22018
22019         Module group-member.
22020         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22021         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22022
22023         Module idcache.
22024         * m4/idcache.m4: New file.
22025
22026         Module userspec.
22027         * m4/userspec.m4: New file.
22028
22029         Module gettime.
22030         * m4/clock_time.m4: New file.
22031         * m4/gettime.m4: New file.
22032
22033         Module settime.
22034         * m4/settime.m4: New file.
22035
22036         Module posixtm.
22037         * m4/posixtm.m4: New file.
22038
22039         Module gethostname.
22040         * m4/gethostname.m4: New file.
22041
22042         Module canon-host.
22043         * m4/canon-host.m4: New file.
22044
22045         Module gettext.
22046         * m4/codeset.m4: New file, from gettext-0.11.5.
22047         * m4/gettext.m4: New file, from gettext-0.11.5.
22048         * m4/glibc21.m4: New file, from gettext-0.11.5.
22049         * m4/iconv.m4: New file, from gettext-0.11.5.
22050         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22051         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22052         * m4/inttypes.m4: New file, from gettext-0.11.5.
22053         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22054         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22055         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22056         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22057         * m4/lib-link.m4: New file, from gettext-0.11.5.
22058         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22059         * m4/progtest.m4: New file, from gettext-0.11.5.
22060         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22061         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22062         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22063
22064         Module localcharset.
22065         * m4/localcharset.m4: New file.
22066
22067         Module hard-locale.
22068         * m4/hard-locale.m4: New file.
22069
22070         Module mbswidth.
22071         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22072         onceonly macros.
22073         * m4/mbrtowc.m4: Add comment.
22074
22075         Module memcasecmp.
22076         * m4/memcasecmp.m4: New file.
22077
22078         Module memcoll.
22079         * m4/memcoll.m4: New file.
22080
22081         Module unicodeio.
22082         * m4/unicodeio.m4: New file.
22083
22084         Module rpmatch.
22085         * m4/rpmatch.m4: New file.
22086
22087         Module yesno.
22088         * m4/yesno.m4: New file.
22089
22090         Module exitfail.
22091         * m4/exitfail.m4: New file.
22092
22093         Module c-stack.
22094         * m4/c-stack.m4 (gl_C_STACK): New macro.
22095         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22096
22097         Module error.
22098         * m4/error.m4 (gl_ERROR): New macro.
22099         (jm_PREREQ_ERROR): Use onceonly macros.
22100
22101         Module fatal.
22102         * m4/fatal.m4: New file.
22103
22104         Module getloadavg.
22105         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22106         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22107
22108         Module getpagesize.
22109         * m4/getpagesize.m4: New file.
22110
22111         Module getusershell.
22112         * m4/getusershell.m4: New file.
22113
22114         Module physmem.
22115         * m4/physmem.m4: New file.
22116
22117         Module posixver.
22118         * m4/posixver.m4: New file.
22119
22120         Module quotearg.
22121         * m4/quotearg.m4: New file.
22122
22123         Module quote.
22124         * m4/quote.m4: New file.
22125
22126         Module readutmp.
22127         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22128
22129         Module sig2str.
22130         * m4/sig2str.m4: New file.
22131
22132         Other.
22133         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22134         ulonglong.m4.
22135         * m4/intmax_t.m4: New file.
22136         * m4/d-type.m4: Indentation.
22137         * m4/jm-macros.m4: Update.
22138         * m4/prereq.m4 (jm_PREREQ): Update.
22139         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22140         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22141         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22142         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22143         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22144         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22145         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22146         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22147         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22148         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22149         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22150         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22151         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22152         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22153         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22154         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22155         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22156         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22157         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22158
22159 2002-12-24  Bruno Haible  <bruno@clisp.org>
22160
22161         * MODULES.txt: Update according to m4/ changes.
22162
22163         Module gettext.
22164         * config.rpath: New file, from gettext-0.11.5.
22165
22166         * modules/*: New module descriptions.
22167         * gnulib-tool: New file.
22168         * MODULES.html.sh: New file.
22169
22170 2002-12-21  Karl Berry  <karl@gnu.org>
22171
22172         * doc/fdl.texi: update to version 1.2.
22173
22174 2002-12-19  Karl Berry  <karl@gnu.org>
22175
22176         * config/config.guess: update from prep.
22177
22178 2002-12-18  Bruno Haible  <bruno@clisp.org>
22179
22180         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22181         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22182
22183 2002-12-17  Bruno Haible  <bruno@clisp.org>
22184
22185         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22186         stdlib.h, string.h.
22187
22188 2002-12-17  Bruno Haible  <bruno@clisp.org>
22189
22190         * lib/canon-host.c (strdup): Remove unused declaration.
22191
22192         * lib/fsusage.c: Include full_read.h.
22193         (get_fs_usage): Use full_read instead of safe_read.
22194
22195         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22196
22197 2002-12-12  Karl Berry  <karl@gnu.org>
22198
22199         * config/config.guess: update from prep.
22200
22201 2002-12-11  Bruno Haible  <bruno@clisp.org>
22202
22203         * m4/setenv.m4: New file, from gettext-0.11.5.
22204
22205 2002-12-11  Bruno Haible  <bruno@clisp.org>
22206
22207         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22208         not unsetenv().
22209         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22210         modifications:
22211
22212         2002-12-11  Bruno Haible  <bruno@clisp.org>
22213
22214                 * setenv.c (alloca): Fall back to malloc.
22215                 (freea): New macro.
22216                 (setenv): Use freea() to free memory allocated with alloca().
22217
22218         2002-11-13  Bruno Haible  <bruno@clisp.org>
22219
22220                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22221                 function declarations.
22222                 * unsetenv.c (unsetenv): Likewise.
22223
22224         2002-03-04  Bruno Haible  <bruno@clisp.org>
22225
22226                 Portability to AIX 4.3.3.
22227                 * unsetenv.c: New file, extracted from setenv.c.
22228                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22229
22230         2001-12-20  Bruno Haible  <bruno@clisp.org>
22231
22232                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22233                 use malloc instead. For SunOS 4.
22234
22235         2001-12-11  Bruno Haible  <bruno@clisp.org>
22236
22237                 * setenv.c: Declare alloca.
22238                 (compar_fn_t): New typedef.
22239                 (KNOWN_VALUE, STORE_VALUE): Use it.
22240
22241         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22242         setenv.h.
22243
22244 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22245
22246         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22247         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22248         Choose values that are less likely to collide with system fnmatch
22249         options.
22250         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22251         defined (e.g., a pure POSIX system).
22252         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22253         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22254
22255 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22256
22257         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22258         a pain in practice to deal with generated m4 files.  This change
22259         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22260
22261         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22262         and jm-glibc-io.m4, as they are no longer a special case.
22263         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22264         kludge and the auto-generation stuff.  Check only whether the
22265         functions are declared, not whether they exist, since older hosts
22266         that don't declare the functions can't use the optimization anyway.
22267
22268 2002-12-06  Jim Meyering  <jim@meyering.net>
22269
22270         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22271
22272         Merge in changes from libc's misc/error.c, in preparation
22273         for the merge of gnulib's changes back into libc.
22274
22275         * lib/error.c (_): Define only if not already defined.
22276         Move definition to follow all #include directives.
22277         Include unlocked-io.h only if !_LIBC.
22278         [_LIBC]: Include <libio/libioP.h>.
22279         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22280         (fflush): Tweak definition to use INTUSE.
22281         (putc): Define.
22282
22283 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22284
22285         * lib/alloca.c [defined emacs]: Include "lisp.h".
22286         (xalloc_die) [defined emacs]: New macro.
22287         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22288         [! defined emacs]: Include <xalloc.h>.
22289         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22290         (pointer): Typedef to POINTER_TYPE *.
22291         (malloc): Remove decl; we now always use xmalloc.
22292         (alloca): Use old-style definition, since Emacs needs this.
22293         Check for arithmetic overflow when computing combined size.
22294
22295 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22296
22297         Do not generate unlocked-io.h automatically, since it's easier to
22298         maintain it by hand.
22299
22300         * lib/unlocked-io.h: New file, from GNU diffutils,
22301         but with proper copyright notice and attribution.
22302         * lib/gen-uio: Remove.
22303         * lib/Makefile.am: Add copyright notice.
22304         (libfetish_a_SOURCES): Add unlocked-io.h.
22305         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22306         (DISTCLEANFILES, io_functions): Remove macros.
22307         (EXTRA_DIST): Remove gen_uio.
22308         (unlocked-io.h): Remove rule.
22309
22310 2002-12-04  Jim Meyering  <jim@meyering.net>
22311
22312         Reflect the fact that stat.c and lstat.c are no longer generated.
22313         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22314         (DISTCLEANFILES): Likewise.
22315         (EXTRA_DIST): Likewise.
22316         (all_local): Don't depend on stat.c or lstat.c.
22317         (stat.c, lstat.c): Remove rules.
22318         (EXTRA_DIST): Remove xstat.in.
22319
22320         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22321         * lib/stat.c: New file.  Contents mostly from xstat.in.
22322         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22323         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22324
22325         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22326         too.
22327         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22328
22329 2002-12-03  Jim Meyering  <jim@meyering.net>
22330
22331         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22332         but not semantics, to minimize the differences between these two files.
22333         (safe_read): Change comment to mention SAFE_READ_ERROR.
22334
22335         * lib/safe-read.c (IS_EINTR): Define.
22336         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22337
22338 2002-12-02  Jim Meyering  <jim@meyering.net>
22339
22340         * lib/safe-read.c (EINTR): Define.
22341         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22342         (INT_MAX): Provide fallback.
22343         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22344
22345         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22346
22347 2002-12-02  Bruno Haible  <bruno@clisp.org>
22348
22349         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22350         Define, taken from safe-read.c.
22351         (INT_MAX): Provide fallback.
22352         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22353         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22354
22355         * lib/safe-read.c (EINTR): Remove definition.
22356         (safe_read): Don't use EINTR if it is absent.
22357
22358 2002-12-01  Jim Meyering  <jim@meyering.net>
22359
22360         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22361         zero.
22362         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22363
22364 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22365
22366         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22367         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22368         with `if (! (value < limit)) abort ();', for readability.
22369
22370 2002-11-26  Karl Berry  <karl@gnu.org>
22371
22372         * lib/strdup.c: copy from libc again, with jim's ok.
22373         * lib/.cppi-disable: re-add strdup.c
22374
22375 2002-11-25  Karl Berry  <karl@gnu.org>
22376
22377         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22378         instead of "strtol.c".
22379
22380 2002-11-25  Karl Berry  <karl@gnu.org>
22381
22382         * config/install-sh: update from automake for variable quoting, $0 in
22383         error msgs, etc.
22384
22385         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22386         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22387         entry.
22388
22389 2002-11-25  Jim Meyering  <jim@meyering.net>
22390
22391         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22392
22393 2002-11-24  Karl Berry  <karl@gnu.org>
22394
22395         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22396         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22397
22398 2002-11-24  Jim Meyering  <jim@meyering.net>
22399
22400         Update from coreutils:
22401
22402         * lib/mktime.c: Merge in changes from libc.
22403
22404         Avoid a link-time failure on some Linux systems.
22405         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22406         (otherwise).
22407         (__mon_yday): Declare with the STATIC attribute.
22408         (__mktime_internal): Likewise.
22409         Based on a report from Greg Schafer.
22410
22411 2002-11-23  Jim Meyering  <jim@meyering.net>
22412
22413         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22414         Use `unsigned', not `int', as type of index.
22415
22416         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22417
22418         * lib/fsusage.c: Remove unneeded parentheses around operands of
22419         `defined'.
22420
22421 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22422
22423         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22424         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22425         so that we can be included first.
22426         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22427         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22428         No need to include stddef.h or sys/types.h any more.
22429         Surround local include files with "", not "<>".
22430         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22431         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22432         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22433         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22434         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22435         (ISPRINT): Remove; no longer needed now that we assume C89.
22436
22437         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22438         Preserve errno.
22439
22440         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22441         quotearg_char): Use SIZE_MAX rather than
22442         (size_t) -1 when we are talking about "infinity".
22443
22444         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22445
22446 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22447
22448         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22449         hint that one should use `if (! x) abort ();' rather than `assert
22450         (x);', and anyway it's one less thing to worry about configuring.
22451         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22452         hash_rehash, hash_insert): Use abort rather than assert.
22453
22454 2002-11-22  Bruno Haible  <bruno@clisp.org>
22455
22456         * lib/safe-read.h: Assume C89. Add comments.
22457         (safe_read): Change return type to size_t.
22458         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22459         byte counts > SSIZE_MAX correctly.
22460         * lib/safe-write.h: New file.
22461         * lib/safe-write.c: New file.
22462         * lib/full-read.h: New file.
22463         * lib/full-read.c: New file.
22464         * lib/full-write.h: Assume C89. Add comments.
22465         * lib/full-write.c: Include safe-write.h.
22466         (full_write): Rewritten to use safe_write.
22467         Suggested by Jim Meyering and Paul Eggert.
22468
22469 2002-11-21  Jim Meyering  <jim@meyering.net>
22470
22471         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22472
22473         Merge in changes from the coreutils.
22474
22475         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22476         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22477         <stdint.h>.
22478         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22479         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22480         int.  Work more efficiently if X is the same width as uintmax_t.
22481         Do not compare X to -1, to avoid bogus compiler warning.
22482         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22483         Don't assume that f_frsize and f_bsize are the same type.
22484
22485         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22486         warning on FreeBSD.
22487
22488         * lib/makepath.c (make_path): Restore umask *before* creating the final
22489         component.
22490         (make_path): Minor reformatting.
22491
22492         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22493         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22494         HAVE_MALLOC/HAVE_REALLOC.
22495
22496         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22497         dummy ones.  At least on GNU/Linux systems, `auto' means something
22498         else.
22499         From Michael Stone.
22500
22501 2002-11-21  Bruno Haible  <bruno@clisp.org>
22502
22503         Remove case insensitive option matching.
22504         * lib/argmatch.h (argcasematch): Remove declaration.
22505         (ARGCASEMATCH): Remove macro.
22506         (__xargmatch_internal): Remove case_sensitive argument.
22507         (XARGMATCH): Update.
22508         (XARGCASEMATCH): Remove macro.
22509         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22510         case_sensitive argument.
22511         (argcasematch): Remove function.
22512         (__xargmatch_internal): Remove case_sensitive argument.
22513         (main): Use XARGMATCH instead of XARGCASEMATCH.
22514
22515         * lib/xmalloc.c: Change compile-time error message. Add comment about
22516         required autoconf version.
22517
22518 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22519
22520         Merge argmatch cleanups from Bison.  Assume C89.
22521
22522         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22523         Include stdlib.h, for EXIT_FAILURE.
22524         Always include <string.h>, since we assume C89.
22525         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22526         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22527         Include <stddef.h> instead, since it's all we need for size_t.
22528         (PARAMS): Remove.  All uses removed.
22529         (ARRAY_CARDINALITY): Do not bother to #undef.
22530         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22531         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22532         Remove unnecessary parentheses.
22533         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22534         Insert necessary parentheses.
22535         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22536         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22537
22538 2002-11-19  Bruno Haible  <bruno@clisp.org>
22539
22540         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22541         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22542
22543         * lib/mbswidth.h (PARAMS): Remove macro.
22544         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22545         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22546
22547         * lib/gcd.h (PARAMS): Remove macro.
22548         (gcd): Use ANSI C function declarations.
22549         * lib/gcd.c (gcd): Likewise.
22550
22551 2002-11-15  Bruno Haible  <bruno@clisp.org>
22552
22553         * lib/strcspn.c: Include <stddef.h>.
22554         (strcspn): Use ANSI C function declaration. Change return type to
22555         size_t. Use NULL.
22556         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22557         (strpbrk): Use NULL.
22558         * lib/strpbrk.h (PARAMS): Remove macro.
22559         (strpbrk): Use ANSI C function declaration.
22560         * lib/strstr.c: Don't include <sys/types.h>.
22561         * lib/strstr.h (PARAMS): Remove macro.
22562         (strstr): Use ANSI C function declarations.
22563
22564 2002-11-14  Karl Berry  <karl@gnu.org>
22565
22566         * config/mkinstalldirs: `do' on separate line, instead of
22567         `for var; do'.
22568
22569 2002-11-06  Bruno Haible  <bruno@clisp.org>
22570
22571         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22572         * lib/gcd.c (gcd): Likewise.
22573
22574 2002-11-05  Bruno Haible  <bruno@clisp.org>
22575
22576         * lib/gcd.h: New file, from gettext-0.11.5.
22577         * lib/gcd.c: New file, from gettext-0.11.5.
22578
22579 2002-11-05  Bruno Haible  <bruno@clisp.org>
22580
22581         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22582         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22583         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22584         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22585
22586         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22587         <libintl.h>.
22588         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22589         <libintl.h>.
22590
22591         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22592         * lib/human.c: Include gettext.h instead of <libintl.h>.
22593         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22594         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22595         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22596         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22597         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22598         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22599         (textdomain): Remove definition.
22600         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22601
22602         * lib/long-options.c: Remove include of <libintl.h> and definition of
22603         _.
22604         * lib/same.c: Remove include of <libintl.h> and definition of _.
22605
22606 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22607
22608         * lib/config.charset: A few additions for Solaris.
22609
22610 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22611
22612         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22613         * lib/localcharset.c (locale_charset): Declare as extern "C".
22614
22615 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22616
22617         * lib/config.charset: msdos in uk_UA uses CP1125.
22618
22619 2002-11-04  Bruno Haible  <bruno@clisp.org>
22620
22621         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22622         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22623         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22624         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22625         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22626
22627 2002-11-04  Bruno Haible  <bruno@clisp.org>
22628
22629         * lib/localcharset.c (locale_charset): Don't return an empty string.
22630
22631 2002-11-04  Bruno Haible  <bruno@clisp.org>
22632
22633         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22634         aliases.
22635
22636 2002-11-04  Bruno Haible  <bruno@clisp.org>
22637
22638         * lib/config.charset: Update for newest glibc. Add canonical names
22639         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22640
22641 2002-11-04  Bruno Haible  <bruno@clisp.org>
22642
22643         * lib/config.charset: Add support for NetBSD.
22644
22645 2002-11-04  Bruno Haible  <bruno@clisp.org>
22646
22647         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22648
22649 2002-11-01  Bruno Haible  <bruno@clisp.org>
22650
22651         * configure.in: Add AC_CONFIG_AUX_DIR call.
22652         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22653         test/Makefile.
22654         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22655
22656 2002-09-28  Karl Berry  <karl@gnu.org>
22657
22658         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22659         installed automake until the next release, since changes have been
22660         made.
22661
22662 2002-09-25  Karl Berry  <karl@gnu.org>
22663
22664         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22665         * lib/getopt*: copy from libc/posix.
22666         * lib/gettext.h: copy from gettext.
22667         * lib/.cppi-disable: add strdup.c, gettext.h.
22668
22669 2002-09-25  Karl Berry  <karl@gnu.org>
22670
22671         * config/srclist.txt: enable gettext.h check.
22672         * config/config.{guess,sub}: update from prep.
22673         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22674                 from automake 1.6.3.
22675         See srclist*.
22676
22677 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22678
22679         * regex.c (PATFETCH): Remove the translating fetch.
22680         (PATFETCH_RAW): Rename to PATFETCH.
22681         (set_image_of_range): New fun.
22682         (SET_RANGE_TABLE_WORK_AREA): Use it.
22683         (regex_compile): Don't translate the pattern chars so eagerly.
22684         Only do it when inserting an `exactn' bytecode or when handling
22685         a char-range.
22686         (mutually_exclusive_p): Avoid empty statement.
22687
22688 2002-07-06  Jim Meyering  <meyering@lucent.com>
22689
22690         * m4/README: Don't mention Makefile.am.in.
22691         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22692
22693 2002-07-01  Jim Meyering  <meyering@lucent.com>
22694
22695         * lib/c-stack.c: Include sys/time.h.
22696         From Volker Borchert.
22697
22698 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22699
22700         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22701
22702 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22703
22704         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22705         New macro.  Use it uniformly instead of
22706         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22707         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22708         reported by Vin Shelton.
22709
22710 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22711
22712         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22713         Do not assume SA_SIGINFO behavior.
22714         Bug reported by Jim Meyering on NetBSD 1.5.2.
22715
22716 2002-06-22  Jim Meyering  <meyering@lucent.com>
22717
22718         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22719         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22720
22721         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22722         now that configure.ac uses AC_GNU_SOURCE.
22723         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22724         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22725
22726         Update to latest tools.  Suggestions from Paul Eggert.
22727         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22728         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22729         * m4/fnmatch.m4: Likewise.
22730         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22731         to AC_HEADER_STDBOOL
22732
22733 2002-06-22  Jim Meyering  <meyering@lucent.com>
22734
22735         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22736         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22737
22738 2002-06-22  Jim Meyering  <meyering@lucent.com>
22739
22740         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22741
22742         * lib/exitfail.c, exitfail.h: Likewise.
22743         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22744
22745         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22746         of fnmatch.h.
22747         (EXTRA_DIST): Add fnmatch_loop.c.
22748         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22749
22750         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22751         * lib/fnmatch.c: Update from diffutils-2.8.2.
22752         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22753         * lib/fnmatch.h: Remove file.
22754
22755 2002-06-21  Jim Meyering  <meyering@lucent.com>
22756
22757         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22758         * m4/mbrtowc.m4: Likewise.
22759
22760         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22761         * m4/mbswidth.m4: Reflect name change:
22762         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22763         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22764
22765         * m4/lib-link.m4: Update from gettext-0.11.2.
22766         * m4/gettext.m4: Likewise.
22767
22768         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22769         From Alfred M. Szmidt.
22770
22771 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22772
22773         * lib/file-type.h: Report an error if neither S_ISREG nor
22774         S_IFREG is defined, instead of using a test specific to glibc
22775         2.2.  This should be safe, since POSIX requires S_ISREG and
22776         Unix Version 7 had S_IFREG.  We don't need to check for
22777         <sys/types.h> since we don't use any symbols that it defines.
22778
22779 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22780
22781         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22782         $@-t, so that each temporary file name is unique and valid in the first
22783         8 characters, for operation under DOS.
22784
22785 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22786
22787         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22788
22789 2002-06-15  Jim Meyering  <meyering@lucent.com>
22790
22791         Work even with DJGPP 2.03, which lacks support for symlinks.
22792         From Richard Dawe.
22793         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22794         is defined.
22795         * lib/lchown.c (S_ISLNK): Likewise.
22796
22797 2002-06-15  Jim Meyering  <meyering@lucent.com>
22798
22799         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22800         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22801         have been included before this file.
22802
22803 2002-06-14  Jim Meyering  <meyering@lucent.com>
22804
22805         * lib/file-type.h: Use the version from diffutils-2.8.2.
22806         * lib/file-type.c: Likewise.
22807
22808 2002-06-07  Jim Meyering  <meyering@lucent.com>
22809
22810         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22811         They're needed at least for NetBSD 1.5.2.
22812         ($statxfs_includes): Include those same headers.
22813         ($statxfs_includes): Include sys/vfs.h if available.
22814         ($statxfs_includes): Likewise for sys/statvfs.h.
22815         Check for the following members in both structs statfs and statvfs:
22816         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22817
22818 2002-06-01  Jim Meyering  <meyering@lucent.com>
22819
22820         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22821         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22822
22823 2002-05-28  Jim Meyering  <meyering@lucent.com>
22824
22825         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22826         Reported by Volker Borchert.
22827
22828 2002-05-27  Jim Meyering  <meyering@lucent.com>
22829
22830         Fix a problem seen only on nonconforming systems whereby ls.c's
22831         use of localtime, and then of gettimeofday would cause trouble:
22832         the localtime call used to initialize rpl_gettimeofday's save
22833         mechanism would clobber ls's current local time information so
22834         that in any long listing the first file would always be listed
22835         with date 1970-01-01.  Analysis by Volker Borchert.
22836
22837         * lib/gettimeofday.c (localtime): Undefine.
22838         (rpl_localtime): New function.
22839
22840 2002-05-27  Jim Meyering  <meyering@lucent.com>
22841
22842         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22843         localtime.
22844
22845         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22846         use the replacement function; it wouldn't resolve at link time.
22847         Reported by Volker Borchert.
22848
22849 2002-05-22  Jim Meyering  <meyering@lucent.com>
22850
22851         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22852         file-type.h.
22853         * lib/file-type.h: New file.
22854         * lib/file-type.c (file_type): New file/function.  Extracted from
22855         diffutils.
22856
22857 2002-04-30  Jim Meyering  <meyering@lucent.com>
22858
22859         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22860
22861 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22862
22863         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22864
22865 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22866
22867         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22868         Do not check for alloca.h (no longer used) or stdbool.h (was never
22869         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22870
22871 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22872
22873         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22874
22875 2002-04-29  Jim Meyering  <meyering@lucent.com>
22876
22877         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22878         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22879         Use AC_FUNC_STRNLEN here instead.
22880
22881         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22882         With autoconf-2.53a, it's part of AC_PROG_CC.
22883
22884 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22885
22886         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22887         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22888
22889 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22890
22891         * lib/sig2str.h, lib/sig2str.c: New files.
22892         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22893
22894 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22895
22896         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22897         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22898         of 127, since 64 is the largest conceivable number for ancient
22899         nonstandard hosts.
22900         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22901
22902 2002-04-28  Jim Meyering  <meyering@lucent.com>
22903
22904         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22905
22906 2002-04-24  Jim Meyering  <meyering@lucent.com>
22907
22908         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22909         (jm_PREREQ): Use it.
22910
22911         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22912         mach/mach.h fcntl.h.
22913         Check for this function: setlocale.
22914
22915 2002-04-24  Jim Meyering  <meyering@lucent.com>
22916
22917         * lib/gettext.h: New file, from Gettext.
22918         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22919         (libfetish_a_SOURCES): Add gettext.h.
22920
22921 2002-04-16  Jim Meyering  <meyering@lucent.com>
22922
22923         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22924         ut_pid, ut_id, ut_exit.
22925
22926 2002-04-16  Jim Meyering  <meyering@lucent.com>
22927
22928         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22929         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22930         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22931
22932 2002-04-12  Jim Meyering  <meyering@lucent.com>
22933
22934         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22935         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22936         existence of the getmntinfo function.  Needed for Darwin 5.3.
22937
22938         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22939         This is necessary at least on Darwin 5.3.
22940
22941         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22942         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22943         strnlen.o in the library, and that makes some versions of ranlib
22944         object.
22945
22946 2002-04-12  Jim Meyering  <meyering@lucent.com>
22947
22948         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22949
22950 2002-04-09  Jim Meyering  <meyering@lucent.com>
22951
22952         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22953         to be more precise.  Rather than saying we're checking whether the
22954         function `works', say what we're testing.
22955         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22956         Reported by Bruno Haible.
22957
22958 2002-03-10  Jim Meyering  <meyering@lucent.com>
22959
22960         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22961         Suggestion from Santiago Vila.
22962
22963 2002-03-08  Jim Meyering  <meyering@lucent.com>
22964
22965         * lib/rename.c: Mention that this wrapper is needed also on
22966         mips-dec-ultrix4.4 systems.
22967
22968 2002-03-02  Jim Meyering  <meyering@lucent.com>
22969
22970         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22971         not HAVE_CLOCK_SETTIME.
22972
22973 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22974
22975         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22976         Check for clock_settime.
22977
22978 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22979
22980         * lib/nanosleep.h: Rename to....
22981         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22982
22983         * lib/gettime.c: New file.
22984         * lib/settime.c: New file.
22985         * lib/stime.c: Remove.
22986
22987         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22988         timespec.h.  Remove nanosleep.h.
22989
22990 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22991
22992         * m4/acl.m4: New file.
22993         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22994         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22995
22996 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22997
22998         * lib/acl.c, lib/acl.h: New files.
22999         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23000
23001 2002-02-24  Jim Meyering  <meyering@lucent.com>
23002
23003         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23004         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23005         cause trouble.  Reported by Nelson Beebe.
23006
23007 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23008
23009         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23010         compilers that don't know that xalloc_die never returns.
23011
23012 2002-02-20  Jim Meyering  <meyering@lucent.com>
23013
23014         * lib/getdate.c: Regenerate using bison-1.33.
23015
23016 2002-02-17  Jim Meyering  <meyering@lucent.com>
23017
23018         * config/config.guess (main): Don't use `head -1'; it's no longer
23019         portable. Use `sed 1q' instead.
23020
23021 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23022
23023         * m4/codeset.m4: Upgrade to gettext-0.11.
23024         * m4/gettext.m4: Upgrade to gettext-0.11.
23025         * m4/glibc21.m4: Upgrade to gettext-0.11.
23026         * m4/iconv.m4: Upgrade to gettext-0.11.
23027         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23028         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23029         * m4/lib-ld.m4: New file, from gettext-0.11.
23030         * m4/lib-link.m4: New file, from gettext-0.11.
23031         * m4/lib-prefix.m4: New file, from gettext-0.11.
23032         * m4/progtest.m4: Upgrade to gettext-0.11.
23033
23034 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23035
23036         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23037         (jm_PREREQ): Use it.
23038
23039 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23040
23041         * lib/posixver.c, lib/posixver.h: New files.
23042         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23043
23044 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23045             Bruno Haible  <bruno@clisp.org>
23046
23047         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23048         (fwrite_success_callback): New declaration.
23049         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23050         print_unicode_char. Call failure callback instead of error.
23051         (fwrite_success_callback): New function.
23052         (exit_failure_callback): New function.
23053         (fallback_failure_callback): New function.
23054         (print_unicode_char): Call unicode_to_mb.
23055
23056 2002-01-26  Jim Meyering  <meyering@lucent.com>
23057
23058         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23059         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23060
23061 2002-01-26  Jim Meyering  <meyering@lucent.com>
23062
23063         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23064
23065 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23066
23067         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23068
23069 2002-01-22  Jim Meyering  <meyering@lucent.com>
23070
23071         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23072         Otherwise, some versions of automake would omit the rule that makes
23073         Makefile from Makefile.in.
23074
23075 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23076
23077         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23078         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23079         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23080         (memcoll): Set errno to zero if there is no error.
23081
23082         * lib/quotearg.c (quotearg_buffer_restyled):
23083         Fix bug with quoting buffers containing NUL when backslashing escapes.
23084         This bug was exposed by the other changes in this patch.
23085         (quotearg_n_options): New arg ARGSIZE.
23086         All callers changed.
23087         (quoting_options_from_style): New function.
23088         (quotearg_n_style): Use it.
23089         (quotearg_n_style_mem): New function.
23090
23091         * lib/quotearg.h (quotearg_n_style_mem): New function.
23092
23093 2002-01-19  Jim Meyering  <meyering@lucent.com>
23094
23095         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23096         Remove useless quotes: DF_PROG="df".
23097         * m4/strnlen.m4: New file.
23098
23099 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23100
23101         * lib/backupfile.c (ISDIGIT): Comment fix.
23102         * lib/getdate.y (ISDIGIT): Likewise.
23103         * lib/posixtm.c (ISDIGIT, year): Likewise.
23104         * lib/strverscmp.c (ISDIGIT): Likewise.
23105         * lib/userspec.c (ISDIGIT): Likewise.
23106
23107 2002-01-16  Jim Meyering  <meyering@lucent.com>
23108
23109         * lib/getdate.y: Add three semicolons, each just before a closing
23110         brace. Bison (as of version 1.31) no longer papers over that mistake.
23111
23112 2002-01-05  Jim Meyering  <meyering@lucent.com>
23113
23114         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23115
23116 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23117
23118         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23119         not silently exit merely because the output buffer happens to
23120         have nothing pending.
23121
23122 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23123
23124         See the big note in ../ChangeLog.
23125         * lib/human.c (suffixes): Prefer K to k for 1024.
23126         (generate_suffix_backwards): New function.
23127         (human_readable_inexact): Use it.
23128         * lib/xstrtol.c (__xstrtol): If there is no number but there
23129         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23130         Accept 'K' as well as 'k'.
23131
23132 2001-12-15  Jim Meyering  <meyering@lucent.com>
23133
23134         * lib/regex.h (__restrict_arr): Update from libc.
23135
23136         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23137         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23138         (STREQ): Define.
23139
23140 2001-12-14  Jim Meyering  <meyering@lucent.com>
23141
23142         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23143         Suggestion from Bruno Haible.
23144
23145 2001-12-10  Jim Meyering  <meyering@lucent.com>
23146
23147         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23148         xrealloc, Instead, include "xalloc.h".
23149         (initbuffer): Don't cast xmalloc return value to char*.
23150         (readline): Reword comment.
23151         Don't cast xrealloc return value to char*
23152         Return NULL, not 0.
23153
23154 2001-12-09  Jim Meyering  <meyering@lucent.com>
23155
23156         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23157         about `signed and unsigned type in conditional expression'.
23158         * lib/posixtm.c (posix_time_parse): Likewise.
23159
23160         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23161
23162         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23163         to avoid a pedantic warning.
23164
23165         * lib/getstr.c: Don't include assert.h.
23166         (getstr): Remove warning-evoking assertions.
23167         Return -1 if offset parameter is out of bounds.
23168         Change the type of a local from int to size_t.
23169
23170         * lib/strftime.c (my_strftime_localtime_r): Include this function
23171         definition in the `#if ! HAVE_TM_GMTOFF' block.
23172
23173         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23174         Include xalloc.h instead.
23175
23176 2001-12-02  Jim Meyering  <meyering@lucent.com>
23177
23178         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23179         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23180         included.
23181
23182         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23183         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23184
23185 2001-11-30  Akim Demaille  <akim@epita.fr>
23186
23187         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23188         before being defined.
23189
23190 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23191
23192         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23193         First arg is int, not unsigned.
23194         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23195         (SIZE_MAX, UINT_MAX): New macros.
23196         (quotearg_n_options): Abort if N is negative.
23197         Avoid overflow check on hosts where size_t is 64 bits and int
23198         is 32 bits, as overflow is impossible there.
23199         Fix off-by-one typo that caused unnecessary reallocation.
23200
23201 2001-11-27  Jim Meyering  <meyering@lucent.com>
23202
23203         * lib/tempname.c: Merge with version from libc.
23204         * lib/regex.c: Likewise.
23205
23206         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23207         systems for which STDC_HEADERS is 0, it was not included, resulting in
23208         a warning about an integer-to-pointer conversion problem with getenv.
23209         Reported by Volker Borchert.
23210
23211 2001-11-26  Jim Meyering  <meyering@lucent.com>
23212
23213         * lib/gtod.h: Remove file.
23214         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23215         * lib/gettimeofday.c: Don't include gtod.h.
23216         (GTOD_init): Remove function.
23217         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23218         Suggestion from Volker Borchert.
23219
23220 2001-11-23  Jim Meyering  <meyering@lucent.com>
23221
23222         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23223         it.
23224         * lib/hash.c (struct hash_table): Define it here instead.
23225
23226 2001-11-22  Jim Meyering  <meyering@lucent.com>
23227
23228         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23229
23230 2001-11-20  Jim Meyering  <meyering@lucent.com>
23231
23232         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23233         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23234
23235 2001-11-19  Jim Meyering  <meyering@lucent.com>
23236
23237         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23238         directory.  Use "conftestXXXXXX" as the template.
23239         Suggestion from Paul Eggert.
23240
23241         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23242         immediately, so the test doesn't mistakenly hit the max-open-files
23243         limit.
23244
23245 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23246
23247         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23248         (TEMPORARIES): New macro.
23249         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23250         removes an artificial limitation (e.g. HP-UX 10.20, where
23251         TMP_MAX is 17576).
23252
23253 2001-11-18  Jim Meyering  <meyering@lucent.com>
23254
23255         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23256
23257 2001-11-18  Jim Meyering  <meyering@lucent.com>
23258
23259         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23260         on SunOS 4.
23261
23262         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23263         files will be created before anything else.
23264
23265 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23266
23267         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23268         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23269
23270 2001-11-17  Jim Meyering  <meyering@lucent.com>
23271
23272         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23273         Prompted by a report from Bob Proulx.
23274
23275         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23276         Instead, require UTILS_FUNC_MKSTEMP.
23277
23278 2001-11-17  Jim Meyering  <meyering@lucent.com>
23279
23280         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23281         Now, that's done as part of AC_FUNC_STRTOD.
23282
23283 2001-11-17  Jim Meyering  <meyering@lucent.com>
23284
23285         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23286         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23287         rather than group writable.  Patch by Juan F. Codagnone.
23288
23289         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23290         xrealloc, Instead, include "xalloc.h".
23291
23292         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23293         Remove explicit declarations of xmalloc, xrealloc,
23294         and xstrdup.  Instead, include "xalloc.h".
23295
23296         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23297         unlocked-io.h.
23298         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23299         Likewise.
23300         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23301
23302         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23303         Reported by Padraig Brady.
23304
23305         * lib/mkstemp.c: #undef mkstemp.
23306         Include config.h.
23307         (rpl_mkstemp): Rename from mkstemp.
23308         Protoize.
23309
23310 2001-11-16  Jim Meyering  <meyering@lucent.com>
23311
23312         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23313         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23314         determine the amount of total physical memory, use pstat_getstatic.
23315         HPUX-11 doesn't define _SC_PHYS_PAGES.
23316         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23317         If sysconf couldn't be used to determine the amount of available
23318         physical memory, use both pstat_getstatic and pstat_getdynamic.
23319         Based on a patch from Bob Proulx.
23320
23321 2001-11-10  Jim Meyering  <meyering@lucent.com>
23322
23323         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23324         (jm_PREREQ): Use it.
23325
23326 2001-11-09  Jim Meyering  <meyering@lucent.com>
23327
23328         * m4/jm-macros.m4: Require autoconf-2.52f.
23329         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23330         Use these AC_-prefixed names, not the AM_-prefixed ones.
23331
23332         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23333
23334 2001-11-05  Jim Meyering  <meyering@lucent.com>
23335
23336         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23337
23338 2001-11-04  Jim Meyering  <meyering@lucent.com>
23339
23340         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23341         $DEFS.
23342
23343 2001-11-03  Jim Meyering  <meyering@lucent.com>
23344
23345         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23346         of AC_DEFUN.
23347
23348         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23349         know the name of the variable in the macro definition.
23350
23351 2001-11-03  Jim Meyering  <meyering@lucent.com>
23352
23353         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23354         in argmatch_to_argument call.
23355
23356         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23357         argument.
23358
23359         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23360         e.g., a fault due to an attempt to free a NULL pointer.
23361
23362 2001-11-01  Jim Meyering  <meyering@lucent.com>
23363
23364         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23365         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23366
23367 2001-11-01  Jim Meyering  <meyering@lucent.com>
23368
23369         * lib/dirfd.c, lib/dirfd.h: New files.
23370         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23371
23372         * lib/hash.c (hash_print) [TESTING]: Clean up.
23373
23374 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23375
23376         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23377         to avoid a warning if -Wall.
23378
23379 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23380
23381         * README: New file
23382         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23383         (per RMS's instructions, this is now the canonical source)
23384         * lgpl/, gpl/: New directories.
23385
23386 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23387
23388         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23389
23390 2001-10-21  Jim Meyering  <meyering@lucent.com>
23391
23392         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23393         this code would end up calling gettext even in packages built
23394         with --disable-nls.
23395         * lib/getopt.c (_): Likewise.
23396         * lib/regex.c (_): Likewise.
23397
23398 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23399
23400         * m4/error.m4 (jm_PREREQ_ERROR):
23401         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23402         AC_FUNC_STRERROR_R does that.
23403         Check for strerror declaration.
23404
23405         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23406         are supposed to have them these days.
23407         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23408         Merge changes from latest Autoconf CVS.
23409         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23410         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23411         POSIX decided to standardize on the int flavor of strerror_r.
23412
23413 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23414
23415         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23416         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23417         Use strerror_r that is only a macro, even if it is not a function.
23418         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23419         (private_strerror): Use prototypes, not old-style function definition.
23420         (print_errno_message): New function.
23421         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23422         char*-flavored one.
23423         (error_tail, error, error_at_line): Use it.
23424
23425 2001-10-11  Jim Meyering  <meyering@lucent.com>
23426
23427         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23428         and quote_n (1, ... to avoid clobbering a buffer.
23429
23430 2001-10-05  Jim Meyering  <meyering@lucent.com>
23431
23432         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23433         hash-pjw.h.
23434         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23435         * lib/hash-pjw.h: New file.
23436
23437 2001-09-30  Jim Meyering  <meyering@lucent.com>
23438
23439         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23440         `struct fsstat' has the `f_fstypename' member.
23441         Use that to define FS_TYPE, which is now used to make
23442         the getfsstat link test tighter.
23443
23444 2001-09-30  Jim Meyering  <meyering@lucent.com>
23445
23446         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23447         Include <sys/ucred.h>, for Apple Darwin.
23448         Include sys/mount.h and sys/fs_types.h only if available.
23449         (FS_TYPE): Define.
23450         (read_filesystem_list): Use FS_TYPE.
23451
23452 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23453
23454         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23455         a boolean context.
23456
23457 2001-09-29  Jim Meyering  <meyering@lucent.com>
23458
23459         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23460         [one-argument getmntent function]): Include stdio.h before mntent.h.
23461         SunOS 4.1.x needs it for the declaration of `FILE'.
23462         Patch by Volker Borchert.
23463
23464         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23465         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23466         sys/fs_types.h, and make the link-test for getfsstat guard #include
23467         directives with appropriate #if HAVE_*_H tests so that we can
23468         detect getfsstat on Apple Darwin1.3.7 systems.
23469         Reported by Nelson Beebe.
23470         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23471
23472 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23473
23474         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23475         #defines strtoimax.  Also treat the other strto* functions
23476         like strtoimax.
23477
23478         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23479         Check for strtoul and strtoumax,
23480         as those declarations are made even in the signed case.
23481         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23482         Likewise, for strtol and strtoimax.
23483
23484 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23485
23486         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23487         #defines strtoimax.  Also treat the other strto* functions
23488         like strtoimax.
23489
23490         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23491         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23492         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23493
23494 2001-09-26  Jim Meyering  <meyering@lucent.com>
23495
23496         Most macros in unlocked-io.h had the wrong number of arguments.
23497         * lib/gen-uio: New script.
23498         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23499         * lib/unlocked-io.hin: Remove file.
23500         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23501         rather than trying to embed it here.
23502         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23503         Reported by Padraig Brady.
23504
23505 2001-09-25  Volker Borchert  <bt@teknon.de>
23506
23507         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23508         `result'.
23509
23510 2001-09-24  Jim Meyering  <meyering@lucent.com>
23511
23512         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23513
23514 2001-09-23  Jim Meyering  <meyering@lucent.com>
23515
23516         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23517         instead of the mere test for existence of mntent.h.  The latter
23518         would get a false-positive on AIX 3.4 systems.
23519         In the outer getmntent if-block, don't die if neither of the getmntent
23520         tests succeeds.  Instead, just fall through and continue with the
23521         remaining tests.
23522
23523 2001-09-23  Jim Meyering  <meyering@lucent.com>
23524
23525         * lib/mountlist.c: Remove useless parentheses in #if directives.
23526         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23527         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23528
23529 2001-09-22  Jim Meyering  <meyering@lucent.com>
23530
23531         * m4/gettext.m4: New file.  From gettext.
23532         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23533         * m4/progtest.m4: Likewise
23534         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23535         * m4/glibc21.m4: Likewise.
23536
23537         * m4/libintl.m4: Remove.  No longer used.
23538
23539 2001-09-22  Jim Meyering  <meyering@lucent.com>
23540
23541         * lib/localcharset.c: Update from latest gettext.
23542         * lib/config.charset: Likewise.
23543
23544 2001-09-20  Jim Meyering  <meyering@lucent.com>
23545
23546         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23547         strtoimax.
23548         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23549         strtoumax.
23550
23551 2001-09-20  Jim Meyering  <meyering@lucent.com>
23552
23553         * lib/xstrtol.c (strtoimax): Guard declaration with
23554         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23555         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23556         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23557         (strtoumax): Likewise, for completeness (it wasn't necessary).
23558
23559 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23560
23561         * lib/strtoimax.c (HAVE_LONG_LONG):
23562         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23563         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23564         to work around bug in IBM C compiler.
23565
23566 2001-09-17  Jim Meyering  <meyering@lucent.com>
23567
23568         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23569         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23570         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23571         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23572         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23573         whenever the right hand side need not be expanded by the shell.
23574
23575 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23576
23577         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23578         library.  It's not correct, as some older glibcs are buggy.
23579         fnmatch wasn't fixed until glibc 2.2.
23580
23581         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23582         special shell magic here.
23583
23584 2001-09-16  Jim Meyering  <meyering@lucent.com>
23585
23586         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23587         * m4/jm-macros.m4: Require it.
23588
23589 2001-09-16  Jim Meyering  <meyering@lucent.com>
23590
23591         * lib/mkdir.c: New file.
23592
23593 2001-09-15  Jim Meyering  <meyering@lucent.com>
23594
23595         * m4/jm-macros.m4: Check for help2man.
23596
23597 2001-09-11  Jim Meyering  <meyering@lucent.com>
23598
23599         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23600         The body, by Paul Eggert, was moved here from configure.in.
23601         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23602
23603 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23604
23605         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23606         (jm_PREREQ): Use it.
23607
23608 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23609
23610         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23611         Use ssize_t, not int, to store result of readlink.
23612         Check for ssize_t overflow as well as size_t overflow,
23613         as POSIX says the result of readlink is implementation-defined
23614         when ssize_t overflows.
23615         Remove unnecessary cast to char*.
23616         Use free+malloc instead of realloc, as the storage doesn't need
23617         to be preserved and it's clearer and can be more efficient that way.
23618         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23619         * lib/xreadlink.h (xreadlink): Update prototype.
23620
23621 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23622
23623         * lib/xgetcwd.c: Revert some of the previous change; intead,
23624         fix the HAVE_GETCWD_NULL code to behave more like the
23625         !HAVE_GETCWD_NULL code used to.
23626
23627         Include "xalloc.h".
23628         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23629         invoke xalloc_die.
23630
23631 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23632
23633         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23634         sys/param.h, as pathmax.h includes them.
23635
23636 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23637
23638         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23639         (jm_PREREQ_XGETCWD): New macro.
23640
23641         * m4/getcwd.m4: New file.
23642
23643 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23644
23645         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23646         like the HAVE_GETCWD_NULL code.
23647         Include pathmax.h if not HAVE_GETCWD.
23648         Do not include xalloc.h.
23649         (INITIAL_BUFFER_SIZE): New symbol.
23650         Do not use xmalloc / xrealloc, since the caller is responsible for
23651         handling errors.  Preserve errno around `free' during failure.
23652         Do not overrun buffer when using getwd.
23653
23654 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23655
23656         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23657         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23658         getcwd (NULL, 0).
23659
23660 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23661
23662         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23663         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23664         spotted by Jim Meyering.
23665
23666 2001-09-03  Jim Meyering  <meyering@lucent.com>
23667
23668         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23669         failure.
23670
23671 2001-09-02  Jim Meyering  <meyering@lucent.com>
23672
23673         * lib/error.c: Update from GNU libc.
23674
23675 2001-09-01  Jim Meyering  <meyering@lucent.com>
23676
23677         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23678         Used by df.
23679
23680 2001-09-01  Jim Meyering  <meyering@lucent.com>
23681
23682         * lib/xreadlink.c: New file.
23683         * lib/xreadlink.h: New file.
23684         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23685         xreadlink.h.
23686
23687         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23688         doesn't conflict with sparc Solaris 7's definition in
23689         /usr/include/sys/int_types.h.
23690
23691         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23692         files.
23693         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23694         and strncasecmp as r-values.  Unixware didn't have declarations.
23695
23696 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23697
23698         * lib/xstrtol.h: Add copyright notice.
23699         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23700         LONGINT_INVALID_SUFFIX_CHAR.
23701
23702 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23703
23704         * lib/xstrtol.c (strtoimax): New decl.
23705
23706 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23707
23708         * lib/xgetcwd.c: Don't include pathmax.h.
23709         Include stdlib.h and unistd.h if available.
23710         Include xalloc.h.
23711         (xmalloc, xstrdup, free): Remove decls.
23712         (xgetcwd): Don't assume sizes fit in unsigned.
23713         Check for overflow when computing sizes.
23714         Simplify reallocation code.
23715
23716 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23717
23718         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23719         a directory's st_size can have an arbitrary value, so the old
23720         usage could waste an arbitrary amount of memory.  All uses
23721         changed.
23722         * lib/savedir.h: Update prototype.
23723
23724 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23725
23726         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23727
23728         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23729         old strtoimax.c.
23730
23731         Also, make the following further changes to make this file's
23732         configuration more similar to that of strtol.c:
23733         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23734         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23735         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23736         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23737         changed to signed values.
23738
23739         And make the following changes as well:
23740         Fix copyright notice, as 1999 was missing.
23741         (verify): New macro.
23742         (strtoimax): Check sizes at compile-time, not run-time.
23743         Prefer strtol to strtoll if both work.
23744         (main): Remove; it was not that useful and was a pain to maintain.
23745
23746         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23747
23748 2001-08-31  Jim Meyering  <meyering@lucent.com>
23749
23750         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23751         Use an initial, malloc'd, buffer of length 128 rather than
23752         a statically allocated one of length 1024.
23753
23754 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23755
23756         Simplify code, partly by assuming autoconf 2.52 semantics.
23757
23758         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23759
23760         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23761         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23762         All uses removed.
23763         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23764         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23765         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23766         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23767         jm_AC_HEADER_INTTYPES_H.
23768         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23769
23770         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23771
23772         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23773         Quote first arg of AC_DEFUN.
23774         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23775         since they are needed to parse the include file even if we need
23776         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23777         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23778         but with opposite signedness.
23779
23780 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23781
23782         Merge 'exclude' changes from tar 1.13.22.
23783         This fixes one or two unlikely storage allocation overflow bugs,
23784         but doesn't change user-visible behavior otherwise.
23785
23786 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23787
23788         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23789         (jm_PREREQ_EXCLUDE): New macro.
23790
23791 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23792
23793         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23794         tm to be declared.
23795
23796 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23797
23798         * lib/hash.c: Remove '2001' from copyright notice.
23799
23800 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23801
23802         * lib/full-write.h: New file.
23803         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23804         * lib/full-write.c: Correct credits, as cccp.c no longer
23805         exists and anyway it was so heavily changed from the old cccp
23806         code as to be unrecognizable.  Include full-write.h.
23807         (full_write) Return size_t, with short writes meaning failure.
23808         All callers changed.  This fixes a bug with large buffers
23809         on 64-bit hosts.
23810         * lib/utime.c: Include full-write.h.
23811
23812 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23813
23814         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23815         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23816         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23817         Include if available.
23818         (<xalloc.h>): Include
23819         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23820         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23821         collide with FNM macros.
23822         (struct patopts): New struct.
23823         (struct exclude): Use it, as exclude patterns now come with options.
23824         (new_exclude): Support above changes.
23825         (new_exclude, add_exclude_file):
23826         Initial size must now be a power of two to simplify overflow checking.
23827         (free_exclude, fnmatch_no_wildcards): New function.
23828         (excluded_filename): No longer requires options arg, as the options
23829         are determined by add_exclude.  Now returns bool, not int.
23830         (excluded_filename, add_exclude):
23831         Add support for the fancy new exclusion options.
23832         (add_exclude, add_exclude_file): Now takes int options arg.
23833         Check for arithmetic overflow when computing sizes.
23834         (add_exclude_file): xrealloc might modify errno, so don't
23835         realloc until after errno might be used.
23836
23837         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23838         New macros.
23839         (free_exclude): New decl.
23840         (add_exclude, add_exclude_file): Now takes int options arg.
23841         (excluded_filename): No longer requires options arg, as the options
23842         are determined by add_exclude.  Now returns bool, not int.
23843
23844 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23845
23846         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23847
23848 2001-08-27  Jim Meyering  <meyering@lucent.com>
23849
23850         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23851
23852         * lib/version-etc.c (N_): Remove definition.
23853         Revert most of last change.
23854         Instead, simply don't mark the `Copyright...' string for translation.
23855         Based on advice from Paul Eggert.
23856
23857         * lib/strtoxmax.c: Tweak comment.
23858
23859 2001-08-26  Jim Meyering  <meyering@lucent.com>
23860
23861         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23862
23863         * m4/xstrtoimax.m4: New file.
23864         * m4/xstrtoumax.m4: Add comments explaining why we
23865         AC_REPLACE_FUNCS(strtol).
23866
23867 2001-08-26  Jim Meyering  <meyering@lucent.com>
23868
23869         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23870         of copyright with `%s' so translators don't get an untranslated
23871         message in 2002.
23872         (COPYRIGHT_YEAR): Define.
23873         (version_etc): Use fprintf rather than fputs.
23874         Suggestion from Ulrich Drepper.
23875
23876         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23877
23878         * lib/strtoll.c: New file, from GNU libc.
23879         * lib/xstrtoimax.c: New file.
23880
23881         * lib/xstrtol.h: Add xstrtoimax.
23882         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23883         * lib/strtoimax.c: New file.  Likewise, but first define
23884         STRTOUXMAX_SIGNED.
23885
23886         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23887         ...
23888         * lib/strtoxmax.c: ... then renamed to this.
23889
23890 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23891
23892         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23893         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23894         (jm_AC_TYPE_INTMAX_T): New macro.
23895         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23896
23897         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23898
23899         * m4/longlong.m4: Renamed from ulonglong.m4.
23900         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23901         * m4/uintmax_t.m4: Removed.
23902
23903 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23904
23905         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23906         Port to Solaris 8, where 'sed' requires a space after the 'r'
23907         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23908         Redirect output to $tmp just once.
23909
23910 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23911
23912         * lib/addext.c (<errno.h>): Include.
23913         (errno): Declare if not defined.
23914         (addext): Work correctly when pathconf returns -1 and leaves
23915         errno alone because there is no limit.  Also, work even if
23916         pathconf returns a value greater than SIZE_MAX.
23917
23918 2001-08-12  Jim Meyering  <meyering@lucent.com>
23919
23920         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23921         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23922         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23923         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23924         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23925         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23926         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23927         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23928         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23929         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23930         utime.m4, utimes.m4, xstrtoumax.m4:
23931         Quote the first argument in each use of AC_DEFUN.
23932
23933 2001-08-12  Jim Meyering  <meyering@lucent.com>
23934
23935         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23936         Simply `return getcwd (NULL, 0);'.
23937         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23938         Use 1300 as initial value for length, not PATH_MAX.
23939
23940         * lib/pathmax.h: Clean up cpp syntax.
23941
23942 2001-08-12  Jim Meyering  <meyering@lucent.com>
23943
23944         * lib/gettimeofday.c: New file.
23945         * lib/gtod.h: New file.
23946         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23947
23948 2001-08-05  Jim Meyering  <meyering@lucent.com>
23949
23950         * m4/jm-macros.m4: Require autoconf-2.52.
23951
23952 2001-08-04  Jim Meyering  <meyering@lucent.com>
23953
23954         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23955         stmt, to get in sync with glibc.
23956
23957 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23958
23959         The following changes are from gettext 0.10.39 as maintained by
23960         Bruno Haible.
23961
23962         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23963         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23964         with inverted sense.  All uses changed.
23965
23966         * lib/mbswidth.c: Don't include <limits.h>.
23967         Include <stdlib.h> and <string.h> unconditionally.
23968         (iswcntrl, mbsinit, ISCNTRL): New macros.
23969         (mbsnwidth): Use K&R style function declarations.
23970         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23971         can optimize it when MB_CUR_MAX == 1.
23972         The width of control characters is zero, not 1.
23973
23974 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23975
23976         The following changes are from gettext 0.10.39 as maintained by
23977         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23978
23979         * m4/codeset.m4: Upgrade to serial AM1.
23980         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23981         all uses changed.  Quote first arg of AC_DEFUN.
23982         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23983
23984         * m4/iconv.m4: Upgrade to serial AM2.
23985         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23986         Add --with-libconv-prefix.
23987         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23988         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23989         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23990         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23991         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23992
23993         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23994         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23995         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23996         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23997         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23998         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23999         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24000         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24001         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24002
24003         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24004         string.h any more.
24005
24006         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24007         not the default value.
24008
24009         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24010         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24011         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24012         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24013         Also check for iswcntrl, used for wcwidth fallback.
24014         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24015         to Autoconf 2.13.
24016
24017 2001-08-03  Jim Meyering  <meyering@lucent.com>
24018
24019         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24020         as it was in the original.  Reported by Paul Eggert.
24021
24022 2001-07-16  Jim Meyering  <meyering@lucent.com>
24023
24024         * m4/gettimeofday.m4: New file.
24025         Prompted by a report from Bernhard Baehr.
24026
24027 2001-07-15  Jim Meyering  <meyering@lucent.com>
24028
24029         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24030         stuff. Now it's in ../Makefile.cfg.
24031
24032 2001-07-15  Jim Meyering  <meyering@lucent.com>
24033
24034         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24035         (BUILT_SOURCES): Add unlocked-io.h.
24036         (io_functions): Define.
24037         (unlocked-io.h): New rule.
24038         (DISTCLEANFILES): Add unlocked-io.h.
24039         (all-local): Depend on unlocked-io.h, to ensure it is created.
24040
24041         * lib/unlocked-io.hin: New file
24042
24043         * lib/regex.c: Update from glibc.
24044
24045 2001-07-05  Jim Meyering  <meyering@lucent.com>
24046
24047         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24048         recommendation.
24049         (libfetish_a_SOURCES): Put all .h files here instead.
24050         Remove a thus-exposed (better checks in automake) duplicate and
24051         two unnecessary .h files.
24052
24053 2001-07-04  Jim Meyering  <meyering@lucent.com>
24054
24055         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24056         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24057         distcheck failure.
24058
24059 2001-07-02  Jim Meyering  <meyering@lucent.com>
24060
24061         The following changes were prompted by suggestions from Bruno Haible.
24062
24063         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24064         is now generated.
24065         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24066         definition of EXTRA_DIST.
24067         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24068         ensure that the generated file is created/updated whenever the list
24069         of $(unlocked_functions) is changed.
24070         (jm-glibc-io.m4): New rule.
24071         (unlocked-io.h): New rule -- currently unused.
24072
24073 2001-06-24  Jim Meyering  <meyering@lucent.com>
24074
24075         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24076         unmatched right bracket, rather than kludging it with an extra,
24077         falsely-matching quote in a comment.  Patch by Akim Demaille.
24078
24079 2001-06-11  Jim Meyering  <meyering@lucent.com>
24080
24081         * lib/regex.c: Update from GNU libc.
24082
24083 2001-05-27  Jim Meyering  <meyering@lucent.com>
24084
24085         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24086         Check for ut_type in struct utmp.
24087
24088 2001-05-27  Jim Meyering  <meyering@lucent.com>
24089
24090         * lib/readutmp.h (UT_TYPE): Define.
24091
24092 2001-05-24  Jim Meyering  <meyering@lucent.com>
24093
24094         * lib/argmatch.c: Include "quote.h".
24095         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24096         quote function.  Reported by Göran Uddeborg.
24097
24098 2001-05-22  Jim Meyering  <meyering@lucent.com>
24099
24100         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24101         now that we use the package-supplied version unconditionally.
24102         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24103
24104 2001-05-21  Jim Meyering  <meyering@lucent.com>
24105
24106         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24107         shell syntax errors.
24108
24109 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24110
24111         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24112
24113 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24114
24115         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24116         Don't bother to check library strftime, since
24117         we'll be using our own my_strftime function anyway.
24118         Define my_strftime instead of strftime.
24119
24120 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24121
24122         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24123         which is not yet declared.
24124
24125 2001-05-15  Jim Meyering  <meyering@lucent.com>
24126
24127         * m4/regex.m4: Use proper quoting so brackets appear in the test
24128         program.
24129         Reported by, and with help from, Bruno Haible.
24130
24131 2001-05-13  Jim Meyering  <meyering@lucent.com>
24132
24133         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24134         undefined.
24135
24136 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24137
24138         dirname code cleanup.  base_name now behaves more compatibly
24139         with POSIX basename when given file names that have trailing
24140         slashes, and similarly for dir_name.  Add new primitives
24141         base_len and dir_len.  Put the directory-name-related decls
24142         into dirname.h.
24143
24144         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24145         * lib/backupfile.c (base_name): Likewise.
24146         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24147         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24148         * lib/makepath.c (strip_trailing_slashes): Likewise.
24149         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24150         ISSLASH): Likewise.
24151         * lib/rename.c (strip_trailing_slashes): Likewise.
24152         * lib/same.c (base_name): Likewise.
24153         * lib/stripslash.c (ISSLASH): Likewise.
24154
24155         * lib/addext.c: Include <dirname.h> after size_t is defined.
24156         * lib/backupfile.c: Likewise.
24157
24158         * lib/addext.c (addext): Use base_len to trim redundant
24159         trailing slashes instead of doing it ourselves.
24160         But do not trim the last slash if it is not redundant.
24161
24162         * lib/backupfile.c (find_backup_file_name,
24163         max_backup_version): Use base_len instead of rolling it ourselves.
24164         Handle the case of "" and (on DOS) "C:" correctly.
24165
24166         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24167         needed. Include <string.h>, <dirname.h>.
24168         (base_name): Allow file names ending in slashes, other than names
24169         that are all slashes.  In this case, return the basename followed
24170         by the slashes.  This is more general, and can be used in places
24171         where the original base_name purposely had an assertion failure.
24172         (base_len): New function.
24173
24174         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24175         Do not include <assert.h>; no longer needed.
24176         Include xalloc.h.
24177         (memrchr): Remove decl.
24178         (dir_name_r): Remove.
24179         (dir_len): Renamed from dirlen.  All callers changed.
24180         Rewrite in terms of base_name, for simplicity and consistency.
24181         (dir_name): Never return NULL.  All callers changed.
24182         Do not include <stdlib.h> in test program; no longer needed.
24183         return 0; is fine for test program.
24184
24185         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24186         New macros.
24187         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24188
24189         * lib/path-concat.c (path_concat): Use base_len to compute
24190         base length, not strlen; this means we cannot rely on memcpy
24191         to null-terminate.
24192
24193         * lib/same.c (STREQ): Remove.
24194         (same_name): Handle the case where the basename ends in trailing '/'.
24195
24196         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24197         a slash was stripped.  Do not strip the last slash after a
24198         file system prefix.
24199
24200 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24201
24202         * lib/Makefile.am (libfetish_a_SOURCES):
24203         Add strftime.c, since we now compile it on all hosts.
24204
24205         * lib/strftime.c (my_strftime):
24206         Define to nstrftime if emacs, but only if my_strftime is not defined.
24207         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24208         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24209         Add one more extra argument: a nanoseconds value.
24210         All uses changed.
24211         (ns): New macro.
24212         (my_strftime function): Add %N format.
24213         (emacs_strftimeu): Renamed from emacs_strftime,
24214         with extra ut argument.
24215
24216 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24217
24218         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24219
24220 2001-04-21  Jim Meyering  <meyering@lucent.com>
24221
24222         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24223         doesn't interfere.
24224
24225 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24226
24227         * m4/ftruncate.m4: Check for chsize.
24228         Link with ftruncate.o unconditionally if ftruncate is missing.
24229         This was required when cross-compiling to i586-mingw32msvc.
24230
24231 2001-04-08  Jim Meyering  <meyering@lucent.com>
24232
24233         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24234         recomputed; that's necessary when the offset spans a DST transition.
24235         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24236
24237 2001-04-02  Jim Meyering  <meyering@lucent.com>
24238
24239         * lib/regex.h, regex.c: Update from GNU libc.
24240
24241 2001-03-24  Jim Meyering  <meyering@lucent.com>
24242
24243         * m4/jm-macros.m4: Require autoconf-2.49d.
24244
24245 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24246
24247         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24248
24249 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24250
24251         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24252
24253 2001-03-17  Jim Meyering  <meyering@lucent.com>
24254
24255         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24256         now that the version in autoconf is equivalent.
24257         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24258
24259         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24260         Suggestion from Akim Demaille.
24261
24262         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24263         (jm_PREREQ_TEMPNAME): New function.
24264
24265 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24266
24267         * lib/tempname.c (uint64_t): Define to uintmax_t if
24268         not defined, and if UINT64_MAX is not defined.
24269         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24270         Reported by John David Anglin.
24271
24272 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24273
24274         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24275         resolve alias if codeset is empty.
24276         * lib/config.charset (BeOS): Use wildcard syntax.
24277
24278 2001-03-13  Jim Meyering  <meyering@lucent.com>
24279
24280         * lib/path-concat.c (path_concat)
24281         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24282         concatenating e.g., `C:' and `foo'.
24283         From Bruno Haible.
24284
24285 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24286
24287         * lib/localcharset.c (locale_charset): Don't use
24288         setlocale(LC_CTYPE,NULL). Don't return NULL.
24289         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24290
24291 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24292
24293         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24294         support for DOS/DJGPP.
24295
24296 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24297
24298         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24299         lacks mkstemp.  Compile our own tempname.c if we compile our own
24300         mkstemp.c, as mkstemp relies on tempname.
24301
24302 2001-03-01  Jim Meyering  <meyering@lucent.com>
24303
24304         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24305         AH_VERBATIM really does output its argument verbatim.
24306
24307 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24308
24309         * lib/Makefile.am (libfetish_a_SOURCES):
24310         Add dup-safer.c, fopen-safer.c.
24311         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24312
24313         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24314         * lib/unistd-safer.h: New files.
24315
24316 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24317
24318         The mkstemp replacement is taken from glibc 2.2.2, with some
24319         portability fixes for use outside glibc, as follows:
24320
24321         * lib/tempname.c (struct_stat64): New macro.
24322         (direxists, __gen_tempname): Use it.
24323         This avoids a portability problem with Solaris 8.
24324
24325         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24326         (<stddef.h>, <stdint.h>, <string.h>):
24327         Include only if STDC_HEADERS || _LIBC.
24328         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24329         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24330         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24331         (__set_errno): Define this macro if <errno.h> doesn't.
24332         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24333         Define these macros if <stdio.h> doesn't.
24334         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24335         Define these macros if <sys/stat.h>
24336         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24337         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24338         __xstat64): Define if not _LIBC.
24339         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24340         (__gen_tempname): Invoke gettimeofday only if
24341         HAVE_GETTIMEOFDAY || _LIBC;
24342         otherwise, fall back on plain "time".
24343         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24344
24345         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24346
24347         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24348
24349 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24350
24351         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24352
24353 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24354
24355         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24356         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24357         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24358         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24359
24360 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24361
24362         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24363         Remove workaround macros for hosts that have mbrtowc but not
24364         mbstate_t, as we now insist on proper declarations for both
24365         before using mbrtowc.
24366
24367 2001-02-17  Jim Meyering  <meyering@lucent.com>
24368
24369         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24370         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24371         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24372         UnixWare 7.1.1.
24373
24374         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24375         rather than AC_CACHE_VAL.
24376
24377 2001-02-17  Jim Meyering  <meyering@lucent.com>
24378
24379         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24380         around included file name.
24381
24382         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24383
24384         * lib/strftime.c: Update from GNU libc (the only changes were to
24385         comments).
24386
24387 2001-02-17  Jim Meyering  <meyering@lucent.com>
24388
24389         * lib/regex.c: Update from libc.
24390
24391 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24392
24393         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24394         clash.
24395
24396 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24397
24398         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24399         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24400         Reported by Mark Hounschell via Paul Eggert.
24401
24402 2001-02-07  Jim Meyering  <meyering@lucent.com>
24403
24404         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24405
24406 2001-02-05  Jim Meyering  <meyering@lucent.com>
24407
24408         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24409         it includes the patch required for `large file' support with at least
24410         HP-UX's 10.20 /bin/cc.
24411
24412 2001-02-03  Jim Meyering  <meyering@lucent.com>
24413
24414         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24415         AS_IF, now that it works once again (mysteriously).
24416         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24417
24418 2001-01-30  Jim Meyering  <meyering@lucent.com>
24419
24420         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24421         * m4/chown.m4: Rename conftestchown to conftest.chown.
24422         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24423         s/conftestdir2/conftest.d2/.
24424         * m4/utimes.m4: s/conftestdata/conftest.data/
24425         Inspired by Pavel Roskin's change in autoconf.
24426
24427 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24428
24429         * lib/config.charset: Update for FreeBSD 4.2.
24430
24431 2001-01-27  Jim Meyering  <meyering@lucent.com>
24432
24433         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24434         a use of AS_IF.
24435         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24436
24437 2001-01-26  Jim Meyering  <meyering@lucent.com>
24438
24439         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24440         quotearg.c includes it.
24441
24442 2001-01-26  Jim Meyering  <meyering@lucent.com>
24443
24444         * lib/quotearg.c: Include stddef.h.
24445         * lib/quote.c: Include stddef.h.
24446         Reported by Axel Kittenberger.
24447
24448         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24449         line in double quotes so that it evokes a better diagnostic.
24450         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24451         Reported by Axel Kittenberger.
24452
24453 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24454
24455         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24456         as if it was a `charset'.
24457
24458 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24459
24460         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24461         has const.
24462
24463 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24464
24465         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24466         to avoid a warning.  Add back 'const' to inptr.
24467
24468 2001-01-20  Jim Meyering  <meyering@lucent.com>
24469
24470         Be sure that headers are checked before used in code compiled
24471         for the type checks.
24472         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24473         In place of that, invoke jm_CHECK_ALL_TYPES.
24474         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24475         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24476         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24477         The check for ssize_t was mistakenly run before the test for unistd.h.
24478
24479         The configure-time check for stdbool.h was missing.
24480         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24481         (jm_PREREQ_HASH): New function.
24482
24483 2001-01-17  Jim Meyering  <meyering@lucent.com>
24484
24485         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24486         for autoconf-2.49c.
24487         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24488
24489 2001-01-16  Jim Meyering  <meyering@lucent.com>
24490
24491         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24492         From Bruno Haible.
24493
24494 2001-01-14  Jim Meyering  <meyering@lucent.com>
24495
24496         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24497         foo and bar.  Create conftestdir/ in the script, not in the C code.
24498         Remove directories in the script, not in the C code.
24499         Remove conftestdir{,2} before trying to create the directory.
24500         Make the entire configure script fail if the mkdir fails.
24501
24502 2001-01-14  Jim Meyering  <meyering@lucent.com>
24503
24504         * lib/rename.c: New file.  From Volker Borchert.
24505         Include stdlib.h, string.h or strings.h, and xalloc.h.
24506         Use strip_trailing_slashes rather than open-coding it.
24507
24508 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24509
24510         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24511
24512 2001-01-03  Jim Meyering  <meyering@lucent.com>
24513
24514         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24515         of local `inptr' to avoid warning with some system declarations of
24516         iconv.
24517
24518 2001-01-02  Volker Borchert  <bt@teknon.de>
24519
24520         * m4/rename.m4: New file.
24521         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24522
24523 2001-01-01  Jim Meyering  <meyering@lucent.com>
24524
24525         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24526         even on systems with utmpx.h.  It's necessary for the declaration of
24527         utmp's ut_user member.  Reported by Andreas Jaeger.
24528
24529         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24530         available. They are required for the declarations of getgrgid and
24531         getpwuid resp.
24532         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24533         Reported by Andreas Jaeger.
24534
24535 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24536
24537         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24538         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24539         so `make install' also works in VPATH builds.
24540
24541 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24542
24543         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24544         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24545         can be used in subdirectories.
24546
24547 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24548
24549         * lib/modechange.c: Do not assume that mode_t uses the
24550         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24551         the other-execute bit of FOO even if S_IXOTH != 1.
24552
24553         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24554         WOTH, XOTH, ALLM): New macros.
24555         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24556          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24557         Use them.
24558         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24559         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24560         (mode_compile):
24561         No need to use uintmax_t; unsigned long is long enough.
24562         Don't bother to get suffix since we don't use it.
24563
24564 2000-12-26  Jim Meyering  <meyering@lucent.com>
24565
24566         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24567         better with autoheader.
24568
24569 2000-12-24  Jim Meyering  <meyering@lucent.com>
24570
24571         * lib/hash.c (is_prime): Return explicit boolean values.
24572         (hash_get_first): Return NULL to appease Irix5.6's 89.
24573         Reported by Nelson Beebe.
24574
24575 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24576
24577         * lib/localcharset.c (locale_charset): Add support for Win32.
24578
24579 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24580
24581         * lib/physmem.h, lib/physmem.c: New files.
24582
24583         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24584         (noinst_HEADERS): Add physmem.h.
24585
24586         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24587         't' for compatibility with Solaris 8 sort.
24588
24589 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24590
24591         * lib/config.charset: Add support for BeOS.
24592
24593 2000-12-17  Jim Meyering  <meyering@lucent.com>
24594
24595         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24596         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24597
24598 2000-12-16  Jim Meyering  <meyering@lucent.com>
24599
24600         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24601         N and M) would have treated it like `chown N:N FILE'.
24602
24603         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24604
24605 2000-12-16  Jim Meyering  <meyering@lucent.com>
24606
24607         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24608         SHELLS_FILE to a file name that's useful on djgpp systems.
24609         Include stdlib.h.
24610         (ADDITIONAL_DEFAULT_SHELLS): Define.
24611         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24612         Based mostly on a patch from Prashant TR.
24613
24614 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24615
24616         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24617         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24618         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24619
24620 2000-12-08  Andreas Schwab  <schwab@suse.de>
24621
24622         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24623         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24624
24625 2000-12-07  Jim Meyering  <meyering@lucent.com>
24626
24627         * lib/stripslash.c (ISSLASH): Define.
24628         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24629         `/'.
24630         From Prashant TR.
24631
24632         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24633         (dir_name_r): Declare this function as static.
24634         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24635         manifest itself on a name containing a mix of slashes and
24636         backslashes.
24637         Make this function work with names starting with a DOS-style
24638         drive letter and colon prefix.
24639         (dir_name): Append `.' if necessary.
24640         Based mostly on patches from Prashant TR and Eli Zaretskii.
24641
24642         * lib/dirname.h (dir_name_r): Remove prototype.
24643
24644 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24645
24646         * m4/off_t-format.m4: Remove this file.
24647         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24648
24649 2000-12-06  Jim Meyering  <meyering@lucent.com>
24650
24651         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24652         replacement strtoull, we may well need the replacement strtoul, too.
24653         Check for declarations of strtoul and strtoull.
24654         Check for strtol.  Mainly as a cue to cause automake to include
24655         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24656         Check for limits.h -- strtol.c needs it.
24657
24658 2000-12-05  Jim Meyering  <meyering@lucent.com>
24659
24660         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24661
24662 2000-12-04  Jim Meyering  <meyering@lucent.com>
24663
24664         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24665         Also include memory.h, stdlib.h, unistd.h if appropriate.
24666         Reported by Andreas Jaeger (conflicting declaration of malloc).
24667
24668 2000-12-02  Jim Meyering  <meyering@lucent.com>
24669
24670         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24671         * m4/jm-macros.m4 (jm_MACROS): require it.
24672
24673 2000-12-02  Jim Meyering  <meyering@lucent.com>
24674
24675         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24676
24677 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24678
24679         * lib/memrchr.c: Include <config.h> before any system include file.
24680
24681 2000-11-30  Jim Meyering  <meyering@lucent.com>
24682
24683         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24684
24685 2000-11-30  Jim Meyering  <meyering@lucent.com>
24686
24687         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24688
24689 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24690
24691         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24692
24693 2000-11-26  Jim Meyering  <meyering@lucent.com>
24694
24695         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24696
24697 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24698
24699         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24700         size of (size_t) -1; it's not portable.
24701
24702 2000-11-17  Jim Meyering  <meyering@lucent.com>
24703
24704         * lib/strstr.c: Update from GNU libc.
24705
24706 2000-11-17  Akim Demaille  <akim@epita.fr>
24707
24708         * lib/obstack.h: Formatting changes.
24709         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24710         prevent type checking.
24711         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24712         cast the value to (void *): assigning a `foo *' to a `void *'
24713         variable is valid.
24714         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24715
24716 2000-11-16  Jim Meyering  <meyering@lucent.com>
24717
24718         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24719
24720 2000-11-11  Jim Meyering  <meyering@lucent.com>
24721
24722         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24723
24724 2000-11-10  Jim Meyering  <meyering@lucent.com>
24725
24726         * lib/obstack.h: Update from GNU libc.
24727         * lib/obstack.c: Likewise.
24728
24729 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24730
24731         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24732
24733 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24734
24735         * lib/getusershell.c (setusershell): Use rewind rather than
24736         fseek/fseeko, to avoid configuration hassles with fseeko.
24737         Don't bother opening SHELLS_FILE if shellstream is NULL;
24738         it's not necessary.
24739
24740 2000-11-05  Jim Meyering  <meyering@lucent.com>
24741
24742         * lib/makepath.h (make_dir): Declare.
24743         * lib/makepath.c (make_dir): Remove `static' attribute.
24744         Tweak a comment.
24745
24746 2000-11-04  Jim Meyering  <meyering@lucent.com>
24747
24748         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24749
24750 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24751
24752         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24753         last one in a bucket, advance to the next bucket.
24754
24755 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24756
24757         * lib/fnmatch.c: Do not comment out all the code if we are using
24758         the GNU C library, because in some cases we are replacing buggy
24759         code in the GNU C library itself.
24760
24761 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24762
24763         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24764         (regex_compile): Catch bogus \(\1\).
24765
24766 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24767
24768         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24769         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24770         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24771
24772 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24773
24774         * lib/error.h, getline.h, modechange.h:
24775         Remove "2000" from Copyright line, as the file hasn't been
24776         changed this year other than in the copyright notice.
24777
24778         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24779         was changed this year.
24780
24781 2000-10-29  Jim Meyering  <meyering@lucent.com>
24782
24783         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24784         renaming.
24785         * m4/ls-mntd-fs.m4: Likewise
24786
24787 2000-10-29  Jim Meyering  <meyering@lucent.com>
24788
24789         * lib/xstat.in: Fix grammar in comment.
24790
24791 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24792
24793         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24794         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24795         doesn't define __restrict_arr.
24796
24797 2000-10-28  Jim Meyering  <meyering@lucent.com>
24798
24799         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24800         (jm_PREREQ_MEMCHR): New function.
24801
24802 2000-10-28  Jim Meyering  <meyering@lucent.com>
24803
24804         * lib/memchr.c: Update from libc.
24805         Adjust for portability:
24806         [HAVE_STDLIB_H]: Include stdlib.h.
24807         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24808         Undef __memchr, too.
24809         [!weak_alias]: Define __memchr to memchr.
24810
24811         * lib/regex.c: Update from libc.
24812         * lib/regex.h: Likewise.
24813         * lib/getopt1.c: Likewise.
24814         * lib/memcmp.c: Likewise.
24815
24816         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24817         Avoid using fseek, when possible -- it's broken by design.
24818         Patch by Ulrich Drepper.
24819
24820 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24821
24822         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24823         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24824         Giving in to popular pressure to shut up the compiler with casts.
24825
24826 2000-10-26  Jim Meyering  <meyering@lucent.com>
24827
24828         * lib/strftime.c: Update from libc.
24829
24830 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24831
24832         * regex.c: More `unsigned char' -> `re_char' changes.
24833         Also change several `int' into `re_wchar_t'.
24834         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24835         (PUSH_FAILURE_POINTER): Don't cast any more.
24836         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24837         We want GCC to complain, since this piece of code makes
24838         re_match non-reentrant, which *should* be fixed.
24839         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24840         (EXTEND_BUFFER): Use RETALLOC.
24841         (SET_LIST_BIT): Don't cast.
24842         (re_wchar_t): New type.
24843         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24844         that those two functions will always properly return.
24845         (IMMEDIATE_QUIT_CHECK): Cast to void.
24846         (analyse_first): Use recursion rather than an explicit stack.
24847         (re_compile_fastmap): Can't fail anymore.
24848         (re_search_2): Don't check re_compile_fastmap for failure.
24849         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24850         Now also sets the new value (passed in a new argument).
24851         (re_match_2_internal): Use it.
24852         Also, use a new var `reg' of type size_t when looping through regs
24853         rather than reuse the inappropriate `mcnt'.
24854
24855 2000-10-25  Jim Meyering  <meyering@lucent.com>
24856
24857         * lib/obstack.c: Update from libc.
24858
24859 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24860
24861         * regex.c (regex_compile): Change the way of handling a range from
24862         a char less than 256 to a char not less than 256.
24863
24864 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24865
24866         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24867         NT-Emacs only.
24868         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24869         so that re_search functions only quit when callers expect them to.
24870
24871 2000-10-23  Jim Meyering  <meyering@lucent.com>
24872
24873         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24874         wrong.  That set_locale call must not have any side effects.
24875         From Paul Eggert.
24876
24877 2000-10-22  Jim Meyering  <meyering@lucent.com>
24878
24879         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24880         [CYCLIC]: Remove now-unused definition.
24881
24882         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24883         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24884         Suggestion from Ulrich Drepper.
24885
24886 2000-10-21  Jim Meyering  <meyering@lucent.com>
24887
24888         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24889         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24890         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24891
24892 2000-10-21  Jim Meyering  <meyering@lucent.com>
24893
24894         * lib/dirname.c (memrchr): Declare if necessary.
24895         (dir_name): Remove the restriction that there be no
24896         trailing slashes.  Now, this code skips past them, effectively
24897         ignoring them.
24898         [TEST_DIRNAME] (main): New unit tests.
24899
24900         * lib/memrchr.c: New file from GNU libc.
24901         Undef __memrchr, too.
24902         [!weak_alias]: Define __memrchr to memrchr.
24903         Guard weak_alias use with `#ifdef weak_alias'.
24904
24905 2000-10-21  Jim Meyering  <meyering@lucent.com>
24906
24907         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24908         (dir_name): Use dir_name_r.
24909         * lib/dirname.h (dir_name_r): Declare it.
24910
24911 2000-10-17  Jim Meyering  <meyering@lucent.com>
24912
24913         * lib/quote.h (PARAMS): Define and use.
24914         Reported by Akim Demaille.
24915
24916         * lib/getopt.c: Update from libc.
24917
24918 2000-10-16  Jim Meyering  <meyering@lucent.com>
24919
24920         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24921         setlocale.
24922         From Jan Fedak.
24923
24924 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24925
24926         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24927
24928 2000-09-25  Jim Meyering  <meyering@lucent.com>
24929
24930         * lib/md5.h (rol): Define (from GnuPG).
24931
24932         * lib/sha.c: Give credit (GnuPG) where due.
24933         (M): Use rol rather than open-coding it.
24934         Add a FIXME comment.
24935
24936 2000-09-21  Jim Meyering  <meyering@lucent.com>
24937
24938         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24939         Reported by Michael Stone.
24940
24941 2000-09-20  Jim Meyering  <meyering@lucent.com>
24942
24943         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24944         (noinst_HEADERS): Add sha.h.
24945         Based on code from Scott G. Miller and from GnuPG.
24946
24947 2000-09-18  Jim Meyering  <meyering@lucent.com>
24948
24949         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24950         LIBS. Otherwise, everyone ends up linking with -lelf for some
24951         configurations.
24952         Reported by Mike Stone.
24953
24954 2000-09-15  Jim Meyering  <meyering@lucent.com>
24955
24956         * lib/regex.c: Update from libc.
24957
24958 2000-09-10  Jim Meyering  <meyering@lucent.com>
24959
24960         * lib/getopt.c (_getopt_internal): Update from glibc.
24961
24962 2000-09-09  Jim Meyering  <meyering@lucent.com>
24963
24964         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24965         think it should be used as a general replacement for isascii.
24966         * lib/fnmatch.c: Likewise.
24967         * lib/mbswidth.c: Likewise
24968         * lib/regex.c: Likewise.
24969
24970         Don't use atoi.
24971         * lib/userspec.c: Include sys/param.h and limits.h.
24972         Include xstrtol.h.
24973         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24974         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24975         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24976         UID, GID.  Check range.
24977
24978 2000-09-06  Jim Meyering  <meyering@lucent.com>
24979
24980         * lib/getopt.c (_getopt_internal): Update from glibc.
24981
24982 2000-08-30  Jim Meyering  <meyering@lucent.com>
24983
24984         * lib/strftime.c: Merge in changes from GNU libc.
24985
24986 2000-08-26  Jim Meyering  <meyering@lucent.com>
24987
24988         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24989         * m4/fpending.m4: New file.
24990
24991 2000-08-26  Jim Meyering  <meyering@lucent.com>
24992
24993         * lib/closeout.c: Include "__fpending.h".
24994         (close_stdout_status): Return right away if there's nothing to flush.
24995
24996         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24997         * lib/__fpending.c: New file.
24998         * lib/__fpending.h: New file.
24999
25000 2000-08-20  Jim Meyering  <meyering@lucent.com>
25001
25002         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25003         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25004         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25005
25006 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25007
25008         Improve fileutils installation on systems where running
25009         programs (like install) can't be unlinked.
25010         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25011         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25012
25013 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25014
25015         Standardize on "memory exhausted" instead of "Memory exhausted"
25016         or "virtual memory exhausted".
25017         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25018         "virtual memory exhausted".
25019         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25020         our own message.
25021         * lib/userspec.c (parse_user_spec): Likewise.
25022         * lib/bumpalloc.h: comment fix
25023         * lib/same.c, userspec.c: Include xalloc.h.
25024
25025         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25026         not char *const and pointing to a constant array.
25027         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25028         (xrealloc): Comment fix.
25029
25030         * lib/userspec.c (parse_user_spec):
25031         Don't translate a message until just before returning,
25032         to avoid unnecessary translation.
25033
25034 2000-08-07  Jim Meyering  <meyering@lucent.com>
25035
25036         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25037         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25038         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25039         getgroups.c, gethostname.c, getopt.h, group-member.c,
25040         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25041         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25042         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25043         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25044         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25045         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25046         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25047         yesno.c: Back out Copyright date changes for each file with no change
25048         this year.  This eases coordination with other programs using the same
25049         source code modules.  From Paul Eggert.
25050
25051 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25052
25053         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25054         not char, for compatibility with glibc 2.1.3 strftime.c.
25055
25056 2000-08-03  Greg McGary  <greg@mcgary.org>
25057
25058         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25059         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25060         (EXTEND_BUFFER): Use them.
25061
25062 2000-08-01  Jim Meyering  <meyering@lucent.com>
25063
25064         * lib/dirname.c (ISSLASH): Define.
25065         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25066         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25067         both `\' and `/' may be use as path separators.
25068         Based on a patch from Prashant TR.
25069
25070 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25071
25072         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25073         slot vector a constant, since it might get modified.
25074
25075 2000-07-31  Jim Meyering  <meyering@lucent.com>
25076
25077         * lib/xmalloc.c: Use `virtual memory exhausted', not
25078         `Memory exhausted'.
25079         * lib/obstack.c (print_and_abort): Likewise.
25080
25081 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25082
25083         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25084         buffer, so that the caller can always quote one small
25085         component of a "memory exhausted" message in slot 0.
25086         From a suggestion by Jim Meyering.
25087
25088 2000-07-30  Jim Meyering  <meyering@lucent.com>
25089
25090         * lib/makepath.c (make_path): Quote the other instance, too.
25091
25092         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25093         (STATIC_BUF_SIZE): Define.
25094         (quotearg_n_options): Use only statically allocated storage when
25095         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25096         than STATIC_BUF_SIZE.
25097
25098 2000-07-29  Jim Meyering  <meyering@lucent.com>
25099
25100         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25101         * lib/dirname.c (dir_name): Likewise.
25102
25103         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25104         `/'.
25105
25106         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25107         (dir_name): Assert that there are no trailing slashes.
25108
25109 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25110
25111         * lib/mbswidth.h (mbswidth): Add a flags argument.
25112         (mbswidth): New declaration.
25113         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25114         * lib/mbswidth.c (mbswidth): Add a flags argument.
25115         (mbsnwidth): New function.
25116
25117 2000-07-24  Jim Meyering  <meyering@lucent.com>
25118
25119         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25120
25121 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25122
25123         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25124
25125 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25126
25127         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25128         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25129         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25130         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25131         invoke multibyte primitives.
25132
25133 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25134
25135         * lib/quotearg.c:
25136         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25137         so that mbstate_t is always defined.
25138
25139         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25140         be 1 in at least one GCC installation, and this configuration
25141         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25142         performance on hosts that have mbrtowc but have only unibyte
25143         locales, but I assume these hosts are rare.
25144
25145 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25146
25147         * lib/mbswidth.c (_XOPEN_SOURCE):
25148         Don't define; this causes problems on Solaris 7.
25149         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25150
25151 2000-07-23  Jim Meyering  <meyering@lucent.com>
25152
25153         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25154         too: getgrgid, getpwuid, getuid.
25155
25156 2000-07-23  Jim Meyering  <meyering@lucent.com>
25157
25158         * lib/basename.c (base_name): Add an assertion.
25159
25160 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25161
25162         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25163         shadow its mbsinit function.
25164
25165 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25166
25167         * lib/mbswidth.h: New file.
25168         * lib/mbswidth.c: New file.
25169         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25170         (noinst_HEADERS): Add mbswidth.h.
25171
25172 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25173
25174         * lib/config.charset: Add support for FreeBSD. Improve support for
25175         HP-UX and IRIX 6.
25176
25177 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25178
25179         * m4/mbswidth.m4: New file.
25180         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25181
25182 2000-07-15  Jim Meyering  <meyering@lucent.com>
25183
25184         * lib/makepath.c: Include quote.h.
25185         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25186         corresponding argument in a `quote (...)' call.
25187         Give better diagnostics.
25188
25189         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25190         (noinst_HEADERS): Add quote.h.
25191
25192         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25193         from tar's src/misc.c.
25194         * lib/quote.h: New file.  Prototypes for same.
25195
25196 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25197
25198         From a suggestion by Bruno Haible.
25199         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25200         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25201         to decide whether to define the BeOS workaround macro;
25202         this adjusts to the change to AC_MBSTATE_T.
25203
25204 2000-07-14  Jim Meyering  <meyering@lucent.com>
25205
25206         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25207         jm_AC_TYPE_UINTMAX_T.
25208
25209 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25210
25211         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25212
25213         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25214         quotearg_buffer_restyled): Add support for
25215         clocale_quoting_style.  Undo previous change to
25216         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25217         and "{RIGHT QUOTATION MARK}" msgids.
25218
25219 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25220
25221         From a suggestion by Bruno Haible.
25222         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25223         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25224         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25225         and mbstate_t, to a single-part test that simply defines mbstate_t.
25226         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25227         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25228
25229 2000-07-10  Jim Meyering  <meyering@lucent.com>
25230
25231         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25232
25233         * m4/gnu-source.m4: Output to confdefs.h directly.
25234         Suggestion from Akim Demaille.
25235
25236 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25237
25238         The old behavior of quoting `like this' doesn't look good with
25239         newer, ISO-style fonts.  See:
25240         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25241
25242         Instead, quote "like this" by default.  Let the translator
25243         tailor the locale-specific quoting behavior by providing
25244         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25245
25246         * lib/quotearg.c (N_): New macro.
25247         (gettext_default): New function.
25248         (quotearg_buffer_restyled): Use
25249         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25250         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25251
25252 2000-07-09  Jim Meyering  <meyering@lucent.com>
25253
25254         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25255         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25256
25257         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25258         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25259
25260 2000-07-09  Jim Meyering  <meyering@lucent.com>
25261
25262         * lib/Most files: Update copyright dates to include 2000.
25263
25264 2000-07-08  Jim Meyering  <meyering@lucent.com>
25265
25266         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25267         if not defined.
25268         (xgethostname): Remove now-unnecessary #ifdef.
25269         Move declaration of `err' into loop where it's used.
25270
25271 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25272         and Bruno Haible  <haible@clisp.cons.org>
25273
25274         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25275         only if the test for an object-type mbstate_t fails.  This
25276         prevents us from mistakenly reporting that mbstate_t is a
25277         system object type after we "#define mbstate_t int" to work
25278         around its lack.
25279
25280 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25281         and Bruno Haible  <haible@clisp.cons.org>
25282
25283         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25284
25285 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25286
25287         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25288         to strerror_r.
25289         Include <ctype.h> for use of isalpha.
25290
25291 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25292
25293         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25294         by allocating a larger buffer. Test the gethostname return value for
25295         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25296         returns an error and ENAMETOOLONG isn't defined.
25297
25298 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25299
25300         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25301         dimension.
25302
25303 2000-07-04  Jim Meyering  <meyering@lucent.com>
25304
25305         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25306         of the deprecated AC_CHECKING.
25307
25308 2000-07-04  Jim Meyering  <meyering@lucent.com>
25309
25310         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25311         Reported by Bruno Haible.
25312
25313 2000-07-04  Jim Meyering  <meyering@lucent.com>
25314
25315         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25316         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25317         lacks mbrtowc.
25318
25319 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25320
25321         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25322         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25323
25324 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25325         and Bruno Haible  <haible@clisp.cons.org>
25326
25327         * lib/quotearg.c (mbrtowc):
25328         Assign to *pwc, and return 1 only if result is nonzero.
25329         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25330
25331 2000-07-03  Jim Meyering  <meyering@lucent.com>
25332
25333         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25334
25335 2000-07-03  Jim Meyering  <meyering@lucent.com>
25336
25337         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25338         This is necessary to get a definition of e.g., UTMP_FILE on
25339         HP-UX 10.20.
25340         From Bob Proulx.
25341
25342 2000-07-02  Jim Meyering  <meyering@lucent.com>
25343
25344         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25345
25346         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25347         AC_LIBOBJ(function_name).
25348         * m4/chown.m4: Likewise.
25349         * m4/fnmatch.m4: Likewise.
25350         * m4/ftruncate.m4: Likewise.
25351         * m4/getgroups.m4: Likewise.
25352         * m4/getline.m4: Likewise.
25353         * m4/group-member.m4: Likewise.
25354         * m4/jm-macros.m4: Likewise.
25355         * m4/lstat.m4: Likewise.
25356         * m4/malloc.m4: Likewise.
25357         * m4/memcmp.m4: Likewise.
25358         * m4/nanosleep.m4: Likewise.
25359         * m4/putenv.m4: Likewise.
25360         * m4/realloc.m4: Likewise.
25361         * m4/regex.m4: Likewise.
25362         * m4/stat.m4: Likewise.
25363         * m4/strftime.m4: Likewise.
25364
25365 2000-07-02  Jim Meyering  <meyering@lucent.com>
25366
25367         * lib/quotearg.c (mbstate_t): Don't define here.
25368
25369 2000-07-02  Jim Meyering  <meyering@lucent.com>
25370
25371         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25372
25373 2000-07-01  Jim Meyering  <meyering@lucent.com>
25374
25375         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25376
25377 2000-07-01  Jim Meyering  <meyering@lucent.com>
25378
25379         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25380         problem.
25381
25382 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25383
25384         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25385         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25386
25387 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25388
25389         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25390         per change in ../m4/ls-mntd-fs.m4.
25391         (read_filesystem_list): Ignore symbolic links.
25392
25393 2000-06-29  Jim Meyering  <meyering@lucent.com>
25394
25395         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25396         for declaration of strcmp.
25397
25398         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25399
25400         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25401         Avoid warning by casting result to `char *' to remove `const'.
25402
25403 2000-06-28  Jim Meyering  <meyering@lucent.com>
25404
25405         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25406         included by quotearg.c, for which we perform this test.  From
25407         Bruno Haible.
25408
25409 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25410
25411         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25412         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25413         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25414
25415 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25416
25417         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25418
25419 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25420
25421         savedir now sets errno on failure and invokes xmalloc to get memory.
25422         Fix a couple of other minor bugs while we're at it.
25423
25424         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25425         (NAMLEN): Remove macro.
25426         (malloc, realloc): Remove decls.
25427         (stpcpy): Likewise.
25428         ("xalloc.h"): Include.
25429         (NAME_SIZE_DEFAULT): New macro.
25430         (savedir): Use xmalloc / xrealloc to allocate memory.
25431         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25432         Skip "" directory entries.
25433         Use strlen to calculate directory entry length, since the old method
25434         is rarely used these days and isn't worth supporting.
25435         Don't use a pointer after freeing it.
25436         Check for integer overflow when calculating allocation size.
25437         Use memcpy to copy entries, instead of stpcpy.
25438         Set errno properly when returning NULL.
25439         Check for readdir error.
25440
25441 2000-06-26  Jim Meyering  <meyering@lucent.com>
25442
25443         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25444
25445 2000-06-25  Jim Meyering  <meyering@lucent.com>
25446
25447         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25448         Linux header bug when _XOPEN_SOURCE is defined to 500.
25449
25450 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25451
25452         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25453         deficiency.
25454
25455 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25456
25457         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25458         Include xalloc.h.
25459         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25460
25461 2000-06-24  Jim Meyering  <meyering@lucent.com>
25462
25463         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25464         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25465         for which strerror does return char*, but which lacks a conveniently
25466         accessible declaration of the function.  If the compile-test says
25467         strerror_r doesn't work, then resort to a `run'-test that works on
25468         BeOS and segfaults on DEC Unix.
25469
25470 2000-06-24  Jim Meyering  <meyering@lucent.com>
25471
25472         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25473
25474 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25475
25476         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25477         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25478
25479 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25480
25481         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25482         (mbrtowc, mbstate_t): Define substitutes if
25483         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25484         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25485         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25486
25487 2000-06-23  Jim Meyering  <meyering@lucent.com>
25488
25489         * m4/afs.m4: Add missing AC_MSG_RESULT.
25490         Reported by Bruno Haible.
25491
25492         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25493         Suggestion from Bruno Haible.
25494
25495 2000-06-23  Jim Meyering  <meyering@lucent.com>
25496
25497         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25498
25499 2000-06-21  Jim Meyering  <meyering@lucent.com>
25500
25501         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25502
25503 2000-06-21  Jim Meyering  <meyering@lucent.com>
25504
25505         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25506         (noinst_HEADERS): Add getstr.h.
25507
25508         * lib/getline.c (getstr): Move into a separate file.
25509         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25510         the following changes: new parameter, delim2; both delim[12]
25511         parameters have type `int', not `char'.  The latter would lose
25512         with 8-bit delimiters.
25513         * lib/getstr.h: New file.
25514
25515 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25516
25517         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25518         than 1024, return a memory chunk of least possible size, instead
25519         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25520         Use free/xmalloc instead of xrealloc to avoid copying for very long
25521         paths.
25522
25523 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25524
25525         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25526         the empty string.
25527
25528 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25529
25530         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25531         address, not strdup.  Include <stdlib.h> and don't declare free().
25532
25533 2000-06-19  Jim Meyering  <meyering@lucent.com>
25534
25535         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25536
25537 2000-06-18  Jim Meyering  <meyering@lucent.com>
25538
25539         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25540
25541         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25542         `checking whether...' message to be consistent with that of the
25543         lstat test.
25544
25545 2000-06-18  Jim Meyering  <meyering@lucent.com>
25546
25547         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25548         Besides, these days every porting target provides a mkdir function.
25549
25550         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25551         needed. (this snippet comes from src/system.h).
25552
25553 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25554
25555         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25556
25557 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25558
25559         * lib/human.c (adjust_value): New function.
25560         (human_readable_inexact): Apply rounding style even when
25561         printing approximate values.
25562
25563 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25564
25565         * lib/human.c (human_readable_inexact): Allow an input block
25566         size that is not a multiple of the output block size, and vice versa.
25567         Reported by Piergiorgio Sartor.
25568
25569 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25570
25571         * lib/getdate.y (get_date): Apply relative times after time
25572         zone indicator, not before.  Reported by Todd A. Jacobs.
25573
25574 2000-06-13  Jim Meyering  <meyering@lucent.com>
25575
25576         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25577
25578         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25579
25580 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25581
25582         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25583
25584 2000-06-12  Jim Meyering  <meyering@lucent.com>
25585
25586         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25587         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25588         optional argument.
25589         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25590         the optional argument, `lib'.
25591
25592 2000-06-08  Jim Meyering  <meyering@lucent.com>
25593
25594         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25595
25596 2000-06-04  Paul Eggert  <eggert@twinsun.com>