Tests of module 'netinet_in'.
[gnulib.git] / ChangeLog
1 2007-02-17  Bruno Haible  <bruno@clisp.org>
2
3         * modules/netinet_in-tests: New file.
4         * tests/test-netinet_in.c: New file.
5
6         * modules/inttypes-tests: New file.
7         * tests/test-inttypes.c: New file.
8
9         * modules/fcntl-tests: New file.
10         * tests/test-fcntl.c: New file.
11
12         * modules/byteswap-tests: New file.
13         * tests/test-byteswap.c: New file.
14
15         * modules/arpa_inet-tests: New file.
16         * tests/test-arpa_inet.c: New file.
17
18 2007-02-17  Bruno Haible  <bruno@clisp.org>
19
20         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
21         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
22         if the corresponding module is not enabled. Emit link warnings if
23         the function is used nevertheless.
24         * m4/inttypes_h.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
25         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
26         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
27         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
28         * modules/inttypes (Depends-on): Add link-warning.
29         (Makefile.am): Copy the contents of build-aux/link-warning.h into
30         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
31         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
32         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
33         * modules/imaxdiv (configure.ac): Likewise.
34         * modules/strtoimax (configure.ac): Likewise.
35         * modules/strtoumax (configure.ac): Likewise.
36         
37 2007-02-17  Bruno Haible  <bruno@clisp.org>
38
39         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
40         gl_STRING_MODULE_INDICATOR_DEFAULTS.
41         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
42         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
43
44 2007-02-17  Bruno Haible  <bruno@clisp.org>
45
46         * modules/link-warning: New file.
47         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
48         * lib/string_.h (GL_LINK_WARNING): Remove definition.
49         * modules/string (Depends-on): Add link-warning.
50         (Makefile.am): Copy the contents of build-aux/link-warning.h into
51         string.h.
52         * MODULES.html.sh (Support for building libraries and executables): Add
53         link-warning.
54
55 2007-02-17  Bruno Haible  <bruno@clisp.org>
56
57         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
58         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
59         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
60         long lines.
61
62 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
63             Bruno Haible  <bruno@clisp.org>
64
65         * modules/tmpfile: New file.
66         * lib/tmpfile.c: New file.
67         * m4/tmpfile.m4: New file.
68         * MODULES.html.sh (func_all_modules): New section "Input/output".
69
70 2007-02-15  Bruno Haible  <bruno@clisp.org>
71
72         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
73         (supports_delete_on_close): New function.
74         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
75
76 2007-02-14  Bruno Haible  <bruno@clisp.org>
77
78         * modules/mbspcasecmp-tests: New file.
79         * tests/test-mbspcasecmp.sh: New file.
80         * tests/test-mbspcasecmp.c: New file.
81
82         New module mbspcasecmp.
83         * modules/mbspcasecmp: New file.
84         * lib/mbspcasecmp.c: New file.
85         * lib/string_.h (strncasecmp): Change warning message.
86         (mbspcasecmp): New declaration.
87         * m4/mbspcasecmp.m4: New file.
88         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
89         GNULIB_MBSPCASECMP.
90         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
91         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
92
93 2007-02-14  Bruno Haible  <bruno@clisp.org>
94
95         * modules/mbsncasecmp-tests: New file.
96         * tests/test-mbsncasecmp.sh: New file.
97         * tests/test-mbsncasecmp.c: New file.
98
99         New module mbsncasecmp.
100         * modules/mbsncasecmp: New file.
101         * lib/mbsncasecmp.c: New file.
102         * lib/string_.h (mbsncasecmp): New declaration.
103         * m4/mbsncasecmp.m4: New file.
104         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
105         GNULIB_MBSNCASECMP.
106         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
107         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
108
109 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
110
111         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
112         Verify that it doesn't overlap with our flags.
113         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
114         do not have the desired effect in multibyte locales; instead, use
115         mbscasecmp.
116         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
117         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
118         we don't require GNU fnmatch ourselves (if our users require it, they
119         should do so explicitly).
120
121         Fix regex code so it doesn't rely on strcasecmp.
122         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
123         Otherwise, include gnulib's langinfo.h.
124         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
125         undesirable behavior in non-C locales.  Instead, rely on localecharset.
126         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
127         * modules/regex (FILES): Remove m4/codeset.m4.
128         (Depends-on): Add localcharset.  Remove strcase.
129
130 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
131
132         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
133         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
134
135 2007-02-13  Bruno Haible  <bruno@clisp.org>
136
137         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
138         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
139
140 2007-02-12  Bruno Haible  <bruno@clisp.org>
141
142         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
143         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
144         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
145         time warning rather than a link error.
146
147 2007-02-12  Bruno Haible  <bruno@clisp.org>
148
149         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
150         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
151         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
152
153 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
154
155         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
156         args, not 2.
157
158 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
159
160         New module 'time', so that apps can include <time.h> as per
161         POSIX and GNU instead of separate include files like time_r.h
162         and timegm.h.  This implementation tries out a simpler approach
163         for replacing decls in standard include files (as compared to
164         the string module), somewhat as an experiment.
165
166         * config/srclist.txt: Comment out mktime.c for now.
167         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
168         since it doesn't apply any more.  Use generic wording instead.
169         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
170         'time'.
171         * lib/time_.h, m4/time_h.m4, modules/time: New files.
172         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
173         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
174         Don't include <sys/types.h>; no longer needed since we assume C89.
175         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
176         * lib/strftime.c: Likewise.
177         * lib/time_r.c: Likewise.
178         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
179         * lib/nanosleep.c: Include <time.h> first, to check interface.
180         * lib/strptime.c: Likewise.
181         * lib/time_r.c: Likewise.
182         * lib/timegm.c: Likewise.
183         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
184         needed.
185         * lib/timegm.c: Don't include timegm.h; no longer needed.
186         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
187         time.h now handles any problems in that area.
188         (struct timespec, nanosleep): Remove; time.h now arranges for these.
189         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
190         that time.h defines struct timespec.
191         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
192         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
193         handles that.
194         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
195         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
196         needed.  Set REPLACE_LOCALTIME.
197         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
198         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
199         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
200         nanosleep; time_h.m4 now does that.  Don't require
201         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
202         module handles this now.
203         * modules/getdate (Depends-on): Remove timespec.  Add time.
204         * modules/nanosleep (Depends-on): Likewise.
205         * modules/stat-time (Depends-on): Likewise.
206         * modules/nanosleep (Include): Include time.h, not timespec.h.
207         * modules/strptime (Files): Remove lib/strptime.h.
208         (Depends-on): Add extensions, time.
209         (Include): Include time.h, not strptime.h.
210         * modules/time_r (Files): Remove lib/time_r.h.
211         (Depends-on): Add time.
212         (Include): Include time.h, not time_r.h.
213         * modules/timegm: Likewise.
214         * modules/timespec (Description): Now does timespec-related decls
215         of our own, instead of struct timespec itself.
216         (Depends-on): Add time; remove extensions.
217         (Maintainer): Add self.
218         * modules/utimecmp (Depends-on): Add time; remove timespec.
219         * modules/utimens (Depends-on): Likewise.
220         * modules/xnanosleep (Depends-on): Likewise.
221
222 2007-02-11  Bruno Haible  <bruno@clisp.org>
223
224         * lib/c-strstr.c: Include allocsa.h.
225         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
226         * lib/c-strcasestr.c: Include allocsa.h.
227         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
228         * lib/strcasestr.c: Include allocsa.h.
229         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
230         * lib/mbsstr.c: Include allocsa.h.
231         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
232         allocsa/freesa instead of malloc/free.
233         * lib/mbscasestr.c: Include allocsa.h.
234         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
235         allocsa/freesa instead of malloc/free.
236         * modules/c-strstr (Depends-on): Add allocsa.
237         * modules/c-strcasestr (Depends-on): Likewise.
238         * modules/strcasestr (Depends-on): Likewise.
239         * modules/mbsstr (Depends-on): Likewise.
240         * modules/mbscasestr (Depends-on): Likewise.
241
242 2007-02-11  Bruno Haible  <bruno@clisp.org>
243
244         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
245
246         * modules/mbsspn-tests: New file.
247         * tests/test-mbsspn.sh: New file.
248         * tests/test-mbsspn.c: New file.
249
250 2007-02-11  Bruno Haible  <bruno@clisp.org>
251
252         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
253
254         * modules/mbspbrk-tests: New file.
255         * tests/test-mbspbrk.sh: New file.
256         * tests/test-mbspbrk.c: New file.
257
258 2007-02-11  Bruno Haible  <bruno@clisp.org>
259
260         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
261         unneeded cast.
262
263         * modules/mbscspn-tests: New file.
264         * tests/test-mbscspn.sh: New file.
265         * tests/test-mbscspn.c: New file.
266
267 2007-02-11  Bruno Haible  <bruno@clisp.org>
268
269         * modules/mbscasecmp-tests: New file.
270         * tests/test-mbscasecmp.sh: New file.
271         * tests/test-mbscasecmp.c: New file.
272
273 2007-02-11  Bruno Haible  <bruno@clisp.org>
274
275         Ensure O(n) worst-case complexity of mbscasestr.
276         * lib/mbscasestr.c: Include stdbool.h.
277         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
278         functions.
279         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
280         the bookkeeping indicates that it's worth it.
281         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
282
283         * modules/mbscasestr-tests: New file.
284         * tests/test-mbscasestr1.c: New file.
285         * tests/test-mbscasestr2.sh: New file.
286         * tests/test-mbscasestr2.c: New file.
287         * tests/test-mbscasestr3.sh: New file.
288         * tests/test-mbscasestr3.c: New file.
289         * tests/test-mbscasestr4.sh: New file.
290         * tests/test-mbscasestr4.c: New file.
291         * m4/locale-tr.m4: New file.
292
293 2007-02-11  Bruno Haible  <bruno@clisp.org>
294
295         Ensure O(n) worst-case complexity of mbsstr.
296         * lib/mbsstr.c: Include stdbool.h.
297         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
298         functions.
299         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
300         bookkeeping indicates that it's worth it.
301         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
302
303         * modules/mbsstr-tests: New file.
304         * tests/test-mbsstr1.c: New file.
305         * tests/test-mbsstr2.sh: New file.
306         * tests/test-mbsstr2.c: New file.
307         * tests/test-mbsstr3.sh: New file.
308         * tests/test-mbsstr3.c: New file.
309         * m4/locale-fr.m4: New file.
310
311 2007-02-11  Bruno Haible  <bruno@clisp.org>
312
313         * lib/mbsrchr.c (mbsrchr): Fix bug.
314
315         * modules/mbsrchr-tests: New file.
316         * tests/test-mbsrchr.sh: New file.
317         * tests/test-mbsrchr.c: New file.
318
319 2007-02-11  Bruno Haible  <bruno@clisp.org>
320
321         * lib/mbschr.c (mbschr): Fix bug.
322
323         * modules/mbschr-tests: New file.
324         * tests/test-mbschr.sh: New file.
325         * tests/test-mbschr.c: New file.
326         * m4/locale-zh.m4: New file.
327
328 2007-02-11  Bruno Haible  <bruno@clisp.org>
329
330         Support for copying multibyte string iterators.
331         * lib/mbiter.h: Include <string.h>.
332         (mbiter_multi_copy): New function.
333         (mbi_copy): New macro.
334         * lib/mbuiter.h: Include <string.h>.
335         (mbuiter_multi_copy): New function.
336         (mbui_copy): New macro.
337
338 2007-02-11  Bruno Haible  <bruno@clisp.org>
339
340         New module mbslen.
341         * modules/mbslen: New file.
342         * lib/mbslen.c: New file.
343         * lib/string_.h (mbslen): New declaration.
344         * m4/mbslen.m4: New file.
345         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
346         GNULIB_MBSLEN.
347         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
348         * MODULES.html.sh (Internationalization functions): Add mbslen.
349
350 2007-02-11  Bruno Haible  <bruno@clisp.org>
351
352         Ensure O(n) worst-case complexity of strcasestr substitute.
353         * lib/strcasestr.c: Include stdbool.h.
354         (knuth_morris_pratt): New function.
355         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
356         bookkeeping indicates that it's worth it.
357         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
358
359         * modules/strcasestr-tests: New file.
360         * tests/test-strcasestr.c: New file.
361
362 2007-02-11  Bruno Haible  <bruno@clisp.org>
363
364         Ensure O(n) worst-case complexity of c_strcasestr.
365         * lib/c-strcasestr.c: Include stdbool.h, string.h.
366         (knuth_morris_pratt): New function.
367         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
368         the bookkeeping indicates that it's worth it.
369         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
370
371         * modules/c-strcasestr-tests: New file.
372         * tests/test-c-strcasestr.c: New file.
373
374 2007-02-11  Bruno Haible  <bruno@clisp.org>
375
376         Ensure O(n) worst-case complexity of c_strstr.
377         * lib/c-strstr.c: Include stdbool.h, string.h.
378         (knuth_morris_pratt): New function.
379         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
380         bookkeeping indicates that it's worth it.
381         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
382
383         * lib/c-strstr.c: Complete rewrite for maintainability.
384
385         * modules/c-strstr-tests: New file.
386         * tests/test-c-strstr.c: New file.
387
388 2007-02-11  Bruno Haible  <bruno@clisp.org>
389
390         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
391         5.2.1 and earlier, whereby \055 was treated just like the range
392         delimiter '-'.  Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
393
394 2007-02-08  Bruno Haible  <bruno@clisp.org>
395
396         * modules/regex (Depends-on): Add stdbool.
397         Reported by Dalibor Topic <robilad@kaffe.org>.
398
399 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
400
401         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
402         Prefer returning from main to exiting from it.
403         Remove unnecessary parens after sizeof.
404
405 2007-02-05  Bruno Haible  <bruno@clisp.org>
406
407         New module mbssep.
408         * modules/mbssep: New file.
409         * lib/mbssep.c: New file.
410         * lib/string_.h (strsep): Add a conditional link warning.
411         (mbssep): New declaration.
412         * m4/mbssep.m4: New file.
413         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
414         GNULIB_MBSSEP.
415         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
416         * MODULES.html.sh (Internationalization functions): Add mbssep.
417
418 2007-02-05  Bruno Haible  <bruno@clisp.org>
419
420         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
421         Optimize search in case of 1 delimiter.
422
423 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
424
425         * lib/acl.h: Include sys/types.h before sys/acl.h.
426
427 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
428
429         Merge upstream fix for glibc bugzilla #3957:
430
431         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
432
433         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
434         bit for RE_HAT_LISTS_NOT_NEWLINE.
435         (build_charclass_op): Remove bogus comment.
436
437 2007-02-05  Simon Josefsson  <simon@josefsson.org>
438
439         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
440
441 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
442
443         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
444         * lib/memmem.c [!defined _LIBC]: Include config.h.
445
446 2007-02-04  Bruno Haible  <bruno@clisp.org>
447
448         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
449         warning message.
450
451 2007-02-04  Bruno Haible  <bruno@clisp.org>
452
453         New module mbstok_r.
454         * modules/mbstok_r: New file.
455         * lib/mbstok_r.c: New file.
456         * lib/string_.h (strtok_r): Change argument names to match the
457         comments. Add a conditional link warning.
458         (mbstok_r): New declaration.
459         * m4/mbstok_r.m4: New file.
460         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
461         GNULIB_MBSTOK_R.
462         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
463         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
464
465 2007-02-04  Bruno Haible  <bruno@clisp.org>
466
467         New module mbsspn.
468         * modules/mbsspn: New file.
469         * lib/mbsspn.c: New file.
470         * lib/string_.h (strspn): Add a conditional link warning.
471         (mbsspn): New declaration.
472         * m4/mbsspn.m4: New file.
473         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
474         GNULIB_MBSSPN.
475         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
476         * MODULES.html.sh (Internationalization functions): Add mbsspn.
477
478 2007-02-04  Bruno Haible  <bruno@clisp.org>
479
480         New module mbspbrk.
481         * modules/mbspbrk: New file.
482         * lib/mbspbrk.c: New file.
483         * lib/string_.h (strpbrk): Add a conditional link warning.
484         (mbspbrk): New declaration.
485         * m4/mbspbrk.m4: New file.
486         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
487         GNULIB_MBSPBRK.
488         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
489         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
490
491 2007-02-04  Bruno Haible  <bruno@clisp.org>
492
493         New module mbscspn.
494         * modules/mbscspn: New file.
495         * lib/mbscspn.c: New file.
496         * lib/string_.h (strcspn): Add a conditional link warning.
497         (mbscspn): New declaration.
498         * m4/mbscspn.m4: New file.
499         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
500         GNULIB_MBSCSPN.
501         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
502         * MODULES.html.sh (Internationalization functions): Add mbscspn.
503
504 2007-02-04  Bruno Haible  <bruno@clisp.org>
505
506         New module mbscasestr, reduced goal of strcasestr.
507         * modules/mbscasestr: New file.
508         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
509         (mbscasestr): Renamed from strcasestr.
510         * lib/strcasestr.c: Don't include mbuiter.h.
511         (strcasestr): Remove support for multibyte locales.
512         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
513         Change the conditional link warning.
514         (mbscasestr): New declaration.
515         * m4/mbscasestr.m4: New file.
516         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
517         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
518         REPLACE_STRCASESTR.
519         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
520         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
521         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
522         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
523         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
524         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
525         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
526         (Depends-on): Remove mbuiter.
527         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
528
529 2007-02-04  Bruno Haible  <bruno@clisp.org>
530
531         Simplify handling of strncasecmp.
532         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
533         the conditional link warning.
534         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
535         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
536         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
537         * modules/strcase (configure.ac): Don't invoke
538         gl_STRING_MODULE_INDICATOR.
539         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
540
541 2007-02-04  Bruno Haible  <bruno@clisp.org>
542
543         New module mbscasecmp, reduced goal of strcasecmp.
544         * modules/mbscasecmp: New file.
545         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
546         (mbscasecmp): Renamed from strcasecmp.
547         * lib/strcasecmp.c: Don't include mbuiter.h.
548         (strcasecmp): Remove support for multibyte locales.
549         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
550         Change the conditional link warning.
551         (mbscasecmp): New declaration.
552         * m4/mbscasecmp.m4: New file.
553         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
554         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
555         REPLACE_STRCASECMP.
556         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
557         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
558         GNULIB_MBSCASECMP.
559         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
560         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
561         * modules/strcase (Files): Remove m4/mbrtowc.m4.
562         (Depends-on): Remove mbuiter.
563         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
564
565 2007-02-04  Bruno Haible  <bruno@clisp.org>
566
567         New module mbsstr. Remove module strstr.
568         * modules/mbsstr: New file.
569         * modules/strstr: Remove file.
570         * lib/mbsstr.c: Renamed from lib/strstr.c.
571         (mbsstr): Renamed from strstr.
572         * lib/string_.h (strstr): Remove declaration. Change the conditional
573         link warning.
574         (mbsstr): New declaration.
575         * m4/mbsstr.m4: New file.
576         * m4/strstr.m4: Remove file.
577         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
578         REPLACE_STRSTR.
579         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
580         Don't initialize GNULIB_STRSTR.
581         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
582         substitute GNULIB_STRSTR and REPLACE_STRSTR.
583         * MODULES.html.sh (Internationalization functions): Add mbsstr.
584         (Support for systems lacking ANSI C 89): Remove strstr.
585
586 2007-02-04  Bruno Haible  <bruno@clisp.org>
587
588         New module mbsrchr.
589         * modules/mbsrchr: New file.
590         * lib/mbsrchr.c: New file.
591         * lib/string_.h (strrchr): Add a conditional link warning.
592         (mbsrchr): New declaration.
593         * m4/mbsrchr.m4: New file.
594         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
595         GNULIB_MBSRCHR.
596         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
597         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
598
599 2007-02-04  Bruno Haible  <bruno@clisp.org>
600
601         New module mbschr.
602         * modules/mbschr: New file.
603         * lib/mbschr.c: New file.
604         * lib/string_.h (strchr): Add a conditional link warning.
605         (mbschr): New declaration.
606         * m4/mbschr.m4: New file.
607         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
608         GNULIB_MBSCHR.
609         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
610         * MODULES.html.sh (Internationalization functions): Add mbschr.
611
612 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
613
614         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
615
616         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
617
618 2007-02-04  Bruno Haible  <bruno@clisp.org>
619
620         New module description section 'configure.ac-early'.
621         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
622         (func_get_autoconf_early_snippet): New function.
623         (func_import, func_create_testdir): Use it. Remove special cases for
624         modules 'extensions' and 'lock'.
625         * modules/extensions (configure.ac-early): Require
626         gl_USE_SYSTEM_EXTENSIONS.
627         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
628
629 2007-02-04  Bruno Haible  <bruno@clisp.org>
630
631         Make use of gcj-4.3's -fsource and -ftarget option.
632         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
633         and if so try the options -fsource and -ftarget.
634         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
635         source_version, ftarget_option, target_version arguments.
636         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
637         (is_envjavac_oldgcj_14_14_usable): Renamed from
638         is_envjavac_gcj_14_14_usable.
639         (is_envjavac_oldgcj_14_13_usable): Renamed from
640         is_envjavac_gcj_14_13_usable.
641         (is_gcj_present): Update.
642         (is_gcj_43, is_gcj43_usable): New functions.
643         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
644         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
645         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
646         try the options -fsource and -ftarget.
647
648 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
649
650         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
651         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
652         larger value.
653
654 2007-02-03  Jim Meyering  <jim@meyering.net>
655
656         Give tools a better chance to allocate space for very large buffers.
657         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
658
659         Make pwd and readlink work also when run with an unreadable parent dir
660         on systems with openat support.
661         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
662         provided getcwd function, even when we have openat support.
663         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
664
665 2007-02-02  Bruno Haible  <bruno@clisp.org>
666
667         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
668         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
669         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
670         portability problems if one of these functions is only used on specific
671         platforms.
672         Reported by Paul Eggert.
673
674 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
675
676         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
677         is causing more trouble than it's curing.
678         * lib/regex_internal.h (__mempcpy): Remove.
679         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
680         (and make the code a tad smaller to boot).
681         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
682
683 2007-02-02  Jim Meyering  <jim@meyering.net>
684
685         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
686         section, not in the Makefile.am: one.
687
688 2007-02-02  Eric Blake  <ebb9@byu.net>
689
690         * lib/strchrnul.c: Always include config.h first.
691
692         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
693         gnulib strstr is not necessary here.
694
695 2007-02-02  Simon Josefsson  <simon@josefsson.org>
696
697         * m4/socklen.m4: Fix typo.
698
699 2007-02-02  Eric Blake  <ebb9@byu.net>
700
701         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
702         * modules/netinet_in (Makefile.am): Likewise.
703
704 2007-02-01  Bruno Haible  <bruno@clisp.org>
705
706         * lib/string_.h (GL_LINK_WARNING): New macro.
707         (strcasecmp, strstr, strcasestr): If provided by the system,
708         conditionally define as a macro that leads to a warning instead of to
709         an error.
710         (strncasecmp): Conditionally define as a macro that leads to a warning.
711
712 2007-02-01  Jim Meyering  <jim@meyering.net>
713
714         Give tools a better chance to allocate space for very large buffers.
715         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
716
717 2007-02-01  Karl Berry  <karl@gnu.org>
718
719         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
720
721 2007-02-01  Bruno Haible  <bruno@clisp.org>
722
723         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
724         renamings.
725
726 2007-02-01  Eric Blake  <ebb9@byu.net>
727
728         * modules/regex (Depends-on): Revert dependence on mempcpy.
729         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
730         module's definition of mempcpy.
731         Reported by Paul Eggert.
732
733 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
734
735         * lib/string_.h: If the gnulib module XYZ is not present, undefine
736         the symbol XYZ before redefining it.  This fixes a problem with
737         programs that don't use XYZ, when compiled on systems that define
738         XYZ to something else.
739
740 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
741
742         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
743         occurs when "mkdir -m foo" creates a setgid directory that is (1)
744         writeable to group or other and (2) is intended to have a special
745         mode bit that is set or cleared.  In such a case, the directory
746         should be neither group- nor other-writeable until the special
747         mode bits are right.
748
749 2007-01-31  Eric Blake  <ebb9@byu.net>
750
751         * modules/mountlist (Depends-on): Add strstr.
752
753         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
754         bug.
755         * modules/string (Makefile.am): Remove redundant replacement.
756         * modules/regex (Depends-on): Add mempcpy.
757
758 2007-01-31  Bruno Haible  <bruno@clisp.org>
759
760         New module description field 'Link'.
761         * gnulib-tool (func_usage): Document --extract-link-directive.
762         (sed_extract_prog): Recognize 'Link' directive.
763         (func_get_link_directive): New function.
764         (func_import): Show summary of link directives.
765         Handle --extract-link-directive option.
766         * modules/acl (Link): New section.
767         * modules/clock-time (Link): New section.
768         * modules/euidaccess (Link): New section.
769         * modules/gettext (Link): New section.
770         * modules/iconv (Link): New section.
771         * modules/lock (Link): New section.
772         * modules/nanosleep (Link): New section.
773         * modules/readline (Link): New section.
774
775 2007-01-27  Bruno Haible  <bruno@clisp.org>
776
777         Enforce the use of gnulib modules for unportable <string.h> functions.
778         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
779         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
780         (gl_HEADER_STRING_H_BODY): Require it.
781         * lib/string_.h: If the gnulib module XYZ is not present, redefine
782         the symbol XYZ to one that gives a link error.
783         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
784         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
785         * modules/mempcpy (configure.ac): Likewise.
786         * modules/memrchr (configure.ac): Likewise.
787         * modules/stpcpy (configure.ac): Likewise.
788         * modules/stpncpy (configure.ac): Likewise.
789         * modules/strcase (configure.ac): Likewise.
790         * modules/strcasestr (configure.ac): Likewise.
791         * modules/strchrnul (configure.ac): Likewise.
792         * modules/strdup (configure.ac): Likewise.
793         * modules/strndup (configure.ac): Likewise.
794         * modules/strnlen (configure.ac): Likewise.
795         * modules/strpbrk (configure.ac): Likewise.
796         * modules/strsep (configure.ac): Likewise.
797         * modules/strstr (configure.ac): Likewise.
798         * modules/strtok_r (configure.ac): Likewise.
799
800 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
801
802         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
803
804 2007-01-30  Jim Meyering  <jim@meyering.net>
805
806         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
807
808 2007-01-29  Bruno Haible  <bruno@clisp.org>
809
810         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
811         * lib/execute.c: Likewise.
812         * lib/pipe.c: Likewise.
813         * lib/printf-args.h: Likewise.
814         * lib/printf-args.c: Likewise.
815         * lib/printf-parse.c: Likewise.
816         * lib/vasnprintf.c: Likewise.
817
818 2007-01-29  Eric Blake  <ebb9@byu.net>
819
820         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
821         declaration.
822
823 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
824
825         * lib/strptime.h (strptime): Use 'restrict' for args where
826         POSIX requires this.
827         * lib/strptime.c (strptime): Likewise.
828         Change license notice from LGPL to GPL, since gnulib-tool will
829         change this as needed.
830         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
831         defined.
832         Include "strptime.h" first, to check interface.
833         Do not #undef _LIBC and _NL_CURRENT.
834         Do not include <stdlib.h>; no longer needed.
835         Include "time_r.h" and declare ptime_locale_status
836         only if _LIBC is not defined.
837         (__P): Remove unused macro.
838         (match_string): Bring back glibc version, but use it only if _LIBC
839         is defined.
840         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
841         Remove unnecessary assertion and abort() call.
842         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
843         * m4/strptime.m4: Fix serial number comment.
844         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
845         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
846         (Depends-on): Add time_r.
847
848 2007-01-29  Bruno Haible  <bruno@clisp.org>
849
850         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
851         strptime.
852         * modules/strptime (Depends-on): Add stdbool.
853         * lib/strptime.h: Include <time.h> always. Add comments.
854
855 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
856
857         * modules/strptime: New file.
858         * lib/strptime.h: New file.
859         * lib/strptime.c: New file.
860         * m4/strptime.m4: New file.
861
862 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
863
864         * MODULES.html.sh: New module mpsort.
865         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
866
867         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
868         a circularity problem with HP-UX ia64 reported by Bob Proulx in
869         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
870         All uses changed.
871         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
872         All uses changed.
873         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
874         to _Restrict_.
875         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
876         the parameter matches the prototype.
877
878 2007-01-28  Jim Meyering  <jim@meyering.net>
879
880         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
881         sys/time.h here, reverting that part of the previous patch:
882         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
883
884 2007-01-28  Bruno Haible  <bruno@clisp.org>
885
886         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
887         value of $(SYS_TIME_H).
888         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
889         remove it conditionally, too. [added by Jim Meyering]
890         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
891         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
892         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
893         GETTIMEOFDAY_REPLACEMENT to 1.
894
895 2007-01-28  Bruno Haible  <bruno@clisp.org>
896
897         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
898         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
899         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
900         Set UNISTD_H instead of UNISTD_H2.
901         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
902
903 2007-01-28  Bruno Haible  <bruno@clisp.org>
904
905         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
906         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
907
908 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
909
910         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
911         (func_create_testdir): Ensure C locale for `grep' and `tr'
912         character ranges.
913         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
914         ACLOCAL_AMFLAGS parsing state machine.
915
916 2007-01-27  Bruno Haible  <bruno@clisp.org>
917
918         * modules/unistr/base: Update.
919
920 2007-01-27  Bruno Haible  <bruno@clisp.org>
921
922         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
923         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
924         * modules/unistr/u32-mbtouc-unsafe: Renamed from
925         modules/unistr/u32-mbtouc.
926         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
927         * lib/unistr.h: Update.
928         * lib/linebreak.c: Update.
929         * modules/unistr/u32-mbtouc: Renamed from
930         modules/unistr/u32-mbtouc-safe.
931         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
932         * lib/unistr.h: Update.
933         * lib/unistr/u32-to-u8.c: Update.
934         * lib/unistr/u32-to-u16.c: Update.
935
936 2007-01-27  Bruno Haible  <bruno@clisp.org>
937
938         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
939         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
940         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
941         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
942         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
943         * modules/unistr/u16-mbtouc-unsafe: Renamed from
944         modules/unistr/u16-mbtouc.
945         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
946         * lib/unistr.h: Update.
947         * lib/linebreak.c: Update.
948         * modules/linebreak: Update.
949         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
950         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
951         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
952         * modules/unistr/u16-mbtouc: Renamed from
953         modules/unistr/u16-mbtouc-safe.
954         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
955         * lib/unistr.h: Update.
956         * lib/unistr/u16-to-u8.c: Update.
957         * modules/unistr/u16-to-u8: Update.
958         * lib/unistr/u16-to-u32.c: Update.
959         * modules/unistr/u16-to-u32: Update.
960
961 2007-01-27  Bruno Haible  <bruno@clisp.org>
962
963         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
964         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
965         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
966         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
967         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
968         * modules/unistr/u8-mbtouc-unsafe: Renamed from
969         modules/unistr/u8-mbtouc.
970         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
971         * lib/unistr.h: Update.
972         * lib/striconveh.c: Update.
973         * modules/striconveh: Update.
974         * lib/linebreak.c: Update.
975         * modules/linebreak: Update.
976         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
977         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
978         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
979         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
980         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
981         * lib/unistr.h: Update.
982         * lib/striconveh.c: Update.
983         * modules/striconveh: Update.
984         * lib/unistr/u8-to-u16.c: Update.
985         * modules/unistr/u8-to-u16: Update.
986         * lib/unistr/u8-to-u32.c: Update.
987         * modules/unistr/u8-to-u32: Update.
988
989 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
990
991         Sync from Libtool.
992         * lib/argz.c: Do not include strings.h nor memory.h, include
993         string.h unconditionally.  Patch by Simon Josefsson.
994
995 2007-01-27  Bruno Haible  <bruno@clisp.org>
996
997         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
998         from gl_HEADER_STRING_H_BODY.
999         (gl_HEADER_STRING_H_BODY): Require it.
1000         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1001         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1002         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1003         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1004         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1005         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1006         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1007         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1008         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1009         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1010         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1011         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1012         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1013         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1014         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1015
1016 2007-01-27  Bruno Haible  <bruno@clisp.org>
1017
1018         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1019         check_PROGRAMS into noinst_PROGRAMS.
1020         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1021         check_PROGRAMS in this case.
1022         (func_import): Set for_test to false.
1023         (func_create_testdir): Set for_test to true.
1024
1025 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1026             Bruno Haible  <bruno@clisp.org>
1027
1028         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1029         (Depends-on): Add string.
1030         (Includes): Use <string.h> instead of strcasestr.h.
1031         * modules/string (Makefile.am): Also substitute the value of
1032         REPLACE_STRCASESTR.
1033         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1034         assume strcasestr is declared in <string.h> not <strings.h>. Also
1035         set REPLACE_STRCASESTR.
1036         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1037         REPLACE_STRCASESTR.
1038         * lib/strcasestr.h: Remove file.
1039         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1040         * lib/string_.h (strcasestr): New declaration.
1041
1042 2007-01-27  Bruno Haible  <bruno@clisp.org>
1043
1044         * lib/string_.h: Use 'extern'.
1045
1046 2007-01-27  Jim Meyering  <jim@meyering.net>
1047
1048         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1049         of set-but-not-used local, "q".
1050
1051         * lib/mempcpy.c: Include <config.h> before <string.h>.
1052         This fixes a compilation error on HP-UX, due to the system's
1053         "restrict"-using mempcpy prototype.
1054
1055 2007-01-26  Bruno Haible  <bruno@clisp.org>
1056
1057         Small optimization.
1058         * lib/javacomp.c: Include c-strstr.h.
1059          (is_envjavac_gcj): Use c_strstr instead of strstr.
1060         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1061
1062 2007-01-26  Bruno Haible  <bruno@clisp.org>
1063
1064         * MODULES.html.sh (Unicode string functions): Add the new modules.
1065
1066         * modules/uniconv/u32-strconv-to-locale: New file.
1067         * lib/uniconv/u32-strconv-to-locale.c: New file.
1068
1069         * modules/uniconv/u16-strconv-to-locale: New file.
1070         * lib/uniconv/u16-strconv-to-locale.c: New file.
1071
1072         * modules/uniconv/u8-strconv-to-locale: New file.
1073         * lib/uniconv/u8-strconv-to-locale.c: New file.
1074
1075         * modules/uniconv/u32-strconv-from-locale: New file.
1076         * lib/uniconv/u32-strconv-from-locale.c: New file.
1077
1078         * modules/uniconv/u16-strconv-from-locale: New file.
1079         * lib/uniconv/u16-strconv-from-locale.c: New file.
1080
1081         * modules/uniconv/u8-strconv-from-locale: New file.
1082         * lib/uniconv/u8-strconv-from-locale.c: New file.
1083
1084         * modules/uniconv/u32-strconv-to-enc: New file.
1085         * lib/uniconv/u32-strconv-to-enc.c: New file.
1086         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1087         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1088
1089         * modules/uniconv/u16-strconv-to-enc: New file.
1090         * lib/uniconv/u16-strconv-to-enc.c: New file.
1091         * lib/uniconv/u-strconv-to-enc.h: New file.
1092         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1093         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1094
1095         * modules/uniconv/u8-strconv-to-enc: New file.
1096         * lib/uniconv/u8-strconv-to-enc.c: New file.
1097         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1098         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1099
1100         * modules/uniconv/u32-strconv-from-enc: New file.
1101         * lib/uniconv/u32-strconv-from-enc.c: New file.
1102         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1103         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1104
1105         * modules/uniconv/u16-strconv-from-enc: New file.
1106         * lib/uniconv/u16-strconv-from-enc.c: New file.
1107         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1108         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1109
1110         * modules/uniconv/u8-strconv-from-enc: New file.
1111         * lib/uniconv/u8-strconv-from-enc.c: New file.
1112         * lib/uniconv/u-strconv-from-enc.h: New file.
1113         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1114         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1115
1116         * modules/uniconv/u32-conv-from-enc: New file.
1117         * lib/uniconv/u32-conv-from-enc.c: New file.
1118         * modules/uniconv/u32-conv-from-enc-tests: New file.
1119         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1120
1121         * modules/uniconv/u16-conv-from-enc: New file.
1122         * lib/uniconv/u16-conv-from-enc.c: New file.
1123         * lib/uniconv/u-conv-from-enc.h: New file.
1124         * modules/uniconv/u16-conv-from-enc-tests: New file.
1125         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1126
1127         * modules/uniconv/u8-conv-from-enc: New file.
1128         * lib/uniconv/u8-conv-from-enc.c: New file.
1129         * modules/uniconv/u8-conv-from-enc-tests: New file.
1130         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1131
1132         * modules/uniconv/base: New file.
1133         * lib/uniconv.h: New file.
1134
1135 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1136
1137         * doc/gnulib-tool.texi (Initial import): Update to match current
1138         behavior with strdup module.
1139         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1140         * lib/memmem.h: Remove; all uses removed.  This is now done
1141         by <string.h>.
1142         * lib/mempcpy.h: Likewise.
1143         * lib/memrchr.h: Likewise.
1144         * lib/stpcpy.h: Likewise.
1145         * lib/stpncpy.h: Likewise.
1146         * lib/strcase.h: Likewise.
1147         * lib/strchrnul.h: Likewise.
1148         * lib/strdup.h: Likewise.
1149         * lib/strndup.h: Likewise.
1150         * lib/strnlen.h: Likewise.
1151         * lib/strpbrk.h: Likewise.
1152         * lib/strsep.h: Likewise.
1153         * lib/strstr.h: Likewise.
1154         * lib/strtok_r.h: Likewise.
1155         * lib/string_.h: New file.
1156         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1157         Rely on <string.h> instead.
1158         * lib/canon-host.c: Likewise.
1159         * lib/chdir-long.c: Likewise.
1160         * lib/concatpath.c: Likewise.
1161         * lib/exclude.c: Likewise.
1162         * lib/fchdir.c: Likewise.
1163         * lib/getaddrinfo.c: Likewise.
1164         * lib/getcwd.c: Likewise.
1165         * lib/getsubopt.c: Likewise.
1166         * lib/glob.c: Likewise.
1167         * lib/hard-locale.c: Likewise.
1168         * lib/iconvme.c: Likewise.
1169         * lib/javacomp.c: Likewise.
1170         * lib/mempcpy.c: Likewise.
1171         * lib/memrchr.c: Likewise.
1172         * lib/regex_internal.h: Likewise.
1173         * lib/stpncpy.c: Likewise.
1174         * lib/strcasecmp.c: Likewise.
1175         * lib/strchrnul.c: Likewise.
1176         * lib/strdup.c: Likewise.
1177         * lib/striconv.c: Likewise.
1178         * lib/striconveh.c: Likewise.
1179         * lib/striconveha.c: Likewise.
1180         * lib/strncasecmp.c: Likewise.
1181         * lib/strndup.c: Likewise.
1182         * lib/strnlen.c: Likewise.
1183         * lib/strsep.c: Likewise.
1184         * lib/strstr.c: Likewise.
1185         * lib/strtok_r.c: Likewise.
1186         * lib/userspec.c: Likewise.
1187         * lib/w32spawn.h: Likewise.
1188         * lib/xstrndup.c: Likewise.
1189         * lib/mountlist.c (strstr): Remove decl.
1190         * m4/string_h.m4: New file.
1191         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1192         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1193         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1194         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1195         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1196         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1197         Set REPLACE_STRCASECMP if necessary.
1198         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1199         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1200         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1201         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1202         HAVE_DECL_STRDUP if necessary.
1203         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1204         since gl_FUNC_STRNDUP does that now.
1205         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1206         Check for decl here...
1207         (gl_PREREQ_STRNLEN): ... not here.
1208         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1209         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1210         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1211         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1212         necessary.
1213         * modules/string: New file.
1214         * modules/memmem (Files): Remove special-purpose include file.
1215         (Depends-on): Add string.
1216         (Include): Include <string.h>, not the removed file.
1217         * modules/mempcpy: Likewise.
1218         * modules/memrchr: Likewise.
1219         * modules/stpcpy: Likewise.
1220         * modules/stpncpy: Likewise.
1221         * modules/strcase: Likewise.
1222         * modules/strchrnul: Likewise.
1223         * modules/strdup: Likewise.
1224         * modules/strndup: Likewise.
1225         * modules/strnlen: Likewise.
1226         * modules/strpbrk: Likewise.
1227         * modules/strsep: Likewise.
1228         * modules/strstr: Likewise.
1229         * modules/strtok_r: Likewise.
1230         * tests/test-dirname.c: Don't include "strdup.h", since
1231         <string.h> now suffices.
1232         * tests/test-memmem.c: Don't include "memmem.h", since
1233         <string.h> now suffices.
1234
1235 2007-01-25  Bruno Haible  <bruno@clisp.org>
1236
1237         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1238         *resultp is 0.
1239
1240         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1241         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1242         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1243         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1244
1245         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1246         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1247         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1248         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1249         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1250         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1251
1252 2007-01-24  Bruno Haible  <bruno@clisp.org>
1253
1254         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1255         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1256         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1257         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1258         gl_FUNC_FTS_CORE.
1259         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1260         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1261         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1262         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1263         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1264         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1265         gl_FUNC_FCHOWNAT.
1266         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1267         gl_FUNC_STRFTIME.
1268         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1269         Reported by Ralf Wildenhues.
1270
1271 2007-01-24  Bruno Haible  <bruno@clisp.org>
1272
1273         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1274         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1275         gl_GETADDRINFO.
1276         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1277         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1278         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1279
1280 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1281
1282         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1283         Don't use 'exit'; just return from 'main'.
1284         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1285
1286         * lib/fnmatch_.h: Readjust white space and comments to match
1287         glibc, to avoid spurious diffs.
1288
1289 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1290
1291         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1292         2004-12-01 change by Jakub Jelinek, since this code won't compile
1293         if !LIBC.  Problem reported by Bob Proulx.
1294
1295 2007-01-23  Bruno Haible  <bruno@clisp.org>
1296
1297         * lib/striconveh.c: Include c-strcaseeq.h.
1298         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1299         * modules/striconveh (Depends-on): Add c-strcaseeq.
1300
1301 2007-01-23  Bruno Haible  <bruno@clisp.org>
1302
1303         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1304
1305         * modules/c-strcaseeq: New file.
1306         * lib/c-strcaseeq.h: New file.
1307
1308         * modules/streq: New file.
1309         * lib/streq.h: New file.
1310
1311 2007-01-23  Bruno Haible  <bruno@clisp.org>
1312
1313         * modules/striconveha-tests: New file.
1314         * tests/test-striconveha.c: New file.
1315
1316         * lib/striconveha.h: Include <stdbool.h>.
1317         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1318         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1319         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1320         (mem_iconveha): New function.
1321         (str_iconveha_notranslit): Renamed from str_iconveha.
1322         (str_iconveha): New function.
1323         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1324         c-strcase.
1325
1326 2007-01-23  Bruno Haible  <bruno@clisp.org>
1327
1328         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1329         encodings without forgiving before trying any encoding with handler.
1330         (str_iconveha): Try all encodings without forgiving before trying any
1331         encoding with handler.
1332
1333 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1334
1335         Import the following changes from libc.
1336
1337         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1338
1339         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1340
1341         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1342
1343         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1344         normal_bracket label.
1345
1346         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1347
1348         [BZ #361]
1349         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1350         to normal_bracket after fetching the next character.
1351
1352 2007-01-22  Bruno Haible  <bruno@clisp.org>
1353
1354         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1355         argument.
1356         * lib/striconveh.c (iconv_carefully_1): New function.
1357         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1358         argument.
1359         (str_cd_iconveh): Update.
1360         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1361         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1362         * tests/test-striconveh.c (MAGIC): New macro.
1363         (new_offsets): New function.
1364         (main): Test call with and without offsets.
1365
1366 2007-01-22  Bruno Haible  <bruno@clisp.org>
1367
1368         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1369         * modules/sys_select (Makefile.am): Likewise.
1370         * modules/sys_socket (Makefile.am): Likewise.
1371         * modules/sys_time (Makefile.am): Likewise.
1372
1373 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1374
1375         * modules/gettimeofday (License): Change from GPL to LGPL, since
1376         gettimeofday is a library function.
1377
1378 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1379
1380         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1381
1382 2007-01-21  Bruno Haible  <bruno@clisp.org>
1383
1384         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1385
1386 2007-01-21  Bruno Haible  <bruno@clisp.org>
1387
1388         * modules/striconveha: New file.
1389         * lib/striconveha.h: New file.
1390         * lib/striconveha.c: New file.
1391         * MODULES.html.sh (Internationalization functions): Add striconveha.
1392         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1393         string.
1394         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1395
1396 2007-01-21  Bruno Haible  <bruno@clisp.org>
1397
1398         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1399         * lib/striconveh.c (str_iconveh): Likewise.
1400
1401 2007-01-21  Bruno Haible  <bruno@clisp.org>
1402
1403         * lib/striconveh.h (mem_iconveh): New declaration.
1404         * lib/striconveh.c (mem_iconveh): New function.
1405         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1406
1407 2007-01-21  Bruno Haible  <bruno@clisp.org>
1408
1409         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1410
1411         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1412         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1413         original result buffer.
1414         (str_cd_iconveh): Update.
1415         * tests/test-striconveh.c (main): Update.
1416
1417         * lib/striconv.h (mem_cd_iconv): Change specification.
1418         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1419         result buffer.
1420         (str_cd_iconv): Update.
1421         * tests/test-striconv.c (main): Update.
1422
1423 2007-01-21  Bruno Haible  <bruno@clisp.org>
1424
1425         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1426
1427 2007-01-20  Jim Meyering  <jim@meyering.net>
1428
1429         * lib/userspec.c (parse_with_separator): If a user or group string
1430         starts with "+", skip the corresponding name-to-ID look-up, since
1431         such a look-up must fail: user and group names may not include "+".
1432
1433 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1434
1435         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1436         since we now assume the sys_time module.
1437         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1438         check for sys/time.h; no longer needed.
1439         * modules/poll (Depends-on): Depend on sys_time.
1440
1441 2007-01-18  Bruno Haible  <bruno@clisp.org>
1442
1443         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1444         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1445
1446         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1447         gettimeofday.
1448
1449         * tests/test-gettimeofday.c: Include <time.h>.
1450         (dummy): Remove variable.
1451
1452         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1453         gl_HEADER_SYS_TIME_H.
1454         (gl_HEADER_SYS_TIME_H): New macro.
1455
1456         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1457         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1458         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1459         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1460         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1461         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1462         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1463         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1464         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1465         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1466         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1467
1468         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1469         last change; it caused a compilation error when cross-compiling to
1470         Cygwin.
1471
1472 2007-01-18  Jim Meyering  <jim@meyering.net>
1473
1474         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1475         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1476         than the race-prone "test -d sys || mkdir sys".
1477         (configure.ac): Use AC_PROG_MKDIR_P.
1478         * modules/sys_select: Likewise.
1479         * modules/sys_socket: Likewise.
1480         * modules/sys_time: Likewise.
1481
1482 2007-01-18  Eric Blake  <ebb9@byu.net>
1483
1484         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1485         replace gettimeofday.
1486         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1487         name, to avoid infinite recursion.
1488
1489 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1490
1491         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1492         module sys_time.
1493         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1494         assume timespec.h defines struct timeval.
1495         * lib/settime.c: Likewise.
1496         * lib/utimens.c: Likewise.
1497         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1498         since we now assume the gettimeofday module.
1499         * lib/tempname.c (__gen_tempname): Likewise.
1500         * lib/gettimeofday.h: Remove.
1501         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1502         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1503         Include <time.h>, for 'time()'.
1504         (localtime_buffer_addr): Also use this workaround if
1505         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1506         to simplify the uses.  All uses changed.
1507         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1508         that #undef is inside {}, and 'const' follows type name consistently.
1509         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1510         (gettimeofday): Do not use the maximum possible value for
1511         tv->tv_usec, since that might break usages other than ls.c.
1512         Instead, we'll leave ls.c alone.  This undoes today's patch
1513         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1514         we've never observed the problem but might as well keep the
1515         canary.
1516         * lib/nanosleep.c: Include timespec.h first, for interface check.
1517         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1518         now assume the sys_time module.
1519         * lib/tempname.c: Likewise.
1520         * lib/timespec.h: Likewise.
1521         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1522         needed.
1523         * lib/strftime.c: Likewise.
1524         * lib/timespec.h: Likewise.
1525         * lib/posixtm.c: Include posixtm.h first, for interface check.
1526         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1527         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1528         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1529         * lib/sys_time_.h: New file.
1530         * lib/timespec.h (struct timespec): Use long int, not long.
1531         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1532         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1533         Remove obsolescent call to AC_HEADER_TIME.
1534         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1535         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1536         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1537         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1538         Likewise.
1539         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1540         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1541         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1542         into the sys_time module.  Check for gettimeofday just once.
1543         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1544         for gettimeofday signature to just check the signature.  Merely
1545         compile it, since linking doesn't test signature.  Improve test for
1546         whether gettimeofday.o is actually needed.
1547         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1548         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1549         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1550         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1551         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1552         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1553         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1554         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1555         than worrying about sys/time.h.
1556         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1557         Don't bother worrying about TIME_WITH_SYS_TIME.
1558         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1559         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1560         * m4/sys_time_h.m4: New file.
1561         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1562         Don't include sys/time.h.  Return from main rather than exiting.
1563         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1564         all uses changed.
1565         * modules/gethrxtime (Depends-on): Add sys_time.
1566         * modules/gettime (Depends-on): Likewise.
1567         * modules/gettimeofday (Depends-on): Likewise.
1568         * modules/nanosleep (Depends-on): Likewise.
1569         * modules/settime (Depends-on): Likewise.
1570         * modules/tempname (Depends-on): Likewise.
1571         * modules/utimens (Depends-on): Likewise.
1572         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1573         (Include:) Change back to <sys/time.h>.
1574         (Maintainer:) Add self.
1575         * modules/sys_time: New file.
1576         * modules/tempname (Depends-on): Add gettimeofday.
1577         * tests/test-gettimeofday.c: Include <sys/time.h>
1578         rather than gettimeofday.h.
1579
1580 2007-01-17  Bruno Haible  <bruno@clisp.org>
1581
1582         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1583         the license default to GPL.
1584         (func_create_testdir): Don't complain if a module is LGPL and its
1585         tests module depends on GPLed modules.
1586
1587 2007-01-17  Bruno Haible  <bruno@clisp.org>
1588
1589         * lib/gettimeofday.c (gettimeofday): Add code for the case
1590         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1591         maximum possible value for tv->tv_usec, rather than the minimum one.
1592
1593 2005-10-08  Martin Lambers  <marlam@marlam.de>
1594 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1595 2007-01-16  Bruno Haible  <bruno@clisp.org>
1596
1597         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1598         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1599         gl_FUNC_GETTIMEOFDAY.
1600         (Include): Add gettimeofday.h.
1601         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1602         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1603         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1604         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1605         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1606         * lib/gettimeofday.h: New file.
1607         * lib/gettimeofday.c: Include <sys/timeb.h>.
1608         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1609         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1610         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1611         fall back on time().
1612
1613         * tests/test-gettimeofday.c: New file.
1614         * modules/gettimeofday-tests: New file.
1615
1616 2007-01-16  Eric Blake  <ebb9@byu.net>
1617
1618         * modules/fnmatch (Depends-on): Depend on wchar.
1619         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1620         * m4/fnmatch.m4: Likewise.
1621         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1622         * m4/mbchar.m4: Likewise.
1623         * modules/mbswidth (Depends-on): Depend on wchar.
1624         * lib/mbswidth.c: Assume <wchar.h>.
1625         * m4/mbswidth.m4: Likewise.
1626         * modules/quotearg (Depends-on): Depend on wchar.
1627         * lib/quotearg.c: Assume <wchar.h>.
1628         * m4/quotearg.m4: Likewise.
1629         * modules/regex (Depends-on): Depend on wchar.
1630         * lib/regex_internal.h: Assume <wchar.h>.
1631         * m4/regex.m4: Likewise.
1632         * modules/stdint (Depends-on): Depend on wchar.
1633         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1634         * m4/stdint.m4: Likewise.
1635         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1636         * modules/strftime (Depends-on): Depend on wchar.
1637         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1638         * modules/strtol (Depends-on): Depend on wchar.
1639         * lib/strtol.c: Assume <wchar.h>.
1640         * modules/wcwidth (Depends-on): Depend on wchar.
1641         * lib/wcwidth.h: Assume <wchar.h>.
1642         * m4/wcwidth.m4: Likewise.
1643
1644 2007-01-16  Bruno Haible  <bruno@clisp.org>
1645
1646         * modules/csharpexec-script: New, created from...
1647         * modules/csharpexec: ... this.
1648
1649 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1650
1651         * modules/javaexec-script: New, created from...
1652         * modules/javaexec: ... this.
1653
1654 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1655
1656         * modules/poll (Dependencies): Add sys_select.
1657
1658 2007-01-15  Jim Meyering  <jim@meyering.net>
1659
1660         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1661         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1662         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1663         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1664
1665 2007-01-15  Bruno Haible  <bruno@clisp.org>
1666
1667         * modules/striconveh: New file.
1668         * lib/striconveh.h: New file.
1669         * lib/striconveh.c: New file.
1670         * MODULES.html.sh (Internationalization functions): Add striconveh.
1671
1672         * modules/striconveh-tests: New file.
1673         * tests/test-striconveh.c: New file.
1674
1675 2007-01-15  Bruno Haible  <bruno@clisp.org>
1676
1677         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1678         not from GNU libiconv or GNU libc.
1679
1680 2007-01-15  Bruno Haible  <bruno@clisp.org>
1681
1682         * doc/gnulib-intro.texi (Copyright): Explain the different license
1683         terms for module descriptions, autoconf macros, tests, documentation.
1684
1685 2007-01-14  Bruno Haible  <bruno@clisp.org>
1686
1687         * modules/striconv-tests: New file.
1688         * tests/test-striconv.c: New file.
1689
1690 2007-01-14  Bruno Haible  <bruno@clisp.org>
1691
1692         * modules/iconv-tests: New file.
1693         * tests/test-iconv.c: New file.
1694
1695 2007-01-14  Bruno Haible  <bruno@clisp.org>
1696
1697         * gnulib-tool (func_get_license): For test modules, use the license of
1698         the main module.
1699
1700 2007-01-14  Bruno Haible  <bruno@clisp.org>
1701
1702         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1703         if iconv is found to exist.
1704
1705 2007-01-14  Bruno Haible  <bruno@clisp.org>
1706
1707         * modules/c-ctype-tests: New file.
1708         * tests/test-c-ctype.c: New file.
1709
1710 2007-01-14  Bruno Haible  <bruno@clisp.org>
1711
1712         * modules/binary-io-tests: New file.
1713         * tests/test-binary-io.sh: New file.
1714         * tests/test-binary-io.c: New file.
1715
1716 2007-01-14  Bruno Haible  <bruno@clisp.org>
1717
1718         * modules/array-oset-tests: New file.
1719         * tests/test-array_oset.c: New file.
1720
1721 2007-01-14  Bruno Haible  <bruno@clisp.org>
1722
1723         * modules/array-list-tests: New file.
1724         * tests/test-array_list.c: New file.
1725
1726 2007-01-14  Bruno Haible  <bruno@clisp.org>
1727
1728         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1729         and make.
1730         Reported by Simon Josefsson in
1731         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1732
1733 2007-01-14  Bruno Haible  <bruno@clisp.org>
1734
1735         * modules/allocsa-tests: New file.
1736         * tests/test-allocsa.c: New file.
1737
1738 2007-01-14  Bruno Haible  <bruno@clisp.org>
1739
1740         * modules/fchdir (Depends-on): Add absolute-header.
1741         * modules/unistd (Depends-on): Likewise.
1742
1743 2006-12-30  Bruno Haible  <bruno@clisp.org>
1744
1745         * modules/fchdir: New file.
1746         * modules/unistd (Files): Add lib/unistd_.h.
1747         (Makefile.am): Generate unistd.h from unistd_.h.
1748         * lib/fchdir.c: New file.
1749         * lib/dirent_.h: New file.
1750         * lib/unistd_.h: New file.
1751         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1752         * m4/fchdir.m4: New file.
1753         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1754         (gl_HEADER_UNISTD): Invoke it.
1755         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1756         function.
1757         * lib/backupfile.c (opendir, closedir): Undefine.
1758         * lib/chown.c (open, close): Undefine.
1759         * lib/clean-temp.c (open, close): Undefine.
1760         * lib/copy-file.c (open, close): Undefine.
1761         * lib/execute.c (open, close): Undefine.
1762         * lib/fsusage.c (open, close): Undefine.
1763         * lib/gc-gnulib.c (open, close): Undefine.
1764         * lib/getcwd.c (opendir, closedir): Undefine.
1765         * lib/glob.c (opendir, closedir): Undefine.
1766         * lib/javacomp.c (open, close): Undefine.
1767         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1768         * lib/openat-proc.c (open, close): Undefine.
1769         * lib/pagealign_alloc.c (open, close): Undefine.
1770         * lib/pipe.c (open, close): Undefine.
1771         * lib/progreloc.c (open, close): Undefine.
1772         * lib/savedir.c (opendir, closedir): Undefine.
1773         * lib/utime.c (open, close): Undefine.
1774         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1775
1776 2007-01-10  Bruno Haible  <bruno@clisp.org>
1777
1778         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1779
1780 2007-01-12  Eric Blake  <ebb9@byu.net>
1781
1782         Provide a robust <wchar.h>.  Further simplifications are now
1783         possible in other modules, but not included here.
1784         * modules/wchar: New module.
1785         * m4/wchar.m4: New file.
1786         * lib/wchar_.h: Likewise.
1787         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1788         of the new module.
1789         * MODULES.html.sh (Extended multibyte and wide character utilities):
1790         New section.
1791
1792 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1793
1794         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1795         to a reasonable default for memory allocation.
1796         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1797         file system that reports garbage st_size values for symlinks.
1798         Problem reported by Liyang Hu.
1799
1800 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1801
1802         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1803         Emacs .#* auto-save files).
1804
1805 2007-01-11  Bruno Haible  <bruno@clisp.org>
1806
1807         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1808         directory.
1809
1810 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1811
1812         Use @...@ consistently in lib/wctype_.h.
1813         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1814         on it being set to 1 or 0.
1815         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1816         go back to AC_SUBSTing it.
1817         * modules/wctype (Makefile.am): Undo previous change.
1818
1819 2007-01-10  Eric Blake  <ebb9@byu.net>
1820
1821         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1822         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1823         * modules/wctype (Makefile.am): Likewise.
1824         Reported by Chris McGuire.
1825
1826 2007-01-10  Jim Meyering  <jim@meyering.net>
1827
1828         fts.c: a small readability/maintainability improvement
1829         * lib/fts.c (fts_read): Make this code slightly more readable and
1830         maintainable by hoisting the "sp->fts_cur = p" assignments to
1831         immediately follow the statements that set P.  Derived from
1832         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1833
1834 2007-01-10  Eric Blake  <ebb9@byu.net>
1835
1836         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1837         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1838         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1839         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1840         Reported by Chris McGuire.
1841
1842 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1843
1844         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1845         in sed script.
1846
1847 2007-01-09  Bruno Haible  <bruno@clisp.org>
1848
1849         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1850         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1851         variables.
1852         (func_module): Use them.
1853
1854 2007-01-09  Bruno Haible  <bruno@clisp.org>
1855
1856         * modules/unistr/base: New file.
1857         * lib/unistr.h: New file.
1858
1859         * modules/unistr/u8-to-u16: New file.
1860         * lib/unistr/u8-to-u16.c: New file.
1861
1862         * modules/unistr/u8-to-u32: New file.
1863         * lib/unistr/u8-to-u32.c: New file.
1864
1865         * modules/unistr/u16-to-u8: New file.
1866         * lib/unistr/u16-to-u8.c: New file.
1867
1868         * modules/unistr/u16-to-u32: New file.
1869         * lib/unistr/u16-to-u32.c: New file.
1870
1871         * modules/unistr/u32-to-u8: New file.
1872         * lib/unistr/u32-to-u8.c: New file.
1873
1874         * modules/unistr/u32-to-u16: New file.
1875         * lib/unistr/u32-to-u16.c: New file.
1876
1877         * modules/unistr/u8-check: New file.
1878         * modules/unistr/u16-check: New file.
1879         * modules/unistr/u32-check: New file.
1880         * lib/unistr/u8-check.c: New file.
1881         * lib/unistr/u16-check.c: New file.
1882         * lib/unistr/u32-check.c: New file.
1883
1884         * modules/unistr/u8-chr: New file.
1885         * modules/unistr/u16-chr: New file.
1886         * modules/unistr/u32-chr: New file.
1887         * lib/unistr/u8-chr.c: New file.
1888         * lib/unistr/u16-chr.c: New file.
1889         * lib/unistr/u32-chr.c: New file.
1890
1891         * modules/unistr/u8-cmp: New file.
1892         * modules/unistr/u16-cmp: New file.
1893         * modules/unistr/u32-cmp: New file.
1894         * lib/unistr/u8-cmp.c: New file.
1895         * lib/unistr/u16-cmp.c: New file.
1896         * lib/unistr/u32-cmp.c: New file.
1897
1898         * modules/unistr/u8-cpy: New file.
1899         * modules/unistr/u16-cpy: New file.
1900         * modules/unistr/u32-cpy: New file.
1901         * lib/unistr/u8-cpy.c: New file.
1902         * lib/unistr/u16-cpy.c: New file.
1903         * lib/unistr/u32-cpy.c: New file.
1904         * lib/unistr/u-cpy.h: New file.
1905
1906         * modules/unistr/u8-cpy-alloc: New file.
1907         * modules/unistr/u16-cpy-alloc: New file.
1908         * modules/unistr/u32-cpy-alloc: New file.
1909         * lib/unistr/u8-cpy-alloc.c: New file.
1910         * lib/unistr/u16-cpy-alloc.c: New file.
1911         * lib/unistr/u32-cpy-alloc.c: New file.
1912         * lib/unistr/u-cpy-alloc.h: New file.
1913
1914         * modules/unistr/u8-endswith: New file.
1915         * modules/unistr/u16-endswith: New file.
1916         * modules/unistr/u32-endswith: New file.
1917         * lib/unistr/u8-endswith.c: New file.
1918         * lib/unistr/u16-endswith.c: New file.
1919         * lib/unistr/u32-endswith.c: New file.
1920         * lib/unistr/u-endswith.h: New file.
1921
1922         * modules/unistr/u8-mblen: New file.
1923         * modules/unistr/u16-mblen: New file.
1924         * modules/unistr/u32-mblen: New file.
1925         * lib/unistr/u8-mblen.c: New file.
1926         * lib/unistr/u16-mblen.c: New file.
1927         * lib/unistr/u32-mblen.c: New file.
1928
1929         * modules/unistr/u8-mbtouc: New file.
1930         * modules/unistr/u16-mbtouc: New file.
1931         * modules/unistr/u32-mbtouc: New file.
1932         * lib/unistr/u8-mbtouc.c: New file.
1933         * lib/unistr/u16-mbtouc.c: New file.
1934         * lib/unistr/u32-mbtouc.c: New file.
1935
1936         * modules/unistr/u8-mbtouc-safe: New file.
1937         * modules/unistr/u16-mbtouc-safe: New file.
1938         * modules/unistr/u32-mbtouc-safe: New file.
1939         * lib/unistr/u8-mbtouc-safe.c: New file.
1940         * lib/unistr/u16-mbtouc-safe.c: New file.
1941         * lib/unistr/u32-mbtouc-safe.c: New file.
1942
1943         * modules/unistr/u8-move: New file.
1944         * modules/unistr/u16-move: New file.
1945         * modules/unistr/u32-move: New file.
1946         * lib/unistr/u8-move.c: New file.
1947         * lib/unistr/u16-move.c: New file.
1948         * lib/unistr/u32-move.c: New file.
1949         * lib/unistr/u-move.h: New file.
1950
1951         * modules/unistr/u8-next: New file.
1952         * modules/unistr/u16-next: New file.
1953         * modules/unistr/u32-next: New file.
1954         * lib/unistr/u8-next.c: New file.
1955         * lib/unistr/u16-next.c: New file.
1956         * lib/unistr/u32-next.c: New file.
1957
1958         * modules/unistr/u8-prev: New file.
1959         * modules/unistr/u16-prev: New file.
1960         * modules/unistr/u32-prev: New file.
1961         * lib/unistr/u8-prev.c: New file.
1962         * lib/unistr/u16-prev.c: New file.
1963         * lib/unistr/u32-prev.c: New file.
1964
1965         * modules/unistr/u8-set: New file.
1966         * modules/unistr/u16-set: New file.
1967         * modules/unistr/u32-set: New file.
1968         * lib/unistr/u8-set.c: New file.
1969         * lib/unistr/u16-set.c: New file.
1970         * lib/unistr/u32-set.c: New file.
1971         * lib/unistr/u-set.h: New file.
1972
1973         * modules/unistr/u8-startswith: New file.
1974         * modules/unistr/u16-startswith: New file.
1975         * modules/unistr/u32-startswith: New file.
1976         * lib/unistr/u8-startswith.c: New file.
1977         * lib/unistr/u16-startswith.c: New file.
1978         * lib/unistr/u32-startswith.c: New file.
1979         * lib/unistr/u-startswith.h: New file.
1980
1981         * modules/unistr/u8-stpcpy: New file.
1982         * modules/unistr/u16-stpcpy: New file.
1983         * modules/unistr/u32-stpcpy: New file.
1984         * lib/unistr/u8-stpcpy.c: New file.
1985         * lib/unistr/u16-stpcpy.c: New file.
1986         * lib/unistr/u32-stpcpy.c: New file.
1987         * lib/unistr/u-stpcpy.h: New file.
1988
1989         * modules/unistr/u8-stpncpy: New file.
1990         * modules/unistr/u16-stpncpy: New file.
1991         * modules/unistr/u32-stpncpy: New file.
1992         * lib/unistr/u8-stpncpy.c: New file.
1993         * lib/unistr/u16-stpncpy.c: New file.
1994         * lib/unistr/u32-stpncpy.c: New file.
1995         * lib/unistr/u-stpncpy.h: New file.
1996
1997         * modules/unistr/u8-strcat: New file.
1998         * modules/unistr/u16-strcat: New file.
1999         * modules/unistr/u32-strcat: New file.
2000         * lib/unistr/u8-strcat.c: New file.
2001         * lib/unistr/u16-strcat.c: New file.
2002         * lib/unistr/u32-strcat.c: New file.
2003         * lib/unistr/u-strcat.h: New file.
2004
2005         * modules/unistr/u8-strchr: New file.
2006         * modules/unistr/u16-strchr: New file.
2007         * modules/unistr/u32-strchr: New file.
2008         * lib/unistr/u8-strchr.c: New file.
2009         * lib/unistr/u16-strchr.c: New file.
2010         * lib/unistr/u32-strchr.c: New file.
2011
2012         * modules/unistr/u8-strcmp: New file.
2013         * modules/unistr/u16-strcmp: New file.
2014         * modules/unistr/u32-strcmp: New file.
2015         * lib/unistr/u8-strcmp.c: New file.
2016         * lib/unistr/u16-strcmp.c: New file.
2017         * lib/unistr/u32-strcmp.c: New file.
2018
2019         * modules/unistr/u8-strcpy: New file.
2020         * modules/unistr/u16-strcpy: New file.
2021         * modules/unistr/u32-strcpy: New file.
2022         * lib/unistr/u8-strcpy.c: New file.
2023         * lib/unistr/u16-strcpy.c: New file.
2024         * lib/unistr/u32-strcpy.c: New file.
2025         * lib/unistr/u-strcpy.h: New file.
2026
2027         * modules/unistr/u8-strcspn: New file.
2028         * modules/unistr/u16-strcspn: New file.
2029         * modules/unistr/u32-strcspn: New file.
2030         * lib/unistr/u8-strcspn.c: New file.
2031         * lib/unistr/u16-strcspn.c: New file.
2032         * lib/unistr/u32-strcspn.c: New file.
2033         * lib/unistr/u-strcspn.h: New file.
2034
2035         * modules/unistr/u8-strdup: New file.
2036         * modules/unistr/u16-strdup: New file.
2037         * modules/unistr/u32-strdup: New file.
2038         * lib/unistr/u8-strdup.c: New file.
2039         * lib/unistr/u16-strdup.c: New file.
2040         * lib/unistr/u32-strdup.c: New file.
2041         * lib/unistr/u-strdup.h: New file.
2042
2043         * modules/unistr/u8-strlen: New file.
2044         * modules/unistr/u16-strlen: New file.
2045         * modules/unistr/u32-strlen: New file.
2046         * lib/unistr/u8-strlen.c: New file.
2047         * lib/unistr/u16-strlen.c: New file.
2048         * lib/unistr/u32-strlen.c: New file.
2049         * lib/unistr/u-strlen.h: New file.
2050
2051         * modules/unistr/u8-strmblen: New file.
2052         * modules/unistr/u16-strmblen: New file.
2053         * modules/unistr/u32-strmblen: New file.
2054         * lib/unistr/u8-strmblen.c: New file.
2055         * lib/unistr/u16-strmblen.c: New file.
2056         * lib/unistr/u32-strmblen.c: New file.
2057
2058         * modules/unistr/u8-strmbtouc: New file.
2059         * modules/unistr/u16-strmbtouc: New file.
2060         * modules/unistr/u32-strmbtouc: New file.
2061         * lib/unistr/u8-strmbtouc.c: New file.
2062         * lib/unistr/u16-strmbtouc.c: New file.
2063         * lib/unistr/u32-strmbtouc.c: New file.
2064
2065         * modules/unistr/u8-strncat: New file.
2066         * modules/unistr/u16-strncat: New file.
2067         * modules/unistr/u32-strncat: New file.
2068         * lib/unistr/u8-strncat.c: New file.
2069         * lib/unistr/u16-strncat.c: New file.
2070         * lib/unistr/u32-strncat.c: New file.
2071         * lib/unistr/u-strncat.h: New file.
2072
2073         * modules/unistr/u8-strncmp: New file.
2074         * modules/unistr/u16-strncmp: New file.
2075         * modules/unistr/u32-strncmp: New file.
2076         * lib/unistr/u8-strncmp.c: New file.
2077         * lib/unistr/u16-strncmp.c: New file.
2078         * lib/unistr/u32-strncmp.c: New file.
2079
2080         * modules/unistr/u8-strncpy: New file.
2081         * modules/unistr/u16-strncpy: New file.
2082         * modules/unistr/u32-strncpy: New file.
2083         * lib/unistr/u8-strncpy.c: New file.
2084         * lib/unistr/u16-strncpy.c: New file.
2085         * lib/unistr/u32-strncpy.c: New file.
2086         * lib/unistr/u-strncpy.h: New file.
2087
2088         * modules/unistr/u8-strnlen: New file.
2089         * modules/unistr/u16-strnlen: New file.
2090         * modules/unistr/u32-strnlen: New file.
2091         * lib/unistr/u8-strnlen.c: New file.
2092         * lib/unistr/u16-strnlen.c: New file.
2093         * lib/unistr/u32-strnlen.c: New file.
2094         * lib/unistr/u-strnlen.h: New file.
2095
2096         * modules/unistr/u8-strpbrk: New file.
2097         * modules/unistr/u16-strpbrk: New file.
2098         * modules/unistr/u32-strpbrk: New file.
2099         * lib/unistr/u8-strpbrk.c: New file.
2100         * lib/unistr/u16-strpbrk.c: New file.
2101         * lib/unistr/u32-strpbrk.c: New file.
2102         * lib/unistr/u-strpbrk.h: New file.
2103
2104         * modules/unistr/u8-strrchr: New file.
2105         * modules/unistr/u16-strrchr: New file.
2106         * modules/unistr/u32-strrchr: New file.
2107         * lib/unistr/u8-strrchr.c: New file.
2108         * lib/unistr/u16-strrchr.c: New file.
2109         * lib/unistr/u32-strrchr.c: New file.
2110
2111         * modules/unistr/u8-strspn: New file.
2112         * modules/unistr/u16-strspn: New file.
2113         * modules/unistr/u32-strspn: New file.
2114         * lib/unistr/u8-strspn.c: New file.
2115         * lib/unistr/u16-strspn.c: New file.
2116         * lib/unistr/u32-strspn.c: New file.
2117         * lib/unistr/u-strspn.h: New file.
2118
2119         * modules/unistr/u8-strstr: New file.
2120         * modules/unistr/u16-strstr: New file.
2121         * modules/unistr/u32-strstr: New file.
2122         * lib/unistr/u8-strstr.c: New file.
2123         * lib/unistr/u16-strstr.c: New file.
2124         * lib/unistr/u32-strstr.c: New file.
2125         * lib/unistr/u-strstr.h: New file.
2126
2127         * modules/unistr/u8-strtok: New file.
2128         * modules/unistr/u16-strtok: New file.
2129         * modules/unistr/u32-strtok: New file.
2130         * lib/unistr/u8-strtok.c: New file.
2131         * lib/unistr/u16-strtok.c: New file.
2132         * lib/unistr/u32-strtok.c: New file.
2133         * lib/unistr/u-strtok.h: New file.
2134
2135         * modules/unistr/u8-uctomb: New file.
2136         * modules/unistr/u16-uctomb: New file.
2137         * modules/unistr/u32-uctomb: New file.
2138         * lib/unistr/u8-uctomb.c: New file.
2139         * lib/unistr/u16-uctomb.c: New file.
2140         * lib/unistr/u32-uctomb.c: New file.
2141
2142         * MODULES.html.sh (Unicode string functions): Add the new modules.
2143
2144 2007-01-08  Bruno Haible  <bruno@clisp.org>
2145
2146         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2147         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2148         subdirectories.
2149
2150 2007-01-08  Karl Berry  <karl@gnu.org>
2151
2152         * doc/error.texi: mention that main() fns must set program_name
2153         when progname is used.
2154
2155 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2156
2157         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2158         WCTYPE_H is empty, for the benefit of builds from non-distclean
2159         directories.  Problem reported by Eric Blake in
2160         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2161
2162 2007-01-08  Bruno Haible  <bruno@clisp.org>
2163
2164         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2165         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2166         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2167         PROVIDE_CANONICALIZE_FILENAME_MODE.
2168         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2169
2170 2007-01-08  Bruno Haible  <bruno@clisp.org>
2171
2172         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2173         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2174         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2175         * lib/fts.c: Likewise.
2176         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2177
2178 2006-12-25  Bruno Haible  <bruno@clisp.org>
2179
2180         * modules/utf8-ucs4-safe: New file.
2181         * lib/utf8-ucs4-safe.h: New file.
2182         * lib/unistr/utf8-ucs4-safe.c: New file.
2183
2184         * modules/utf16-ucs4-safe: New file.
2185         * lib/utf16-ucs4-safe.h: New file.
2186         * lib/unistr/utf16-ucs4-safe.c: New file.
2187
2188         * MODULES.html.sh (Unicode string functions): Add the new modules.
2189
2190 2007-01-08  Bruno Haible  <bruno@clisp.org>
2191
2192         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2193         (Depends-on): Add unitypes.
2194         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2195         (u8_mbtouc_aux): Move out to separate file.
2196         (u8_mbtouc): Use ucs4_t, uint8_t types.
2197         * lib/unistr/utf8-ucs4.c: New file.
2198
2199         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2200         (Depends-on): Add unitypes.
2201         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2202         (u16_mbtouc_aux): Move out to separate file.
2203         (u16_mbtouc): Use ucs4_t, uint16_t types.
2204         * lib/unistr/utf16-ucs4.c: New file.
2205
2206         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2207         (Depends-on): Add unitypes.
2208         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2209         (u8_uctomb_aux): Move out to separate file.
2210         (u8_uctomb): Use ucs4_t, uint8_t types.
2211         * lib/unistr/ucs4-utf8.c: New file.
2212
2213         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2214         (Depends-on): Add unitypes.
2215         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2216         (u16_uctomb_aux): Move out to separate file.
2217         (u16_uctomb): Use ucs4_t, uint16_t types.
2218         * lib/unistr/ucs4-utf16.c: New file.
2219
2220 2006-12-25  Bruno Haible  <bruno@clisp.org>
2221
2222         * modules/unitypes: New file.
2223         * lib/unitypes.h: New file.
2224         * MODULES.html.sh (func_all_modules): New section "Unicode string
2225         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2226         this section. Add unitypes.
2227
2228 2007-01-08  Bruno Haible  <bruno@clisp.org>
2229
2230         Avoid variable names that conflict with those from libtool.
2231         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2232         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2233         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2234         library_names_spec to acl_library_names_spec, hardcode_* to
2235         acl_hardcode_*.
2236         Reported by Ralf Wildenhues.
2237
2238 2007-01-08  Bruno Haible  <bruno@clisp.org>
2239
2240         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2241         definition.
2242         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2243         definition.
2244         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2245         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2246         definition.
2247         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2248         definition.
2249         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2250         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2251         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2252         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2253         definition.
2254         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2255         definition.
2256         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2257         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2258         GC_USE_<algorithm>.
2259         * lib/gc-libgcrypt.c: Likewise.
2260         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2261         * modules/gc-arctwo (configure.ac): Likewise.
2262         * modules/gc-des (configure.ac): Likewise.
2263         * modules/gc-hmac-md5 (configure.ac): Likewise.
2264         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2265         * modules/gc-md2 (configure.ac): Likewise.
2266         * modules/gc-md4 (configure.ac): Likewise.
2267         * modules/gc-md5 (configure.ac): Likewise.
2268         * modules/gc-random (configure.ac): Likewise.
2269         * modules/gc-rijndael (configure.ac): Likewise.
2270         * modules/gc-sha1 (configure.ac): Likewise.
2271
2272 2007-01-08  Bruno Haible  <bruno@clisp.org>
2273
2274         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2275         macro definition.
2276         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2277         definition.
2278         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2279         definition.
2280         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2281         * modules/fcntl-safer (configure.ac): Likewise.
2282         * modules/fopen-safer (configure.ac): Likewise.
2283         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2284         GNULIB_FWRITEERROR macro definition.
2285
2286 2007-01-08  Bruno Haible  <bruno@clisp.org>
2287
2288         * m4/gnulib-common.m4: New file.
2289         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2290         (func_get_filelist): Add m4/gnulib-common.m4.
2291
2292 2007-01-08  Bruno Haible  <bruno@clisp.org>
2293
2294         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2295         command.
2296
2297 2007-01-08  Jim Meyering  <jim@meyering.net>
2298
2299         Use a more robust test for a "can't happen" condition.
2300         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2301         narrowed the st_size value.  Presuming the "can't happen" condition
2302         is true, that narrowing could conceivably convert an invalid st_size
2303         value into a valid one.  Instead, use a change based on Matthew
2304         Woehlke's original patch.
2305
2306         Slight readability improvement: use an assert-like macro
2307         in place of literal "abort ()" uses.
2308         * lib/fts.c (fts_assert): Define.
2309         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2310         Use this macro instead of a bare 'abort'.
2311
2312 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2313
2314         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2315         simply work around them.
2316         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2317         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2318         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2319         Don't bother to define as macros, since the standard doesn't require it.
2320         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2321         longer worry about IRIX 5.3.
2322         (HAVE_WCTYPE_CTMP_BUG): Remove.
2323
2324 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2325
2326         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2327         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2328         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2329         Problems reported by Georg Schwarz for IRIX 5.3.
2330
2331         * gnulib-tool (autoconf_minversion): Take the maximum version number
2332         found, not the minimum.  Problem reported by James Youngman.
2333
2334 2007-01-03  Karl Berry  <karl@gnu.org>
2335
2336         * doc/error.texi: new file, explaining interaction with progname.
2337         * doc/gnulib.texi: include it.  Update copyright.
2338
2339 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2340
2341         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2342         AC_CANONICAL_HOST, to improve autobuild outputs.
2343
2344 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2345             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2346
2347         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2348         sockets, server sockets, and other file descriptors.  Count errors
2349         to compute the return value.  Reorder the code a bit to be easier
2350         to follow.  Don't set event bits that were not requested (except
2351         POLLERR and POLLHUP).
2352
2353 2007-01-01  Bruno Haible  <bruno@clisp.org>
2354
2355         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2356
2357 2007-01-03  Jim Meyering  <jim@meyering.net>
2358
2359         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2360
2361 2007-01-02  Bruno Haible  <bruno@clisp.org>
2362
2363         * modules/settime (Include): Require timespec.h.
2364         * modules/nanosleep (Include): Likewise.
2365
2366 2007-01-01  Bruno Haible  <bruno@clisp.org>
2367
2368         * gnulib-tool (func_emit_copyright_notice): Bump year.
2369         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2370
2371 2007-01-01  Bruno Haible  <bruno@clisp.org>
2372
2373         Improve support for OpenBSD.
2374         * build-aux/config.rpath (libname_spec): Export.
2375         (library_names_spec): New variable. Export.
2376         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2377         library_names_spec from the config.rpath output. Locate shared library
2378         through the name pattern in library_names_spec.
2379
2380 2007-01-01  Eric Blake  <ebb9@byu.net>
2381
2382         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2383
2384 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2385
2386         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2387         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2388         assume the C locale, and avoid an "eval" that could cause trouble.
2389         Problem with SORT reported by Bob Proulx.
2390
2391         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2392         Define.  Trivial patch from Henning Nielsen Lund, originally
2393         sent to bug-grep@gnu.org today.
2394
2395 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2396
2397         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2398         struct stat.  Problem reported by Henning Nielsen Lund.
2399         * lib/acl.c: Include acl.h first, to check interface.  Don't
2400         bother to include sys/types.h and sys/stat.h again.
2401
2402 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2403
2404         Import the following change from libc; problem reported by
2405         Sven Verdoolaege.
2406
2407         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2408
2409         [BZ #1373]
2410         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2411
2412 2006-12-28  Jim Meyering  <jim@meyering.net>
2413
2414         * build-aux/announce-gen: Do not assume that the package
2415         builds any of tar.gz, tar.bz2, and .xdelta files.
2416         Suggestion from Simon Josefsson.
2417
2418 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2419
2420         * modules/announce-gen: New file.
2421
2422 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2423
2424         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2425         handles its gotchas now.
2426         * lib/mbswidth.c: Likewise.
2427         * lib/wcwidth.h: Likewise.
2428         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2429         and iswcntrl; the wctype module does this stuff now.
2430         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2431         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2432         * modules/mbchar (Depends-on): Add wctype.
2433         * modules/mbswidth (Depends-on): Likewise.
2434         * modules/wcwidth (Depends-on): Likewise.
2435
2436 2006-12-27  Eric Blake  <ebb9@byu.net>
2437
2438         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2439         module uses more than what <wctype.h> is required to provide.
2440
2441 2006-12-26  Eric Blake  <ebb9@byu.net>
2442
2443         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2444
2445 2006-12-26  Eric Blake  <ebb9@byu.net>
2446
2447         * modules/absolute-header: New module.
2448         * modules/fcntl (Depends-on): Depend on it.
2449         * modules/inttypes (Depends-on): Likewise.
2450         * modules/stdint (Depends-on): Likewise.
2451         * modules/sys_stat (Depends-on): Likewise.
2452         * modules/wctype (Depends-on): Likewise.
2453         * MODULES.html.sh (Support for building libraries and
2454         executables): Document it.
2455
2456 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2457
2458         * gnulib-tool (SED): Remove, undoing previous change.
2459         The problem was that it broke coreutils on Solaris, because
2460         "sed --posix" leaked into a makefile.
2461         (sed): New alias, if 'alias' and GNU sed.
2462
2463 2006-12-24  Jim Meyering  <jim@meyering.net>
2464
2465         Work around an fchownat bug in glibc-2.4:
2466         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2467         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2468         in spite of the -P option.
2469         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2470         New macros.
2471         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2472         * modules/openat (Files): Add lib/fchownat.c.
2473         * lib/openat.c (fchownat): Don't define here.  Move to...
2474         * lib/fchownat.c: ...this new file.
2475
2476 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2477
2478         Fix bug reported by Bruno Haible in
2479         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2480         where quotearg.c didn't compile on Mac OS X 10.2 because it
2481         lacks <wchar.h> and wint_t.
2482         * lib/wctype_.h (__wctype_wint_t): New type.
2483         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2484         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2485         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2486         Arg is now of type __wctype_wint_t, not wint_t.
2487         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2488         substitute HAVE_WINT_T.
2489         * modules/wctype (Files): Add m4/wint_t.m4.
2490         (wctype.h): Substitute HAVE_WINT_T.
2491
2492 2006-12-23  Bruno Haible  <bruno@clisp.org>
2493
2494         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2495
2496 2006-12-23  Bruno Haible  <bruno@clisp.org>
2497
2498         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2499         S_ISLNK.
2500         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2501         mingw.
2502
2503 2006-12-22  Bruno Haible  <bruno@clisp.org>
2504
2505         * lib/copy-file.c: Include acl.h.
2506         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2507         Close the file descriptors only after being done with copy_acl.
2508         * modules/copy-file (Depends-on): Add acl.
2509
2510 2006-12-22  Bruno Haible  <bruno@clisp.org>
2511
2512         * gnulib-tool (SED): New variable.
2513         Use $SED instead of sed everywhere.
2514
2515 2006-12-22  Bruno Haible  <bruno@clisp.org>
2516
2517         * modules/no-c++: New file.
2518         * m4/no-c++.m4: New file.
2519         * MODULES.html.sh (Support for building libraries and executables):
2520         Add no-c++.
2521
2522 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2523
2524         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2525         Include <limits.h>, and use its INT_MAX to rewrite the
2526         j loop so that it does not overflow 'int'.  Problem reported by
2527         Ralf Wildenhues in
2528         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2529         Play it safe by shifting left by 1 rather than multiplying by 2,
2530         as GCC is less likely to optimize this away when the value
2531         is signed (when it assumes overflow leads to undefined behavior).
2532         Also, don't assume time_t uses two's complement.
2533
2534 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2535
2536         * MODULES.html.sh: New module wctype.
2537         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2538         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2539         <wctype.h>, since the new wctype module should fix this.
2540         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2541         the wctype module should arrange for it.
2542         * lib/regex_internal.h: Likewise.
2543         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2544         since the wctype module should handle this now.
2545         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2546         * modules/fnmatch (Depends-on): Add wctype.
2547         * modules/quotearg (Depends-on): Likewise.
2548         * modules/regex (Depends-on): Likewise.
2549
2550 2006-12-19  Bruno Haible  <bruno@clisp.org>
2551
2552         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2553         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2554
2555 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2556
2557         * modules/savewd (Depends-on): Fix dependency on fcntl.
2558
2559 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2560
2561         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2562         conforms to C99, rather than relying on the user's environment
2563         setting of STDINT_H.
2564
2565 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2566         and Eric Blake  <ebb9@byu.net>
2567
2568         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2569         This is more consistent with the other defines here.
2570         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2571         Port to z/OS.  Problem reported by Paul Gilmartin.
2572         Change local vars to use gl_ prefix rather than ac_.
2573         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2574         with other defines.
2575         * modules/double-slash-root: New module.
2576         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2577         (Depends-on): Add double-slash-root.
2578         * MODULES.html.sh (File system functions): Mention new module.
2579
2580 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2581
2582         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2583         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2584         This is for the benefit of gzip, which doesn't do i18n.
2585
2586 2006-12-12  Jim Meyering  <jim@meyering.net>
2587
2588         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2589         Reported by Andreas Schwab <schwab@suse.de>.
2590
2591 2006-12-12  Bruno Haible  <bruno@clisp.org>
2592
2593         Merge these changes.
2594         2006-09-05  Bruno Haible  <bruno@clisp.org>
2595         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2596         iconv_alloc succeeded.
2597         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2598         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2599         test for " && dest " at the end - dest is always != NULL there. Call
2600         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2601         with 2xNULL arguments, also to flush the state storage. Handle the
2602         IRIX iconv behaviour. Realloc the final result, to throw away unused
2603         memory.
2604
2605 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2606
2607         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2608         and fchmodat unconditionally, since glibc 2.4 has them.
2609         Problem reported by Arkadiusz Miskiewicz.
2610
2611 2006-12-10  Bruno Haible  <bruno@clisp.org>
2612
2613         * gnulib-tool (func_import): Show the include files only for those
2614         modules that are copied and specified.
2615         Reported by Karl Berry.
2616
2617 2006-12-08  Jim Meyering  <jim@meyering.net>
2618
2619         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2620         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2621
2622         * build-aux/announce-gen: Add two new options, both optional:
2623         --bootstrap-tools=TOOL_LIST
2624               a comma-separated list of tools, e.g.,
2625               autoconf,automake,bison,gnulib
2626         --gnulib-snapshot-date=DATE
2627               if gnulib is in the bootstrap tool list,
2628               then report this as the snapshot date.
2629               If not specified, use the current date/time.
2630               If you specify a date here, be sure it's UTC.
2631
2632 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2633
2634         * tests/test-argp-2.sh: Fix test to match actual output.
2635         (func_compare): Fix sed script to be portable.
2636
2637 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2638
2639         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2640         workaround for this case.  It is not autoconfigured now; offhand
2641         it's hard to see how to autoconfigure it.
2642
2643 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2644
2645         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2646         a directory that is about to be chowned.  Such a directory's
2647         initial file permissions should permit the owner only and this
2648         should not be changed until after the chown, since the group and
2649         other bits would be incorrect if they granted permission before
2650         the chown.
2651
2652         Fix porting problem for iswctype reported by Georg Schwarz in:
2653         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2654         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2655         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2656         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2657         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2658
2659 2006-12-03  Jim Meyering  <jim@meyering.net>
2660
2661         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2662         p->fts_statp may not yet be defined.
2663         (fts_read): Instead, set it in the caller, once p->fts_statp is
2664         sure to be defined, and corresponds to a top-level directory.
2665         This bug made du -x fail.  Here's the coreutils test case:
2666         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2667         Reported by Mike Frysinger.
2668
2669 2006-12-01  Jim Meyering  <jim@meyering.net>
2670
2671         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2672         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2673         Reported by Simon Josefsson.
2674
2675 2006-11-30  Jim Meyering  <jim@meyering.net>
2676
2677         * m4/warning.m4: Use the all-permissive copyright notice
2678         recommended by RMS (rather than LGPL).
2679         * m4/vararrays.m4: Likewise.
2680         * m4/flexmember.m4: Likewise.
2681
2682 2006-11-29  Bruno Haible  <bruno@clisp.org>
2683
2684         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2685         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2686         using +=.
2687         Reported by Simon Josefsson <simon@josefsson.org>.
2688
2689 2006-11-28  James Youngman <jay@gnu.org>
2690
2691         * README: Advise users that they might find the bug-gnulib@gnu.org
2692         and autotools-announce@gnu.org mailing lists useful.
2693
2694 2006-11-28  Bruno Haible  <bruno@clisp.org>
2695
2696         * m4/ptrdiff_max.m4: Remove file.
2697
2698 2006-11-21  Bruno Haible  <bruno@clisp.org>
2699
2700         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2701         _AC_COMPUTE_INT.
2702         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2703         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2704         _AC_COMPUTE_INT.
2705         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2706         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2707         _AC_COMPUTE_INT.
2708         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2709
2710 2006-11-28  Jim Meyering  <jim@meyering.net>
2711
2712         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2713         warning from "gcc -Wshadow" about shadowing the builtin.
2714
2715 2006-11-27  Bruno Haible  <bruno@clisp.org>
2716
2717         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2718         _AC_COMPUTE_INT.
2719         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2720
2721 2006-11-27  Bruno Haible  <bruno@clisp.org>
2722             Paul Eggert  <eggert@cs.ucla.edu>
2723
2724         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2725
2726 2006-11-26  Bruno Haible  <bruno@clisp.org>
2727
2728         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2729         noinst_LTLIBRARIES.
2730
2731 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2732             Bruno Haible  <bruno@clisp.org>
2733
2734         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2735         if compiling with "gcc -ansi".
2736
2737 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2738
2739         Fix some incompatibilities with gcc -ansi -pedantic.
2740         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2741         if compiling pedantically with GCC, unless it's C99 or later.
2742         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2743         it mishandles gcc -ansi -pedantic as well.
2744         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2745         if gcc -pedantic.
2746         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2747         initializers for struct if -pedantic, unless it's C99 or later.
2748
2749 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2750
2751         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2752         Don't close an fd more than once. Identical atimes indicate
2753         success, not failure.
2754
2755 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2756
2757         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2758
2759 2006-11-23  Jim Meyering  <jim@meyering.net>
2760
2761         * build-aux/announce-gen: New file.  From coreutils.
2762
2763 2006-11-22  Jim Meyering  <jim@meyering.net>
2764
2765         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2766         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2767         (fts_read): Use a temporary to narrow the overused st_size member
2768         before using it in a switch statement.  Reported by Matthew Woehlke.
2769
2770         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2771         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2772
2773 2006-11-20  Bruno Haible  <bruno@clisp.org>
2774
2775         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2776         changequote instead of pairs of brackets.
2777         Reported by Andreas Schwab <schwab@suse.de>.
2778
2779 2006-11-21  Jim Meyering  <jim@meyering.net>
2780
2781         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2782         so as to remain compatible with older compilers.
2783         Patch from Michael Deutschmann.
2784
2785 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2786
2787         * MODULES.html.sh (File system functions): Add openat.
2788
2789         * lib/openat.h (rpl_fstatat): New macro, if
2790         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2791         (fstatat): Define to rpl_fstatat under the same conditions,
2792         unless COMPILING_FSTATAT.
2793         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2794         seems to have the bug.
2795         * lib/fstatat.c: New file.
2796         * modules/openat (Files): Add it.
2797
2798 2006-11-20  Bruno Haible  <bruno@clisp.org>
2799
2800         * Makefile: New file.
2801
2802 2006-11-20  Jim Meyering  <jim@meyering.net>
2803
2804         The beginnings of syntax-related checks for gnulib.
2805         * lib/Makefile: New file.
2806         * lib/t-idcache: New script.  Ensure that the two halves of
2807         idcache.c stay in sync.
2808
2809         * lib/idcache.c: Adjust comments in user- and group- portions to
2810         be more accurate, and to be consistent with one another.
2811
2812 2006-11-20  Jim Meyering  <jim@meyering.net>
2813
2814         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2815         continue using the flexible array member (thus, this module performs
2816         half as many malloc calls), with the addition that...
2817         (getgroup, getuser): Consistently record a non-match via an empty
2818         "name" string, and map an empty string match to a NULL return value.
2819         * modules/idcache (Depends-on): Re-add flexmember.
2820
2821         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2822         (getuidbyname, getgroup, getgidbyname): Likewise.
2823
2824         Use cleaner syntax: NULL rather than 0.
2825         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2826
2827 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2828
2829         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2830         It mishandled the case where the group was missing.
2831         Problem reported by Greg Schafer.
2832         * modules/idcache: Likewise.
2833
2834 2006-11-18  Jim Meyering  <jim@meyering.net>
2835
2836         * check-module (%exempt_header): Add exception for some
2837         conditionally-included headers.
2838
2839         * modules/i-ring (Depends-on): Add verify.
2840         (License): Change to LGPL.
2841
2842 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2843
2844         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2845         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2846         and inttostr.h.  Use snprintf rather than uinttostr, so that
2847         LGPLed code doesn't depend on GPLed.
2848
2849 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2850
2851         * modules/inline (License): Change from GPL to LGPL.
2852
2853 2006-11-17  Jim Meyering  <jim@meyering.net>
2854
2855         * modules/d-type (License): Switch to LGPL.
2856
2857 2006-11-15  Bruno Haible  <bruno@clisp.org>
2858
2859         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2860
2861 2006-11-15  Eric Blake  <ebb9@byu.net>
2862
2863         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2864         the module dependency.
2865
2866 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2867             Bruno Haible  <bruno@clisp.org>
2868
2869         * gnulib-tool (func_create_testdir): Add license consistency check.
2870
2871 2006-11-15  Eric Blake  <ebb9@byu.net>
2872
2873         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2874         random "(cached)" in configure output.
2875
2876 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2877
2878         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2879         test for conforming inttypes.h is both announced and cached.
2880
2881         * MODULES.html.sh (seen_modules, seen_files): New variables.
2882         (func_module): Rewrite to use a few less gnulib-tool and sed
2883         invocations.  Avoid a couple of quadratic algorithms for ...
2884         (missed_modules, missed_files): ... these, with ...
2885         (func_append, func_tmpdir): ... these new functions, from
2886         gnulib-tool.  Analogously, install traps for cleanup.
2887
2888         * tests/test-gc.c (main): Remove unused variables.
2889         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2890
2891 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2892
2893         * modules/inttostr (License): Change to LGPL.
2894
2895 2006-11-14  Eric Blake  <ebb9@byu.net>
2896
2897         * modules/tempname (License): Change to LGPL.
2898
2899 2006-11-14  Eric Blake  <ebb9@byu.net>
2900
2901         * doc/functions.texi (Function Portability): *printf functions on
2902         Cygwin now understand all POSIX size specifiers.
2903
2904 2006-11-14  Bruno Haible  <bruno@clisp.org>
2905
2906         * modules/c-ctype (License): Change to LGPL.
2907
2908 2006-11-12  Bruno Haible  <bruno@clisp.org>
2909
2910         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2911         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2912         for GNOME libraries, for which the include files are installed in
2913         subdirectories of $prefix/include.
2914
2915 2006-11-12  Bruno Haible  <bruno@clisp.org>
2916
2917         * m4/lib-link.m4: Require at least autoconf-2.54.
2918         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2919         name to underscores for the --with option.
2920
2921 2006-11-13  Bruno Haible  <bruno@clisp.org>
2922
2923         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2924         the tests directory.
2925         Reported by Ralf Wildenhues.
2926
2927 2006-11-13  Bruno Haible  <bruno@clisp.org>
2928
2929         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2930         (func_emit_initmacro_end): Undo the override here.
2931         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2932         Works around the famous automake error in coreutils.
2933
2934 2006-11-13  Eric Blake  <ebb9@byu.net>
2935
2936         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2937         element, not its node.
2938
2939 2006-11-12  Bruno Haible  <bruno@clisp.org>
2940
2941         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2942         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2943
2944 2006-11-12  Bruno Haible  <bruno@clisp.org>
2945
2946         * gnulib-tool: New option --local-symlink.
2947         (func_usage): Document it.
2948         (lsymbolic): New variable.
2949         (func_import, func_create_testdir): If --symlink was not specified,
2950         test whether --local-symlink was specified and the file comes from
2951         the local_gnulib_dir.
2952
2953 2006-11-12  Bruno Haible  <bruno@clisp.org>
2954
2955         * gnulib-tool (func_ln): New function.
2956         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2957
2958 2006-11-12  Bruno Haible  <bruno@clisp.org>
2959
2960         Finish support for source files in subdirectories.
2961         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2962         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2963         AUTOMAKE_OPTIONS.
2964         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2965
2966 2006-11-12  Bruno Haible  <bruno@clisp.org>
2967
2968         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2969         EXTRA_lib_SOURCES augmentation.
2970         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2971
2972 2006-11-12  Jim Meyering  <jim@meyering.net>
2973
2974         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2975         file descriptors.  This also averts a failure on systems with
2976         native openat support when a traversed directory lacks "x" access.
2977         * lib/fts_.h: Include "i-ring.h"
2978         (struct FTS) [fts_fd_ring]: New member.
2979         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2980         (FCHDIR): Add parentheses.
2981         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2982         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2983         When descending, rather than simply closing the previous
2984         fts_cwd_fd value, push that file descriptor onto the ring.
2985         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2986         (fts_open): Initialize the new fd_ring member.
2987         (fts_close): Clear the ring.
2988         (fts_safe_changedir): When possible, use our new fd_ring to skip
2989         the diropen and fstat and dev/ino comparison that would normally
2990         accompany a virtual `chdir ("..")'.
2991
2992         * modules/fts (Depends-on): Add i-ring.
2993         * modules/i-ring: New module.
2994         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2995         * m4/i-ring.m4: New file.
2996
2997 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2998
2999         * gnulib-tool (func_create_testdir): Fix replacement of
3000         `build-aux' in configure.ac.  Run autotools in gltests
3001         subdirectory.
3002         (func_create_testdir, func_create_megatestdir, test): There is
3003         no need for '--force' in most autotool invocations in a new
3004         tree.  Actually fail the whole test if any of the tools, or the
3005         configure or make stages fail.
3006
3007         Sync from Automake.
3008         * build-aux/gnupload: Revert last change.  Add pointer to upload
3009         instructions of the GNU Maintenance Instructions.
3010         Suggestion by Karl Berry.
3011
3012 2006-11-10  Jim Meyering  <jim@meyering.net>
3013
3014         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3015
3016 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3017
3018         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3019         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3020         (bind_textdomain_codeset) [! ENABLE_NLS]:
3021         Evaluate all the arguments.  That way, callers get compatible behavior
3022         if the arguments have side effects.  Also, it avoids some GCC
3023         diagnostics in some cases; Joel E. Denny reported problems when Bison
3024         was configured with --enable-gcc-warnigs.
3025
3026 2006-11-10  Jim Meyering  <jim@meyering.net>
3027
3028         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3029         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3030         account.
3031
3032 2006-11-10  Jim Meyering  <jim@meyering.net>
3033
3034         * modules/inline: New file/module.
3035         * modules/xalloc (Files): Remove m4/inline.m4.
3036         (Depends-on): Add inline, instead.
3037         * modules/oset: Likewise.
3038         * modules/list: Likewise.
3039
3040 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3041
3042         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3043         Problem reported by Matthew Woehlke.
3044
3045 2006-11-09  Bruno Haible  <bruno@clisp.org>
3046
3047         * lib/tempname.c (gen_tempname): Remove variant that invokes
3048         __gen_tempname.
3049         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3050         __gen_tempname.
3051
3052 2006-11-08  Bruno Haible  <bruno@clisp.org>
3053
3054         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3055         to 'yes' instead of 'cross-compiling'.
3056
3057 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3058
3059         * lib/quotearg.h (quotearg_free): New decl.
3060         * lib/quotearg.c (quotearg_free): New function.
3061         (slot0, nslots, slotvec0, slotvec):
3062         Now file-scope so that quotearg_free can get at them.
3063
3064 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3065
3066         Sync from Automake.
3067         * build-aux/gnupload: Add missing 'gnu' to example URL.
3068         Report by Karl Berry.
3069
3070 2006-11-08  Bruno Haible  <bruno@clisp.org>
3071
3072         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3073         Suggested by Paul Eggert.
3074
3075 2006-11-08  Jim Meyering  <jim@meyering.net>
3076
3077         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3078         It's already included if !_LIBC.
3079         (fts_safe_changedir): Add a comment.
3080
3081 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3082
3083         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3084         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3085         Matthew Woehlke.
3086
3087         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3088         definitions up, to avoid colliding with change below.
3089         (static_inline) [HAVE_INLINE]: New macro.
3090         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3091         Provide extern decls when !HAVE_INLINE.  Do not define unless
3092         static_inline is defined, either by us or by xmalloc.c.  Use
3093         static_inline rather than static inline.
3094         (XCALLOC): Optimize sizeof(T) = 1 case.
3095         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3096
3097 2006-11-07  Bruno Haible  <bruno@clisp.org>
3098
3099         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3100         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3101         AC_C_INLINE.
3102         * modules/xalloc (Files): Add m4/inline.m4.
3103
3104 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3105
3106         * README: Fix typo.
3107         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3108         (Miscellanous Notes): ...from this.
3109
3110 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3111
3112         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3113         Mention that offsetof should be used instead of sizeof.
3114         From Bruno Haible.
3115
3116 2006-11-07  Bruno Haible  <bruno@clisp.org>
3117
3118         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3119
3120 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3121
3122         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3123         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3124         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3125         (gl_tree_add_before, gl_tree_add_after):
3126         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3127         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3128         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3129         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3130         (gl_linked_add_after, gl_linked_add_at): Likewise.
3131         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3132         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3133         (gl_tree_add_before, gl_tree_add_after): Likewise.
3134         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3135         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3136         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3137
3138 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3139
3140         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3141
3142 2006-11-06  Bruno Haible  <bruno@clisp.org>
3143
3144         * m4/inline.m4: New file.
3145         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3146         * modules/list (Files): Add m4/inline.m4.
3147         * modules/oset (Files): Likewise.
3148
3149 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3150
3151         * lib/idcache.c: Include <stddef.h>, for offsetof.
3152         (struct userid.name): Change from char * to a flexible array member.
3153         All uses changed.
3154         * modules/idcache (Depends-on): Add flexmember.
3155
3156         * MODULES.html.sh (Core language properties): New module flexmember.
3157         * modules/flexmember, m4/flexmember.m4: New files.
3158
3159         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3160         inline functions that are identical with the old xnmalloc_inline,
3161         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3162         that we can avoid some unnecessary integer multiplications and
3163         divisions in the common case where the element size is known at
3164         compile time.
3165         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3166         needed.
3167         (xnboundedmalloc): Remove.
3168         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3169         arguments, for consistency with rest of this header.
3170         (xcharalloc): Rewrite using XNMALLOC.
3171         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3172         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3173         versions have been moved to lib/xalloc.h and renamed to be the
3174         non-*_inline versions.
3175         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3176         and xnrealloc functions, since those functions are now inline and
3177         now call us.
3178         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3179         renaming described above.
3180         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3181         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3182         captures the dependency in AC_C_INLINE.
3183
3184         New module canonicalize-lgpl, proposed by Charles Wilson in
3185         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3186         with a few small changes afterwards.
3187         * MODULES.html.sh (File system functions): New module
3188         canonicalize-lgpl.
3189         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3190         and canonicalize_file_name.
3191         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3192         * modules/canonicalize-lgpl: New files.
3193
3194 2006-11-05  Bruno Haible  <bruno@clisp.org>
3195
3196         * gnulib-tool (func_import, func_create_testdir): Create directories
3197         also for files in subdirectories of lib/.
3198
3199 2006-11-05  Bruno Haible  <bruno@clisp.org>
3200
3201         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3202         ANSI C compliant.
3203
3204 2006-11-03  Bruno Haible  <bruno@clisp.org>
3205
3206         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3207         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3208         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3209         (xnboundedmalloc): New inline function.
3210         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3211         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3212         xmalloc.
3213         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3214         xmalloc.
3215         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3216         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3217         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3218         xmalloc.
3219         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3220         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3221         xmalloc.
3222         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3223         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3224         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3225         xmalloc.
3226         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3227         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3228         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3229         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3230         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3231         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3232         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3233
3234 2006-11-03  Bruno Haible  <bruno@clisp.org>
3235
3236         * lib/c-ctype.h [C++]: Define functions without name mangling.
3237         * lib/fwriteerror.h [C++]: Likewise.
3238         * lib/gcd.h [C++]: Likewise.
3239         * lib/linebreak.h [C++]: Likewise.
3240
3241 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3242
3243         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3244         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3245         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3246         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3247         Check for functions and headers just once.
3248         Check for declaration of canonicalize_file_name.
3249         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3250
3251 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3252
3253         * gnulib-tool (func_import): Fix typo in actioncmd.
3254
3255 2006-11-02  Bruno Haible  <bruno@clisp.org>
3256
3257         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3258         newline sequence in the Makefile.am snippet as a space, like "make"
3259         does.
3260         Reported by Roger Persson <perrog@gmail.com>.
3261
3262 2006-11-01  Bruno Haible  <bruno@clisp.org>
3263
3264         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3265         already declared in <string.h>.
3266         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3267
3268 2006-11-01  Bruno Haible  <bruno@clisp.org>
3269
3270         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3271         * lib/strcase.h: Include <string.h>.
3272         (strcasecmp): Define to rpl_strcasecmp here.
3273
3274 2006-11-01  Bruno Haible  <bruno@clisp.org>
3275
3276         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3277
3278 2006-11-01  Eric Blake  <ebb9@byu.net>
3279
3280         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3281
3282         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3283
3284 2006-10-29  Bruno Haible  <bruno@clisp.org>
3285
3286         Make it compile in C++ mode.
3287         * lib/full-write.c (full_rw): Add a cast.
3288
3289 2006-11-01  Bruno Haible  <bruno@clisp.org>
3290
3291         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3292         be POSIX compliant.
3293         Reported by Roger Persson <perrog@gmail.com>.
3294
3295 2006-11-01  Eric Blake  <ebb9@byu.net>
3296
3297         * lib/getopt_.h: Fix comments.
3298
3299 2006-10-31  Eric Blake  <ebb9@byu.net>
3300
3301         * modules/tmpdir (Depends-on): Add sys_stat.
3302         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3303         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3304         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3305         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3306         tempname.
3307
3308 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3309
3310         Avoid some C++ diagnostics reported by Bruno Haible.
3311         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3312         xmalloc.
3313         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3314         (struct slotvec): Move to top level.
3315         (quotearg_n_options): Rewrite to avoid xmalloc.
3316         * lib/xalloc.h (xcharalloc): New function.
3317         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3318         [defined __cplusplus]: Add function template that provides result
3319         type propagation.  This part of the change is from Bruno Haible.
3320
3321 2006-10-29  Bruno Haible  <bruno@clisp.org>
3322
3323         Make it compile in C++ mode.
3324         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3325         * lib/strnlen1.c (strnlen1): Cast memchr result.
3326         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3327         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3328         (create_temp_dir): Rename local variable 'template'.
3329         (compile_csharp_using_sscli): Add cast.
3330         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3331         * lib/findprog.c (find_in_path): Likewise.
3332         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3333         * lib/wait-process.c (register_slave_subprocess): Likewise.
3334
3335 2006-10-22  Bruno Haible  <bruno@clisp.org>
3336
3337         * modules/tsearch: New file.
3338         * lib/tsearch.h: New file.
3339         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3340         * m4/tsearch.m4: New file.
3341         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3342
3343 2006-10-29  Eric Blake  <ebb9@byu.net>
3344
3345         * lib/arcfour.c: Assume config.h.
3346         * lib/arctwo.c: Likewise.
3347         * lib/base64.c: Likewise.
3348         * lib/check-version.c: Likewise.
3349         * lib/crc.c: Likewise.
3350         * lib/des.c: Likewise.
3351         * lib/gc-gnulib.c: Likewise.
3352         * lib/gc-libgcrypt.c: Likewise.
3353         * lib/gc-pbkdf2-sha1.c: Likewise.
3354         * lib/getaddrinfo.c: Likewise.
3355         * lib/getdelim.c: Likewise.
3356         * lib/getline.c: Likewise.
3357         * lib/hmac-md5.c: Likewise.
3358         * lib/hmac-sha1.c: Likewise.
3359         * lib/iconvme.c: Likewise.
3360         * lib/md2.c: Likewise.
3361         * lib/md4.c: Likewise.
3362         * lib/memxor.c: Likewise.
3363         * lib/read-file.c: Likewise.
3364         * lib/readline.c: Likewise.
3365         * lib/rijndael-alg-fst.c: Likewise.
3366         * lib/rijndael-api-fst.c: Likewise.
3367         * lib/xgetdomainname.c: Likewise.
3368
3369 2006-10-28  Eric Blake  <ebb9@byu.net>
3370
3371         * lib/xstrndup.c: Assume config.h.
3372
3373 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3374
3375         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3376         stat-macros.h is now for our own macros, whereas stat_h is for
3377         macros in the <sys/stat.h> name space.
3378         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3379         (STAT_MACROS_H): Remove.
3380         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3381         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3382         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3383         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3384         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3385         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3386         Move these macros to ...
3387         * lib/stat_.h: here.  Don't include stat-macros.h.
3388         * lib/canonicalize.c: Don't include stat-macros.h.
3389         * lib/chown.c: Likewise.
3390         * lib/euidaccess.c: Likewise.
3391         * lib/file-type.c: Likewise.
3392         * lib/filemode.c: Likewise.
3393         * lib/glob.c: Likewise.
3394         * lib/isapipe.c: Likewise.
3395         * lib/lchown.c: Likewise.
3396         * lib/lstat.c: Likewise.
3397         * lib/mkdir-p.c: Likewise.
3398         * lib/rmdir.c: Likewise.
3399         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3400         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3401         unless mkdir isn't declared, to speed up 'configure'.
3402         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3403         would define all the S_* symbols.
3404         * modules/canonicalize (Depends-on):
3405         Depend on sys_stat, not stat-macros.
3406         * modules/chown: Likewise.
3407         * modules/euidaccess: Likewise.
3408         * modules/filemode: Likewise.
3409         * modules/file-type: Likewise.
3410         * modules/glob: Likewise.
3411         * modules/isapipe: Likewise.
3412         * modules/lchown: Likewise.
3413         * modules/lstat: Likewise.
3414         * modules/mkancesdirs: Likewise.
3415         * modules/rmdir: Likewise.
3416         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3417         * modules/modechange: Likewise.
3418         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3419         (configure.ac): Remove gl_STAT_MACROS.
3420         * modules/sys_stat (Depends-on): Remove stat-macros.
3421
3422 2006-10-27  Bruno Haible  <bruno@clisp.org>
3423
3424         * m4/signed.m4: Remove file.
3425         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3426         invocation.
3427         * modules/vasnprintf (Files): Remove m4/signed.m4.
3428
3429 2006-10-27  Bruno Haible  <bruno@clisp.org>
3430
3431         Update to GNU gettext 0.16.
3432         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3433         m4/inttypes-h.m4, m4/signed.m4.
3434         * m4/gettext.m4: Update to GNU gettext 0.16.
3435         * m4/intl.m4: New file, from GNU gettext.
3436         * m4/intldir.m4: New file, from GNU gettext.
3437         * config/srclist.txt: Update
3438
3439 2006-10-27  Eric Blake  <ebb9@byu.net>
3440
3441         * MODULES.html.sh: Document tempname.
3442         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3443         dependencies.
3444         (Files): Move lib/tempname.c...
3445         * modules/tempname: ...to this new module.
3446         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3447         (gl_PREREQ_TEMPNAME): Move...
3448         * m4/tempname.m4: ...to this new file.
3449         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3450         * modules/sys_stat (Depends-on): Add stat-macros.
3451         * lib/stat_.h (includes): Pick up stat macros.
3452         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3453         if stat macros are broken.
3454         * lib/tempname.c (includes): No need to include "stat-macros.h".
3455         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3456         (direxists, __path_search) [!_LIBC]: Don't compile these in
3457         gnulib; the tmpdir module covers that.
3458         * lib/tempname.h: New file.
3459
3460 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3461
3462         * COPYING: Explain how gnulib-tool converts licence headers.
3463         Almost all wording by Eric Blake.
3464
3465 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3466
3467         * lib/mbchar.h (is_basic_table): Make read-only.
3468         * lib/mbchar.c (is_basic_table): Likewise.
3469         Reported by John Darrington.
3470
3471 2006-10-25  Bruno Haible  <bruno@clisp.org>
3472
3473         * lib/progname.h (set_program_name): Undefine before defining.
3474
3475 2006-10-25  Bruno Haible  <bruno@clisp.org>
3476
3477         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3478         false for non-gcc C++ compilers.
3479         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3480
3481 2006-10-24  Bruno Haible  <bruno@clisp.org>
3482
3483         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3484         iconv implementations like Irix iconv.
3485
3486 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3487
3488         * modules/vararrays: New file.
3489         * m4/vararrays.m4: New file, taken from diffutils.
3490         * MODULES.html.sh: New module vararrays.
3491
3492 2006-10-24  Karl Berry  <karl@gnu.org>
3493
3494         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3495         Don't call GNU Unix.
3496
3497 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3498
3499         * users.txt: Add Libtool.
3500
3501         Sync from Libtool:
3502
3503         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3504
3505         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3506         to gnulib's policy of including config.h unconditionally.
3507
3508 2006-10-24  Bruno Haible  <bruno@clisp.org>
3509
3510         * modules/wcwidth (Files): Add m4/wint_t.m4.
3511         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3512         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3513
3514 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3515
3516         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3517         to pacify GCC with some -W flags enabled.  Problem reported by
3518         Bruno Haible.
3519
3520 2006-10-24  Jim Meyering  <jim@meyering.net>
3521
3522         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3523         Reported by Karl Berry.
3524
3525 2006-10-23  Bruno Haible  <bruno@clisp.org>
3526
3527         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3528
3529 2006-10-24  Bruno Haible  <bruno@clisp.org>
3530
3531         * lib/gl_list.h: Use C comment style, not C++ comment style.
3532
3533 2006-10-23  Eric Blake  <ebb9@byu.net>
3534
3535         * lib/getaddrinfo.c (includes): Add missing include.
3536
3537 2006-10-23  Bruno Haible  <bruno@clisp.org>
3538             Paul Eggert  <eggert@cs.ucla.edu>
3539
3540         Ability to rename obstack_free.
3541         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3542         obstack_free.
3543         (obstack_free): Invoke the __obstack_free macro.
3544         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3545
3546 2006-10-23  Bruno Haible  <bruno@clisp.org>
3547             Paul Eggert  <eggert@cs.ucla.edu>
3548
3549         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3550         __argc, __argv from the declaration. (They are defined as macros on
3551         mingw.)
3552
3553 2006-10-22  Bruno Haible  <bruno@clisp.org>
3554
3555         * doc/gnulib-intro.texi: New file.
3556         * doc/gnulib.texi: Include it.
3557
3558 2006-10-21  Bruno Haible  <bruno@clisp.org>
3559
3560         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3561         "Introduction", "Miscellanous Notes", "Particular Modules".
3562
3563 2006-10-21  Bruno Haible  <bruno@clisp.org>
3564
3565         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3566         Change mostlyclean-local rule to avoid sh syntax error from bash
3567         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3568
3569 2006-10-23  Jim Meyering  <jim@meyering.net>
3570
3571         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3572         in place of snprintf.
3573
3574         * modules/inttostr (Files): Add lib/uinttostr.c.
3575         * lib/uinttostr.c (inttostr): New file/function.
3576         * lib/inttostr.h (uinttostr): Declare.
3577         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3578         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3579         Add uinttostr.
3580         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3581
3582 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3583
3584         * lib/canonicalize.c (ELOOP): Define if not already defined.
3585         Problem reported by Bruno Haible in
3586         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3587
3588 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3589
3590         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3591         Problem reported by Perry Smith and Ville Laurikari.
3592
3593         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3594         uses.
3595
3596 2006-10-19  Bruno Haible  <bruno@clisp.org>
3597
3598         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3599         for mingw.
3600
3601 2006-10-19  Bruno Haible  <bruno@clisp.org>
3602
3603         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3604         Needed for mingw.
3605
3606 2006-10-19  Bruno Haible  <bruno@clisp.org>
3607
3608         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3609
3610 2006-10-19  Bruno Haible  <bruno@clisp.org>
3611
3612         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3613         it.
3614
3615 2006-10-19  Bruno Haible  <bruno@clisp.org>
3616
3617         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3618         invocation.
3619
3620 2006-10-19  Bruno Haible  <bruno@clisp.org>
3621
3622         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3623         mountlist by default.
3624
3625 2006-10-16  Bruno Haible  <bruno@clisp.org>
3626
3627         * lib/c-strstr.c: Include c-strstr.h.
3628
3629 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3630
3631         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3632         in a slash.
3633
3634 2006-10-18  Bruno Haible  <bruno@clisp.org>
3635
3636         * lib/lock.h [C++]: Wrap definitions in extern "C".
3637
3638 2006-10-18  Bruno Haible  <bruno@clisp.org>
3639
3640         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3641         gl_LIBOBJS list.
3642
3643 2006-10-18  Bruno Haible  <bruno@clisp.org>
3644
3645         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3646
3647 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3648
3649         * lib/xstrtol.h: Include gettext.h.
3650         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3651         Problem reported by Eric Blake.
3652         * modules/xstrtol (Depends-on): Add gettext-h.
3653
3654 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3655
3656         * lib/strftime.c (advance): New macro.
3657         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3658         incomplete type, so you can't add 0 to it.  Problem and patch
3659         reported by Eelco Dolstra for dietlibc.
3660
3661 2006-10-18  Jim Meyering  <jim@meyering.net>
3662
3663         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3664         type for a local, and rename it: s/up/user_proc/.
3665
3666 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3667
3668         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3669         READ_UTMP_USER_PROCESS.
3670         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3671
3672 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3673
3674         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3675         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3676
3677 2006-10-17  Eric Blake  <ebb9@byu.net>
3678
3679         * lib/sigprocmask.c (sigprocmask): Fix typo.
3680
3681         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3682
3683         * modules/clean-temp (Makefile.am): Don't add to make output...
3684         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3685         config.h.
3686
3687 2006-10-17  Bruno Haible  <bruno@clisp.org>
3688
3689         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3690         differently if DEFAULT_TEXT_DOMAIN is set.
3691
3692 2006-10-16  Bruno Haible  <bruno@clisp.org>
3693
3694         * lib/clean-temp.c: Include fwriteerror.h.
3695
3696 2006-10-16  Bruno Haible  <bruno@clisp.org>
3697
3698         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3699
3700 2006-10-16  Bruno Haible  <bruno@clisp.org>
3701
3702         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3703         * lib/sigprocmask.h: Include <sys/types.h>.
3704         (sigset_t): Use the system's definition if present.
3705
3706 2006-10-17  Eric Blake  <ebb9@byu.net>
3707
3708         * lib/xvasprintf.c (includes): Assume config.h.
3709         * lib/xasprintf.c (includes): Likewise.
3710
3711 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3712
3713         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3714         at least as wide as intmax_t.
3715
3716 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3717
3718         (Imported from Automake.)
3719         * build-aux/gnupload: Update to version 1.1 of directive file.
3720
3721 2006-10-16  Eric Blake  <ebb9@byu.net>
3722
3723         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3724         match Automake 1.10a.
3725
3726 2006-10-14  Bruno Haible  <bruno@clisp.org>
3727
3728         * modules/sigprocmask: New file.
3729         * lib/sigprocmask.h: New file.
3730         * lib/sigprocmask.c: New file.
3731         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3732         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3733         request sigprocmask.o.
3734         (gl_PREREQ_SIGPROCMASK): New macro.
3735         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3736         (Depends-on): Add sigprocmask.
3737         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3738         gt_SIGNALBLOCKING. Test for 'raise' only once.
3739         * lib/fatal-signal.c: Include sigprocmask.h.
3740         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3741         unblock_fatal_signals): Define always.
3742         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3743         sigprocmask.
3744
3745 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3746
3747         Sync from Automake.
3748         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3749         which incorrectly sets the mode of an existing destination
3750         directory.  In some cases the unpatched install-sh could do the
3751         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3752         system.  We hope this is rare in practice, but it's clearly worth
3753         fixing.  Problem reported by Alex Unleashed in
3754         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3755         Also, don't bother to check for -m bugs unless we're using -m;
3756         suggested by Stepan Kasal.
3757
3758 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3759
3760         Sync from Automake.
3761         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3762         `-c' flag, so they appear at the same position as in %FASTDEP%
3763         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3764         which ignores unknown options only after the first non-option.
3765         Bug report against M4 by Nelson H. F. Beebe.
3766
3767 2006-10-13  Jim Meyering  <jim@meyering.net>
3768
3769         Fix a bug in yesterday's change.
3770         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3771         p->fts_statp->st_dev would be used uninitialized.
3772         Ensures that we always call fts_stat on the very first entry.
3773         Miklos Szeredi reported that find -xdev stopped working.
3774
3775 2006-10-12  Bruno Haible  <bruno@clisp.org>
3776
3777         * gnulib-tool (func_get_automake_snippet): Append an automatically
3778         computed EXTRA_DIST augmentation.
3779         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3780         * modules/alloca-opt (Makefile.am): Likewise.
3781         * modules/allocsa (Makefile.am): Likewise.
3782         * modules/arcfour (Makefile.am): Likewise.
3783         * modules/arctwo (Makefile.am): Likewise.
3784         * modules/argmatch (Makefile.am): Likewise.
3785         * modules/argz (Makefile.am): Likewise.
3786         * modules/atexit (Makefile.am): Likewise.
3787         * modules/backupfile (Makefile.am): Likewise.
3788         * modules/byteswap (Makefile.am): Likewise.
3789         * modules/c-strtod (Makefile.am): Likewise.
3790         * modules/c-strtold (Makefile.am): Likewise.
3791         * modules/calloc (Makefile.am): Likewise.
3792         * modules/canon-host (Makefile.am): Likewise.
3793         * modules/canonicalize (Makefile.am): Likewise.
3794         * modules/chdir-long (Makefile.am): Likewise.
3795         * modules/chdir-safer (Makefile.am): Likewise.
3796         * modules/check-version (Makefile.am): Likewise.
3797         * modules/chown (Makefile.am): Likewise.
3798         * modules/cloexec (Makefile.am): Likewise.
3799         * modules/close-stream (Makefile.am): Likewise.
3800         * modules/closeout (Makefile.am): Likewise.
3801         * modules/crc (Makefile.am): Likewise.
3802         * modules/csharpexec (Makefile.am): Likewise.
3803         * modules/cycle-check (Makefile.am): Likewise.
3804         * modules/des (Makefile.am): Likewise.
3805         * modules/dev-ino (Makefile.am): Likewise.
3806         * modules/dirfd (Makefile.am): Likewise.
3807         * modules/dirname (Makefile.am): Likewise.
3808         * modules/dup2 (Makefile.am): Likewise.
3809         * modules/eealloc (Makefile.am): Likewise.
3810         * modules/error (Makefile.am): Likewise.
3811         * modules/euidaccess (Makefile.am): Likewise.
3812         * modules/exclude (Makefile.am): Likewise.
3813         * modules/exitfail (Makefile.am): Likewise.
3814         * modules/fcntl-safer (Makefile.am): Likewise.
3815         * modules/fcntl (Makefile.am): Likewise.
3816         * modules/file-type (Makefile.am): Likewise.
3817         * modules/fileblocks (Makefile.am): Likewise.
3818         * modules/filemode (Makefile.am): Likewise.
3819         * modules/filenamecat (Makefile.am): Likewise.
3820         * modules/fnmatch (Makefile.am): Likewise.
3821         * modules/fopen-safer (Makefile.am): Likewise.
3822         * modules/fpending (Makefile.am): Likewise.
3823         * modules/fprintftime (Makefile.am): Likewise.
3824         * modules/free (Makefile.am): Likewise.
3825         * modules/fsusage (Makefile.am): Likewise.
3826         * modules/ftruncate (Makefile.am): Likewise.
3827         * modules/fts (Makefile.am): Likewise.
3828         * modules/gc-arcfour (Makefile.am): Likewise.
3829         * modules/gc-des (Makefile.am): Likewise.
3830         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3831         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3832         * modules/gc-md4 (Makefile.am): Likewise.
3833         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3834         * modules/gc-sha1 (Makefile.am): Likewise.
3835         * modules/gc (Makefile.am): Likewise.
3836         * modules/getaddrinfo (Makefile.am): Likewise.
3837         * modules/getcwd (Makefile.am): Likewise.
3838         * modules/getdelim (Makefile.am): Likewise.
3839         * modules/getdomainname (Makefile.am): Likewise.
3840         * modules/getgroups (Makefile.am): Likewise.
3841         * modules/gethostname (Makefile.am): Likewise.
3842         * modules/gethrxtime (Makefile.am): Likewise.
3843         * modules/getline (Makefile.am): Likewise.
3844         * modules/getloadavg (Makefile.am): Likewise.
3845         * modules/getlogin_r (Makefile.am): Likewise.
3846         * modules/getndelim2 (Makefile.am): Likewise.
3847         * modules/getopt (Makefile.am): Likewise.
3848         * modules/getpagesize (Makefile.am): Likewise.
3849         * modules/getpass-gnu (Makefile.am): Likewise.
3850         * modules/getpass (Makefile.am): Likewise.
3851         * modules/getsubopt (Makefile.am): Likewise.
3852         * modules/gettime (Makefile.am): Likewise.
3853         * modules/gettimeofday (Makefile.am): Likewise.
3854         * modules/getugroups (Makefile.am): Likewise.
3855         * modules/getusershell (Makefile.am): Likewise.
3856         * modules/glob (Makefile.am): Likewise.
3857         * modules/group-member (Makefile.am): Likewise.
3858         * modules/hard-locale (Makefile.am): Likewise.
3859         * modules/hash (Makefile.am): Likewise.
3860         * modules/hmac-md5 (Makefile.am): Likewise.
3861         * modules/hmac-sha1 (Makefile.am): Likewise.
3862         * modules/human (Makefile.am): Likewise.
3863         * modules/idcache (Makefile.am): Likewise.
3864         * modules/imaxabs (Makefile.am): Likewise.
3865         * modules/imaxdiv (Makefile.am): Likewise.
3866         * modules/inet_ntop (Makefile.am): Likewise.
3867         * modules/inet_pton (Makefile.am): Likewise.
3868         * modules/intprops (Makefile.am): Likewise.
3869         * modules/inttostr (Makefile.am): Likewise.
3870         * modules/inttypes (Makefile.am): Likewise.
3871         * modules/isapipe (Makefile.am): Likewise.
3872         * modules/javaversion (Makefile.am): Likewise.
3873         * modules/lchmod (Makefile.am): Likewise.
3874         * modules/lchown (Makefile.am): Likewise.
3875         * modules/localcharset (Makefile.am): Likewise.
3876         * modules/long-options (Makefile.am): Likewise.
3877         * modules/lstat (Makefile.am): Likewise.
3878         * modules/malloc (Makefile.am): Likewise.
3879         * modules/mathl (Makefile.am): Likewise.
3880         * modules/mbchar (Makefile.am): Likewise.
3881         * modules/md2 (Makefile.am): Likewise.
3882         * modules/md4 (Makefile.am): Likewise.
3883         * modules/md5 (Makefile.am): Likewise.
3884         * modules/memcasecmp (Makefile.am): Likewise.
3885         * modules/memchr (Makefile.am): Likewise.
3886         * modules/memcmp (Makefile.am): Likewise.
3887         * modules/memcoll (Makefile.am): Likewise.
3888         * modules/memcpy (Makefile.am): Likewise.
3889         * modules/memmem (Makefile.am): Likewise.
3890         * modules/memmove (Makefile.am): Likewise.
3891         * modules/mempcpy (Makefile.am): Likewise.
3892         * modules/memrchr (Makefile.am): Likewise.
3893         * modules/memset (Makefile.am): Likewise.
3894         * modules/memxor (Makefile.am): Likewise.
3895         * modules/mkancesdirs (Makefile.am): Likewise.
3896         * modules/mkdir-p (Makefile.am): Likewise.
3897         * modules/mkdir (Makefile.am): Likewise.
3898         * modules/mkdtemp (Makefile.am): Likewise.
3899         * modules/mkstemp (Makefile.am): Likewise.
3900         * modules/mktime (Makefile.am): Likewise.
3901         * modules/modechange (Makefile.am): Likewise.
3902         * modules/mountlist (Makefile.am): Likewise.
3903         * modules/nanosleep (Makefile.am): Likewise.
3904         * modules/obstack (Makefile.am): Likewise.
3905         * modules/openat (Makefile.am): Likewise.
3906         * modules/pagealign_alloc (Makefile.am): Likewise.
3907         * modules/pathmax (Makefile.am): Likewise.
3908         * modules/physmem (Makefile.am): Likewise.
3909         * modules/poll (Makefile.am): Likewise.
3910         * modules/posixtm (Makefile.am): Likewise.
3911         * modules/posixver (Makefile.am): Likewise.
3912         * modules/putenv (Makefile.am): Likewise.
3913         * modules/quote (Makefile.am): Likewise.
3914         * modules/quotearg (Makefile.am): Likewise.
3915         * modules/raise (Makefile.am): Likewise.
3916         * modules/read-file (Makefile.am): Likewise.
3917         * modules/readline (Makefile.am): Likewise.
3918         * modules/readlink (Makefile.am): Likewise.
3919         * modules/readtokens (Makefile.am): Likewise.
3920         * modules/readutmp (Makefile.am): Likewise.
3921         * modules/realloc (Makefile.am): Likewise.
3922         * modules/regex (Makefile.am): Likewise.
3923         * modules/rename-dest-slash (Makefile.am): Likewise.
3924         * modules/rename (Makefile.am): Likewise.
3925         * modules/rijndael (Makefile.am): Likewise.
3926         * modules/rmdir (Makefile.am): Likewise.
3927         * modules/rpmatch (Makefile.am): Likewise.
3928         * modules/safe-read (Makefile.am): Likewise.
3929         * modules/safe-write (Makefile.am): Likewise.
3930         * modules/same-inode (Makefile.am): Likewise.
3931         * modules/same (Makefile.am): Likewise.
3932         * modules/save-cwd (Makefile.am): Likewise.
3933         * modules/savedir (Makefile.am): Likewise.
3934         * modules/setenv (Makefile.am): Likewise.
3935         * modules/settime (Makefile.am): Likewise.
3936         * modules/sha1 (Makefile.am): Likewise.
3937         * modules/sig2str (Makefile.am): Likewise.
3938         * modules/snprintf (Makefile.am): Likewise.
3939         * modules/stat-macros (Makefile.am): Likewise.
3940         * modules/stat-time (Makefile.am): Likewise.
3941         * modules/stdbool (Makefile.am): Likewise.
3942         * modules/stdint (Makefile.am): Likewise.
3943         * modules/stdlib-safer (Makefile.am): Likewise.
3944         * modules/stpcpy (Makefile.am): Likewise.
3945         * modules/stpncpy (Makefile.am): Likewise.
3946         * modules/strcase (Makefile.am): Likewise.
3947         * modules/strcasestr (Makefile.am): Likewise.
3948         * modules/strchrnul (Makefile.am): Likewise.
3949         * modules/strcspn (Makefile.am): Likewise.
3950         * modules/strdup (Makefile.am): Likewise.
3951         * modules/strerror (Makefile.am): Likewise.
3952         * modules/strftime (Makefile.am): Likewise.
3953         * modules/strndup (Makefile.am): Likewise.
3954         * modules/strnlen (Makefile.am): Likewise.
3955         * modules/strpbrk (Makefile.am): Likewise.
3956         * modules/strsep (Makefile.am): Likewise.
3957         * modules/strstr (Makefile.am): Likewise.
3958         * modules/strtod (Makefile.am): Likewise.
3959         * modules/strtoimax (Makefile.am): Likewise.
3960         * modules/strtok_r (Makefile.am): Likewise.
3961         * modules/strtol (Makefile.am): Likewise.
3962         * modules/strtoll (Makefile.am): Likewise.
3963         * modules/strtoul (Makefile.am): Likewise.
3964         * modules/strtoull (Makefile.am): Likewise.
3965         * modules/strtoumax (Makefile.am): Likewise.
3966         * modules/strverscmp (Makefile.am): Likewise.
3967         * modules/sys_socket (Makefile.am): Likewise.
3968         * modules/sys_stat (Makefile.am): Likewise.
3969         * modules/sysexits (Makefile.am): Likewise.
3970         * modules/time_r (Makefile.am): Likewise.
3971         * modules/timegm (Makefile.am): Likewise.
3972         * modules/timespec (Makefile.am): Likewise.
3973         * modules/tmpfile-safer (Makefile.am): Likewise.
3974         * modules/trim (Makefile.am): Likewise.
3975         * modules/unistd-safer (Makefile.am): Likewise.
3976         * modules/unlinkdir (Makefile.am): Likewise.
3977         * modules/unlocked-io (Makefile.am): Likewise.
3978         * modules/userspec (Makefile.am): Likewise.
3979         * modules/utime (Makefile.am): Likewise.
3980         * modules/utimecmp (Makefile.am): Likewise.
3981         * modules/utimens (Makefile.am): Likewise.
3982         * modules/vasnprintf (Makefile.am): Likewise.
3983         * modules/vasprintf (Makefile.am): Likewise.
3984         * modules/vsnprintf (Makefile.am): Likewise.
3985         * modules/xalloc (Makefile.am): Likewise.
3986         * modules/xgetcwd (Makefile.am): Likewise.
3987         * modules/xnanosleep (Makefile.am): Likewise.
3988         * modules/xreadlink (Makefile.am): Likewise.
3989         * modules/xstrtod (Makefile.am): Likewise.
3990         * modules/xstrtol (Makefile.am): Likewise.
3991         * modules/xstrtold (Makefile.am): Likewise.
3992         * modules/yesno (Makefile.am): Likewise.
3993         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3994
3995 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3996
3997         * modules/error (Makefile.am): Distribute files through
3998         EXTRA_DIST, not lib_SOURCES.
3999
4000 2006-10-12  Eric Blake  <ebb9@byu.net>
4001
4002         * modules/error (Makefile.am): Distribute files in /lib.
4003         * modules/obstack (Makefile.am): Likewise.
4004
4005 2006-10-12  Bruno Haible  <bruno@clisp.org>
4006
4007         * modules/acl (Makefile.am): Distribute all files in lib/ through
4008         EXTRA_DIST.
4009         * modules/arcfour (Makefile.am): Likewise.
4010         * modules/arctwo (Makefile.am): Likewise.
4011         * modules/argmatch (Makefile.am): Likewise.
4012         * modules/argz (Makefile.am): Likewise.
4013         * modules/atexit (Makefile.am): Likewise.
4014         * modules/backupfile (Makefile.am): Likewise.
4015         * modules/c-strtod (Makefile.am): Likewise.
4016         * modules/c-strtold (Makefile.am): Likewise.
4017         * modules/calloc (Makefile.am): Likewise.
4018         * modules/canon-host (Makefile.am): Likewise.
4019         * modules/canonicalize (Makefile.am): Likewise.
4020         * modules/chdir-long (Makefile.am): Likewise.
4021         * modules/chdir-safer (Makefile.am): Likewise.
4022         * modules/check-version (Makefile.am): Likewise.
4023         * modules/chown (Makefile.am): Likewise.
4024         * modules/cloexec (Makefile.am): Likewise.
4025         * modules/close-stream (Makefile.am): Likewise.
4026         * modules/closeout (Makefile.am): Likewise.
4027         * modules/crc (Makefile.am): Likewise.
4028         * modules/cycle-check (Makefile.am): Likewise.
4029         * modules/des (Makefile.am): Likewise.
4030         * modules/dirfd (Makefile.am): Likewise.
4031         * modules/dirname (Makefile.am): Likewise.
4032         * modules/dup2 (Makefile.am): Likewise.
4033         * modules/euidaccess (Makefile.am): Likewise.
4034         * modules/exclude (Makefile.am): Likewise.
4035         * modules/exitfail (Makefile.am): Likewise.
4036         * modules/fcntl-safer (Makefile.am): Likewise.
4037         * modules/file-type (Makefile.am): Likewise.
4038         * modules/fileblocks (Makefile.am): Likewise.
4039         * modules/filemode (Makefile.am): Likewise.
4040         * modules/filenamecat (Makefile.am): Likewise.
4041         * modules/fnmatch (Makefile.am): Likewise.
4042         * modules/fopen-safer (Makefile.am): Likewise.
4043         * modules/fpending (Makefile.am): Likewise.
4044         * modules/fprintftime (Makefile.am): Likewise.
4045         * modules/free (Makefile.am): Likewise.
4046         * modules/fsusage (Makefile.am): Likewise.
4047         * modules/ftruncate (Makefile.am): Likewise.
4048         * modules/fts (Makefile.am): Likewise.
4049         * modules/gc (Makefile.am): Likewise.
4050         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4051         * modules/getaddrinfo (Makefile.am): Likewise.
4052         * modules/getcwd (Makefile.am): Likewise.
4053         * modules/getdelim (Makefile.am): Likewise.
4054         * modules/getdomainname (Makefile.am): Likewise.
4055         * modules/getgroups (Makefile.am): Likewise.
4056         * modules/gethostname (Makefile.am): Likewise.
4057         * modules/gethrxtime (Makefile.am): Likewise.
4058         * modules/getline (Makefile.am): Likewise.
4059         * modules/getloadavg (Makefile.am): Likewise.
4060         * modules/getlogin_r (Makefile.am): Likewise.
4061         * modules/getopt (Makefile.am): Likewise.
4062         * modules/getpass (Makefile.am): Likewise.
4063         * modules/getpass-gnu (Makefile.am): Likewise.
4064         * modules/getsubopt (Makefile.am): Likewise.
4065         * modules/gettime (Makefile.am): Likewise.
4066         * modules/gettimeofday (Makefile.am): Likewise.
4067         * modules/getugroups (Makefile.am): Likewise.
4068         * modules/getusershell (Makefile.am): Likewise.
4069         * modules/glob (Makefile.am): Likewise.
4070         * modules/group-member (Makefile.am): Likewise.
4071         * modules/hard-locale (Makefile.am): Likewise.
4072         * modules/hash (Makefile.am): Likewise.
4073         * modules/hmac-md5 (Makefile.am): Likewise.
4074         * modules/hmac-sha1 (Makefile.am): Likewise.
4075         * modules/human (Makefile.am): Likewise.
4076         * modules/idcache (Makefile.am): Likewise.
4077         * modules/imaxabs (Makefile.am): Likewise.
4078         * modules/imaxdiv (Makefile.am): Likewise.
4079         * modules/inet_ntop (Makefile.am): Likewise.
4080         * modules/inet_pton (Makefile.am): Likewise.
4081         * modules/inttostr (Makefile.am): Likewise.
4082         * modules/isapipe (Makefile.am): Likewise.
4083         * modules/lchown (Makefile.am): Likewise.
4084         * modules/long-options (Makefile.am): Likewise.
4085         * modules/lstat (Makefile.am): Likewise.
4086         * modules/malloc (Makefile.am): Likewise.
4087         * modules/mathl (Makefile.am): Likewise.
4088         * modules/mbchar (Makefile.am): Likewise.
4089         * modules/md2 (Makefile.am): Likewise.
4090         * modules/md4 (Makefile.am): Likewise.
4091         * modules/md5 (Makefile.am): Likewise.
4092         * modules/memcasecmp (Makefile.am): Likewise.
4093         * modules/memchr (Makefile.am): Likewise.
4094         * modules/memcmp (Makefile.am): Likewise.
4095         * modules/memcoll (Makefile.am): Likewise.
4096         * modules/memcpy (Makefile.am): Likewise.
4097         * modules/memmem (Makefile.am): Likewise.
4098         * modules/memmove (Makefile.am): Likewise.
4099         * modules/mempcpy (Makefile.am): Likewise.
4100         * modules/memrchr (Makefile.am): Likewise.
4101         * modules/memset (Makefile.am): Likewise.
4102         * modules/memxor (Makefile.am): Likewise.
4103         * modules/mkancesdirs (Makefile.am): Likewise.
4104         * modules/mkdir (Makefile.am): Likewise.
4105         * modules/mkdir-p (Makefile.am): Likewise.
4106         * modules/mkdtemp (Makefile.am): Likewise.
4107         * modules/mkstemp (Makefile.am): Likewise.
4108         * modules/mktime (Makefile.am): Likewise.
4109         * modules/modechange (Makefile.am): Likewise.
4110         * modules/mountlist (Makefile.am): Likewise.
4111         * modules/nanosleep (Makefile.am): Likewise.
4112         * modules/openat (Makefile.am): Likewise.
4113         * modules/pagealign_alloc (Makefile.am): Likewise.
4114         * modules/physmem (Makefile.am): Likewise.
4115         * modules/poll (Makefile.am): Likewise.
4116         * modules/posixtm (Makefile.am): Likewise.
4117         * modules/posixver (Makefile.am): Likewise.
4118         * modules/putenv (Makefile.am): Likewise.
4119         * modules/quote (Makefile.am): Likewise.
4120         * modules/quotearg (Makefile.am): Likewise.
4121         * modules/raise (Makefile.am): Likewise.
4122         * modules/read-file (Makefile.am): Likewise.
4123         * modules/readline (Makefile.am): Likewise.
4124         * modules/readlink (Makefile.am): Likewise.
4125         * modules/readtokens (Makefile.am): Likewise.
4126         * modules/readutmp (Makefile.am): Likewise.
4127         * modules/realloc (Makefile.am): Likewise.
4128         * modules/regex (Makefile.am): Likewise.
4129         * modules/rename (Makefile.am): Likewise.
4130         * modules/rename-dest-slash (Makefile.am): Likewise.
4131         * modules/rijndael (Makefile.am): Likewise.
4132         * modules/rmdir (Makefile.am): Likewise.
4133         * modules/rpmatch (Makefile.am): Likewise.
4134         * modules/safe-read (Makefile.am): Likewise.
4135         * modules/safe-write (Makefile.am): Likewise.
4136         * modules/same (Makefile.am): Likewise.
4137         * modules/save-cwd (Makefile.am): Likewise.
4138         * modules/savedir (Makefile.am): Likewise.
4139         * modules/setenv (Makefile.am): Likewise.
4140         * modules/settime (Makefile.am): Likewise.
4141         * modules/sha1 (Makefile.am): Likewise.
4142         * modules/sig2str (Makefile.am): Likewise.
4143         * modules/snprintf (Makefile.am): Likewise.
4144         * modules/stdlib-safer (Makefile.am): Likewise.
4145         * modules/stpcpy (Makefile.am): Likewise.
4146         * modules/stpncpy (Makefile.am): Likewise.
4147         * modules/strcase (Makefile.am): Likewise.
4148         * modules/strcasestr (Makefile.am): Likewise.
4149         * modules/strchrnul (Makefile.am): Likewise.
4150         * modules/strcspn (Makefile.am): Likewise.
4151         * modules/strdup (Makefile.am): Likewise.
4152         * modules/strerror (Makefile.am): Likewise.
4153         * modules/strftime (Makefile.am): Likewise.
4154         * modules/strndup (Makefile.am): Likewise.
4155         * modules/strnlen (Makefile.am): Likewise.
4156         * modules/strpbrk (Makefile.am): Likewise.
4157         * modules/strsep (Makefile.am): Likewise.
4158         * modules/strstr (Makefile.am): Likewise.
4159         * modules/strtod (Makefile.am): Likewise.
4160         * modules/strtoimax (Makefile.am): Likewise.
4161         * modules/strtok_r (Makefile.am): Likewise.
4162         * modules/strtol (Makefile.am): Likewise.
4163         * modules/strtoll (Makefile.am): Likewise.
4164         * modules/strtoul (Makefile.am): Likewise.
4165         * modules/strtoull (Makefile.am): Likewise.
4166         * modules/strtoumax (Makefile.am): Likewise.
4167         * modules/strverscmp (Makefile.am): Likewise.
4168         * modules/time_r (Makefile.am): Likewise.
4169         * modules/timegm (Makefile.am): Likewise.
4170         * modules/tmpfile-safer (Makefile.am): Likewise.
4171         * modules/unistd-safer (Makefile.am): Likewise.
4172         * modules/unlinkdir (Makefile.am): Likewise.
4173         * modules/userspec (Makefile.am): Likewise.
4174         * modules/utime (Makefile.am): Likewise.
4175         * modules/utimecmp (Makefile.am): Likewise.
4176         * modules/utimens (Makefile.am): Likewise.
4177         * modules/vasnprintf (Makefile.am): Likewise.
4178         * modules/vasprintf (Makefile.am): Likewise.
4179         * modules/vsnprintf (Makefile.am): Likewise.
4180         * modules/xalloc (Makefile.am): Likewise.
4181         * modules/xgetcwd (Makefile.am): Likewise.
4182         * modules/xnanosleep (Makefile.am): Likewise.
4183         * modules/xreadlink (Makefile.am): Likewise.
4184         * modules/xstrtod (Makefile.am): Likewise.
4185         * modules/xstrtol (Makefile.am): Likewise.
4186         * modules/xstrtold (Makefile.am): Likewise.
4187         * modules/yesno (Makefile.am): Likewise.
4188
4189 2006-10-12  Jim Meyering  <jim@meyering.net>
4190
4191         * m4/getloadavg.m4: Revert the change below.
4192
4193         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4194         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4195         fail with a symlink, which is what coreutils' ./bootstrap now
4196         creates by default.
4197
4198 2006-10-12  Bruno Haible  <bruno@clisp.org>
4199
4200         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4201         mingw.
4202         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4203         MSVC and mingw explicitly.
4204
4205 2006-10-11  Simon Josefsson  <jas@extundo.com>
4206             Bruno Haible  <bruno@clisp.org>
4207
4208         Add support for multiple gnulib-tool invocations in the scope of a
4209         single configure.ac file.
4210         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4211         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4212         with the same contents as the _LIBADD variable.
4213         (func_emit_initmacro_start, func_emit_initmacro_end,
4214         func_emit_initmacro_done): New functions.
4215         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4216         gl_LIBOBJS and gl_LTLIBOBJS.
4217
4218 2006-10-11  Bruno Haible  <bruno@clisp.org>
4219
4220         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4221         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4222         autoreconf. Instead, invoke autopoint explicitly but move back the
4223         *.m4 files from gnulib.
4224
4225 2006-10-11  Bruno Haible  <bruno@clisp.org>
4226
4227         * gnulib-tool (func_usage): Make module names after --create-testdir
4228         optional.
4229         (func_create_testdir): If no module was specified, use nearly all
4230         modules.
4231
4232 2006-10-12  Jim Meyering  <jim@meyering.net>
4233
4234         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4235         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4236         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4237         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4238         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4239         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4240         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4241         (fts_set_stat_required): New function.
4242         (fts_open): Defer the calls to fts_stat, if possible or requested.
4243         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4244         into fts_stat itself.
4245         (fts_read): Perform any required (deferred) fts_stat call.
4246         (fts_build): Likewise, for the directory we're about to open and read.
4247         In the readdir loop, carefully decide whether each entry will require
4248         an eventual call to fts_stat, using dirent.d_type info if available.
4249         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4250         a command line argument into this function.  Update all callers.
4251         Map a return value of FTS_DOT to FTS_D for a command line argument.
4252         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4253         Thanks to Miklos Szeredi for his tenacity and for the initial
4254         bug report about "find" failing on a FUSE-based file system.
4255
4256         * lib/fts.c (fts_open): Use consistent indentation.
4257
4258 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4259
4260         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4261         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4262         reported by Jim Meyering.  All uses of cache variables renamed
4263         to match Autoconf's.
4264         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4265         the other one.
4266
4267         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4268         Fix misspelling in diagnostic.
4269
4270 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4271
4272         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4273         defined.  Problem reported by Matthew Woehlke.
4274
4275         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4276         Add support for Tandem NonStop R series.
4277         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4278         Use new macro.
4279
4280         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4281         (has_trailing_slash): Omit size arg; all callers changed.
4282         Omit 'inline', since it doesn't help performance and we'd
4283         need to configure it.
4284         Don't count //, ///, etc. as having a trailing slash.
4285         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4286         (rpl_rename_dest_slash): On failure, use rename's errno rather
4287         than (in some cases) an incorrect or junk errno.
4288         Simplify code by removing need to compute length; this does
4289         cause it to make two passes instead of one over the file name,
4290         but it's worth it.
4291
4292         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4293         change, since Autoconf's version may no longer be appropriate now
4294         that we are using CVS Autoconf's version.  Add support for Tandem.
4295
4296 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4297             Bruno Haible  <bruno@clisp.org>
4298
4299         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4300         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4301         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4302         gl_AC_TYPE_LONG_LONG.
4303
4304         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4305         instead of HAVE_LONG_LONG.
4306         * lib/printf-args.c (printf_fetchargs): Likewise.
4307         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4308         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4309         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4310         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4311         gl_AC_TYPE_LONG_LONG.
4312
4313 2006-10-11  Bruno Haible  <bruno@clisp.org>
4314
4315         * m4/longlong.m4: Add comments.
4316         * m4/ulonglong.m4: Likewise.
4317
4318 2006-10-10  Bruno Haible  <bruno@clisp.org>
4319
4320         Make it possible to #define stpcpy, strdup to aliases.
4321         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4322         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4323
4324 2006-10-10  Bruno Haible  <bruno@clisp.org>
4325
4326         Make it possible to #define gcd to an alias.
4327         * lib/gcd.c: Include config.h.
4328
4329 2006-10-10  Bruno Haible  <bruno@clisp.org>
4330
4331         Make it possible to #define c_isascii to an alias.
4332         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4333         defined. Undefine the macros before defining them, to avoid gcc
4334         warnings.
4335         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4336         define NO_C_CTYPE_MACROS early.
4337
4338 2006-10-10  Bruno Haible  <bruno@clisp.org>
4339
4340         Make it possible to #define set_program_name to an alias.
4341         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4342         ENABLE_RELOCATABLE early.
4343
4344 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4345
4346         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4347         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4348         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4349         More generally, don't assume that 64-bit signed int is available
4350         if unsigned int is, and vice versa.
4351         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4352         unsigned symbols, not on their signed counterparts.
4353         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4354         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4355         (UINT64_C, UINTMAX_C):
4356         Likewise.
4357         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4358         unsigned counterparts.
4359         (Have_long_long, Unsigned): New macros.
4360         (Int): Renamed from INT.
4361         (strtoimax): Use the new macros.
4362         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4363         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4364         * modules/inttypes (inttypes.h): Substitute
4365         HAVE_UNSIGNED_LONG_LONG_INT.
4366         * modules/stdint (stdint.h): Likewise.
4367         (Files): Add m4/ulonglong.m4.
4368
4369 2006-10-10  Bruno Haible  <bruno@clisp.org>
4370
4371         Fix a gcc -Wshadow warning.
4372         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4373         to 'bucket'.
4374         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4375         gl_linked_indexof_from_to): Likewise.
4376         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4377         Likewise.
4378         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4379         Likewise.
4380         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4381         Reported by Eric Blake.
4382
4383 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4384
4385         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4386         for NetBSD.  Problem reported by Bruno Haible.
4387
4388 2006-10-09  Jim Meyering  <jim@meyering.net>
4389
4390         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4391         Patch from Bruno Haible.
4392
4393 2006-10-09  Jim Meyering  <jim@meyering.net>
4394
4395         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4396         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4397         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4398
4399 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4400
4401         Don't include <config.h> twice; this doesn't work in some cases,
4402         e.g., when config.h has "#define intmax_t long long int" and
4403         we include <config.h>, <inttypes.h>, <config.h> in that order.
4404         Problem reported by Matthew Woehlke in:
4405         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4406         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4407         * lib/fts-cycle.c: Don't include config.h.
4408         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4409         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4410         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4411         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4412         inttypes.h.
4413         * lib/xstrtoumax.c: Likewise.
4414         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4415         __strtol and the like, so that this module is more like its siblings.
4416         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4417         Remove; no longer needed now that we assume gnulib inttypes.h.
4418
4419 2006-10-08  Bruno Haible  <bruno@clisp.org>
4420
4421         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4422         option.
4423
4424 2006-10-07  Jim Meyering  <jim@meyering.net>
4425
4426         * modules/inttypes (inttypes.h): Revert what seems to have been
4427         an inadvertent part of today's change: use "|", not "/" in the
4428         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4429
4430 2006-10-07  Bruno Haible  <bruno@clisp.org>
4431
4432         * modules/sublist: New file.
4433
4434 2006-10-07  Bruno Haible  <bruno@clisp.org>
4435
4436         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4437         * modules/argz (argz.h): Likewise.
4438         * modules/arpa_inet (arpa/inet.h): Likewise.
4439         * modules/byteswap (byteswap.h): Likewise.
4440         * modules/configmake (configmake.h): Likewise.
4441         * modules/fcntl (fcntl.h): Likewise.
4442         * modules/fnmatch (fnmatch.h): Likewise.
4443         * modules/getopt (getopt.h): Likewise.
4444         * modules/glob (glob.h): Likewise.
4445         * modules/inttypes (inttypes.h): Likewise.
4446         * modules/netinet_in (netinet/in.h): Likewise.
4447         * modules/poll (poll.h): Likewise.
4448         * modules/stdbool (stdbool.h): Likewise.
4449         * modules/stdint (stdint.h): Likewise.
4450         * modules/sys_select (sys/select.h): Likewise.
4451         * modules/sys_socket (sys/socket.h): Likewise.
4452         * modules/sys_stat (sys/stat.h): Likewise.
4453         * modules/sysexits (sysexits.h): Likewise.
4454         * modules/unistd (unistd.h): Likewise.
4455         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4456         Add a "DO NOT EDIT" comment to the generated file.
4457         (func_import): Likewise for gnulib-comp.m4.
4458
4459 2006-10-07  Bruno Haible  <bruno@clisp.org>
4460
4461         * lib/gl_sublist.h: New file.
4462         * lib/gl_sublist.c: New file.
4463
4464 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4465
4466         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4467         name (relative to the original working directory) and the file
4468         name component (relative to the temporary working directory).  All
4469         callers changed.
4470         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4471         * lib/mkdir-p.c (make_dir_parents): Likewise.
4472         * lib/mkdir-p.h (make_dir_parents): Likewise.
4473
4474 2006-10-06  Eric Blake  <ebb9@byu.net>
4475
4476         Define several macros for use by the clean-temp module.
4477         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4478         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4479         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4480
4481         * lib/clean-temp.h (close_stream_temp): New declaration.
4482         * lib/clean-temp.c (includes): Pull in headers according to what
4483         other modules are in use.
4484         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4485
4486 2006-10-06  Bruno Haible  <bruno@clisp.org>
4487
4488         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4489         instead of fopen, fwriteerror.
4490
4491 2006-10-06  Bruno Haible  <bruno@clisp.org>
4492
4493         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4494         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4495         int.
4496         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4497         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4498         Return an error indicator.
4499         Suggested by Eric Blake.
4500
4501 2006-10-06  Bruno Haible  <bruno@clisp.org>
4502
4503         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4504         Reported by Eric Blake.
4505
4506 2006-10-06  Bruno Haible  <bruno@clisp.org>
4507
4508         * modules/closeout (Description): Mention stderr too.
4509
4510 2006-10-06  Bruno Haible  <bruno@clisp.org>
4511         and Paul Eggert  <eggert@cs.ucla.edu>
4512
4513         * lib/closeout.c (close_stdout): Also close stderr.
4514         * lib/closeout.h: Update comment.
4515
4516 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4517
4518         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4519         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4520         * lib/dirchownmod.c: Include lchown.h.
4521         * lib/lchown.c: Don't include files that lchown.h now includes.
4522         Don't declare chown, since lchown.h now does that.
4523         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4524         (lchown): Define to rpl_chown if lchown is declared but
4525         does not exist.  Declare using a prototype if lchown is not
4526         declared.  Add a copyright notice.
4527         * lib/mkstemp.h: Include <unistd.h>.
4528         * lib/openat.c: Include lchown.h.
4529
4530         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4531         we now test for that separately.
4532         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4533         rather than O_NOFOLLOW, when testing whether it's possible to
4534         avoid a race condition reliably.
4535         * lib/savewd.c (savewd_chdir): Likewise.
4536
4537         Remove macros that are no longer needed now that stdint.h is
4538         reliable.
4539         * lib/fsusage.c (UINTMAX_MAX): Remove.
4540         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4541         * lib/utimecmp.c (SIZE_MAX): Remove.
4542
4543         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4544
4545         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4546         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4547         O_NOATIME works.
4548
4549 2006-10-05  Bruno Haible  <bruno@clisp.org>
4550
4551         * lib/gl_list.h (gl_sortedlist_search_from_to,
4552         gl_sortedlist_indexof_from_to): New declarations.
4553         (gl_list_implementation): New fields sortedlist_search_from_to,
4554         sortedlist_indexof_from_to.
4555         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4556         inline functions.
4557         * lib/gl_list.c (gl_sortedlist_search_from_to,
4558         gl_sortedlist_indexof_from_to): New functions.
4559         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4560         function.
4561         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4562         (gl_array_sortedlist_search_from_to): New function.
4563         (gl_array_list_implementation): Update.
4564         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4565         function.
4566         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4567         (gl_carray_sortedlist_search_from_to): New function.
4568         (gl_carray_list_implementation): Update.
4569         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4570         gl_linked_sortedlist_indexof_from_to): New functions.
4571         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4572         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4573         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4574         gl_tree_sortedlist_indexof_from_to): New functions.
4575         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4576         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4577         Update.
4578         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4579         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4580         Update.
4581
4582 2006-10-05  Bruno Haible  <bruno@clisp.org>
4583
4584         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4585         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4586         (struct gl_list_implementation): Add fields search_from_to,
4587         indexof_from_to. Remove fields search, indexof.
4588         (gl_list_search): Use the search_from_to method.
4589         (gl_list_search_from, gl_list_search_from_to): New functions.
4590         (gl_list_indexof): Use the indexof_from_to method.
4591         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4592         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4593         (gl_list_search_from, gl_list_search_from_to): New functions.
4594         (gl_list_indexof): Use the indexof_from_to method.
4595         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4596         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4597         gl_array_indexof. Add start_index, end_index arguments.
4598         (gl_array_search_from_to): Renamed from gl_array_search. Add
4599         start_index, end_index arguments.
4600         (gl_array_remove, gl_array_list_implementation): Update.
4601         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4602         gl_carray_indexof. Add start_index, end_index arguments.
4603         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4604         start_index, end_index arguments.
4605         (gl_carray_remove, gl_carray_list_implementation): Update.
4606         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4607         gl_linked_search. Add start_index, end_index arguments.
4608         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4609         start_index, end_index arguments.
4610         (gl_linked_remove): Update.
4611         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4612         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4613         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4614         field to 'size_t'.
4615         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4616         gl_tree_search. Add start_index, end_index arguments.
4617         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4618         start_index, end_index arguments.
4619         (gl_tree_remove): Update.
4620         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4621         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4622         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4623         function.
4624         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4625         gl_tree_search. Add start_index, end_index arguments.
4626         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4627         start_index, end_index arguments.
4628         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4629         Update.
4630         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4631
4632 2006-10-05  Bruno Haible  <bruno@clisp.org>
4633
4634         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4635
4636         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4637         fwriteerror_temp): New declarations.
4638         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4639         (descriptors): New variable.
4640         (cleanup): First, close the descriptors.
4641         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4642         fclose_temp, fwriteerror_temp): New functions.
4643
4644 2006-10-04  Jim Meyering  <jim@meyering.net>
4645
4646         * lib/fts.c (fts_open): Tiny comment change.
4647
4648 2006-10-04  Bruno Haible  <bruno@clisp.org>
4649
4650         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4651         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4652         gl_LOCK_BODY.
4653         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4654         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4655         gl_LOCK_EARLY_BODY.
4656         (gl_LOCK): Require gl_LOCK_BODY.
4657
4658 2006-10-04  Bruno Haible  <bruno@clisp.org>
4659
4660         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4661         (gl_oset_search_atleast): New declaration.
4662         (struct gl_oset_implementation): Add field 'search_atleast'.
4663         (gl_oset_search_atleast): New inline function.
4664         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4665         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4666         (gl_array_oset_implementation): Update.
4667         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4668         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4669         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4670
4671 2006-10-04  Bruno Haible  <bruno@clisp.org>
4672
4673         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4674
4675 2006-10-03  Bruno Haible  <bruno@clisp.org>
4676
4677         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4678         from gl_avltreehash_list_implementation.
4679
4680 2006-10-03  Bruno Haible  <bruno@clisp.org>
4681
4682         * lib/gl_oset.c (gl_oset_add): Fix return type.
4683
4684 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4685
4686         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4687
4688 2006-10-02  Eric Blake  <ebb9@byu.net>
4689
4690         * modules/strnlen (Depends-on): Add extensions.
4691
4692 2006-10-02  Eric Blake  <ebb9@byu.net>
4693
4694         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4695         definition in 2.60+.
4696
4697 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4698
4699         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4700         checks.
4701
4702 2006-10-02  Bruno Haible  <bruno@clisp.org>
4703
4704         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4705         to the AUTOMAKE_OPTIONS.
4706         Reported by Jim Meyering.
4707
4708 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4709
4710         Work around bug in Solaris 10 /proc file system:
4711         /proc/self/fd/NNN/.. isn't the parent directory of
4712         the directory whose file descriptor is NNN.  This needs to
4713         be worked around at run time, not compile time, since a
4714         program might be built on Solaris 8, where things work, and
4715         run on Solaris 10.
4716         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4717         to use the following interface instead:
4718         (OPENAT_BUFFER_SIZE): New macro.
4719         (openat_proc_name): New function.
4720         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4721         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4722         Likewise.
4723         * lib/openat-proc.c: New file.
4724         * modules/openat (Files): Add lib/openat-proc.c.
4725         (Depends-on): Add same-inode, stdbool.
4726         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4727
4728 2006-09-29  Bruno Haible  <bruno@clisp.org>
4729
4730         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4731         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4732         argument. Set stdout_closed before testing for ferror, not after.
4733         (fwriteerror, fwriteerror_no_ebadf): New functions.
4734
4735 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4736
4737         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4738
4739 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4740
4741         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4742         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4743
4744 2006-09-28  Jim Meyering  <jim@meyering.net>
4745
4746         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4747         Include <unistd.h>.
4748
4749 2006-09-28  Bruno Haible  <bruno@clisp.org>
4750
4751         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4752         * modules/linkedhash-list (Depends-on): Likewise.
4753         * modules/rbtreehash-list (Depends-on): Likewise.
4754
4755 2006-09-28  Bruno Haible  <bruno@clisp.org>
4756
4757         * lib/strndup.h: Simplify the redefinition of strndup.
4758         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4759         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4760
4761 2006-09-28  Bruno Haible  <bruno@clisp.org>
4762
4763         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4764         * lib/gl_linkedhash_list.c: Likewise.
4765         * lib/gl_rbtreehash_list.c: Likewise.
4766
4767 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4768
4769         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4770         getaddrinfo.
4771
4772         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4773         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4774         it causes <stdio_ext.h> to cause a compile-time error.
4775         Problem reported by Nelson H. F. Beebe.
4776         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4777         of HAVE_DECL___PENDING.
4778
4779         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4780         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4781         declaration.
4782
4783 2006-09-27  Jim Meyering  <jim@meyering.net>
4784
4785         This file could end up with a definition for a function
4786         named __strndup, rather than rpl_strndup on a system with
4787         incomplete weak_alias support.
4788         * lib/strndup.c (strndup): Rename from __strndup.
4789         Remove #defines that used to map __strndup to strndup.
4790         Don't use K&R prototypes.
4791         Remove LIBC-related code, since this file is not sync'd with glibc.
4792         * lib/strndup.h: Revamp, accordingly.
4793         * m4/strndup.m4: Modernize.
4794
4795 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4796
4797         * modules/savewd (Depends-on): Add 'raise'.
4798         * lib/savewd.c: Include <signal.h>, for 'raise'.
4799
4800 2006-09-26  Jim Meyering  <jim@meyering.net>
4801
4802         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4803         when we detect Darwin 8.7.0's acl_get_file bug.
4804         Rearrange to perform the new (below) run-test while $LIBS
4805         contains any acl-related library.  Set USE_ACL at the end.
4806         (gl_ACL_GET_FILE): New function.
4807
4808 2006-09-26  Eric Blake  <ebb9@byu.net>
4809
4810         * lib/verror.c: Include <config.h> unconditionally.
4811
4812 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4813
4814         * modules/clock-time (Maintainer): Add self.
4815         * modules/getlogin_r (Depends-on): Add extensions.
4816
4817 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4818
4819         * modules/clock-time: New module.
4820         * modules/nanosleep (Depends-on): Add clock-time.
4821         * modules/gethrxtime (Depends-on): Likewise.
4822         * modules/gettime (Depends-on): Likewise.
4823         * modules/settime (Depends-on): Likewise.
4824
4825         * modules/fts-lgpl: Depend on openat.
4826         * modules/mkancesdirs: Depend on savewd.
4827         * modules/mkdir-p: Likewise.
4828
4829 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4830
4831         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4832
4833         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4834         `gl_have_arbitrary_file_name_length_limit' to
4835         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4836         actually works between configure runs.
4837
4838 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4839             Bruno Haible  <bruno@clisp.org>
4840
4841         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4842
4843 2006-09-25  Jim Meyering  <jim@meyering.net>
4844
4845         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4846         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4847
4848 2006-09-25  Eric Blake  <ebb9@byu.net>
4849
4850         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4851         exec's in 2006-09-18 patch when shuffling fds.
4852
4853 2006-09-25  Bruno Haible  <bruno@clisp.org>
4854
4855         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4856         Reported by Jim Meyering.
4857
4858 2006-09-24  Jim Meyering  <jim@meyering.net>
4859
4860         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4861         compare a pointer against a literal "0".  That caused failures with
4862         at least HP-UX's hpcc.
4863
4864 2006-09-22  Simon Josefsson  <jas@extundo.com>
4865
4866         * modules/gc-sha1:
4867         * modules/gc-md4:
4868         * modules/gc-hmac-sha1:
4869         * modules/gc-hmac-md5:
4870         * modules/gc-des:
4871         * modules/gc-arcfour: Distribute more files.
4872
4873 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4874
4875         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4876         (gl_linked_iterator_from_to): Initialize struct completely.
4877         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4878         (gl_tree_iterator_from_to): Likewise
4879         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4880         * lib/gl_array_list.c [lint] (gl_array_iterator)
4881         (gl_array_iterator_from_to): Likewise.
4882         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4883         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4884         (gl_carray_iterator_from_to): Likewise.
4885
4886         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4887         * lib/md4.c (md4_process_block): Remove unused variable.
4888         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4889         parentheses for clarity.
4890
4891 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4892
4893         * modules/bison-i18n (Depends-on): Add gettext.
4894
4895 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4896
4897         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4898         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4899         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4900         also add missing comma that caused broken test.
4901         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4902         stdlib.h, for `abort'.
4903         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4904         variables.
4905         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4906         include unistd.h if present, for `rmdir'.
4907         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4908         variables.
4909         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4910         in the process include standard headers for prototypes.
4911         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4912         gets declared on GNU/Linux.
4913         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4914         unistd.h, for `rmdir'.
4915         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4916
4917         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4918         always true.
4919         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4920
4921         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4922
4923 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4924
4925         * gnulib-tool (func_version): Create output all at once.  This
4926         may help avoid triggering unnecessary SIGPIPEs, and at any
4927         rate it doesn't hurt.
4928
4929 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4930             Bruno Haible  <bruno@clisp.org>
4931
4932         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4933         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4934         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4935
4936         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4937         (gl_FUNC_VASPRINTF): Invoke it.
4938
4939 2006-09-22  Bruno Haible  <bruno@clisp.org>
4940
4941         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4942         getloadavg.c as first argument.
4943
4944 2006-09-22  Bruno Haible  <bruno@clisp.org>
4945
4946         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4947         at the beginning of the gl_INIT macro.
4948         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4949         gl_GETLOADAVG.
4950
4951 2006-09-22  Bruno Haible  <bruno@clisp.org>
4952
4953         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4954         module.
4955         Suggested by Ralf Wildenhues.
4956
4957 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4958
4959         Import this patch from libc:
4960
4961         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4962
4963         * lib/regex_internal.c (re_string_reconstruct): Handle
4964         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4965         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4966         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4967         re_string_context_at.
4968
4969         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4970         now requires it.
4971         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4972         gl_REGEX now does it for us.
4973         (gl_REGEX): Add test taken from
4974         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4975
4976         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4977         Check that large offsets work.  Modernize Autoconf usages.
4978         Prefer "yes" to mean a good thing rather than a bad.
4979         Don't put "#define mkstemp" in config.h, as this might interfere
4980         with standard system headers that "#define mkstemp mkstemp64".
4981
4982         * modules/mkstemp (Depends-on): Add extensions, so that
4983         mkstemp is visible on some platforms.
4984         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4985         (Include): Change to "mkstemp.h" from <stdlib.h>.
4986         (Files): Add mkstemp.h.
4987
4988         * lib/mkstemp.h: New file, since some standard headers
4989         #define mkstemp.
4990         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4991         Include "mkstemp.h".
4992         Make the _LIBC code resemble glibc original more,
4993         e.g., use K&R style.
4994         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4995         (mkstemp): Remove, since mkstemp.h does this for us.
4996         * lib/stdlib--.h: Include mkstemp.h.
4997
4998         Import this patch from libc:
4999
5000         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5001
5002         * lib/tempname.c (__gen_tempname): Change attempts_min
5003         into a macro.  Use preprocessor to decide how to initialize
5004         attempts [Coverity CID 67].
5005
5006 2006-09-20  Bruno Haible  <bruno@clisp.org>
5007
5008         * lib/mkdtemp.c: Import from libc.
5009         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5010                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5011                 attempts_min into a macro.  Use preprocessor to decide how to
5012                 initialize attempts [Coverity CID 67].
5013         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5014                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5015                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5016
5017 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5018
5019         * gnulib-tool (func_exit): New function, to allow to pass the
5020         exit status portably through the trap.  Use everywhere.
5021         (--help, --version): Signal a write error.
5022         (trap): catch SIGPIPE, for write errors.
5023         Exit at the end of the trap, with the correct exit status.
5024
5025 2006-09-19  Karl Berry  <karl@gnu.org>
5026
5027         * doc/gnulib.texi: note about the license texinfo files.
5028
5029 2006-09-19  Eric Blake  <ebb9@byu.net>
5030
5031         * gnulib-tool: Avoid space-tab.
5032
5033 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5034
5035         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5036         that prevented coreutils 6.1 from building.  Problem reported
5037         by Petter Reinholdtsen.
5038
5039 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5040
5041         * gnulib-tool (avoidlist): Fix typo that broke options like
5042         --avoid=lock that are used by coreutils bootstrap.
5043
5044 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5045
5046         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5047         more systematically.
5048
5049 2006-09-18  Jim Meyering  <jim@meyering.net>
5050
5051         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5052
5053 2006-09-18  Bruno Haible  <bruno@clisp.org>
5054
5055         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5056
5057 2006-09-18  Bruno Haible  <bruno@clisp.org>
5058
5059         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5060         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5061         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5062         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5063         * m4/gettext.m4: Require autoconf >= 2.52.
5064         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5065         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5066         of gl_cv_header_inttypes_h.
5067
5068 2006-09-18  Bruno Haible  <bruno@clisp.org>
5069
5070         * lib/javaversion.c: Include configmake.h.
5071
5072 2006-09-18  Bruno Haible  <bruno@clisp.org>
5073
5074         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5075         avoid that the while loops be executed in a subshell.
5076
5077 2006-09-18  Bruno Haible  <bruno@clisp.org>
5078
5079         * MODULES.html.sh (func_module): Break long lines.
5080         Suggested by Bruce Korb <bkorb@gnu.org>.
5081
5082 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5083
5084         Speed up by a factor of 1.12.
5085         * gnulib-tool (nl): New variable.
5086         (func_import): Rewrite include directive extraction to only read each
5087         directive once.
5088
5089 2006-09-17  Bruno Haible  <bruno@clisp.org>
5090
5091         * modules/javaversion (Makefile.am): Remove DEFS setting.
5092         (Depends-on): Add configmake, for PKGDATADIR definition.
5093
5094 2006-09-17  Bruno Haible  <bruno@clisp.org>
5095
5096         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5097
5098 2006-09-17  Bruno Haible  <bruno@clisp.org>
5099
5100         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5101         (func_modules_transitive_closure, func_modules_add_dummy,
5102         func_modules_to_filelist, func_import, func_create_testdir,
5103         func_create_megatestdir, ...): Use it wherever possible.
5104         Suggested by Ralf Wildenhues.
5105
5106 2006-09-16  Karl Berry  <karl@gnu.org>
5107
5108         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5109         to avoid sectioning errors.
5110         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5111         [ifinfo]: blank line after @center-ed titles.
5112         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5113         Spell FSF address consistently with others.
5114         (These changes approved by rms.)
5115
5116 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5117
5118         Speed up by a factor of 1.61.
5119         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5120         already checked module names again.
5121
5122 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5123
5124         Speed up by a factor of 1.13.
5125         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5126         for new_files, and the input to func_add_or_update.
5127
5128 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5129
5130         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5131         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5132
5133 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5134
5135         * modules/mkancesdirs (Depends-on): Add fcntl.
5136         * modules/savewd: New file.
5137         * MODULES.html.sh (File system functions): Add savewd.
5138
5139         * modules/configmake (Makefile.am): Add support for the
5140         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5141
5142 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5143
5144         * m4/savewd.m4: New file.
5145
5146 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5147
5148         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5149         (dirchownmod): New arg FD.  All callers changed.
5150         Use FD rather than opening the directory ourself, as opening is
5151         now the caller's responsibility.
5152         * lib/dirchownmod.h: Likewise.
5153         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5154         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5155         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5156         (test_dir): Remove.
5157         (mkancesdirs): Return length of prefix of FILE that has already
5158         been made, or -2 if there is a child doing the work.  Redo
5159         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5160         ".", and treat ".." specially since it might stray back into
5161         already-created areas.  Use a subprocess if necessary.  New arg
5162         WD; all users changed.  MAKE_DIR function should now return 1
5163         if it creates a directory that is not readable.  Return -2 if
5164         a child process is spun off.
5165         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5166         Adjust signature to match code.
5167         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5168         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5169         all users changed.
5170         * lib/savewd.c, lib/savewd.h: New files.
5171
5172 2006-09-15  Jim Meyering  <jim@meyering.net>
5173
5174         * modules/rename-dest-slash: New module.
5175         * MODULES.html.sh (posix_compat): Add it here.
5176
5177         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5178
5179 2006-09-15  Jim Meyering  <jim@meyering.net>
5180
5181         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5182         file.
5183
5184         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5185
5186 2006-09-15  Jim Meyering  <jim@meyering.net>
5187
5188         * lib/rename-dest-slash.c (has_trailing_slash): Use
5189         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5190         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5191         test before testing whether SRC is a directory.
5192         Suggestions from Bruno Haible.
5193
5194         Avoid a warning about an unused variable.
5195         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5196         into the #ifdef block where it's used.
5197
5198         * lib/rename-dest-slash.c: New file.
5199
5200 2006-09-14  Bruno Haible  <bruno@clisp.org>
5201
5202         * lib/allocsa.c: Include <config.h> unconditionally.
5203         * lib/asnprintf.c: Likewise.
5204         * lib/asprintf.c: Likewise.
5205         * lib/c-strcasecmp.c: Likewise.
5206         * lib/c-strcasestr.c: Likewise.
5207         * lib/c-strncasecmp.c: Likewise.
5208         * lib/c-strstr.c: Likewise.
5209         * lib/classpath.c: Likewise.
5210         * lib/clean-temp.c: Likewise.
5211         * lib/concatpath.c: Likewise.
5212         * lib/copy-file.c: Likewise.
5213         * lib/csharpcomp.c: Likewise.
5214         * lib/csharpexec.c: Likewise.
5215         * lib/execute.c: Likewise.
5216         * lib/fatal-signal.c: Likewise.
5217         * lib/findprog.c: Likewise.
5218         * lib/fwriteerror.c: Likewise.
5219         * lib/gl_array_list.c: Likewise.
5220         * lib/gl_array_oset.c: Likewise.
5221         * lib/gl_avltree_list.c: Likewise.
5222         * lib/gl_avltree_oset.c: Likewise.
5223         * lib/gl_avltreehash_list.c: Likewise.
5224         * lib/gl_carray_list.c: Likewise.
5225         * lib/gl_linked_list.c: Likewise.
5226         * lib/gl_linkedhash_list.c: Likewise.
5227         * lib/gl_list.c: Likewise.
5228         * lib/gl_oset.c: Likewise.
5229         * lib/gl_rbtree_list.c: Likewise.
5230         * lib/gl_rbtree_oset.c: Likewise.
5231         * lib/gl_rbtreehash_list.c: Likewise.
5232         * lib/imaxabs.c: Likewise.
5233         * lib/imaxdiv.c: Likewise.
5234         * lib/javacomp.c: Likewise.
5235         * lib/javaexec.c: Likewise.
5236         * lib/javaversion.c: Likewise.
5237         * lib/linebreak.c: Likewise.
5238         * lib/localcharset.c: Likewise.
5239         * lib/lock.c: Likewise.
5240         * lib/mbchar.c: Likewise.
5241         * lib/mbswidth.c: Likewise.
5242         * lib/mkdtemp.c: Likewise.
5243         * lib/pipe.c: Likewise.
5244         * lib/printf-args.c: Likewise.
5245         * lib/printf-parse.c: Likewise.
5246         * lib/progname.c: Likewise.
5247         * lib/progreloc.c: Likewise.
5248         * lib/readlink.c: Likewise.
5249         * lib/sh-quote.c: Likewise.
5250         * lib/stpcpy.c: Likewise.
5251         * lib/stpncpy.c: Likewise.
5252         * lib/strcasecmp.c: Likewise.
5253         * lib/strcasestr.c: Likewise.
5254         * lib/strcspn.c: Likewise.
5255         * lib/striconv.c: Likewise.
5256         * lib/strncasecmp.c: Likewise.
5257         * lib/strnlen1.c: Likewise.
5258         * lib/strstr.c: Likewise.
5259         * lib/strtok_r.c: Likewise.
5260         * lib/tls.c: Likewise.
5261         * lib/tmpdir.c: Likewise.
5262         * lib/unicodeio.c: Likewise.
5263         * lib/unsetenv.c: Likewise.
5264         * lib/vasnprintf.c: Likewise.
5265         * lib/vasprintf.c: Likewise.
5266         * lib/wait-process.c: Likewise.
5267         * lib/xallocsa.c: Likewise.
5268         * lib/xsetenv.c: Likewise.
5269         * lib/xstriconv.c: Likewise.
5270
5271 2006-09-13  Simon Josefsson  <jas@extundo.com>
5272
5273         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5274         that internally, suggested by Ralf Wildenhues
5275         <Ralf.Wildenhues@gmx.de>.
5276
5277 2006-09-13  Simon Josefsson  <jas@extundo.com>
5278
5279         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5280         @LIBOBJS@.
5281         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5282
5283 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5284
5285         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5286         longer worry about uses that don't define HAVE_CONFIG_H.
5287         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5288         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5289         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5290         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5291         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5292         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5293         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5294         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5295         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5296         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5297         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5298         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5299         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5300         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5301         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5302         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5303         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5304         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5305         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5306         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5307         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5308         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5309         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5310         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5311         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5312         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5313         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5314         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5315         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5316         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5317         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5318         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5319         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5320         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5321         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5322         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5323         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5324         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5325         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5326         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5327         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5328         Likewise.
5329
5330 2006-09-13  Eric Blake  <ebb9@byu.net>
5331
5332         * lib/getopt.c: Fix typo in last commit.
5333
5334 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5335
5336         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5337         dgettext.
5338
5339 2006-09-12  Jim Meyering  <jim@meyering.net>
5340
5341         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5342         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5343         Reported by Nelson H. F. Beebe.
5344
5345 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5346
5347         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5348         program_invocation_name and program_invocation_short_name are
5349         initialized.
5350         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5351         and program_invocation_short_name to argp.h, so they are visible
5352         to user programs.
5353         * lib/argp.h: Likewise
5354
5355 2006-09-10  Bruno Haible  <bruno@clisp.org>
5356
5357         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5358         m4/inttypes_h.m4, m4/uintmax_t.m4.
5359
5360 2006-09-10  Bruno Haible  <bruno@clisp.org>
5361
5362         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5363         gl_AC_TYPE_UINTMAX_T.
5364
5365 2006-09-10  Bruno Haible  <bruno@clisp.org>
5366
5367         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5368
5369 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5370
5371         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5372         convention.  Text proposed by Bruno Haible.
5373         (struct argp_option): Document the use of N_() wrappers.
5374
5375         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5376         '\v', and translate the two parts separately, instead of feeding
5377         the whole string to gettext.  This allows to exclude
5378         '\v' from the strings visible to the translator by writing doc
5379         strings as N_("..") "\v" N_("..").
5380
5381 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5382
5383         * config/srclist.txt: Undo latest change; the bug was fixed.
5384
5385 2006-09-09  Bruno Haible  <bruno@clisp.org>
5386
5387         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5388         assignments if building a library without libtool.
5389         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5390         in func_emit_lib_Makefile_am.
5391         (func_import): When building a static library libfoo.a, arrange to
5392         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5393         (func_create_testdir): Likewise.
5394         * modules/gc (configure.ac, Makefile.am): If building statically,
5395         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5396         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5397         * modules/striconv (configure.ac, Makefile.am): Likewise.
5398         Based on a suggestion by Ralf Wildenhues.
5399
5400 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5401
5402         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5403         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5404         Also:
5405
5406         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5407         Add year_2050_test to catch glibc bug 2821
5408         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5409
5410         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5411         Prefer #ifdef to #if.
5412
5413         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5414         Return from 'main' instead of calling 'exit'.
5415
5416 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5417
5418         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5419         returned the maximum time_t value rather than (time_t) -1.
5420         Problem originally reported by William Bardwell
5421         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5422
5423         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5424         Moved to here ...
5425         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5426         ... from here.
5427
5428 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5429
5430         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5431         2821 is fixed.
5432
5433 2006-09-08  Jim Meyering  <jim@meyering.net>
5434
5435         Don't make generated files read-only.  That would bother too many
5436         people.  However, do retain the ability to work when targets are
5437         read-only: remove the destination and temporary files before writing
5438         them (when generated via sed or echo), or by using the -f option for
5439         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5440         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5441         * modules/byteswap, modules/configmake, modules/fcntl:
5442         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5443         * modules/localcharset, modules/netinet_in, modules/poll:
5444         * modules/stdbool, modules/stdint, modules/sys_select:
5445         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5446
5447 2006-09-08  Jim Meyering  <jim@meyering.net>
5448
5449         Avoid new build failure on FreeBSD 6.0.
5450         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5451         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5452         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5453
5454 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5455
5456         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5457
5458 2006-09-07  Jim Meyering  <jim@meyering.net>
5459
5460         Fix global typo in last change: use chmod u-w, not chmod u-x.
5461         Spotted by Paul Eggert and Bruce Korb.
5462         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5463         * modules/byteswap, modules/configmake, modules/fcntl:
5464         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5465         * modules/localcharset, modules/netinet_in, modules/poll:
5466         * modules/stdbool, modules/stdint, modules/sys_select:
5467         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5468
5469 2006-09-06  Jim Meyering  <jim@meyering.net>
5470
5471         Make generated files be read-only.
5472         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5473         Ensure that each generated file is now read-only.
5474         * modules/argz: Likewise.
5475         * modules/arpa_inet: Likewise.
5476         * modules/byteswap: Likewise.
5477         * modules/configmake: Likewise.
5478         * modules/fcntl: Likewise.
5479         * modules/fnmatch: Likewise.
5480         * modules/getopt: Likewise.
5481         * modules/glob: Likewise.
5482         * modules/inttypes: Likewise.
5483         * modules/netinet_in: Likewise.
5484         * modules/poll: Likewise.
5485         * modules/stdbool: Likewise.
5486         * modules/stdint: Likewise.
5487         * modules/sys_select: Likewise.
5488         * modules/sys_socket: Likewise.
5489         * modules/sys_stat: Likewise.
5490         * modules/sysexits: Likewise.
5491         * modules/localcharset: Same as above, but continue using temporary
5492         file named "t-$@" (why different?) rather than the "$@-t" used
5493         everywhere else.
5494
5495         * modules/sysexits (Makefile.am): Replace literal occurrences
5496         of "sysexit.h" more readable, and more consistent, "$@".
5497
5498 2006-09-06  Bruno Haible  <bruno@clisp.org>
5499
5500         * modules/striconv: New file.
5501         * modules/xstriconv: New file.
5502         * MODULES.html.sh (Internationalization functions): Add striconv,
5503         xstriconv.
5504
5505 2006-09-06  Bruno Haible  <bruno@clisp.org>
5506
5507         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5508         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5509         not using libtool correctly.
5510
5511 2006-09-06  Bruno Haible  <bruno@clisp.org>
5512
5513         * lib/striconv.h: New file.
5514         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5515         iconvstring.c.
5516         * lib/xstriconv.h: New file.
5517         * lib/xstriconv.c: New file.
5518
5519 2006-09-06  Bruno Haible  <bruno@clisp.org>
5520
5521         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5522         lib_..._LDFLAGS.
5523
5524 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5525
5526         * lib/argz_.h: Sync from Libtool.
5527
5528         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5529                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5530
5531         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5532
5533 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5534
5535         * modules/trim: New file.
5536
5537 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5538
5539         * lib/trim.h: New file.
5540         * lib/trim.c: New file.
5541
5542 2006-09-05  Bruno Haible  <bruno@clisp.org>
5543
5544         * MODULES.html.sh (String handling): Add trim.
5545
5546 2006-09-04  Karl Berry  <karl@gnu.org>
5547
5548         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5549         until next release.
5550
5551 2006-09-03  Bruno Haible  <bruno@clisp.org>
5552
5553         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5554         correctly.
5555
5556 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5557
5558         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5559         not gl_GETLOADAVG.  Omit unneeded semicolons.
5560         Problems reported by Ralf Wildenhues in
5561         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5562         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5563         at the end, which is the usual gnulib style.
5564
5565         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5566         of doing all the work ourselves.
5567         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5568         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5569
5570 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5571
5572         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5573         Problem reported by Ralf Wildenhues in
5574         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5575
5576         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5577         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5578
5579 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5580
5581         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5582         yesterday's patch by changing test -n to test -z.
5583
5584 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5585
5586         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5587         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5588         the former is now obsolescent.
5589
5590         * modules/chdir-long (Depends-on): Add fcntl.
5591
5592 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5593
5594         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5595         obsolescent, and programs should use gnulib instead.
5596         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5597         but with prefixes changed.
5598
5599 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5600
5601         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5602         or stdbool.h, because they might not exist while configuring.
5603
5604         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5605         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5606         does that for us.
5607         (O_DIRECTORY): Remove.
5608
5609 2006-08-31  Eric Blake  <ebb9@byu.net>
5610
5611         * gnulib-tool: Don't let emacs change spaces to TAB.
5612
5613 2006-08-31  Bruno Haible  <bruno@clisp.org>
5614
5615         * gnulib-tool: When calling func_import more than once, do it in a
5616         subshell.
5617         Reported by Eric Blake <ebb9@byu.net>.
5618
5619 2006-08-31  Bruno Haible  <bruno@clisp.org>
5620
5621         * gnulib-tool (nl): Remove variable.
5622         (sed_transform_lib_file): Use more robust test for config-h module.
5623         (func_import): Fix typo in 2006-08-25 patch.
5624
5625 2006-08-31  Bruno Haible  <bruno@clisp.org>
5626
5627         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5628         specified, augment Makefile.am variables instead of assigning them.
5629
5630 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5631
5632         Work around a bug in both the Linux and SunOS 64-bit kernels:
5633         nanosleep mishandles sleeps for longer than 2**31 seconds.
5634         Problem reported by Frank v Waveren in
5635         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5636         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5637         Check for nanosleep bug.
5638         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5639
5640 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5641
5642         Work around a bug in both the Linux and SunOS 64-bit kernels:
5643         nanosleep mishandles sleeps for longer than 2**31 seconds.
5644         Problem reported by Frank v Waveren in
5645         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5646         * lib/nanosleep.c (BILLION): New constant.
5647         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5648         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5649         implementation.
5650
5651 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5652
5653         * modules/nanosleep (Depends-on): Add gettime.
5654
5655 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5656         and Simon Josefsson  <jas@extundo.com>
5657         and Oskar Liljeblad  <oskar@osk.mine.nu>
5658
5659         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5660         * gnulib-tool (func_import): New license type 'unmodifiable license
5661         text'.
5662         * modules/fdl: Use it.  Longer description.
5663         * module/gpl, module/lgpl: New files.
5664
5665 2006-08-30  Jim Meyering  <jim@meyering.net>
5666
5667         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5668         shadowing the parameter.
5669
5670 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5671
5672         Sync from Libtool:
5673
5674         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5675
5676         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5677         sharing with gnulib.  Report by Eric Blake.
5678
5679 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5680
5681         * modules/isapipe: New file.
5682         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5683
5684 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5685
5686         * modules/configmake (Makefile.am): Add a comment, and omit
5687         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5688         by Bruno Haible.
5689
5690 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5691
5692         * m4/isapipe.m4: New file.
5693
5694 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5695
5696         * lib/isapipe.c, lib/isapipe.h: New files.
5697
5698 2006-08-29  Jim Meyering  <jim@meyering.net>
5699
5700         * modules/configmake (Makefile.am): Make configmake.h depend on
5701         Makefile.  Otherwise, a stale configmake.h could hang around.
5702
5703 2006-08-29  Eric Blake  <ebb9@byu.net>
5704
5705         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5706         resolution of upstream bug 3044.
5707
5708 2006-08-29  Bruno Haible  <bruno@clisp.org>
5709
5710         * modules/localcharset (Depends-on): Add configmake.
5711         (Makefile.am): Remove setting of LIBDIR through DEFS.
5712
5713 2006-08-29  Bruno Haible  <bruno@clisp.org>
5714
5715         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5716         defined.
5717
5718 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5719
5720         * modules/fcntl: New file.
5721         * modules/chdir-safer (Depends-on): Add fcntl.
5722         * modules/fts: Likewise.
5723         * modules/mkdir-p: Likewise.
5724
5725         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5726         This undoes the most recent change, since we're now addressing the
5727         problem in a different way.
5728
5729         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5730         into output, since the output might be called Makefile.am even
5731         if $makefile_name is something different.
5732         (func_import): Use $makefile_am rather than
5733         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5734         empty.
5735
5736         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5737
5738 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5739
5740         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5741         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5742         recent change to stdint.m4, since we're now addressing the problem in a
5743         different way.
5744
5745 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5746
5747         * m4/fcntl_h.m4: New file.
5748
5749 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5750
5751         * lib/fcntl_.h: New file.
5752         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5753         the fcntl module.
5754         * lib/dirchownmod.c: Likewise.
5755         * lib/fts.c: Likewise.
5756
5757         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5758         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5759         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5760         just before including <inttypes.h>, to avoid circular inclusion.
5761
5762 2006-08-28  Jim Meyering  <jim@meyering.net>
5763
5764         * doc/visibility.texi: Actually read and correct the grammar of the
5765         sentence affected by yesterday's change.
5766
5767 2006-08-28  Eric Blake  <ebb9@byu.net>
5768
5769         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5770         needs wrapper.
5771
5772 2006-08-28  Eric Blake  <ebb9@byu.net>
5773
5774         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5775
5776 2006-08-28  Eric Blake  <ebb9@byu.net>
5777
5778         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5779
5780 2006-08-28  Bruno Haible  <bruno@clisp.org>
5781
5782         * modules/c-strstr: New file, from GNU gettext.
5783         * MODULES.html.sh (String handling): Add c-strstr.
5784
5785 2006-08-28  Bruno Haible  <bruno@clisp.org>
5786
5787         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5788         macros.
5789         Reported by Eric Blake.
5790
5791 2006-08-28  Bruno Haible  <bruno@clisp.org>
5792
5793         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5794         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5795         * lib/vasprintf.c: Include errno.h, limits.h.
5796         (EOVERFLOW): New fallback definition.
5797         (vasprintf): Test here whether the string length is > INT_MAX.
5798         * lib/vsnprintf.c: Include errno.h, limits.h.
5799         (EOVERFLOW): New fallback definition.
5800         (vsnprintf): Fix bug when generated string was too long for the buffer.
5801         Test here whether the string length is > INT_MAX.
5802
5803 2006-08-28  Bruno Haible  <bruno@clisp.org>
5804
5805         * lib/inttypes_.h (SCNX*): Remove definitions.
5806         Reported by Eric Blake.
5807
5808 2006-08-28  Bruno Haible  <bruno@clisp.org>
5809
5810         * lib/c-strstr.h: New file, from GNU gettext.
5811         * lib/c-strstr.c: New file, from GNU gettext.
5812
5813 2006-08-28  Bruno Haible  <bruno@clisp.org>
5814
5815         * gnulib-tool: Reorder some statements.
5816
5817 2006-08-28  Bruno Haible  <bruno@clisp.org>
5818
5819         * gnulib-tool: New option --makefile-name.
5820         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5821         $makefile_name.
5822         (func_import): Write $makefile_name to the cache file, and read it from
5823         there unless explicitly specified. Use $makefile_name as file name
5824         instead of Makefile.am. Adjust the recommendations accordingly.
5825
5826 2006-08-28  Bruno Haible  <bruno@clisp.org>
5827
5828         * gnulib-tool (func_verify_module): Check against misapplying patch.
5829
5830 2006-08-28  Bruno Haible  <bruno@clisp.org>
5831
5832         * gnulib-tool (func_relativize, func_relconcat): New functions.
5833         Give an error if --local-dir is given with --update.
5834         Remove trailing slashes from $local_gnulib_dir.
5835         (func_import): Store the relativized $local_gnulib_dir in
5836         gnulib-cache.m4, and read it from there if not specified explicitly.
5837
5838 2006-08-28  Bruno Haible  <bruno@clisp.org>
5839
5840         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5841         is the current directory. Respect also $local_gnulib_dir.
5842
5843 2006-08-28  Bruno Haible  <bruno@clisp.org>
5844             Simon Josefsson  <jas@extundo.com>
5845
5846         BeOS portability.
5847         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5848
5849 2006-08-27  Jim Meyering  <jim@meyering.net>
5850
5851         * doc/visibility.texi: Remove duplicate word: "pointer".
5852
5853 2006-08-26  Bruno Haible  <bruno@clisp.org>
5854
5855         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5856         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5857         (Makefile.am): Create inttypes.h from inttypes_.h.
5858         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5859
5860         * modules/imaxabs: New file.
5861
5862         * modules/imaxdiv: New file.
5863
5864 2006-08-26  Bruno Haible  <bruno@clisp.org>
5865
5866         * m4/inttypes.m4: New file.
5867         * m4/_inttypes_h.m4: Remove file.
5868         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5869         PRI_MACROS_BROKEN.
5870         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5871
5872         * m4/imaxabs.m4: New file.
5873
5874         * m4/imaxdiv.m4: New file.
5875
5876 2006-08-26  Bruno Haible  <bruno@clisp.org>
5877
5878         * lib/inttypes_.h: New file.
5879         * lib/inttypes.h: Remove file.
5880         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5881
5882         * lib/imaxabs.c: New file.
5883
5884         * lib/imaxdiv.c: New file.
5885
5886 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5887
5888         New config-h module, so that "make" output needn't be cluttered
5889         by -DHAVE_CONFIG_H.
5890         * MODULES.html.sh (Support for building libraries and executables):
5891         Add config-h.
5892         * modules/config-h: New file.
5893         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5894         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5895         the config-h module is used.
5896
5897         New configmake module, so that "make" output needn't be cluttered
5898         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5899         * MODULES.html.sh (Support for building libraries and executables):
5900         Add configmake.
5901         * modules/configmake: New file.
5902
5903 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5904
5905         * m4/config-h.m4: New file.
5906
5907 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5908
5909         * config/srclist.txt: Add elisp-comp.
5910
5911 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5912
5913         * MODULES.html.sh (Support for building libraries and executables):
5914         Add elisp-comp.
5915         * build-aux/elisp-comp: New file.
5916         * modules/elisp-comp: New file.
5917
5918 2006-08-24  Bruno Haible  <bruno@clisp.org>
5919
5920         * gnulib-tool (func_create_testdir): Use non-default values of
5921         sourcebase and m4base.
5922
5923 2006-08-24  Bruno Haible  <bruno@clisp.org>
5924
5925         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5926         HTML structure.
5927
5928 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5929
5930         * modules/openat (Depends-on): Add lchown.
5931
5932 2006-08-23  Bruno Haible  <bruno@clisp.org>
5933
5934         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5935         of gl_LOCK_EARLY instead of gl_LOCK.
5936
5937 2006-08-23  Bruno Haible  <bruno@clisp.org>
5938
5939         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5940         on OSF/1 to no.
5941         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5942
5943 2006-08-23  Bruno Haible  <bruno@clisp.org>
5944
5945         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5946         as unusable.
5947
5948         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5949         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5950         (gl_LOCK): New macro.
5951
5952 2006-08-22  Simon Josefsson  <jas@extundo.com>
5953
5954         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5955         to md5 module.
5956
5957 2006-08-22  Simon Josefsson  <jas@extundo.com>
5958
5959         * MODULES.html.sh: Add "Support for maintaining and release
5960         projects".
5961
5962         * build-aux/gnupload: New file, from coreutils.
5963
5964 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5965
5966         Avoid the need for AC_LIBSOURCES in m4 macros.
5967         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5968         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5969         * modules/check-version (EXTRA_DIST): Add check-version.h.
5970         * modules/crc (EXTRA_DIST): Add crc.h.
5971         * modules/des (EXTRA_DIST): Add des.h.
5972         * modules/gc (EXTRA_DIST): Add gc.h.
5973         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5974         * modules/getline (EXTRA_DIST): Add getline.h.
5975         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5976         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5977         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5978         * modules/md2 (EXTRA_DIST): Add md2.h.
5979         * modules/md4 (EXTRA_DIST): Add md4.h.
5980         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5981         * modules/read-file (EXTRA_DIST): Add read-file.h.
5982         * modules/readline (EXTRA_DIST): Add readline.h.
5983         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5984         rijndael-api-fst.h.
5985
5986 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5987
5988         * m4/rijndael.m4 (gl_ARCFOUR):
5989         * m4/arctwo.m4 (gl_ARCTWO):
5990         * m4/check-version.m4 (gl_CHECK_VERSION):
5991         * m4/crc.m4 (gl_CRC):
5992         * m4/des.m4 (gl_DES):
5993         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5994         * m4/gc.m4 (gl_GC):
5995         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5996         * m4/getline.m4 (gl_FUNC_GETLINE):
5997         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5998         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5999         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6000         * m4/md2.m4 (gl_MD2):
6001         * m4/md4.m4 (gl_MD4):
6002         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6003         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6004         * m4/readline.m4 (gl_FUNC_READLINE):
6005         * m4/rijndael.m4 (gl_RIJNDAEL):
6006         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6007         to get the necessary .h files and whatnot.
6008
6009 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6010
6011         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6012         gnulib rather than the other way around.
6013         * config/srclistvars.sh (COREUTILS): Remove.
6014
6015 2006-08-22  Jim Meyering  <jim@meyering.net>
6016
6017         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6018
6019         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6020
6021 2006-08-22  Eric Blake  <ebb9@byu.net>
6022
6023         * modules/regexprops-generic: New file.
6024         * MODULES.html.sh (Support for building documentation): List it.
6025
6026 2006-08-22  Eric Blake  <ebb9@byu.net>
6027
6028         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6029         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6030         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6031         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6032
6033 2006-08-22  Bruno Haible  <bruno@clisp.org>
6034
6035         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6036         and lib_LTLIBRARIES like the other lib_* variables.
6037
6038 2006-08-22  Bruno Haible  <bruno@clisp.org>
6039
6040         * build-aux/x-to-1.in: New file, from GNU gettext.
6041
6042 2006-08-22  Bruno Haible  <bruno@clisp.org>
6043
6044         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6045         <utmpx.h> exists.
6046
6047 2006-08-22  Bruno Haible  <bruno@clisp.org>
6048
6049         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6050         <utmpx.h> exists.
6051
6052 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6053
6054         BeOS portability.
6055         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6056         exist.
6057         Problem reported by Bruno Haible.
6058
6059 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6060
6061         Avoid the need for AC_LIBSOURCES in m4 macros.
6062         * modules/acl (EXTRA_DIST): Add acl.h.
6063         * modules/argmatch (Files): Add m4/argmatch.m4.
6064         (configure.ac): Add gl_ARGMATCH.
6065         (EXTRA_DIST): Renamed from lib_SOURCES, for
6066         consistency with the other modules.  Remove argmatch.c.
6067         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6068         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6069         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6070         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6071         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6072         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6073         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6074         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6075         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6076         * modules/closeout (EXTRA_DIST): Add closeout.h.
6077         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6078         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6079         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6080         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6081         dirname.h; remove basename.c and stripslash.c.
6082         * modules/exclude (EXTRA_DIST): Add exclude.h.
6083         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6084         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6085         * modules/file-type (EXTRA_DIST): Add file-type.h.
6086         * modules/filemode (EXTRA_DIST): Add filemode.h.
6087         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6088         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6089         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6090         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6091         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6092         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6093         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6094         * modules/getdate (EXTRA_DIST): Add getdate.c.
6095         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6096         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6097         * modules/getpass (EXTRA_DIST): Add getpass.h.
6098         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6099         * modules/group-member (EXTRA_DIST): Add group-member.h.
6100         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6101         * modules/hash (EXTRA_DIST): Add hash.h.
6102         * modules/human (EXTRA_DIST): Add human.h.
6103         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6104         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6105         * modules/lchown (EXTRA_DIST): Add lchown.h.
6106         * modules/long-options (EXTRA_DIST): Add long-options.h.
6107         * modules/lstat (EXTRA_DIST): Add lstat.h.
6108         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6109         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6110         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6111         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6112         * modules/memxor (EXTRA_DIST): Add memxor.h.
6113         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6114         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6115         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6116         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6117         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6118         * modules/physmem (EXTRA_DIST): Add physmem.h.
6119         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6120         * modules/posixver (EXTRA_DIST): Add posixver.h.
6121         * modules/quote (EXTRA_DIST): Add quote.h.
6122         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6123         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6124         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6125         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6126         regex_internal.h regexec.c.
6127         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6128         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6129         * modules/same (EXTRA_DIST): Add same.h.
6130         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6131         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6132         * modules/savedir (EXTRA_DIST): Add savedir.h.
6133         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6134         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6135         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6136         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6137         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6138         * modules/strdup (EXTRA_DIST): Add strdup.h.
6139         * modules/strftime (EXTRA_DIST): Add strftime.h.
6140         * modules/strndup (EXTRA_DIST): Add strndup.h.
6141         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6142         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6143         * modules/time_r (EXTRA_DIST): Add time_r.h.
6144         * modules/timespec (EXTRA_DIST): Add timespec.h.
6145         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6146         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6147         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6148         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6149         * modules/userspec (EXTRA_DIST): Add userspec.h.
6150         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6151         * modules/utimens (EXTRA_DIST): Add utimens.h.
6152         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6153         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6154         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6155         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6156         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6157         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6158         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6159         * modules/yesno (EXTRA_DIST): Add yesno.h.
6160
6161 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6162
6163         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6164
6165         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6166         * m4/dev-ino.m4, same-inode.m4: Remove.
6167
6168         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6169         * m4/acl.m4 (AC_FUNC_ACL):
6170         * m4/backupfile.m4 (gl_BACKUPFILE):
6171         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6172         * m4/canon-host.m4 (gl_CANON_HOST):
6173         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6174         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6175         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6176         * m4/cloexec.m4 (gl_CLOEXEC):
6177         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6178         * m4/closeout.m4 (gl_CLOSEOUT):
6179         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6180         * m4/dirname.m4 (gl_DIRNAME):
6181         * m4/exclude.m4 (gl_EXCLUDE):
6182         * m4/exitfail.m4 (gl_EXITFAIL):
6183         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6184         * m4/file-type.m4 (gl_FILE_TYPE):
6185         * m4/filemode.m4 (gl_FILEMODE):
6186         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6187         * m4/fpending.m4 (gl_FUNC_FPENDING):
6188         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6189         * m4/fts.m4 (gl_FUNC_FTS):
6190         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6191         * m4/getdate.m4 (gl_GETDATE):
6192         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6193         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6194         * m4/getpass.m4 (gl_FUNC_GETPASS):
6195         * m4/gettime.m4 (gl_GETTIME):
6196         * m4/getugroups.m4 (gl_GETUGROUPS):
6197         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6198         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6199         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6200         * m4/hash.m4 (gl_HASH):
6201         * m4/idcache.m4 (gl_IDCACHE):
6202         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6203         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6204         * m4/long-options.m4 (gl_LONG_OPTIONS):
6205         * m4/lstat.m4 (gl_FUNC_LSTAT):
6206         * m4/md5.m4 (gl_MD5):
6207         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6208         * m4/memcoll.m4 (gl_MEMCOLL):
6209         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6210         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6211         * m4/memxor.m4 (gl_MEMXOR):
6212         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6213         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6214         * m4/modechange.m4 (gl_MODECHANGE):
6215         * m4/mountlist.m4 (gl_MOUNTLIST):
6216         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6217         * m4/openat.m4 (gl_FUNC_OPENAT):
6218         * m4/pathmax.m4 (gl_PATHMAX):
6219         * m4/physmem.m4 (gl_PHYSMEM):
6220         * m4/posixtm.m4 (gl_POSIXTM):
6221         * m4/posixver.m4 (gl_POSIXVER):
6222         * m4/quote.m4 (gl_QUOTE):
6223         * m4/quotearg.m4 (gl_QUOTEARG):
6224         * m4/readtokens.m4 (gl_READTOKENS):
6225         * m4/readutmp.m4 (gl_READUTMP):
6226         * m4/regex.m4 (gl_REGEX):
6227         * m4/safe-read.m4 (gl_SAFE_READ):
6228         * m4/safe-write.m4 (gl_SAFE_WRITE):
6229         * m4/same.m4 (gl_SAME):
6230         * m4/save-cwd.m4 (gl_SAVE_CWD):
6231         * m4/savedir.m4 (gl_SAVEDIR):
6232         * m4/settime.m4 (gl_SETTIME):
6233         * m4/sha1.m4 (gl_SHA1):
6234         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6235         * m4/stat-macros.m4 (gl_STAT_MACROS):
6236         * m4/stat-time.m4 (gl_STAT_TIME):
6237         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6238         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6239         * m4/strdup.m4 (gl_FUNC_STRDUP):
6240         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6241         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6242         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6243         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6244         * m4/time_r.m4 (gl_TIME_R):
6245         * m4/timespec.m4 (gl_TIMESPEC):
6246         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6247         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6248         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6249         * m4/userspec.m4 (gl_USERSPEC):
6250         * m4/utimecmp.m4 (gl_UTIMECMP):
6251         * m4/utimens.m4 (gl_UTIMENS):
6252         * m4/xalloc.m4 (gl_XALLOC):
6253         * m4/xgetcwd.m4 (gl_XGETCWD):
6254         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6255         * m4/xreadlink.m4 (gl_XREADLINK):
6256         * m4/xstrtod.m4 (gl_XSTRTOD):
6257         * m4/yesno.m4 (gl_YESNO):
6258         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6259         to get the necessary .h files and whatnot.
6260
6261 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6262             Bruno Haible  <bruno@clisp.org>
6263
6264         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6265         /bin/sh understanding of '!' conditional negation.
6266
6267 2006-08-21  Jim Meyering  <jim@meyering.net>
6268
6269         * modules/openat (Depends-on): Really alphabetize.
6270
6271         * modules/acl (Depends-on): Add error and quote.
6272
6273         * check-module (find_included_lib_files): Add at-func.c to the
6274         ok-to-include-more-than-once white list.
6275
6276         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6277
6278 2006-08-21  Bruno Haible  <bruno@clisp.org>
6279
6280         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6281         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6282         Reported by Martin Lambers <marlam@marlam.de>.
6283
6284 2006-08-21  Bruno Haible  <bruno@clisp.org>
6285
6286         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6287         specify an installation location, don't emit a noinst_LIBRARIES or
6288         noinst_LTLIBRARIES assignment.
6289
6290 2006-08-21  Bruno Haible  <bruno@clisp.org>
6291
6292         BeOS portability.
6293         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6294         BeOS has mbrtowc() but no <wctype.h>.
6295
6296 2006-08-21  Bruno Haible  <bruno@clisp.org>
6297
6298         BeOS portability.
6299         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6300         exist.
6301
6302 2006-08-21  Bruno Haible  <bruno@clisp.org>
6303
6304         BeOS portability.
6305         * lib/mbchar.h: Include <wctype.h> only if it exists.
6306
6307 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6308
6309         Remove files that are no longer needed by their respective modules.
6310         * m4/obstack.m4: Remove.
6311         * m4/strerror_r.m4: Remove.
6312         * m4/uint32_t.m4: Remove.
6313         * m4/uintptr_t.m4: Remove.
6314         * m4/ullong_max.m4: Remove.
6315         * m4/xstrtoimax.m4: Remove.
6316         * m4/xstrtoumax.m4: Remove.
6317
6318         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6319         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6320         dependencies now capture this.
6321
6322         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6323         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6324         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6325         * m4/human.m4 (gl_HUMAN): Likewise.
6326         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6327         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6328
6329         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6330
6331         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6332         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6333         stdint.
6334         * m4/human.m4 (gl_HUMAN): Likewise.
6335         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6336         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6337         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6338         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6339         * m4/xstrtol (gl_XSTRTOL): Likewise.
6340
6341         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6342         AC_TYPE_LONG_LONG_INT.
6343         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6344         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6345         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6346         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6347
6348         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6349         on stdbool.
6350
6351         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6352         (gl_PREREQ_XSTRTOUL): Remove.
6353
6354         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6355
6356         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6357         mode.
6358
6359 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6360
6361         Add and change modules to make it easier for coreutils to use
6362         gnulib-tool.
6363         * modules/backupfile (Files): Remove m4/d-ino.m4.
6364         (Depends-on): Add d-ino.
6365         * modules/cycle-check (Depends-on): Add stdint.
6366         (lib_SOURCES): Add cycle-check.h.
6367         * modules/d-ino: New module.
6368         * modules/d-type: New module.
6369         * modules/error (Files): Remove m4/strerror_r.m4.
6370         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6371         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6372         m4/inttypes_h.m4, m4/uintmax_t.m4.
6373         (Depends-on): Add stdint.
6374         (lib_SOURCES): Add fsusage.h.
6375         * modules/getcwd (Files): Remove d-ino.m4.
6376         (Depends-on): Add d-ino.
6377         * modules/getndelim2 (Depends-on): Add stdint.
6378         * modules/glob (Files): Remove m4/d-type.m4.
6379         (Depends-on): Add d-type.
6380         * modules/host-os: New module.
6381         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6382         m4/inttypes_h.m4, m4/uintmax_t.m4.
6383         * Depends-on: Add stdint.
6384         (lib_SOURCES): Add human.h.
6385         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6386         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6387         m4/uintmax_t.m4, m4/ulonglong.m4.
6388         (Depends-on): Add stdint.
6389         (EXTRA_DIST): Add inttostr.h.
6390         * modules/lchmod: New module.
6391         * modules/link-follow: New module.
6392         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6393         (Depends-on): Add lchmod.
6394         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6395         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6396         (Depends-on): Add stdint.
6397         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6398         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6399         (Depends-on): Add stdint.
6400         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6401         * modules/perl: New module.
6402         * modules/regex (Depends-on): Add stdint.
6403         * modules/rmdir-errno: New module.
6404         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6405         m4/intmax_t.m4.
6406         (Depends-on): Add stdint.
6407         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6408         m4/uintmax_t.m4.
6409         (Depends-on): Add stdint.
6410         * modules/unlink-busy: New module.
6411         * modules/utimecmp (Depends-on): Add stdint.
6412         * modules/uptime: New module.
6413         * modules/winsz-ioctl: New module.
6414         * modules/winsz-termios: New module.
6415         * modules/xnanosleep (Depends-on): Add nanosleep.
6416         * modules/ullong_max: Remove.
6417         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6418         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6419         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6420         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6421         (Depends-on): Add inttypes.
6422         (lib_SOURCES): Add xstrtol.h.
6423         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6424         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6425         * MODULES.html.sh: Move 'assert' into the assert section.
6426         Move 'dummy' into the linking section.
6427         Remove ullong_max.
6428         Add section for compatibility checks for POSIX:2001 functions,
6429         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6430         winsz-ioctl, and winsz-termios into it.
6431         Add lchmod.
6432         Add top-level Misc section and put host-os, perl, and uptime
6433         into it.
6434
6435 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6436
6437         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6438         now assume the stdint module.  Do not include inttypes.h.
6439         * lib/fsusage.h: Likewise.
6440         * lib/getndelim2.c: Likewise.
6441         * lib/human.h: Likewise.
6442         * lib/inttostr.h: Likewise.
6443         * lib/obstack.c: Likewise.
6444         * lib/regex_internal.h: Likewise.
6445         * lib/tempname.c: Likewise.
6446         * lib/utimecmp.c: Likewise.
6447         * lib/xstrtol.h: Likewise.
6448
6449         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6450
6451         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6452         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6453         * lib/xtime.h: Likewise.
6454
6455 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6456
6457         * modules/openat (Files): Add lib/fchmodat.c.
6458         Fixes problem reported by Jay Youngman.
6459
6460 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6461
6462         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6463         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6464
6465 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6466             Bruno Haible  <bruno@clisp.org>
6467
6468         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6469         and is a script that invokes bison. Tighten the code. Add comments.
6470
6471 2006-08-18  Jim Meyering  <jim@meyering.net>
6472
6473         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6474         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6475         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6476         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6477
6478 2006-08-18  Bruno Haible  <bruno@clisp.org>
6479
6480         * modules/bison-i18n: New file.
6481         * MODULES.html.sh (Internationalization functions): Add it.
6482
6483 2006-08-18  Bruno Haible  <bruno@clisp.org>
6484
6485         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6486         sys/statvfs.h. When getmntinfo was found, check its declaration and
6487         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6488
6489 2006-08-18  Bruno Haible  <bruno@clisp.org>
6490
6491         * m4/bison-i18n.m4: New file, from bison.
6492
6493 2006-08-18  Bruno Haible  <bruno@clisp.org>
6494
6495         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6496         (ME_DUMMY): Treat "kernfs" as a dummy.
6497         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6498
6499 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6500
6501         Update from coreutils.
6502
6503         2006-08-15  Jim Meyering  <jim@meyering.net>
6504
6505         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6506
6507         2006-01-17  Jim Meyering  <jim@meyering.net>
6508
6509         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6510
6511         2006-01-11  Jim Meyering  <jim@meyering.net>
6512
6513         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6514         Check for the lchmod function.
6515
6516 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6517
6518         Update from coreutils.
6519
6520         * lib/__fpending.h: Add copyright notice.
6521         * lib/fprintftime.h: Likewise.
6522         * lib/savedir.c: Use (C) in copyright notice.
6523         * lib/savedir.h: Likewise.
6524
6525         2006-08-15  Jim Meyering  <jim@meyering.net>
6526
6527         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6528         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6529         in support of the EXPECTED_ERRNO macro.
6530         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6531         definitions.  Instead, define the appropriate symbols and include
6532         "at-func.c".
6533         * lib/mkdirat.c (mkdirat): Likewise.
6534         * lib/fchmodat.c (fchmodat): Likewise.
6535         (ENOSYS): Remove definition.
6536         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6537         it.  Don't include "unistd--.h" -- it wasn't ever used.
6538
6539         2006-01-17  Jim Meyering  <jim@meyering.net>
6540
6541         Rewrite fts.c not to change the current working directory,
6542         by using openat, fstatat, fdopendir, etc..
6543
6544         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6545         (HAVE_OPENAT_SUPPORT): Define.
6546         [_LIBC] (fchdir): Don't undef or define; no longer used.
6547         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6548         Now, this `function' always succeeds, and consumes its file descriptor
6549         parameter -- so callers must not close such FDs.  Update callers.
6550         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6551         (diropen): Add parameter, SP.  Adjust all callers.
6552         Implement using diropen_fd, rather than open.
6553         (fts_open): Initialize new member, fts_cwd_fd.
6554         Remove fts_rft-setting code.
6555         (fts_close): Close fts_cwd_fd, if necessary.
6556         (__opendir2): Define in terms of opendir or opendirat,
6557         depending on whether the FST_NOCHDIR flag is set.
6558         (fts_build): Since fts_safe_changedir consumes its FD, and since
6559         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6560         and close the dup'd file descriptor upon failure.
6561         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6562         (fts_safe_changedir): Tweak semantics to reflect that this function
6563         now calls cwd_advance_fd and hence consumes its FD argument.
6564         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6565         [struct FTS] (fts_rft): Remove now-unused member.
6566         [struct FTS] (fts_cycle.state): Improve comment.
6567
6568         * lib/openat.c (openat_needs_fchdir): New function.
6569         * lib/openat.h (openat_needs_fchdir): Declare it.
6570
6571 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6572
6573         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6574         Problem and fix reported by Pádraig Brady in
6575         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6576
6577 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6578
6579         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6580
6581 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6582
6583         * lib/memcoll.c (memcoll): Optimize for the common case where the
6584         arguments are bytewise equal.
6585
6586 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6587
6588         * doc/regexprops-generic.texi: Add a copyright notice.
6589
6590 2006-08-15  Bruno Haible  <bruno@clisp.org>
6591
6592         * modules/tmpdir (License): Change to LGPL.
6593
6594 2006-08-15  Bruno Haible  <bruno@clisp.org>
6595
6596         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6597         module.
6598
6599 2006-08-14  Simon Josefsson  <jas@extundo.com>
6600
6601         * config/srclist.txt: Add gnupload.
6602
6603 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6604
6605         Change copyright notice from LGPL 2 to GPL 2, since that's the
6606         standard form used in the gnulib repository.
6607         * tests/test-lock.c: Likewise.
6608         * tests/test-stdint.c: Likewise.
6609         * tests/test-tls.c: Likewise.
6610
6611         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6612         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6613         Add copyright notice.
6614
6615         * check-module: Add copyright notice.  Output a copyright
6616         notice if "--version" is specified.
6617         * modules/COPYING: New file.
6618         * tests/test-getaddrinfo.c: Add copyright notice.
6619         * tests/test-verify.c: Likewise.
6620
6621 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6622
6623         Change copyright notice from LGPL 2 to GPL 2, since that's the
6624         standard form used in the gnulib repository.
6625         * lib/lock.c: LGPL -> GPL.
6626         * lib/lock.h: Likewise.
6627         * lib/strnlen1.c: Likewise.
6628         * lib/strnlen1.h: Likewise.
6629         * lib/tls.c: Likewise.
6630         * lib/tls.h: Likewise.
6631         * lib/tmpdir.c: Likewise.
6632
6633         * lib/TODO: Remove; this belongs only in coreutils.
6634
6635 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6636
6637         Add copyright notices to long-enough files that lack them, since
6638         otherwise the files aren't clearly free.  Use the same notice that
6639         getdate.texi already uses.
6640         * doc/alloca-opt.texi: Add copyright notice.
6641         * doc/alloca.texi: Likewise.
6642         * doc/ctime.texi: Likewise.
6643         * doc/functions.texi: Likewise.
6644         * doc/gcd.texi: Likewise.
6645         * doc/gnulib-tool.texi: Likewise.
6646         * doc/inet_ntoa.texi: Likewise.
6647         * doc/visibility.texi: Likewise.
6648
6649         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6650         * doc/quote.texi: Add copyright notice.
6651
6652         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6653         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6654         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6655         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6656         is now obsolete, and give a pointer to the Sun list.
6657         Add copyright notice.
6658
6659 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6660
6661         * config/srclistvars.sh: Add copyright notice.
6662
6663 2006-08-14  Eric Blake  <ebb9@byu.net>
6664
6665         Import the following change from libc:
6666
6667         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6668
6669         Upstream bug 2997.
6670         * lib/misc/error.c: Add space between program name and message if file
6671         name is missing.
6672
6673 2006-08-12  Karl Berry  <karl@gnu.org>
6674
6675         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6676         remove, these originate in gnulib now.
6677
6678 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6679
6680         * doc/Makefile (standards.info standards.html standards.dvi):
6681         Also depend on make-stds.texi.
6682
6683 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6684
6685         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6686         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6687
6688         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6689         in wchar_t.  Problem reported by Eric Blake.
6690
6691         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6692         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6693         Also, help the compiler to keep LEN in a register.
6694
6695 2006-08-11  Eric Blake  <ebb9@byu.net>
6696
6697         * users.txt: Sort.  Add tar.
6698
6699 2006-08-11  Bruno Haible  <bruno@clisp.org>
6700
6701         * users.txt: New file.
6702
6703 2006-08-11  Bruno Haible  <bruno@clisp.org>
6704
6705         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6706         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6707
6708 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6709
6710         * modules/snprintf (Depends-on): Remove minmax.
6711         (Maintainer): Add self and Bruno.
6712
6713 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6714
6715         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6716         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6717         (EOVERFLOW): Define if the system does not.
6718         Do not include "minmax.h"; it wasn't used.
6719         (snprintf): Don't assume size_t promotes to an unsigned type.
6720         Fix bug when generated string was too long for the buffer: the
6721         buffer's contents are supposed to be the initial prefix of the
6722         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6723         exceeds INT_MAX; do the check ourselves.
6724
6725         Import the following changes from libc:
6726
6727         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6728
6729         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6730         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6731         set wc to the byte which couldn't be converted.
6732         (re_string_reconstruct): Don't clear valid_raw_len before calling
6733         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6734         tip_context using re_string_context_at.
6735
6736         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6737
6738         * lib/posix/regex.h: g++ still cannot handled [restrict].
6739
6740         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6741
6742         * lib/posix/regex.h: Remove special handling for VMS.
6743
6744 2006-08-10  Jim Meyering  <jim@meyering.net>
6745
6746         * modules/same-inode: New module.
6747         * modules/dev-ino: New module.
6748         * modules/cycle-check: Depend on these modules, rather than simply
6749         including their .h files.
6750         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6751         required via m4/cycle-check.m4.
6752         * modules/same: Depend on new same-inode module, rather than
6753         including same-inode.h.
6754         * modules/chdir-safer: New file.
6755
6756         * modules/chown (Depends-on): Add stat-macros.
6757
6758 2006-08-10  Jim Meyering  <jim@meyering.net>
6759
6760         * m4/cycle-check.m4: New file.
6761         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6762         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6763
6764 2006-08-10  Eric Blake  <ebb9@byu.net>
6765
6766         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6767         in from original proposal.
6768
6769 2006-08-10  Eric Blake  <ebb9@byu.net>
6770         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6771
6772         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6773         namespace.
6774
6775 2006-08-10  Bruno Haible  <bruno@clisp.org>
6776
6777         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6778         as well.
6779
6780 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6781
6782         Sync from coreutils.
6783
6784         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6785
6786         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6787         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6788
6789 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6790
6791         * modules/restrict: Remove; no longer needed now that we assume
6792         Autoconf 2.59 or later.
6793         * MODULES.html.sh: Remove 'restrict'.
6794         * modules/argp (Depends-on): Remove 'restrict'.
6795         * modules/base64 (Depends-on): Likewise.
6796         * modules/gc (Depends-on): Likewise.
6797         * modules/getaddrinfo (Depends-on): Likewise.
6798         * modules/glob (Depends-on): Likewise.
6799         * modules/inet_ntop (Depends-on): Likewise.
6800         * modules/inet_pton (Depends-on): Likewise.
6801         * modules/memxor (Depends-on): Likewise.
6802         * modules/regex (Depends-on): Likewise.
6803         * modules/strtok_r (Depends-on): Likewise.
6804         * modules/time_r (Depends-on): Likewise.
6805
6806 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6807
6808         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6809         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6810         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6811         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6812         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6813         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6814         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6815         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6816
6817         Merge from coreutils.
6818         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6819         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6820         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6821         * m4/time_r.m4 (gl_TIME_R): Likewise.
6822
6823 2006-08-09  Karl Berry  <karl@gnu.org>
6824
6825         * config/srclist.txt: no more gettext-tools, per Bruno.
6826
6827 2006-08-08  Eric Blake  <ebb9@byu.net>
6828
6829         * modules/verror: New module.
6830         * MODULES.html.sh: Document it.
6831
6832 2006-08-08  Eric Blake  <ebb9@byu.net>
6833
6834         * lib/verror.h, lib/verror.c: New files.
6835
6836 2006-08-08  Eric Blake  <ebb9@byu.net>
6837
6838         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6839         verror_at_line output complies with GNU Coding Standards even when
6840         file is NULL.
6841
6842 2006-08-07  Bruno Haible  <bruno@clisp.org>
6843
6844         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6845         versions of AIX.
6846         Reported by Ralf Wildenhues.
6847
6848 2006-08-07  Bruno Haible  <bruno@clisp.org>
6849
6850         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6851         in an AC_DEFUN. Needed so that the autoconf snippets can use
6852         AC_REQUIRE.
6853
6854 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6855
6856         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6857         Initialize pkgdata_DATA.
6858         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6859         overriding it.
6860
6861 2006-08-06  Eric Blake  <ebb9@byu.net>
6862
6863         * lib/error.h: Fold in some upstream changes from glibc.
6864         * lib/error.c: Likewise.
6865
6866 2006-08-04  Bruno Haible  <bruno@clisp.org>
6867
6868         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6869         Make the mostlyclean-local rule depend on mostlyclean-generic.
6870         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6871
6872 2006-07-31  Bruno Haible  <bruno@clisp.org>
6873
6874         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6875         <stdlib.h>, <string.h>.
6876
6877 2006-07-30  Bruno Haible  <bruno@clisp.org>
6878
6879         * modules/readlink (License): Change to LGPL.
6880
6881 2006-07-30  Bruno Haible  <bruno@clisp.org>
6882
6883         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6884         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6885         set PKGDATADIR to point to it.
6886
6887 2006-07-30  Bruno Haible  <bruno@clisp.org>
6888
6889         * modules/csharpexec (configure.ac): Comment out macro invocation.
6890         * modules/javaexec (configure.ac): Likewise.
6891         * modules/javacomp-script (configure.ac): Likewise.
6892
6893         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6894
6895 2006-07-30  Bruno Haible  <bruno@clisp.org>
6896
6897         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6898         linked-list.
6899
6900 2006-07-30  Bruno Haible  <bruno@clisp.org>
6901
6902         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6903
6904 2006-07-30  Bruno Haible  <bruno@clisp.org>
6905
6906         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6907         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6908         get removed.
6909
6910 2006-07-29  Bruno Haible  <bruno@clisp.org>
6911
6912         Make it possible for gnulib-tool to work with locally modified or
6913         augmented gnulib repositories.
6914         * gnulib-tool (func_usage): Document --local-dir option.
6915         (local_gnulib_dir): New variable.
6916         Handle --local-dir option.
6917         (func_lookup_file): New function.
6918         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6919         (func_get_description, func_get_filelist, func_get_description,
6920         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6921         func_get_automake_snippet, func_get_include_directive,
6922         func_get_license, func_get_maintainer): Use func_lookup_file.
6923         (func_import, func_create_testdir): Use func_lookup_file.
6924
6925 2006-07-29  Bruno Haible  <bruno@clisp.org>
6926
6927         * modules/setenv (Depends-on): Add unistd.
6928
6929 2006-07-29  Bruno Haible  <bruno@clisp.org>
6930
6931         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6932
6933 2006-07-29  Bruno Haible  <bruno@clisp.org>
6934
6935         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6936
6937 2006-07-29  Bruno Haible  <bruno@clisp.org>
6938
6939         * gnulib-tool (import, update): If there is no Makefile.am, look at
6940         aclocal.m4, instead of bailing out.
6941
6942 2006-07-29  Bruno Haible  <bruno@clisp.org>
6943
6944         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6945         Categorize the options by when they are useful.
6946
6947 2006-07-29  Bruno Haible  <bruno@clisp.org>
6948
6949         * gnulib-tool (func_usage): Document option --no-libtool.
6950         Handle option --no-libtool.
6951         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6952         for changed semantics of $libtool variable.
6953         (func_import): Likewise. If libtool is not used, show this through
6954         an option --no-libtool.
6955         (func_create_testdir): Update.
6956
6957 2006-07-29  Bruno Haible  <bruno@clisp.org>
6958
6959         * gnulib-tool (func_import): Extend error message about missing
6960         --doc-base.
6961
6962 2006-07-29  Bruno Haible  <bruno@clisp.org>
6963
6964         * gnulib-tool (func_import): Don't create the $docbase directory if
6965         there is no file to store there.
6966
6967 2006-07-29  Bruno Haible  <bruno@clisp.org>
6968
6969         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6970         relevant, look for configure.ac there, not in the current directory.
6971         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6972
6973 2006-07-29  Bruno Haible  <bruno@clisp.org>
6974
6975         * gnulib-tool (SORT): New variable.
6976         (func_usage): Undocument --assume-autoconf option.
6977         Remove --assume-autoconf option handling.
6978         (autoconf_minversion): Determine from the contents of configure.ac.
6979         (func_import): Remove autoconf_minversion handling.
6980         Suggested by Eric Blake.
6981
6982 2006-07-29  Bruno Haible  <bruno@clisp.org>
6983
6984         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6985
6986 2006-07-29  Bruno Haible  <bruno@clisp.org>
6987
6988         * config/srclist.txt (*setenv.[ch]): Remove rules.
6989
6990 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6991
6992         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6993
6994 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6995
6996         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6997         arpa/inet.h.
6998
6999 2006-07-28  Simon Josefsson  <jas@extundo.com>
7000
7001         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7002         * modules/inet_pton (Depends-on): Likewise.
7003
7004 2006-07-28  Simon Josefsson  <jas@extundo.com>
7005
7006         * m4/netinet_in_h.m4: New file.
7007
7008 2006-07-28  Simon Josefsson  <jas@extundo.com>
7009
7010         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7011         #include's.
7012
7013 2006-07-28  Simon Josefsson  <jas@extundo.com>
7014
7015         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7016         #include's.
7017
7018 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7019
7020         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7021         setgid on directories only if they set these bits.
7022         * lib/modechange.h: Remove obsolete comment about masks.
7023
7024 2006-07-28  Eric Blake  <ebb9@byu.net>
7025
7026         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7027         macro expansion.
7028
7029 2006-07-28  Bruno Haible  <bruno@clisp.org>
7030
7031         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7032
7033 2006-07-28  Bruno Haible  <bruno@clisp.org>
7034
7035         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7036
7037 2006-07-28  Bruno Haible  <bruno@clisp.org>
7038
7039         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7040         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7041         Define fallbacks.
7042         Avoids link error on FreeBSD 4.x.
7043         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7044
7045         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7046         encoding.
7047         * lib/mbswidth.c (iswcntrl): Likewise.
7048
7049 2006-07-27  Bruno Haible  <bruno@clisp.org>
7050
7051         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7052         test.
7053
7054 2006-07-27  Bruno Haible  <bruno@clisp.org>
7055
7056         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7057         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7058         defined.
7059
7060 2006-07-26  Eric Blake  <ebb9@byu.net>
7061
7062         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7063
7064 2006-07-26  Eric Blake  <ebb9@byu.net>
7065
7066         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7067         like mingw that lack mkstemp.
7068         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7069         avoid compilation warning on mingw.
7070
7071 2006-07-26  Bruno Haible  <bruno@clisp.org>
7072
7073         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7074         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7075         INT_FAST*_MIN, INTPTR_MIN.
7076
7077 2006-07-25  Bruno Haible  <bruno@clisp.org>
7078
7079         * modules/version-etc (Depends-on): Add stdarg.
7080
7081 2006-07-25  Bruno Haible  <bruno@clisp.org>
7082
7083         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7084         complex commands.
7085
7086 2006-07-25  Bruno Haible  <bruno@clisp.org>
7087
7088         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7089         defined in <stdarg.h> or config.h.
7090
7091 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7092
7093         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7094         (gl_STDIO_SAFER): Remove.
7095
7096 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7097
7098         * MODULES.html.sh (File stream based Input/Output):
7099         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7100         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7101         * modules/fopen-safer, modules/tmpfile-safer: New files.
7102         * modules/stdio-safer: Remove.
7103
7104 2006-07-24  Bruno Haible  <bruno@clisp.org>
7105
7106         * modules/tmpdir: New file.
7107         * MODULES.html.sh (File system functions): Add it.
7108
7109 2006-07-24  Bruno Haible  <bruno@clisp.org>
7110
7111         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7112         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7113
7114 2006-07-24  Bruno Haible  <bruno@clisp.org>
7115
7116         * modules/clean-temp: New file.
7117
7118 2006-07-24  Bruno Haible  <bruno@clisp.org>
7119
7120         * m4/tmpdir.m4: New file, from GNU gettext.
7121
7122 2006-07-24  Bruno Haible  <bruno@clisp.org>
7123
7124         * lib/tmpdir.h: New file, from GNU gettext.
7125         * lib/tmpdir.c: New file, from GNU gettext.
7126
7127 2006-07-24  Bruno Haible  <bruno@clisp.org>
7128
7129         * lib/clean-temp.h: New file, from GNU gettext.
7130         * lib/clean-temp.c: New file, from GNU gettext.
7131
7132 2006-07-23  Eric Blake  <ebb9@byu.net>
7133
7134         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7135         (Depends-on): Add binary-io.
7136
7137 2006-07-23  Eric Blake  <ebb9@byu.net>
7138
7139         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7140
7141 2006-07-23  Eric Blake  <ebb9@byu.net>
7142
7143         * lib/tmpfile-safer.c: New file.
7144         * lib/stdio-safer.h (fopen_safer): Add prototype.
7145         * lib/stdio--.h (tmpfile): Make safer.
7146
7147 2006-07-23  Bruno Haible  <bruno@clisp.org>
7148
7149         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7150         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7151         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7152         gl_linked_remove_at): Use it.
7153
7154 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7155         and Simon Josefsson <jas@extundo.com>
7156
7157         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7158
7159         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7160
7161 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7162
7163         * modules/close-stream: New file.
7164         * modules/closeout (Description): Make it clear that it exits
7165         with a diagnostic on error.
7166         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7167         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7168
7169 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7170
7171         * m4/close-stream.m4: New file.
7172
7173 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7174
7175         * lib/close-stream.c, lib/close-stream.h: New files.
7176
7177 2006-07-22  Bruno Haible  <bruno@clisp.org>
7178
7179         Merge from GNU gettext 0.15.
7180
7181         2006-05-01  Bruno Haible  <bruno@clisp.org>
7182
7183                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7184
7185         2006-07-22  Bruno Haible  <bruno@clisp.org>
7186
7187                 * modules/javaversion: New file.
7188                 * MODULES.html.sh (Java): Add javaversion.
7189
7190         2006-03-12  Bruno Haible  <bruno@clisp.org>
7191
7192                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7193
7194         2005-12-04  Bruno Haible  <bruno@clisp.org>
7195
7196                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7197                 (untested).
7198
7199         2006-06-21  Bruno Haible  <bruno@clisp.org>
7200
7201                 Avoid warnings from recent versions of mcs.
7202                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7203                 -o, -L, -r any more. Use options documented since mcs-1.0
7204                 instead. Similarly for -g.
7205
7206         2005-12-04  Bruno Haible  <bruno@clisp.org>
7207
7208                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7209                 .resources, not .resource.
7210
7211         2005-07-09  Bruno Haible  <bruno@clisp.org>
7212
7213                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7214                 add a .dll suffix.
7215                 Reported by Mark Junker <mjscod@gmx.de>.
7216
7217         2006-07-22  Bruno Haible  <bruno@clisp.org>
7218
7219                 * modules/gettext: Upgrade to gettext-0.15.
7220                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7221                 m4/visibility.m4.
7222                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7223
7224 2006-07-22  Bruno Haible  <bruno@clisp.org>
7225
7226         Merge from GNU gettext 0.15.
7227
7228         2006-03-25  Bruno Haible  <bruno@clisp.org>
7229
7230                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7231
7232         2006-07-21  Bruno Haible  <bruno@clisp.org>
7233
7234                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7235                 "1.1".
7236
7237         2006-05-09  Bruno Haible  <bruno@clisp.org>
7238
7239                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7240                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7241                 for the conftestver execution.
7242
7243         2006-05-01  Bruno Haible  <bruno@clisp.org>
7244
7245                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7246                 optional target-version argument. Verify that the compiler
7247                 groks source of the specified source-version, or add -source
7248                 option as necessary. Verify that the compiler produces
7249                 bytecode in the specified target-version, or add -target and
7250                 -source options as necessary. Make the result of the test
7251                 available as variable CONF_JAVAC. Also log error output in
7252                 config.log.
7253
7254         2006-03-11  Bruno Haible  <bruno@clisp.org>
7255
7256                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7257
7258         2006-05-09  Bruno Haible  <bruno@clisp.org>
7259
7260                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7261                 CLASSPATH_SEPARATOR to a semicolon.
7262
7263         2006-03-12  Bruno Haible  <bruno@clisp.org>
7264
7265                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7266                 available as variable CONF_JAVA, for subsequent autoconf
7267                 tests. Also log error output in config.log.
7268
7269         2006-07-19  Bruno Haible  <bruno@clisp.org>
7270
7271                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7272                 that getline works on glibc2 systems. Needed to avoid trouble
7273                 in relocatable.c.
7274                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7275
7276         2005-12-04  Bruno Haible  <bruno@clisp.org>
7277
7278                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7279                 launcher (untested).
7280
7281         2005-12-04  Bruno Haible  <bruno@clisp.org>
7282
7283                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7284
7285         2006-07-22  Bruno Haible  <bruno@clisp.org>
7286
7287                 * gettext.m4: Update from GNU gettext-0.15.
7288                 * nls.m4: Likewise.
7289                 * po.m4: Likewise.
7290                 * inttypes-pri.m4: Likewise.
7291                 * inttypes-h.m4: Renamed from inttypes.m4.
7292                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7293
7294 2006-07-22  Bruno Haible  <bruno@clisp.org>
7295
7296         Merge from GNU gettext 0.15.
7297
7298         2005-07-05  Bruno Haible  <bruno@clisp.org>
7299
7300                 * printf-args.c (printf_fetchargs): Work around broken
7301                 definition of wint_t on mingw.
7302
7303         2005-02-12  Bruno Haible  <bruno@clisp.org>
7304
7305                 * xallocsa.h: Add extern "C" for C++.
7306
7307         2006-05-17  Bruno Haible  <bruno@clisp.org>
7308
7309                 Cygwin portability.
7310                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7311
7312         2006-04-30  Bruno Haible  <bruno@clisp.org>
7313
7314                 * progreloc.c: Include <mach-o/dyld.h> if available.
7315                 (find_executable): Use _NSGetExecutablePath when possible.
7316
7317         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7318
7319                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7320                 function.
7321
7322         2005-12-29  Bruno Haible  <bruno@clisp.org>
7323
7324                 * progreloc.c (set_program_name_and_installdir): Fix
7325                 compilation error.
7326
7327         2005-12-04  Bruno Haible  <bruno@clisp.org>
7328
7329                 Cygwin portability.
7330                 * progreloc.c: Include <windows.h> also on Cygwin.
7331                 (find_executable): Add support for Cygwin.
7332                 (set_program_name_and_installdir): Handle also platforms with
7333                 nonempty EXEEXT.
7334
7335         2006-07-11  Bruno Haible  <bruno@clisp.org>
7336
7337                 * javacomp.c: Fix a comment.
7338                 Reported by Jim Meyering.
7339
7340         2006-04-30  Bruno Haible  <bruno@clisp.org>
7341
7342                 * javacomp.h (compile_java_class): Add source_version,
7343                 target_version arguments.
7344                 * javacomp.c: Rewritten to choose only a compiler that
7345                 respects the specified source_version and target_version.
7346
7347         2006-06-27  Bruno Haible  <bruno@clisp.org>
7348
7349                 Assume correct S_ISDIR macro.
7350                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7351
7352         2006-07-22  Bruno Haible  <bruno@clisp.org>
7353
7354                 * javaversion.h: New file, from GNU gettext.
7355                 * javaversion.c: New file, from GNU gettext.
7356                 * javaversion.java: New file, from GNU gettext.
7357                 * javaversion.class: New file, from GNU gettext.
7358
7359         2006-05-17  Bruno Haible  <bruno@clisp.org>
7360
7361                 Cygwin portability.
7362                 * javaexec.c (execute_java_class): Test for jview program
7363                 also on Cygwin.
7364
7365         2006-04-09  Bruno Haible  <bruno@clisp.org>
7366
7367                 * fatal-signal.c: Don't include string.h.
7368                 (at_fatal_signal): Use a copying loop instead of memcpy.
7369
7370         2005-12-04  Bruno Haible  <bruno@clisp.org>
7371
7372                 * csharpexec.c: Add support for 'clix' launcher (untested).
7373                 (execute_csharp_using_sscli): New function.
7374                 (execute_csharp_program): Call it.
7375
7376         2006-06-21  Bruno Haible  <bruno@clisp.org>
7377
7378                 Avoid warnings from recent versions of mcs.
7379                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7380                 -o, -L, -r any more. Use options documented since mcs-1.0
7381                 instead. Similarly for -g.
7382
7383         2005-07-09  Bruno Haible  <bruno@clisp.org>
7384
7385                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7386                 add a .dll suffix.
7387                 Reported by Mark Junker <mjscod@gmx.de>.
7388
7389         2006-06-17  Bruno Haible  <bruno@clisp.org>
7390
7391                 * config.charset: Update for NetBSD 3.0.
7392
7393         2006-05-17  Bruno Haible  <bruno@clisp.org>
7394
7395                 Cygwin portability.
7396                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7397
7398         2006-05-16  Bruno Haible  <bruno@clisp.org>
7399
7400                 * localcharset.c [CYGWIN]: Include <windows.h>.
7401                 (get_charset_aliases): For Cygwin, return the same CPxxx
7402                 aliases list as under WIN32.
7403                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7404                 the environment variables. Fall back to GetACP().
7405
7406         2006-04-05  Bruno Haible  <bruno@clisp.org>
7407
7408                 * config.charset: Update Juan Manuel Guerrero's address.
7409
7410         2005-02-12  Bruno Haible  <bruno@clisp.org>
7411
7412                 * allocsa.h: Add extern "C" for C++.
7413
7414         2005-02-10  Bruno Haible  <bruno@clisp.org>
7415
7416                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7417                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7418
7419         2006-07-22  Bruno Haible  <bruno@clisp.org>
7420
7421                 * gettext.h: Update to GNU gettext-0.15.
7422
7423 2006-07-22  Bruno Haible  <bruno@clisp.org>
7424
7425         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7426         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7427         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7428
7429 2006-07-21  Eric Blake  <ebb9@byu.net>
7430
7431         * modules/stdlib-safer: New file.
7432         * MODULES.html.sh (File stream based Input/Output): Add
7433         stdlib-safer.
7434
7435 2006-07-21  Eric Blake  <ebb9@byu.net>
7436
7437         * lib/stdlib-safer.h: New file from coreutils, required by
7438         stdlib--.h.
7439
7440 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7441
7442         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7443
7444 2006-07-20  Bruno Haible  <bruno@clisp.org>
7445
7446         * gnulib-tool: Recognize new option --assume-autoconf.
7447         (autoconf_minversion): New variable.
7448         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7449
7450 2006-07-20  Bruno Haible  <bruno@clisp.org>
7451
7452         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7453
7454 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7455
7456         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7457         Reindent and repaginate.
7458
7459 2006-07-19  Derek Price  <derek@ximbiot.com>
7460
7461         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7462         Correct grammar.
7463
7464 2006-07-17  Bruno Haible  <bruno@clisp.org>
7465
7466         * modules/list: New file.
7467         * modules/array-list: New file.
7468         * modules/carray-list, modules/carray-list-tests: New files.
7469         * modules/linked-list, modules/linked-list-tests: New files.
7470         * modules/avltree-list, modules/avltree-list-tests: New files.
7471         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7472         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7473         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7474         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7475         * modules/oset: New file.
7476         * modules/array-oset: New file.
7477         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7478         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7479         * tests/test-carray_list.c: New file.
7480         * tests/test-linked_list.c: New file.
7481         * tests/test-avltree_list.c: New file.
7482         * tests/test-rbtree_list.c: New file.
7483         * tests/test-linkedhash_list.c: New file.
7484         * tests/test-avltreehash_list.c: New file.
7485         * tests/test-rbtreehash_list.c: New file.
7486         * tests/test-avltree_oset.c: New file.
7487         * tests/test-rbtree_oset.c: New file.
7488         * MODULES.html.sh (Container data structures): New section.
7489
7490 2006-07-17  Bruno Haible  <bruno@clisp.org>
7491
7492         * m4/gl_list.m4: New file.
7493
7494 2006-07-17  Bruno Haible  <bruno@clisp.org>
7495
7496         * lib/gl_list.h: New file.
7497         * lib/gl_list.c: New file.
7498         * lib/gl_array_list.h: New file.
7499         * lib/gl_array_list.c: New file.
7500         * lib/gl_carray_list.h: New file.
7501         * lib/gl_carray_list.c: New file.
7502         * lib/gl_linked_list.h: New file.
7503         * lib/gl_linked_list.c: New file.
7504         * lib/gl_anylinked_list1.h: New file.
7505         * lib/gl_anylinked_list2.h: New file.
7506         * lib/gl_avltree_list.h: New file.
7507         * lib/gl_avltree_list.c: New file.
7508         * lib/gl_anyavltree_list1.h: New file.
7509         * lib/gl_anyavltree_list2.h: New file.
7510         * lib/gl_rbtree_list.h: New file.
7511         * lib/gl_rbtree_list.c: New file.
7512         * lib/gl_anyrbtree_list1.h: New file.
7513         * lib/gl_anyrbtree_list2.h: New file.
7514         * lib/gl_anytree_list1.h: New file.
7515         * lib/gl_anytree_list2.h: New file.
7516         * lib/gl_linkedhash_list.h: New file.
7517         * lib/gl_linkedhash_list.c: New file.
7518         * lib/gl_anyhash_list1.h: New file.
7519         * lib/gl_anyhash_list2.h: New file.
7520         * lib/gl_avltreehash_list.h: New file.
7521         * lib/gl_avltreehash_list.c: New file.
7522         * lib/gl_rbtreehash_list.h: New file.
7523         * lib/gl_rbtreehash_list.c: New file.
7524         * lib/gl_anytreehash_list1.h: New file.
7525         * lib/gl_anytreehash_list2.h: New file.
7526
7527         * lib/gl_oset.h: New file.
7528         * lib/gl_oset.c: New file.
7529         * lib/gl_array_oset.h: New file.
7530         * lib/gl_array_oset.c: New file.
7531         * lib/gl_avltree_oset.h: New file.
7532         * lib/gl_avltree_oset.c: New file.
7533         * lib/gl_rbtree_oset.h: New file.
7534         * lib/gl_rbtree_oset.c: New file.
7535         * lib/gl_anytree_oset.h: New file.
7536
7537 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7538
7539         * m4/mkancesdirs.m4: New file.
7540         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7541         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7542         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7543         it.
7544
7545 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7546
7547         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7548         * lib/mkancesdirs.h: New files.
7549         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7550         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7551         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7552         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7553         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7554         callers changed.  Revamp internals significantly, by not
7555         attempting to create directories that are temporarily more
7556         permissive than the final results.  Do not attempt to use
7557         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7558         This removes some race conditions, fixes some bugs, and simplifies
7559         things.  Use new dirchownmod function to do owner and mode changes.
7560         * lib/mkdir-p.h: Likewise.
7561         * lib/modechange.c (octal_to_mode): New function.
7562         (struct mode_change): New member mentioned.
7563         (make_node_op_equals): New arg mentioned.  All callers changed.
7564         (mode_compile): Keep track of which mode bits the user has explicitly
7565         mentioned.
7566         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7567         New arg PMODE_BITS, to keep track of which mode bits the user
7568         mentioned; it treats S_ISUID and S_ISGID speciall.
7569         All callers changed.
7570         * lib/modechange.h: Likewise.
7571
7572 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7573
7574         * MODULES.html.sh: Add mkancestors.
7575         * modules/mkancesdirs: New module.
7576         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7577         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7578         The chdir-safer and afs files are now orphans; I'll remove them
7579         unless someone speaks up.
7580         Add lib/dirchownmod.c, lib/dirchownmod.h.
7581         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7582         Add lchown, mkancesdirs.
7583         (Maintainer): Add self.
7584
7585 2006-07-15  Karl Berry  <karl@gnu.org>
7586
7587         * gnulib-tool: help message wording/arrangement.
7588
7589 2006-07-14  Simon Josefsson  <jas@extundo.com>
7590
7591         * doc/gnulib.texi (Libtool and Windows): New section.
7592
7593 2006-07-12  Simon Josefsson  <jas@extundo.com>
7594
7595         * modules/gendocs (License): Fix license, approved by Karl.
7596
7597 2006-07-12  Eric Blake  <ebb9@byu.net>
7598
7599         * MODULES.html.sh: Add gendocs.
7600
7601 2006-07-11  Eric Blake  <ebb9@byu.net>
7602
7603         * modules/fdl: New module, to install doc/fdl.texi.
7604         * MODULES.html.sh: Add new section for documentation modules.
7605         * gnulib-tool: Avoid space-tab.
7606         (--doc-base): New option, to manage files from doc.
7607
7608 2006-07-11  Eric Blake  <ebb9@byu.net>
7609
7610         * m4/absolute-header.m4: Fix comments to match recent change.
7611
7612 2006-07-11  Eric Blake  <ebb9@byu.net>
7613
7614         * gnulib-tool: List --doc-base before --tests-base.
7615
7616 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7617
7618         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7619
7620 2006-07-11  Bruno Haible  <bruno@clisp.org>
7621
7622         * README: Mention where to put documentation.
7623
7624 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7625
7626         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7627
7628 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7629
7630         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7631         to stdint.m4.
7632
7633 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7636         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7637         "no/such/file/stdint.h" when there is no such file, so that
7638         the resulting C code can be parsed by dodgy compilers.
7639         Problems reported by Bob Proulx.
7640
7641 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7642
7643         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7644         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7645         macros into the GNU _D_EXACT_NAMLEN.
7646         * lib/savedir.c:  Likewise.
7647         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7648
7649 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7650         and Paul Eggert  <eggert@cs.ucla.edu>
7651
7652         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7653         * m4/savedir.m4:
7654         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7655         macros into the GNU _D_EXACT_NAMLEN.
7656
7657 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7658
7659         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7660         around the absolute name, to work around a problem with the HP-UX
7661         11.23 native C compiler, reported by Bob Proulx.
7662
7663 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7664
7665         * doc/maintain.texi, make-stds.texi: Sync from
7666         <http://savannah.gnu.org/projects/gnustandards>.
7667
7668 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7669
7670         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7671
7672 2006-07-09  Jim Meyering  <jim@meyering.net>
7673
7674         * m4/glob.m4: Remove a doubled word in a comment.
7675
7676 2006-07-09  Jim Meyering  <jim@meyering.net>
7677
7678         * lib/argp-pv.c: Remove a doubled word in a comment.
7679         * lib/check-version.c (check_version): Likewise.
7680         * lib/javacomp.c (compile_java_class): Likewise.
7681
7682 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7683
7684         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7685         for the benefit of people using Autoconf 2.60.  If you want to
7686         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7687         (or m4/onceonly.m4, if pre-2.57) manually.
7688
7689 2006-07-08  Jim Meyering  <jim@meyering.net>
7690
7691         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7692         comment.
7693         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7694         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7695         comment.
7696
7697 2006-07-08  Jim Meyering  <jim@meyering.net>
7698
7699         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7700
7701 2006-07-07  Simon Josefsson  <jas@extundo.com>
7702
7703         * tests/test-crc.c: Change expected crc value, the test vector
7704         were probably computed using the old broken crc.c?
7705
7706 2006-07-06  Simon Josefsson  <jas@extundo.com>
7707
7708         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7709         now the canonical place for the M4 file).
7710
7711         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7712         from the sys_socket dependency now.
7713
7714         * modules/inet_pton (Files): Ditto.
7715
7716         * modules/inet_ntop (Files): Ditto.
7717
7718 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7719
7720         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7721         not gl_PREREQ_GETUSERSHELL.
7722
7723 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7724
7725         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7726         with only one argument, for Autoconf 2.60.
7727         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7728         expand to nothing, so add a shell command to avoid syntax error.
7729         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7730
7731 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7732
7733         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7734
7735 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7736
7737         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7738         no longer needed.  Check for isblank decl.
7739         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7740         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7741         of existence.
7742
7743 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7744
7745         * lib/getloadavg.c: Use __VMS, not VMS.
7746         * lib/getopt.c: Likewise.
7747         * lib/getpagesize.h: Likewise.
7748         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7749         and probably does not work.
7750
7751 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7752
7753         * lib/.cppi-disable: Add wcwidth.
7754         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7755         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7756         (ISGRAPH): Remove.  All uses changed to isgraph.
7757         (FOLD) [!defined _LIBC]: Remove special case.
7758         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7759         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7760         HAVE_ISBLANK.
7761         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7762         case.
7763
7764 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7765
7766         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7767         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7768         brackets.  Other minor changes to suppress some compiler
7769         warnings.
7770
7771 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7772         and Paul Eggert  <eggert@cs.ucla.edu>
7773
7774         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7775         of invoking obsolescent AC_HEADER_DIRENT macro.
7776         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7777         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7778         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7779         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7780         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7781         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7782         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7783         * m4/readdir.m4: Remove; no longer needed.
7784
7785 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7786         and Paul Eggert  <eggert@cs.ucla.edu>
7787
7788         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7789         Don't worry about this obsolete case any more.
7790         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7791         directories.
7792         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7793         worry about this obsolete case any more.
7794         * lib/fts.c: Likewise.
7795         * lib/getcwd.c: Likewise.
7796         * lib/glob.h: Likewise.
7797         * lib/savedir.c: Likewise.
7798
7799 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7800
7801         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7802         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7803         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7804         needed.
7805         All uses removed.
7806         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7807         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7808         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7809         needed.
7810         * m4/getdate.m4 (gl_GETDATE): Likewise.
7811         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7812         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7813         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7814         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7815         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7816         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7817         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7818         needed.
7819
7820 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7821
7822         * lib/memcasecmp.c: Include <limits.h>.
7823         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7824         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7825         Don't assume isdigit succeeds only on '0' through '9'.
7826
7827 2006-07-05  Eric Blake  <ebb9@byu.net>
7828
7829         * modules/getaddrinfo (Depends-on): Add snprintf.
7830
7831 2006-07-05  Eric Blake  <ebb9@byu.net>
7832
7833         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7834         to avoid 'header present but could not be compiled' on cygwin.
7835
7836 2006-07-05  Eric Blake  <ebb9@byu.net>
7837
7838         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7839         missing from netdb.h.
7840         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7841
7842 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7843
7844         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7845         no longer needed.
7846         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7847         * m4/getdate.m4 (gl_GETDATE): Likewise.
7848         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7849         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7850         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7851         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7852         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7853
7854 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7855
7856         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7857         All uses of is_space replaced by isspace.
7858         * lib/exit.h: Don't talk about STDC_HEADERS.
7859         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7860         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7861         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7862         replaced by isprint etc.
7863         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7864         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7865         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7866         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7867         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7868         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7869
7870 2006-07-05  Bruno Haible  <bruno@clisp.org>
7871
7872         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7873         the function exists, before testing against AIX.
7874         Reported by Martin Lambers <marlam@marlam.de>.
7875
7876 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7877
7878         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7879         From Mark D. Baushke.
7880
7881 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7882
7883         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7884         to the absolute name, not just one, to bypass Sun C 5.8's
7885         "warning: #include of /usr/include/... may be non-portable".
7886
7887 2006-07-04  Eric Blake  <ebb9@byu.net>
7888
7889         * modules/dirname-tests: New test module.
7890         * tests/test-dirname.c: New file, replacing dirname.c
7891         TEST_DIRNAME section that was recently deleted.
7892
7893 2006-07-04  Bruno Haible  <bruno@clisp.org>
7894
7895         Assume ANSI C header files and <ctype.h> functions.
7896         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7897         (mbsnwidth): Use isprint, iscntrl instead.
7898
7899 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7900
7901         Merge from coreutils.
7902         * MODULES.html.sh: Add xstrtold.
7903         * modules/xstrtold: New file.
7904         * modules/cycle-check (Files): Add lib/same-inode.h.
7905         * modules/dirname (Files): Add m4/double-slash-root.m4.
7906         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7907         * modules/mkdir-p (Files): Add lib/same-inode.h.
7908         * modules/same (Files): Add lib/same-inode.h.
7909
7910 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7911
7912         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7913         This is to keep the terminology clean; POSIX talks about
7914         "absolute pathnames", not "full pathnames", but the GNU
7915         Coding Standards say to use "path" for something else;
7916         so use "absolute" to keep both sides happy.
7917         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7918         Set gl_absolute_header, not gl_full_header_path.
7919         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7920         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7921         All uses changed.
7922
7923         Merge from coreutils.
7924
7925         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7926
7927         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7928         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7929         want to require the building of c-strtod.o.
7930         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7931         needs -lm directly.
7932         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7933
7934         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7935
7936         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7937         --as-needed option if available.  Problem reported by Albert Chin in
7938         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7939         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7940         cc merely issues a bunch of annoying warnings for --as-needed
7941         (this problem was reported by Bob Proulx).  Also, try linking with
7942         -lm to detect a bug in binutils 2.16 (this problem was reported
7943         by Ralf Wildenhues).
7944
7945         2006-06-18  Jim Meyering  <jim@meyering.net>
7946
7947         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7948         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7949         macro.
7950         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7951         also check for glibc-2.4's abort-inducing bug.
7952
7953         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7954         Low-probability clean-up should be to use rmdir to get rid of
7955         the just-created directory, not unlink.
7956
7957         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7958         configure fail, and request a bug report to inform us about it.
7959         Add a comment that, barring reports to the contrary, in 2007 we'll
7960         assume ftruncate is universally available.
7961
7962         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7963
7964         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7965
7966         2006-03-12  Jim Meyering  <jim@meyering.net>
7967
7968         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7969         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7970         * m4/same.m4 (gl_SAME): Likewise.
7971         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7972
7973         2006-03-11  Eric Blake  <ebb9@byu.net>
7974
7975         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7976         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7977         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7978         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7979
7980 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7981
7982         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7983         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7984         reported by Mark D. Baushke, one in
7985         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7986
7987         Merge from coreutils.
7988
7989         * lib/.cppi-disable: Add stdint_.h.
7990         * lib/.cvsignore: Add stdint.h.
7991
7992         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7993
7994         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7995         both double and long double versions.
7996         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7997         * lib/xstrtold.c: New file.
7998         * lib/xstrtod.h (xstrtold): New decl.
7999
8000         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8001
8002         * lib/filemode.c (setst): Remove.
8003         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8004         (arguably) clearer, and the generated code is a bit smaller on my
8005         Debian GNU/Linux stable x86 host.
8006
8007         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8008
8009         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8010         Assume that filemode.h includes sys/types.h and sys/stat.h.
8011         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8012         (ftypelet): Reorder to put common cases first, for efficiency.
8013         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8014         to do 'M'.
8015         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8016         of 10, for compatibility with FreeBSD.  All callers changed.
8017         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8018         types that can't be deduced solely from st_mode.  First arg is now a
8019         const pointer.
8020         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8021         (strmode): Renamed from mode_string.
8022         (filemodestring): New decl.
8023         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8024         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8025         needed.
8026         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8027
8028         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8029
8030         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8031         fsusage.h now does that.  Include fsusage.h first, to test interface.
8032         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8033         at most one method (the old code could have generated decls that
8034         didn't conform to C89, not that this was ever exercised).
8035         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8036
8037         2006-03-19  Jim Meyering  <jim@meyering.net>
8038
8039         Work even in a chroot where d_ino values for entries in "/"
8040         don't match the stat.st_ino values for the same names.
8041         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8042         number, iterate through all entries again, using lstat instead.
8043         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8044         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8045
8046         * lib/getcwd.c (__getcwd): Clarify a comment.
8047         Use memcpy in place of a call to strcpy.
8048
8049         2006-03-12  Jim Meyering  <jim@meyering.net>
8050
8051         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8052         matches that of the current directory (which we're about to chdir ".."
8053         out of), then save the dev-ino of the parent, instead.
8054
8055         * lib/same-inode.h (SAME_INODE): New file/macro.
8056         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8057         Include "same-inode.h", instead.
8058         * lib/same.c: Likewise.
8059         * lib/cycle-check.h: Include "same-inode.h".
8060         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8061         * lib/cycle-check.c (SAME_INODE): Remove definition.
8062         * lib/root-dev-ino.h: Include "same-inode.h".
8063
8064         2006-03-11  Eric Blake  <ebb9@byu.net>
8065
8066         * lib/same.c (same_name): s/base_name/last_component/
8067         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8068         * lib/filenamecat.c (file_name_concat): Likewise.
8069
8070         2006-03-11  Eric Blake  <ebb9@byu.net>,
8071                     Paul Eggert  <eggert@cs.ucla.edu>
8072
8073         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8074         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8075         drive prefix.
8076         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8077         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8078         (last_component): New method.
8079         * lib/dirname.c (dir_len): Determine when drive letters need a
8080         subsequent slash.  Preserve // when it is special.
8081         (dir_name): Don't append dot when drive letter is absolute.
8082         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8083         * lib/basename.c (base_name): New semantics - malloc the result.
8084         Preserve // when it is special.  Preserve relative files that look
8085         like drive letters.
8086         (base_len): Preserve // when it is special.
8087         (last_component): New method, similar to old base_name semantics.
8088         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8089         base_name.  Strip redundant slashes from ///.
8090
8091 2006-07-03  Jim Meyering  <jim@meyering.net>
8092
8093         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8094         macro is used before the first cycle_check call.
8095
8096 2006-07-03  Eric Blake  <ebb9@byu.net>
8097
8098         * modules/dirname (Depends-on): Add xstrndup.
8099
8100 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8101
8102         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8103         test cases, so that config.log is a bit easier to follow.
8104
8105 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8106
8107         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8108         both are 64 bits, since this seems to be the tradition, and this
8109         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8110         we ever run into a host that prefers long long to long in this
8111         case, we'll need another configure-time test.  Problem reported by
8112         Jim Meyering.
8113
8114 2006-07-02  Eric Blake  <ebb9@byu.net>
8115
8116         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8117
8118 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8119
8120         * modules/inttypes (Depends-on): No longer depends on stdint.
8121         * modules/stdint (Description): Say more about assumptions.
8122         Say that the fast types might differ.  Say macros are used.
8123         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8124         (Makefile.am): Revise list of substituted symbols to match
8125         new stdint.m4.
8126         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8127         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8128         * tests/test-stdint.c (verify_same_types)
8129         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8130         the code conforms to C99/C89.
8131         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8132         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8133
8134 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8135
8136         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8137         but fix a bug, by requiring at least 64 bits.
8138         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8139         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8140         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8141         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8142
8143         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8144         changes.  Make 2.59 a prerequisite.  Check and substitute for
8145         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8146         inttypes.h.  Do not use special include files; just use the
8147         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8148         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8149         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8150         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8151         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8152         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8153         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8154         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8155         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8156         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8157         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8158         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8159         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8160         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8161         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8162         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8163         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8164         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8165         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8166         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8167         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8168         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8169         not check for things that C99 does not require, e.g., int8_t.  If
8170         a test isn't needed unless <stdint.h> isn't working, and is
8171         unlikely to be needed for any other reason, then don't do it
8172         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8173         size_t, since we assume C89 freestanding at least.  Do not check
8174         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8175         the right thing even if the types are not defined.  Instead use:
8176         (gl_STDINT_TYPE_PROPERTIES): New macro.
8177         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8178         testing whether <sys/types.h> clashes, as Autoconf does this for
8179         us now.  All uses removed.
8180         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8181         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8182         (gl_CHECK_TYPE_SAME):
8183         Remove; no longer needed.
8184         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8185         exists, since we'll return 0 anyway in that case.
8186         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8187
8188 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8189
8190         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8191         possible collision with system files.
8192         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8193         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8194         WCHAR_MIN and WCHAR_MAX in this case.
8195         (<stddef.h>): Do not include; no longer needed.
8196         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8197         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8198         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8199         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8200         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8201         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8202         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8203         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8204         !defined(__c99))]: Include in this case too, since it's harmless
8205         now.
8206         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8207         dangerous to do so.
8208         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8209         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8210         (_STDINT_MIN, _STDINT_MAX): New macros.
8211         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8212         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8213         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8214         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8215         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8216         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8217         macros, not typedefs; this simplifies things quite a bit.
8218         Use long int for all types narrower than int64_t.
8219         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8220         Define in terms of long long int or int64_t or long int,
8221         not int64_t or int32_t.  This saves some compile-time testing.
8222         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8223         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8224         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8225         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8226         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8227         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8228         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8229         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8230         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8231         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8232         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8233         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8234         undef any previous version and define our own version, for
8235         simplicity and consistency with the new macros for types.
8236         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8237         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8238         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8239         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8240         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8241         @WINT_T_SUFFIX@ to keep things simple here.
8242         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8243         Simplify by assuming typical 8/16/32/64 host, since we're
8244         already doing that elsewhere anyway.
8245         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8246         and assume long long int is 64 bits if available.  This
8247         speeds up 'configure'.
8248
8249 2006-07-01  Eric Blake  <ebb9@byu.net>
8250
8251         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8252         Reported by Andreas Buening.
8253
8254 2006-07-01  Eric Blake  <ebb9@byu.net>
8255
8256         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8257
8258 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8259
8260         * lib/getaddrinfo.c: fixed typo
8261
8262 2006-06-29  Jim Meyering  <jim@meyering.net>
8263
8264         * modules/strftime (Maintainer): Add my name, since with the
8265         FPRINTFTIME changes strftime.c has forked from glibc.
8266
8267 2006-06-29  Eric Blake  <ebb9@byu.net>
8268
8269         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8270
8271 2006-06-29  Eric Blake  <ebb9@byu.net>
8272
8273         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8274
8275 2006-06-29  Eric Blake  <ebb9@byu.net>
8276
8277         * lib/stat_.h: New file.
8278
8279 2006-06-29  Eric Blake  <ebb9@byu.net>
8280
8281         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8282         unused static function.
8283
8284 2006-06-29  Eric Blake  <ebb9@byu.net>
8285
8286         * doc/functions.texi (Function Portability): Document missing lstat
8287         on mingw.
8288
8289 2006-06-29  Eric Blake  <ebb9@byu.net>
8290
8291         * MODULES.html.sh: Add sys_stat.
8292         * modules/sys_stat: New module.
8293         * modules/mkstemp (Depends-on): Add sys_stat.
8294
8295 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8296
8297         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8298
8299 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8300
8301         * m4/c-bs-a.m4: Removed.
8302
8303 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8304
8305         * lib/strftime.c: Assume strftime() exists.
8306
8307 2006-06-29  Derek Price  <derek@ximbiot.com>
8308
8309         * modules/c-bs-a: Removed - \a is C89.
8310         * MODULES.html.sh: Remove c-bs-a.
8311
8312 2006-06-29  Bruno Haible  <bruno@clisp.org>
8313
8314         * modules/wcwidth (License): Change to LGPL.
8315
8316 2006-06-28  Simon Josefsson  <jas@extundo.com>
8317
8318         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8319         on _WIN32.
8320
8321         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8322         getnameinfo.
8323
8324 2006-06-28  Simon Josefsson  <jas@extundo.com>
8325
8326         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8327
8328 2006-06-28  Simon Josefsson  <jas@extundo.com>
8329
8330         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8331         functions there.  It will succeed on Windows XP, but on Windows
8332         2000 and (presumably) earlier, it will fail, and use the internal
8333         re-implementation.
8334         (use_win32_p): New function.
8335         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8336         Support AI_NUMERICSERV to disable getservbyname.
8337         (getnameinfo): New function, only supports
8338         NI_NUMERICHOST|NI_NUMERICSERV for now.
8339
8340         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8341         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8342         getnameinfo.
8343
8344 2006-06-28  Eric Blake  <ebb9@byu.net>
8345
8346         * modules/wcwidth: New file.
8347         * modules/mbchar (Depends-on): Add wcwidth.
8348         * modules/mbswidth (Depends-on): Add wcwidth.
8349         * MODULES.html.sh: Add wcwidth.
8350
8351 2006-06-28  Eric Blake  <ebb9@byu.net>
8352
8353         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8354         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8355
8356 2006-06-28  Eric Blake  <ebb9@byu.net>
8357
8358         * lib/xvasprintf.h: Fix comments.
8359
8360 2006-06-28  Eric Blake  <ebb9@byu.net>
8361
8362         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8363         * lib/mbswidth.c (wcwidth): Move from here...
8364         * lib/wcwidth.h: ...to this new file.
8365
8366 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8367
8368         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8369
8370         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8371         it's obsolete.
8372         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8373
8374 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8375
8376         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8377         Autoconf 2.60 says this stuff was obsolete.
8378
8379 2006-06-28  Bruno Haible  <bruno@clisp.org>
8380
8381         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8382
8383 2006-06-28  Bruno Haible  <bruno@clisp.org>
8384
8385         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8386         gt_TYPE_WCHAR_T.
8387
8388 2006-06-28  Bruno Haible  <bruno@clisp.org>
8389
8390         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8391         declaration for wcwidth.
8392         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8393
8394 2006-06-28  Bruno Haible  <bruno@clisp.org>
8395
8396         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8397         (mkdir): Define using _mkdir.
8398
8399 2006-06-28  Bruno Haible  <bruno@clisp.org>
8400
8401         * lib/getaddrinfo.h: Fix POSIX URL.
8402         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8403         _WIN32.
8404         (use_win32_p): Make static.
8405         (getaddrinfo): Reject service name if it is empty or does not consist
8406         solely of decimal digits, or if its value is > 65535.
8407         (getnameinfo): Remove useless casts.
8408
8409 2006-06-27  Simon Josefsson  <jas@extundo.com>
8410
8411         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8412         Eggert and Martin Lambers.
8413
8414 2006-06-27  Simon Josefsson  <jas@extundo.com>
8415
8416         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8417         Eggert and Martin Lambers.
8418
8419 2006-06-27  Bruno Haible  <bruno@clisp.org>
8420
8421         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8422         result to 0, not to empty.
8423         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8424
8425 2006-06-27  Bruno Haible  <bruno@clisp.org>
8426
8427         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8428
8429 2006-06-26  Simon Josefsson  <jas@extundo.com>
8430
8431         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8432         present.
8433
8434 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8435
8436         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8437         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8438         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8439
8440 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8441
8442         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8443
8444 2006-06-26  Bruno Haible  <bruno@clisp.org>
8445
8446         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8447
8448 2006-06-26  Bruno Haible  <bruno@clisp.org>
8449
8450         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8451
8452 2006-06-26  Bruno Haible  <bruno@clisp.org>
8453
8454         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8455         SGI C compiler in pre-C99 mode.
8456         Suggested by Mark D. Baushke and Larry Jones.
8457
8458 2006-06-26  Bruno Haible  <bruno@clisp.org>
8459
8460         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8461         WCHAR_MAX.
8462         Reported by Mark D. Baushke and Larry Jones.
8463
8464 2006-06-26  Bruno Haible  <bruno@clisp.org>
8465
8466         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8467         in pre-C99 mode.
8468         Suggested by Mark D. Baushke and Larry Jones.
8469
8470 2006-06-23  Simon Josefsson  <jas@extundo.com>
8471             Bruno Haible  <bruno@clisp.org>
8472
8473         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8474         Emit mostlyclean-local rule.
8475         (func_emit_tests_Makefile_am): Likewise.
8476         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8477
8478 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8479
8480         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8481
8482 2006-06-23  Bruno Haible  <bruno@clisp.org>
8483
8484         * tests/test-stdint.c: Update to match ISO C 99 Technical
8485         Corrigendum 1.
8486
8487 2006-06-23  Bruno Haible  <bruno@clisp.org>
8488
8489         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8490
8491 2006-06-23  Bruno Haible  <bruno@clisp.org>
8492
8493         * lib/stdint_.h: Treat IRIX like OpenBSD.
8494
8495 2006-06-23  Bruno Haible  <bruno@clisp.org>
8496
8497         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8498         ISO C 99 Technical Corrigendum 1.
8499
8500 2006-06-22  Simon Josefsson  <jas@extundo.com>
8501
8502         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8503         MinGW.
8504
8505 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8506
8507         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8508         needed.  Some compiler complained about some of them.  Problem reported
8509         by Larry Jones in
8510         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8511
8512 2006-06-21  Simon Josefsson  <jas@extundo.com>
8513
8514         * tests/test-getaddrinfo.c: New file.
8515
8516         * modules/getaddrinfo-tests: New file.
8517
8518         * MODULES.html.sh: Add inet_pton.
8519
8520         * modules/inet_pton: New file.
8521
8522 2006-06-21  Simon Josefsson  <jas@extundo.com>
8523
8524         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8525         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8526         of using the (limited) gnulib implementation on Windows XP.
8527
8528         * m4/inet_pton.m4: New file.
8529
8530 2006-06-21  Simon Josefsson  <jas@extundo.com>
8531
8532         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8533         variable.
8534
8535         * lib/socket_.h: Don't define WINVER.
8536
8537         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8538         slightly modified to work in gnulib.
8539
8540 2006-06-21  Simon Josefsson  <jas@extundo.com>
8541
8542         * doc/gnulib.texi (Windows sockets): Add.
8543
8544 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8545
8546         * lib/read-file.c (fread_file): Start with buffer allocation of
8547         0 bytes rather than 1 byte; this simplifies the code.
8548         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8549         code to free buffer and save/restore errno.
8550         (internal_read_file): Remove unused local.
8551
8552 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8553
8554         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8555         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8556         Problem reported by Denis Excoffier in
8557         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8558
8559 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8560
8561         * modules/sys_socket, modules/socklen: Include sys/types since
8562         FreeBSD 4.x's sys/socket.h needs it.
8563
8564 2006-06-19  Simon Josefsson  <jas@extundo.com>
8565
8566         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8567
8568 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8569
8570         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8571
8572 2006-06-19  Bruno Haible  <bruno@clisp.org>
8573
8574         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8575         and FULL_PATH_INTTYPES_H in angle brackets.
8576         Reported by Mark D. Baushke <mdb@gnu.org>.
8577
8578 2006-06-17  Eric Blake  <ebb9@byu.net>
8579
8580         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8581         errno.
8582
8583 2006-06-17  Bruno Haible  <bruno@clisp.org>
8584
8585         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8586         <sys/inttypes.h>.
8587
8588 2006-06-17  Bruno Haible  <bruno@clisp.org>
8589
8590         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8591         whether errno is declared. Assume <errno.h> declares errno.
8592
8593 2006-06-17  Bruno Haible  <bruno@clisp.org>
8594
8595         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8596
8597 2006-06-17  Bruno Haible  <bruno@clisp.org>
8598
8599         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8600         problem on Solaris 2.5.1.
8601
8602 2006-06-16  Eric Blake  <ebb9@byu.net>
8603
8604         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8605         * lib/unicodeio.c [!defined errno]: Likewise.
8606         * lib/strtol.c [!defined errno]: Likewise.
8607         * lib/strtod.c [!defined errno]: Likewise.
8608
8609 2006-06-15  Eric Blake  <ebb9@byu.net>
8610
8611         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8612
8613 2006-06-15  Eric Blake  <ebb9@byu.net>
8614
8615         * config/srclist.txt (ssize_t.m4): Lose sync.
8616
8617 2006-06-15  Bruno Haible  <bruno@clisp.org>
8618
8619         * modules/stdint (Files): Include m4/full-header-path.m4,
8620         m4/size_max.m4, m4/wchar_t.m4.
8621         (Makefile.am): Many more substitutions.
8622         * modules/stdint-tests: New file.
8623         * tests/test-stdint.c: New file.
8624
8625 2006-06-15  Bruno Haible  <bruno@clisp.org>
8626
8627         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8628         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8629         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8630         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8631         gl_CHECK_TYPE_SAME): New macros.
8632
8633 2006-06-15  Bruno Haible  <bruno@clisp.org>
8634
8635         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8636
8637 2006-06-15  Bruno Haible  <bruno@clisp.org>
8638
8639         * lib/stdint_.h: Rewritten to be fully auto-configured.
8640         Fixes bug on HP-UX/IA64.
8641
8642 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8643
8644         * lib/getdate.y (__attribute__): Don't define if already defined.
8645         Problem reported by Larry Jones.
8646         * lib/utimens.c (__attribute__): Likewise.
8647
8648 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8649
8650         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8651         reported by Andreas Schwab.
8652
8653 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8654             Bruno Haible  <bruno@clisp.org>
8655
8656         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8657         check for the declaration of strnlen and a run test that exposes the
8658         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8659         rpl_strndup.
8660
8661 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8662             Bruno Haible  <bruno@clisp.org>
8663
8664         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8665
8666 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8667
8668         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8669         compile test, for Tru64 4.0D.
8670
8671 2006-05-28  Karl Berry  <karl@gnu.org>
8672
8673         * config/srclist.txt (printf-args.c): lose sync.
8674
8675 2006-05-26  Martin Lambers  <marlam@marlam.de>
8676
8677         * lib/getpass.c: Updates the test for the native W32 API, and adds
8678         missing includes, thus fixing compilation warnings.
8679
8680 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8681
8682         * lib/exclude.c (exclude_fnmatch): New function.
8683         (excluded_file_name): Call exclude_fnmatch.
8684         * lib/exclude.h (excluded_file_name): New prototype
8685
8686 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8687
8688         * lib/tempname.c (small_open, large_open): New macros.
8689         (__open, __open64) [!_LIBC]: Remove.
8690         (__gen_tempname): Use small_open and large_open instead of __open
8691         and __open64.  This fixes a portability bug on HP-UX 11.11i
8692         reported by Simon Wing-Tang in
8693         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8694
8695 2006-05-24  Bruno Haible  <bruno@clisp.org>
8696
8697         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8698         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8699         Reported by Thorsten Maerz <torte@netztorte.de> via
8700         Aaron Stone <aaron@serendipity.cx>.
8701
8702 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8703
8704         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8705         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8706         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8707         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8708         not really conditional on the cache.
8709         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8710
8711 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8712
8713         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8714         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8715         (my_usleep): Don't mishandle maximum value.
8716
8717 2006-05-19  Jim Meyering  <jim@meyering.net>
8718
8719         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8720
8721 2006-05-17  Bruno Haible  <bruno@clisp.org>
8722
8723         Cygwin portability.
8724         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8725
8726 2006-05-17  Bruno Haible  <bruno@clisp.org>
8727
8728         * lib/stdint_.h: Fix recognition of Cygwin.
8729
8730 2006-05-15  Bruno Haible  <bruno@clisp.org>
8731
8732         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8733         on libtool patch by Ralf Wildenhues.
8734
8735 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8736
8737         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8738         test for C99 conformance; (bool) 0.5 is an integer constant
8739         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8740         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8741
8742 2006-05-11  Simon Josefsson  <jas@extundo.com>
8743
8744         * m4/xvasprintf.m4: Fix obvious typo.
8745
8746 2006-05-11  Jim Meyering  <jim@meyering.net>
8747
8748         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8749         James Lemley.
8750
8751 2006-05-10  Simon Josefsson  <jas@extundo.com>
8752
8753         * lib/md4.c: Typo fix, update copyright years.
8754         (K1, K2): Don't use L because it turn computations into 64-bit on
8755         64-bit platforms.
8756
8757 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8758
8759         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8760         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8761         unwanted sign propagation, e.g., on hosts with 64-bit int.
8762         There still are some problems with reeelly weird theoretical hosts
8763         (e.g., 33-bit int) but it's not worth worrying about now.
8764         * lib/sha1.c (rol): Likewise.
8765         (K1, K2, K3, K4): Remove unnecessary L suffix.
8766
8767 2006-05-10  Bruno Haible  <bruno@clisp.org>
8768
8769         * lib/des.c: Cast to avoid warnings.
8770
8771 2006-05-09  Bruno Haible  <bruno@clisp.org>
8772
8773         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8774         (Depends-on): Depend also on xsize, stdarg.
8775         (configure.ac): Add gl_XVASPRINTF.
8776
8777 2006-05-09  Bruno Haible  <bruno@clisp.org>
8778
8779         * m4/xvasprintf.m4: New file.
8780
8781 2006-05-09  Bruno Haible  <bruno@clisp.org>
8782
8783         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8784         (EOVERFLOW): Define fallback value.
8785         (xstrcat): New function.
8786         (xvasprintf): Recognize the special case of a string concatenation.
8787
8788 2006-05-08  Eric Blake  <ebb9@byu.net>
8789
8790         * gnulib-tool (func_version): Base copyright year on CVS date.
8791         (func_emit_copyright_notice): New function.
8792         (func_emit_lib_Makefile_am): Use it.
8793         (func_emit_tests_Makefile_am): Likewise.
8794         (func_import): Likewise.
8795
8796 2006-05-08  Bruno Haible  <bruno@clisp.org>
8797
8798         * modules/stdarg: New file.
8799         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8800
8801 2006-05-08  Bruno Haible  <bruno@clisp.org>
8802
8803         * m4/stdarg.m4: New file, from GNU gettext.
8804
8805 2006-05-08  Bruno Haible  <bruno@clisp.org>
8806
8807         * config/srclist.txt (build-aux/config.rpath): different from latest
8808         release.
8809
8810 2006-05-08  Bruno Haible  <bruno@clisp.org>
8811
8812         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8813
8814 2006-05-05  Jim Meyering  <jim@meyering.net>
8815
8816         * m4/warning.m4: New file, derived from bison's file by the same name.
8817
8818 2006-05-03  Bruno Haible  <bruno@clisp.org>
8819
8820         * lib/stdint_.h: Shorter URL.
8821         * lib/inttypes.h: Likewise.
8822
8823 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8824
8825         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8826
8827 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8828
8829         * lib/verify.h: Document the internals better.  Most of this change
8830         was written by Bruno Haible.
8831
8832 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8833
8834         * doc/verify.texi: New file, partly based on a proposal by
8835         Bruno Haible.
8836
8837 2006-05-02  Bruno Haible  <bruno@clisp.org>
8838
8839         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8840         test from here...
8841         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8842
8843 2006-04-29  Bruno Haible  <bruno@clisp.org>
8844
8845         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8846         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8847
8848 2006-04-29  Bruno Haible  <bruno@clisp.org>
8849
8850         * gnulib-tool: Make --update option actually work.
8851
8852 2006-04-29  Bruno Haible  <bruno@clisp.org>
8853
8854         * doc/gcd.texi: New file.
8855         * doc/gnulib.texi: Include it.
8856
8857 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8858
8859         * lib/getdate.y (get_date): When adding relative date, start with the
8860         initial time, not with the result of the first mktime call.
8861
8862 2006-04-25  Bruno Haible  <bruno@clisp.org>
8863
8864         * gnulib-tool (func_import): Output the include directives in three
8865         blocks, sorted separately.
8866         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8867
8868 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8869
8870         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8871         to define main with arguments, for C++.  Reported by Eric Blake.
8872         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8873         Prefer 'int main ()' to 'int main (void)', for C++.
8874         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8875         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8876         for 'main', for C99 and C++.
8877
8878 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8879
8880         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8881         Don't assume that exit status -1 is valid.
8882         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8883         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8884         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8885         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8886         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8887         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8888         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8889         functions can be used without declaring them, or that you can
8890         exit with status -1.
8891         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8892
8893 2006-04-24  Karl Berry  <karl@gnu.org>
8894
8895         * config/srclist.txt (longdouble.m4): sync lost.
8896
8897 2006-04-24  Eric Blake  <ebb9@byu.net>
8898
8899         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8900
8901 2006-04-24  Bruno Haible  <bruno@clisp.org>
8902
8903         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8904         poll() implementation in AIX.
8905         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8906
8907 2006-04-24  Bruno Haible  <bruno@clisp.org>
8908
8909         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8910         assigned exactly once.
8911
8912 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8913             Bruno Haible  <bruno@clisp.org>
8914
8915         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8916         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8917         for AM_CPPFLAGS.
8918
8919 2006-04-23  Bruno Haible  <bruno@clisp.org>
8920
8921         * modules/copy-file: Depend on unistd.
8922         * modules/execute: Likewise.
8923         * modules/fatal-signal: Likewise.
8924         * modules/findprog: Likewise.
8925         * modules/mkdtemp : Likewise.
8926         * modules/pipe: Likewise.
8927         * modules/wait-process: Likewise.
8928
8929 2006-04-23  Bruno Haible  <bruno@clisp.org>
8930
8931         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8932         condition was already detected.
8933         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8934
8935 2006-04-23  Bruno Haible  <bruno@clisp.org>
8936
8937         * lib/copy-file.c: Include <unistd.h> unconditionally.
8938         * lib/execute.c: Likewise.
8939         * lib/fatal-signal.c: Likewise.
8940         * lib/findprog.c: Likewise.
8941         * lib/mkdtemp.c: Likewise.
8942         * lib/pipe.h: Likewise.
8943         * lib/pipe.c: Likewise.
8944         * lib/wait-process.h: Likewise.
8945
8946 2006-04-23  Bruno Haible  <bruno@clisp.org>
8947
8948         * gnulib-tool (func_usage): Fix --import description. Document
8949         --update.
8950         (func_import): Create temporary file in a temporary directory, if
8951         --dry-run is specified. Silence errors from 'grep' when there are no
8952         m4 files in $m4dir.
8953         (func_create_testdir): Silence errors from 'grep' when there are no
8954         m4 files in $m4dir.
8955         Reported by Karl Berry <karl@freefriends.org>.
8956
8957 2006-04-20  Bruno Haible  <bruno@clisp.org>
8958
8959         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8960         one argument, so that the code will be portable to Autoconf 2.60.
8961         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8962         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8963         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8964
8965 2006-04-19  Derek Price  <derek@ximbiot.com>
8966             Eric Blake  <ebb9@byu.net>
8967
8968         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8969         rather than "/full/path.h".  Update comment to match.  Shorten &
8970         generalize m4_translit call via AS_TR_CPP.
8971
8972 2006-04-19  Derek Price  <derek@ximbiot.com>
8973             Eric Blake  <ebb9@byu.net>
8974
8975         * lib/inttypes.h: Correct grammar in comment.
8976
8977 2006-04-18  Derek Price  <derek@ximbiot.com>
8978             Paul Eggert  <eggert@cs.ucla.edu>
8979
8980         * modules/inttypes: New file.
8981         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8982
8983 2006-04-18  Derek Price  <derek@ximbiot.com>
8984             Paul Eggert  <eggert@cs.ucla.edu>
8985
8986         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8987         New files.
8988
8989 2006-04-18  Derek Price  <derek@ximbiot.com>
8990             Paul Eggert  <eggert@cs.ucla.edu>
8991
8992         * lib/inttypes.h: New file.
8993         * lib/strtoimax.c: Assume <inttypes.h>.
8994
8995 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8996
8997         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8998         isn't mounted.  Problem reported by Kir Kolyshkin.
8999
9000 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9001
9002         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9003         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9004         Derek R. Price.
9005         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9006         implementation.
9007
9008 2006-04-12  Eric Blake  <ebb9@byu.net>
9009
9010         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9011         is now done automatically by the corresponding Autoconf macro.
9012
9013 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9014
9015         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9016         time_r.h.
9017
9018 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9019
9020         Merge regex changes from libc, removing some of our
9021         POSIX-conformance changes that were rejected and redoing them in a
9022         less-intrusive way.
9023
9024         * lib/regcomp.c (re_compile_internal, init_dfa):
9025         Length arg is now size_t, not Idx.  All uses changed.
9026         (peek_token): Forward decl now says internal_function.
9027         (__re_error_msgid, __re_error_msgid_idx):
9028         Now static rather than extern with attribute_hidden.
9029         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9030         For some reason libc prefers K&R style defns for external functions.
9031         (regerror) [!defined _LIBC]: Likewise.
9032         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9033         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9034         (build_range_exp, build_collating_symbol):
9035         Use K&R-style defn.
9036         (re_compile_fastmap): Use '\0' to memset, not 0.
9037         (utf8_sb_map): Make the calculations more obvious.
9038         (init_dfa, parse_bracket_exp, build_charclass_op):
9039         Call calloc and cast result, as glibc does.
9040         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9041         (build_range_exp, build_collating_symbol):
9042         Now internal functions.
9043
9044         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9045
9046         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9047         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9048         Don't depend on VMS; depend on __VMS instead, for POSIX
9049         namespace cleanness.
9050         (regoff_t): Define to ssize_t, not long int.
9051
9052         Remove the REG_ macros named below.  Instead, make the old names
9053         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9054         __USE_GNU_REGEX.
9055         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9056         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9057         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9058         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9059         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9060         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9061         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9062         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9063         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9064         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9065         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9066         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9067         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9068         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9069         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9070         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9071         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9072         (REG_NREGS):
9073         Remove.  All uses replaced by the old RE_* names.
9074         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9075         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9076         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9077         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9078         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9079         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9080         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9081         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9082         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9083         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9084         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9085         Don't bother having these macros be independent of each others'
9086         values, since they no longer exist in the POSIX name space.
9087
9088         Rename the following member names back to their old names,
9089         unless !__USE_GNU_REGEX.  All uses changed back.
9090         (buffer): Renamed from re_buffer.
9091         (allocated): Renamed from re_allocated.
9092         (used): Renamed from re_used.
9093         (syntax): Renamed from re_syntax.
9094         (fastmap): Renamed from re_fastmap.
9095         (translate): Renamed from re_translate.
9096         (can_be_null): Renamed from re_can_be_null.
9097         (regs_allocated): Renamed from re_regs_allocated.
9098         (fastmap_accurate): Renamed from re_fastmap_accurate.
9099         (no_sub): Renamed from re_no_sub.
9100         (not_bol): Renamed from re_not_bol.
9101         (not_eol): Renamed from re_not_eol.
9102         (newline_anchor): Renamed from re_newline_anchor.
9103         (num_regs): Renamed from rm_num_regs.
9104         (start): Renamed from rm_start.
9105         (end): Renamed from rm_end.
9106
9107         (free_state): Move up a bit.
9108
9109         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9110         #define to be empty.
9111         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9112         when that is what is intended.
9113         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9114         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9115         (MAX): New macro.
9116         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9117         All uses changed back to re_malloc, etc.  It's now the caller's
9118         responsibility to check for overflow; all callers changed.
9119         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9120         (re_x2nrealloc): Remove.
9121         (free_state): Remove decl.
9122
9123         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9124         (re_set_registers, re_exec):
9125         Use K&R-style defn.
9126
9127         2006-01-31  Roland McGrath  <roland@redhat.com>
9128
9129         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9130         Reported by Mike Frysinger <vapier@gentoo.org>.
9131
9132         2006-01-15  Andreas Jaeger  <aj@suse.de>
9133
9134         [BZ #1950]
9135         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9136         build_wcs_upper_buffer change.
9137         (build_wcs_upper_buffer): Change return type.
9138
9139         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9140
9141         * lib/regex_internal.h: Include <stdint.h> if available.
9142
9143         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9144
9145         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9146
9147         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9148
9149         * lib/regcomp.c: Adjust for changed secondary hash function.
9150
9151         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9152
9153         * lib/regex.h: Pretty printing.
9154         Clean up namespace a bit.
9155
9156         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9157
9158         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9159         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9160
9161         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9162                     Ulrich Drepper  <drepper@redhat.com>
9163
9164         [BZ #1302]
9165         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9166         changed.
9167         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9168
9169         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9170
9171         [BZ #281]
9172         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9173         * lib/regcomp.c: Remove unnecessary uses of
9174         unsigned RE_TRANSLATE_TYPE.
9175         * lib/regex_internal.h: Likewise.
9176         * lib/regex_internal.c: Likewise.
9177         * lib/regexec.c: Likewise.
9178         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9179
9180         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9181
9182         * lib/regexec.c (find_recover_state): Remove unnecessary
9183         initialization.
9184         (transit_state_bkref): Make DFA a const pointer.
9185         (get_subexp): Likewise.
9186         (check_arrival): Likewise.
9187         (update_cur_sifted_state): Likewise.
9188         (re_search_internal): Likewise.
9189         (prune_impossible_nodes): Likewise.
9190         (acquire_init_state_context): Likewise.
9191         (proceed_next_node): Likewise.
9192         (set_regs): Likewise.
9193         (free_fail_stack_return): Likewise.
9194         (check_arrival_expand_ecl): Mark DFA parameter as const.
9195         (check_arrival_expand_ecl_sub): Likewise.
9196         (check_subexp_limits): Likewise.
9197         (sub_epsilon_src_nodes):  Likewise.
9198         (add_epsilon_src_nodes):  Likewise.
9199         (merge_state_array): Likewise.
9200         (update_regs): Likewise.
9201         (build_trtable): Likewise.
9202         (sift_states_backward): Mark MCTX parameter as const.
9203         (build_sifted_states): Likewise.
9204         (update_cur_sifted_state): Likewise.
9205         (sift_states_mkref): Likewise.
9206         (check_arrival_expand_ecl): Mark eclosure as const.
9207         (check_dst_limits_calc_pos_1): Likewise.
9208         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9209         pointer.
9210
9211         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9212
9213         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9214         (transit_state_sb): Likewise.
9215         (transit_state_mb): Likewise.
9216         (sift_states_iter_mb): Likewise.
9217         (check_arrival_add_next_nodes): Likewise.
9218         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9219         [_LIBC] (re_search_2_stub): Use mempcpy.
9220
9221         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9222         mbrtowc for very simple UTF-8 case.
9223
9224         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9225         a pointer-to-const.
9226         (re_acquire_state_context): Likewise.
9227         * lib/regex_internal.h: Adjust prototypes.
9228
9229         * lib/regex.c: Prevent using C++ compilers.
9230
9231         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9232         (re_acquire_state_context): Likewise.
9233
9234 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9235
9236         * modules/regex (Depends-on): Add ssize_t.
9237
9238 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9239
9240         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9241         translation table.
9242
9243 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9244
9245         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9246
9247 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9248             Bruno Haible  <bruno@clisp.org>
9249
9250         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9251         <sys/types.h> and <inttypes.h>.
9252
9253 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9254
9255         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9256         `__error_t_defined', so argp.h will not typedef the former.
9257
9258 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9259
9260         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9261         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9262         glibc names.  Even if glibc is changed to conform to POSIX, the
9263         traditional names will be available anyway, since regex depends on
9264         the extensions module.  Also, fix a longstanding typo in the
9265         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9266         reported by Emanuele Giaquinta.  Also, change sense of cached
9267         variable, so that the message makes sense.
9268
9269 2006-03-24  Simon Josefsson  <jas@extundo.com>
9270
9271         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9272         including some doc fixes.
9273         (base64_encode_alloc): Fix +1 bug on allocation failures.
9274
9275 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9276
9277         * lib/base64.c (base64_encode): Do not read past end of array with
9278         unsanitized input on systems with CHAR_BIT > 8.
9279
9280 2006-03-24  Eric Blake  <ebb9@byu.net>
9281
9282         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9283
9284 2006-03-22  Karl Berry  <karl@gnu.org>
9285
9286         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9287         * config/srclistvars.sh (COREUTILS): new var.
9288
9289 2006-03-17  Jim Meyering  <jim@meyering.net>
9290
9291         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9292         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9293
9294 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9295
9296         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9297         no longer needs it.  Instead, check that regoff_t is as least
9298         as wide as ptrdiff_t.
9299
9300         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9301         so that our regex.h stays compatible with the installed regex.
9302         This is helpful for installers who configure --without-included-regex.
9303         Problem reported by Emanuele Giaquinta.
9304
9305 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9306
9307         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9308         Typedef to long int, not to off_, as POSIX will likely change
9309         in that direction.
9310
9311 2006-03-15  Eric Blake  <ebb9@byu.net>
9312
9313         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9314
9315 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9316
9317         * lib/argp-help.c (validate_uparams): Fix typo
9318         * lib/argp-parse.c (argp_default_options): Consistently begin help
9319         messages with a lowercase letter.
9320
9321 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9322
9323         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9324         overrun buffers and shouldn't be used (much as gets shouldn't be
9325         used).
9326         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9327
9328 2006-03-08  Simon Josefsson  <jas@extundo.com>
9329
9330         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9331         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9332
9333 2006-03-08  Simon Josefsson  <jas@extundo.com>
9334
9335         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9336         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9337
9338 2006-03-08  Simon Josefsson  <jas@extundo.com>
9339
9340         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9341         signal that configure disabled the device.
9342
9343 2006-03-08  Simon Josefsson  <jas@extundo.com>
9344
9345         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9346         languages.
9347
9348 2006-03-07  Simon Josefsson  <jas@extundo.com>
9349
9350         * modules/getopt (Depends-on): Add unistd.
9351
9352         * modules/unistd: New file.
9353
9354 2006-03-07  Simon Josefsson  <jas@extundo.com>
9355
9356         * modules/gc-random: New file.
9357
9358 2006-03-07  Simon Josefsson  <jas@extundo.com>
9359
9360         * m4/unistd_h.m4: New file.
9361
9362 2006-03-07  Simon Josefsson  <jas@extundo.com>
9363
9364         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9365         test to be side-effect free by storing the result in the cache
9366         variable gl_cv_lib_readline, and moving the assignment of
9367         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9368         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9369
9370 2006-03-07  Simon Josefsson  <jas@extundo.com>
9371
9372         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9373         error on missing devices (the functions will return an error).
9374
9375         * m4/gc.m4: Move random stuff to gc-random.m4
9376
9377 2006-03-07  Simon Josefsson  <jas@extundo.com>
9378
9379         * lib/unistd_.h: New file.
9380
9381 2006-03-07  Simon Josefsson  <jas@extundo.com>
9382
9383         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9384
9385 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9386
9387         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9388         Problem reported by Juan Manuel Guerrero.
9389
9390 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9391
9392         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9393         the unistd module.
9394         * lib/getlogin_r.c: Likewise.
9395         * lib/getlogin_r.h: Likewise.
9396         * lib/glob.c: Likewise.
9397         * lib/pagealign_alloc.c: Likewise.
9398         * lib/unistd_.h: Remove; no longer needed.
9399
9400 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9401
9402         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9403         Add unistd.
9404         * modules/c-stack (Depends-on): Add unistd.
9405         * modules/getlogin_r: Likewise.
9406         * modules/glob: Likewise.
9407         * modules/pagealign_alloc: Likewise.
9408         * modules/unistd (Files): Remove lib/unistd_.h.
9409         (EXTRA_DIST): Remove.
9410         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9411         need unistd_.h.
9412         (MOSTLYCLEANFILES): Remove unistd.h-t.
9413
9414 2006-03-03  Simon Josefsson  <jas@extundo.com>
9415
9416         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9417
9418 2006-03-03  Simon Josefsson  <jas@extundo.com>
9419
9420         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9421         libidn and bison.
9422
9423 2006-03-03  Simon Josefsson  <jas@extundo.com>
9424
9425         * build-aux/maint.mk: Add indent target.
9426
9427 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9428
9429         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9430         our replacement poll.h in any case, to avoid a differing
9431         declaration from a system header.  Seen on AIX.
9432
9433 2006-03-01  Simon Josefsson  <jas@extundo.com>
9434
9435         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9436         <kasal@ucw.cz>.
9437
9438 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9439
9440         * modules/gettime (Depends-on): Add extensions module.
9441         * modules/nanosleep (Depends-on): Likewise.
9442         * modules/settime (Depends-on): Likewise.
9443
9444 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9445
9446         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9447         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9448         pedantically.
9449         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9450         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9451
9452         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9453         not "==".  Reported by Ralf Wildenhues.
9454
9455 2006-03-01  Karl Berry  <karl@gnu.org>
9456
9457         * doc/Copyright/request-*: new files, synced from gnuorg.
9458
9459 2006-03-01  Karl Berry  <karl@gnu.org>
9460
9461         * config/srclist.txt (Copyright/*): new entries.
9462
9463 2006-02-28  Simon Josefsson  <jas@extundo.com>
9464
9465         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9466
9467 2006-02-27  Simon Josefsson  <jas@extundo.com>
9468
9469         * lib/base64.h: Indent #define's.  From Jim Meyering
9470         <jim@meyering.net>.
9471
9472 2006-02-27  Jim Meyering  <jim@meyering.net>
9473
9474         Revert the change of 2006-02-24, so these files can continue
9475         to be sync'd from gettext.
9476         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9477         of `config.h'.
9478
9479 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9480
9481         * modules/intprops: New file.
9482         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9483         Add intprops.
9484         * modules/getloadavg (Files): Remove lib/intprops.h.
9485         (Depends-on): Add intprops.
9486         * modules/human: Likewise.
9487         * modules/inttostr: Likewise.
9488         * modules/openat: Likewise.
9489         * modules/sig2str: Likewise.
9490         * modules/userspec: Likewise.
9491         * modules/utimecmp: Likewise.
9492         * modules/xnanosleep: Likewise.
9493         * modules/xstrtol: Likewise.
9494
9495 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9496
9497         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9498         * modules/lock-tests (TESTS): Use $(EXEEXT).
9499         * modules/tls-tests: Likewise.
9500         * modules/argp-tests: Likewise.
9501         (check_PROGRAMS): New var, replacing...
9502         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9503
9504 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9505
9506         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9507         `config.h'.
9508
9509 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9510
9511         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9512
9513 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9514
9515         Sync from coreutils.
9516         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9517         gl_CHDIR_SAFER.
9518
9519 2006-02-22  Jim Meyering  <jim@meyering.net>
9520
9521         Sync from coreutils.
9522         * m4/chdir-safer.m4: New file.
9523
9524 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9525
9526         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9527         AT_FDCWD exceeds INT_MAX.
9528         * lib/openat.h (AT_FDCWD): Likewise.
9529
9530 2006-02-17  Eric Blake  <address@hidden>
9531
9532         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9533
9534 2006-02-16  Simon Josefsson  <jas@extundo.com>
9535
9536         * modules/getaddrinfo (Depends-on): Add sys_socket.
9537
9538 2006-02-15  Simon Josefsson  <jas@extundo.com>
9539
9540         * build-aux/maint.mk: Add dsyntax-check rule.
9541
9542 2006-02-15  Eric Blake  <ebb9@byu.net>
9543
9544         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9545         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9546         'present but cannot compile' warnings on cygwin.
9547         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9548         use ws2tcpip.h if sys/socket.h works.
9549         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9550         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9551
9552 2006-02-14  Simon Josefsson  <jas@extundo.com>
9553
9554         * modules/maintainer-makefile (Files): Rename.
9555
9556         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9557         and (the local) Makefile.cfg to maint-cfg.mk.
9558
9559         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9560         to the latter.
9561
9562         * modules/maintainer-makefile: New module.
9563
9564         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9565         severaly stripped to make it possible to build it up from scratch
9566         with reliable tests.
9567
9568         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9569         fixes to permit overriding the default actions when configure and
9570         makefile are not available.
9571
9572 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9573
9574         Sync from coreutils.
9575         * modules/lstat (Depends-on): Don't depend on xalloc.
9576         (License): Change from GPL to LGPL, since this is now simply a
9577         replacement for a libc function.
9578
9579 2006-02-14  Jim Meyering  <jim@meyering.net>
9580
9581         Sync from coreutils.
9582
9583         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9584         failure on deficient systems, and simplify gnulib lgpl dependencies.
9585         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9586         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9587
9588         * lib/xalloc-die.c: Remove unused definition of N_.
9589
9590 2006-02-14  Jim Meyering  <jim@meyering.net>
9591
9592         Sync from coreutils.
9593         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9594         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9595         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9596         double-quote uses of that variable, to accommodate the rare case in
9597         which getmntent is available in none of the libraries checked.  This
9598         happens at least on FreeBSD 5.0.
9599
9600 2006-02-13  Simon Josefsson  <jas@extundo.com>
9601
9602         * gnulib-tool (Usage): Fix --import, from
9603         karl@freefriends.org (Karl Berry).
9604
9605 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9606
9607         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9608
9609 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9610
9611         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9612         "autoupdate" on 2005-12-12.
9613
9614 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9615
9616         * modules/closeout (Depends-on): Remove atexit.
9617
9618 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9619
9620         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9621         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9622
9623 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9624
9625         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9626         __EXTENSIONS__ if this causes compilation to fail.  Problem
9627         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9628         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9629
9630 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9631
9632         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9633         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9634         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9635         All uses changed.
9636
9637 2006-01-26  Simon Josefsson  <jas@extundo.com>
9638
9639         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9640         prototype is visible on mingw32.
9641
9642         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9643         for mingw32.
9644
9645         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9646         mingw32).
9647
9648 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9649
9650         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9651         attempt to open for write; this always fails, at least on POSIX
9652         hosts.  This reinstates the 2006-01-09 change, which was
9653         inadvertently removed.
9654
9655 2006-01-26  Bruno Haible  <bruno@clisp.org>
9656
9657         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9658         Reported by Paul Eggert.
9659
9660 2006-01-26  Bruno Haible  <bruno@clisp.org>
9661             Paul Eggert  <eggert@cs.ucla.edu>
9662
9663         * lib/stdbool_.h (_Bool)
9664         [(! (defined __cplusplus || defined __BEOS__)
9665           && !defined __GNUC__
9666           && !(defined __HP_cc || defined __xlc__
9667                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9668                || defined __sgi))]:
9669         #define to signed char in these cases too; this simplifies
9670         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9671         etc., separately) and makes it more conservative.
9672
9673 2006-01-25  Simon Josefsson  <jas@extundo.com>
9674
9675         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9676         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9677         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9678
9679 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9680
9681         * lib/argp-namefrob.h: Bugfix. Remove stray #
9682
9683 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9684
9685         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9686         so that we test the test.
9687         Check for yet another HP-UX cc bug involving *bool |= bool.
9688
9689 2006-01-25  Karl Berry  <karl@gnu.org>
9690
9691         * config/srclist.txt (vasnprintf.c): sync lost.
9692
9693 2006-01-25  Jim Meyering  <jim@meyering.net>
9694
9695         Sync from the stable (b5) branch of coreutils:
9696
9697         * lib/fts.c (fts_children): Don't let close() clobber errno from
9698         failed fchdir().
9699
9700         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9701         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9702         a dangling symlink.  That can also happen at least for ELOOP.
9703         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9704         FYI, this bug predates the inclusion of fts.c in coreutils.
9705
9706         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9707         in their own block, so pre-c99 compilers don't object.
9708
9709         Avoid the double-free (first in fts_read, second in fts_close) that
9710         would occur when an `active' directory is made inaccessible (e.g.,
9711         via chmod a-x) during a traversal.
9712         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9713         before returning.  Reproduce this failure by
9714         mkdir -p a/b; cd a; chmod a-x . b
9715         Reported by Stavros Passas.
9716
9717 2006-01-25  Jim Meyering  <jim@meyering.net>
9718
9719         * lib/fileblocks.c: Remove more useless parentheses.
9720         * lib/readutmp.h: Likewise.
9721
9722 2006-01-25  Bruno Haible  <bruno@clisp.org>
9723
9724         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9725         warnings.
9726         Reported by Paul Eggert.
9727
9728 2006-01-25  Bruno Haible  <bruno@clisp.org>
9729
9730         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9731         rid of a trap command. For Solaris sh.
9732         Reported by Mark D. Baushke <mdb@gnu.org>.
9733
9734 2006-01-24  Simon Josefsson  <jas@extundo.com>
9735
9736         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9737         Bruno.
9738
9739 2006-01-24  Karl Berry  <karl@gnu.org>
9740
9741         * config/srclist.txt (argp-namefrob.h): sync lost.
9742
9743 2006-01-24  Jim Meyering  <jim@meyering.net>
9744
9745         * modules/openat (Files): Add lib/intprops.h.
9746         From Mark D. Baushke.
9747
9748 2006-01-24  Jim Meyering  <jim@meyering.net>
9749
9750         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9751         Reported by Mark D. Baushke.
9752
9753 2006-01-24  Jim Meyering  <jim@meyering.net>
9754
9755         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9756
9757 2006-01-24  Bruno Haible  <bruno@clisp.org>
9758
9759         * modules/strnlen (Maintainer): Change from glibc to all.
9760
9761 2006-01-24  Bruno Haible  <bruno@clisp.org>
9762
9763         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9764         Patch by Paul Eggert.
9765
9766 2006-01-24  Bruno Haible  <bruno@clisp.org>
9767
9768         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9769         already has it.
9770         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9771         2005-11-26.
9772
9773         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9774         'signed char' to avoid problems with the built-in _Bool type.
9775         Reported by Paul Eggert on 2005-11-26.
9776
9777 2006-01-24  Bruno Haible  <bruno@clisp.org>
9778
9779         * gnulib-tool (func_import): Avoid constructing complicated sed
9780         expressions inside backquote.
9781         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9782
9783 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9784
9785         These changes imported from libc.
9786         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9787         test and two separate function calls.
9788         * lib/strndup.c (__strndup): Add libc_hidden_def.
9789
9790 2006-01-23  Simon Josefsson  <jas@extundo.com>
9791
9792         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9793         Remove the test_*_SOURCES variable: automake infers it by default.
9794         * modules/tls-tests: Likewise.
9795
9796 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9797
9798         Work around porting bugs reported by Dieter in
9799         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9800         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9801         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9802         Include "getopt.h" first, to check interface.
9803         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9804         !HAVE_DECL_GETENV.
9805         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9806         (__strndup): Revert to K&R-style function dfns, the glibc style.
9807         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9808         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9809         Include strnlen.h first, to get prototype properly.
9810         (strnlen): Renamed from __strnlen.
9811         Remove weak alias.
9812
9813 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9814
9815         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9816
9817 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9818
9819         * config/srclist.txt: Adjust to reflect glibc reorganization.
9820         This affects only comments.
9821
9822 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9823
9824          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9825          Reported by Bruce Korb <bkorb@gnu.org>.
9826
9827 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9828
9829         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9830         to pacify gcc -Wswitch-default.
9831
9832 2006-01-22  Bruno Haible  <bruno@clisp.org>
9833
9834         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9835         temporary buffer for sprintf, take into account the precision also
9836         for 'd', 'i', 'u', 'o', 'x', 'X'.
9837
9838 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9839
9840         * modules/argp-tests: New module
9841         * tests/test-argp.c: New file
9842         * tests/test-argp-2.sh: New file
9843
9844 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9845
9846         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9847         (__argp_base_name): Removed
9848         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9849         typo.
9850         (__argp_base_name): Provide macro definition or extern declaration
9851         depending on the configuration
9852
9853 2006-01-20  Simon Josefsson  <jas@extundo.com>
9854
9855         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9856
9857 2006-01-20  Simon Josefsson  <jas@extundo.com>
9858
9859         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9860
9861 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9862
9863         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9864         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9865         Suggested by Bruno Haible.
9866
9867 2006-01-20  Karl Berry  <karl@gnu.org>
9868
9869         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9870         until changes propagate, I guess.
9871
9872 2006-01-19  Simon Josefsson  <jas@extundo.com>
9873
9874         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9875
9876 2006-01-19  Simon Josefsson  <jas@extundo.com>
9877
9878         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9879
9880 2006-01-19  Simon Josefsson  <jas@extundo.com>
9881
9882         * gnulib-tool: Set check_PROGRAMS.
9883
9884         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9885         modules/des-tests, modules/gc-arcfour-tests,
9886         modules/gc-arctwo-tests, modules/gc-des-tests,
9887         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9888         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9889         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9890         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9891         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9892         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9893         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9894         test_*_SOURCES.
9895
9896 2006-01-18  Simon Josefsson  <jas@extundo.com>
9897
9898         * modules/socklen (Depends-on): Depend on sys_socket.
9899
9900 2006-01-18  Simon Josefsson  <jas@extundo.com>
9901
9902         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9903         modules/des-tests, modules/gc-arcfour-tests,
9904         modules/gc-arctwo-tests, modules/gc-des-tests,
9905         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9906         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9907         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9908         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9909         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9910         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9911         $(EXEEXT) to automake TESTS variable, for mingw32.
9912
9913 2006-01-17  Simon Josefsson  <jas@extundo.com>
9914
9915         * modules/socklen (Include): Need sys/socket.h.
9916
9917 2006-01-17  Bruno Haible  <bruno@clisp.org>
9918
9919         * modules/ssize_t (Include): Add <sys/types.h>.
9920
9921 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9922
9923         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9924         it's not portable and it doesn't work with cross-compiles.
9925         Problem reported by Bruno Haible.  Fix missing-$ typo in
9926         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9927         -zignore from being used with Sun's C compiler.
9928
9929 2006-01-12  Simon Josefsson  <jas@extundo.com>
9930
9931         * lib/base64.c: Fix warning, reported by Bruno Haible
9932         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9933
9934 2006-01-12  Bruno Haible  <bruno@clisp.org>
9935
9936         * modules/ldd: New file.
9937         * build-aux/ldd.sh.in: New file.
9938         * MODULES.html.sh (Support for building libraries and executables): Add
9939         ldd.
9940
9941 2006-01-12  Bruno Haible  <bruno@clisp.org>
9942
9943         * m4/ldd.m4: New file.
9944
9945 2006-01-12  Bruno Haible  <bruno@clisp.org>
9946
9947         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9948         endless loop while replacing $auxdir with build-aux.
9949
9950 2006-01-11  Simon Josefsson  <jas@extundo.com>
9951
9952         * lib/stdint_.h (SIZE_MAX): Add missing (.
9953
9954 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9955
9956         Sync from coreutils.
9957         * lib/md5.c: Fix commentary typos.
9958         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9959         * lib/md5.h (__attribute__): Remove; unused.
9960         * lib/sha1.c: Fix commentary to match md5 better.
9961         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9962         so that we don't need to worry about alignment.  All uses changed.
9963         This merges the 2005-10-28 md5 change into sha1.
9964
9965 2006-01-11  Jim Meyering  <jim@meyering.net>
9966
9967         Sync from coreutils.
9968         * lib/md5.c (OP): Fix spacing.
9969
9970 2006-01-11  Bruno Haible  <bruno@clisp.org>
9971
9972         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9973         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9974         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9975
9976 2006-01-11  Bruno Haible  <bruno@clisp.org>
9977
9978         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9979         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9980         the "early" section as well.
9981
9982 2006-01-11  Bruno Haible  <bruno@clisp.org>
9983
9984         Avoid "ar: no archive members specified" error on MacOS X.
9985         * gnulib-tool (func_modules_add_dummy): New function.
9986         (func_import, func_create_testdir): Invoke it.
9987
9988 2006-01-11  Bruno Haible  <bruno@clisp.org>
9989
9990         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9991         with $auxdir in AC_CONFIG_FILES statements.
9992
9993 2006-01-11  Bruno Haible  <bruno@clisp.org>
9994
9995         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9996         Initialize also noinst_HEADERS to empty.
9997
9998 2006-01-11  Bruno Haible  <bruno@clisp.org>
9999
10000         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10001         variables.
10002         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10003         autoreconf.
10004
10005 2006-01-11  Bruno Haible  <bruno@clisp.org>
10006
10007         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10008         overridable by the user.
10009         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10010
10011 2006-01-10  Simon Josefsson  <jas@extundo.com>
10012
10013         * modules/sys_socket: New file.
10014
10015 2006-01-10  Simon Josefsson  <jas@extundo.com>
10016
10017         * m4/sys_socket_h.m4: New file.
10018
10019 2006-01-10  Simon Josefsson  <jas@extundo.com>
10020
10021         * lib/socket_.h: New file.
10022
10023 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10024
10025         * modules/readutmp (Maintainer): Add myself.
10026
10027 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10028
10029         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10030         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10031         People who are still concerned with buggy memcmp implementations
10032         can invoke gl_FUNC_MEMCMP themselves.
10033
10034 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10035
10036         * lib/regex_internal.h (BITSET_WORD_BITS):
10037         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10038         preprocessor mishandles large unsigned values as if they were signed.
10039         Problem reported by Claudio Fontana in
10040         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10041
10042 2006-01-10  Jim Meyering  <jim@meyering.net>
10043
10044         Avoid the double-free (first in fts_read, second in fts_close) that
10045         would occur when an `active' directory is made inaccessible (e.g.,
10046         via chmod a-x) during a traversal.
10047         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10048         before returning.  Reproduce this failure by
10049         mkdir -p a/b; cd a; chmod a-x . b
10050         Reported by Stavros Passas.
10051
10052         Sync from coreutils.
10053         * lib/sha1.c: Tweak grammar in a comment.
10054
10055 2006-01-10  Jim Meyering  <jim@meyering.net>
10056
10057         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10058         Patch by Joerg Sonnenberger.
10059
10060 2006-01-10  Bruno Haible  <bruno@clisp.org>
10061
10062         * modules/readutmp: Depend on module free.
10063         * modules/strtok_r: Depend on module restrict.
10064
10065 2006-01-10  Bruno Haible  <bruno@clisp.org>
10066
10067         * modules/gettext (configure.ac): Add an invocation of
10068         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10069
10070 2006-01-10  Bruno Haible  <bruno@clisp.org>
10071
10072         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10073         Reported by Werner Lemberg <wl@gnu.org>.
10074
10075 2006-01-10  Bruno Haible  <bruno@clisp.org>
10076
10077         * lib/localcharset.c: Update from GNU gettext.
10078
10079 2006-01-10  Bruno Haible  <bruno@clisp.org>
10080
10081         * lib/argp.h (__const): Remove macro. Use const instead.
10082         * lib/argp-fmtstream.h (__const): Likewise.
10083         * lib/glob_.h (__const): Remove macro.
10084         * lib/glob-libc.h: Use const instead of __const.
10085
10086 2006-01-10  Bruno Haible  <bruno@clisp.org>
10087
10088         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10089         variable.
10090         Needed to avoid an automake error regarding the 'gettext' module.
10091
10092 2006-01-09  Simon Josefsson  <jas@extundo.com>
10093
10094         * modules/inet_ntop (Depends-on): Add restrict.
10095
10096 2006-01-09  Simon Josefsson  <jas@extundo.com>
10097
10098         * modules/gc-rijndael-tests (License): Put under LGPL.
10099
10100         * modules/gc-des-tests (License): Likewise.
10101
10102         * modules/gc-arcfour-tests (License): Likewise.
10103
10104         * modules/gc-arctwo-tests (License): Likewise.
10105
10106         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10107
10108         * modules/gc-hmac-sha1-tests (Files): Likewise.
10109
10110         * modules/gc-hmac-md5-tests (License): Likewise.
10111
10112         * modules/gc-sha1-tests (License): Likewise.
10113
10114         * modules/gc-md5-tests (License): Likewise.
10115
10116         * modules/gc-md4-tests (License): Likewise.
10117
10118         * modules/gc-md2-tests (License): Likewise.
10119
10120         * modules/gc-tests (License): Likewise.
10121
10122         * modules/des-tests (License): Likewise.
10123
10124         * modules/md4-tests (License): Likewise.
10125
10126         * modules/md2-tests (License): Likewise.
10127
10128 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10129
10130         Sync from coreutils:
10131
10132         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10133         * modules/lib-ignore: New file.
10134         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10135         chdir-safer.m4, lchmod.m4.
10136         * modules/openat: Add mkdirat.c, openat-priv.h.
10137
10138 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10139
10140         Sync from coreutils.
10141         * m4/lib-ignore.m4: New file.
10142         * m4/lchmod.m4: New file.
10143
10144 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10145
10146         Sync from coreutils.
10147         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10148         for write access: POSIX says that must fail.
10149         * lib/fts.c (diropen): Likewise.
10150         * lib/save-cwd.c (save_cwd): Likewise.
10151         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10152         well, for minor improvements on hosts that lack O_DIRECTORY.
10153         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10154         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10155         Fall back on chown if open failed with EACCES.
10156
10157         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10158         Report an error at compile-time if only a 1-second nominal clock
10159         resolution is found.
10160
10161         * lib/lchmod.h: New file.
10162         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10163         (make_dir_parents): Use lchown rather than chown, and
10164         lchmod rather than chmod.
10165
10166         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10167         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10168         "proc" reported by n0dalus.
10169
10170         * lib/mountlist.c: Include <limits.h>.
10171         (dev_from_mount_options)
10172         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10173         New function.  It no longer assumes "dev=" has the System V meaning
10174         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10175         (read_file_system_list)
10176         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10177         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10178         dev= in that case.
10179
10180         * lib/posixtm.h (PDS_PRE_2000): New macro.
10181         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10182         allow_century.  All usages changed.  Reject dates outside the range
10183         1969-1999 if PDS_PRE_2000 is used.
10184
10185 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10186
10187         Sync from coreutils.
10188         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10189         (Time of day items): Mention the possibility of leap seconds.
10190         Problem reported by Dr. David Alan Gilbert.
10191
10192 2006-01-09  Jim Meyering  <jim@meyering.net>
10193
10194         Sync from coreutils.
10195
10196         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10197
10198         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10199
10200         * lib/modechange.c (mode_compile): Reject an invalid mode string
10201         that starts with an octal digit.  From Andreas Gruenbacher.
10202
10203         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10204         and dup to open_safer and dup_safer, respectively.
10205         (openat_permissive): Fix typo in comment.
10206
10207         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10208         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10209         (_): Remove; no longer needed.
10210         (openat): Renamed from rpl_openat; no need for rpl_openat
10211         since openat.h renames openat for us.
10212         Replace most of the body with a call to openat_permissive,
10213         to avoid duplicate code.
10214         Port to (probably hypothetical) environments were mode_t is
10215         wider than int.
10216         (openat_permissive): Require mode arg, so that we can check
10217         types better.  Put it just after flags.  Change cwd failure
10218         indicator from pointer-to-bool to pointer-to-errno-value.
10219         All callers changed.
10220         Invoke openat_save_fail and/or openat_restore_fail if
10221         cwd_errno is null, so that openat can call us.
10222         (openat_permissive, fdopendir, fstatat, unlinkat):
10223         Simplify errno handling to avoid some duplicate code,
10224         as it's OK to set errno on success.
10225         * lib/openat.h: Revamp code so that function macros depend on
10226         __OPENAT_PREFIX only, not also on AT_FDCWD.
10227         (openat_ro): Remove.  Caller changed to use openat_permissive.
10228         (openat_permissive): Now a macro, if not a function.
10229         (openat_restore_fail, openat_save_fail): Now always functions,
10230         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10231
10232         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10233         and openat.c.
10234         * lib/mkdirat.c: Include openat-priv.h.
10235         Remove definitions of macros defined therein.
10236         * lib/openat.c: Likewise.
10237
10238         * lib/mkdirat.c (mkdirat): New file and function.
10239         * lib/openat.h (mkdirat): Declare.
10240
10241         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10242
10243         * lib/openat.h (openat_permissive): Declare.
10244         (openat_ro): Define.
10245
10246         * lib/openat.c (EXPECTED_ERRNO): New macro.
10247         (openat_permissive): New function -- used in remove.c rewrite.
10248         (all functions): Set errno just before returning, only if there
10249         was an actual failure.
10250         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10251
10252         Emulate openat-family functions using Linux's procfs, if possible.
10253         Idea and some code based on Ulrich Drepper's glibc changes.
10254
10255         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10256         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10257         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10258         before falling back on save_cwd and restore_cwd.
10259         (fdopendir, fstatat, unlinkat): Likewise.
10260
10261         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10262         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10263
10264         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10265         as second argument to va_arg.  Otherwise, some versions of gcc
10266         warn that `if this code is reached, the program will abort'.
10267
10268 2006-01-09  Jim Meyering  <jim@meyering.net>
10269
10270         Sync from coreutils.
10271         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10272         Require openat-priv.h.
10273
10274 2006-01-09  Bruno Haible  <bruno@clisp.org>
10275
10276         * modules/strnlen (Include): Use strnlen.h.
10277
10278 2006-01-09  Bruno Haible  <bruno@clisp.org>
10279
10280         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10281
10282 2006-01-09  Bruno Haible  <bruno@clisp.org>
10283
10284         * lib/sysexit_.h (EX_OK): New macro.
10285         Suggested by Martin Lambers <marlam@marlam.de>.
10286
10287 2006-01-09  Bruno Haible  <bruno@clisp.org>
10288
10289         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10290         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10291
10292 2006-01-09  Bruno Haible  <bruno@clisp.org>
10293
10294         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10295         numbers.
10296
10297 2006-01-09  Bruno Haible  <bruno@clisp.org>
10298
10299         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10300         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10301         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10302         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10303
10304 2006-01-09  Bruno Haible  <bruno@clisp.org>
10305
10306         * build-aux/javacomp.sh.in: New file, moved from lib/.
10307         * modules/javacomp-script (Files): Update.
10308         (configure.ac): Add AC_CONFIG_FILES invocation.
10309         (EXTRA_DIST): Remove variable.
10310
10311         * build-aux/javaexec.sh.in: New file, moved from lib/.
10312         * modules/javaexec (Files): Update.
10313         (configure.ac): Add AC_CONFIG_FILES invocation.
10314         (EXTRA_DIST): Remove javaexec.sh.in.
10315
10316         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10317         * modules/csharpcomp-script (Files): Update.
10318         (configure.ac): Add AC_CONFIG_FILES invocation.
10319         (EXTRA_DIST): Remove variable.
10320
10321         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10322         * modules/csharpexec (Files): Update.
10323         (configure.ac): Add AC_CONFIG_FILES invocation.
10324         (EXTRA_DIST): Remove csharpexec.sh.in.
10325
10326 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10327
10328         Sync from coreutils.
10329
10330         Add POSIX ACL support
10331         * lib/acl.h (copy_acl, set_acl): Add declarations.
10332         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10333         systems other than Linux.
10334         (chmod_or_fchmod): New function: use fchmod when possible,
10335         and chmod otherwise.
10336         (file_has_acl): Add a POSIX ACL implementation, with a
10337         Linux-specific subcase.
10338         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10339         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10340         acls are unsupported.
10341         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10342         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10343         are unsupported.
10344
10345 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10346
10347         Sync from coreutils.
10348         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10349
10350 2006-01-07  Bruno Haible  <bruno@clisp.org>
10351
10352         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10353         gl_EARLY.
10354
10355 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10356
10357         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10358         Problem reported for Mingw by Mark Junker.
10359
10360 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10361
10362         * README: Gnulib normally doesn't generate a tarball.
10363
10364 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10365
10366         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10367         long int, not int, for nanosecond counts, so that people who are
10368         used to POSIX struct timespec won't be surprised.  Reported by Jim
10369         Meyering.
10370
10371 2005-12-28  Bruno Haible  <bruno@clisp.org>
10372
10373         * build-aux/config.rpath: Update from GNU gettext.
10374
10375 2005-12-16  Jim Meyering  <jim@meyering.net>
10376
10377         * modules/fprintftime: New module.
10378         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10379
10380 2005-12-16  Jim Meyering  <jim@meyering.net>
10381
10382         * m4/fprintftime.m4: New file.
10383
10384 2005-12-16  Jim Meyering  <jim@meyering.net>
10385
10386         * lib/fprintftime.c, lib/fprintftime.h: New files.
10387
10388 2005-12-15  Simon Josefsson  <jas@extundo.com>
10389
10390         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10391         new m4/socklen.m4.
10392
10393 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10394
10395         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10396         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10397
10398 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10399
10400         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10401         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10402         struct uparams is valid. Fall back to the default values if it is
10403         not.
10404
10405 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10406
10407         * modules/argp (Files): Add argp-pin.c
10408         (Depends-on): dirname
10409         (lib_SOURCES): Add argp-pin.c
10410
10411 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10412
10413         * m4/argp.m4:  Check if program_invocation_name and
10414         program_invocation_short_name are declared and define appropriate
10415         macros if they are not.
10416
10417 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10418
10419         * lib/argp-help.c (__argp_base_name): New function
10420         (__argp_short_program_name): Rewrite using __argp_base_name
10421         * lib/argp-namefrob.h: Define program_invocation_name and
10422         program_invocation_short_name if requested
10423         (__argp_base_name): Add prototype
10424         * lib/argp-parse.c (argp_def): Use gettext wrappers
10425         (argp_default_parser): Use __argp_base_name
10426         * lib/argp-pin.c: New file. Defines program_invocation_name and
10427         program_invocation_short_name on systems that lack them.
10428
10429 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10430
10431         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10432         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10433         porting problem reported by Georg Schwarz in
10434         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10435
10436 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10437
10438         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10439         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10440         porting problem reported by Georg Schwarz in
10441         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10442
10443 2005-12-05  Bruno Haible  <bruno@clisp.org>
10444
10445         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10446         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10447         Reported by Mark Junker <mjscod@gmx.de>.
10448
10449 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10450
10451         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10452         Use implementation from Albert Chin, with some
10453         comments/corrections by Stepan Kasal and myself.
10454
10455 2005-12-02  Bruno Haible  <bruno@clisp.org>
10456
10457         * gnulib-tool (func_import): Accept GPLed build tool modules when
10458         --lgpl is given.
10459         * modules/csharpcomp-script: New file.
10460         * modules/csharpcomp: Depend on it.
10461         * modules/javacomp-script: New file.
10462         * modules/javacomp: Depend on it.
10463         Suggested by Simon Josefsson.
10464
10465 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10466
10467         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10468         statement, to work around an HP-UX 10.20 compiler bug reported by
10469         Peter O'Gorman.
10470
10471 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10472
10473         * modules/savedir (Depends-on): Add openat.
10474
10475 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10476
10477         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10478         (uintmax_t) [defined uintmax_t]: Do not declare.
10479         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10480         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10481         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10482         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10483         sake of portability to weird hosts that C allows (though we don't
10484         know of any practical examples).
10485
10486         * lib/savedir.h (fdsavedir): New decl.
10487         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10488         contains most of the former guts of savedir.
10489         (savedir): Use savedirstream.
10490         Include "openat.h".
10491
10492 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10493
10494         * modules/obstack (Files): Add m4/ulonglong.m4.
10495         Problem reported by Davide Angelocola.
10496
10497 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10498
10499         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10500         coreutils no longer futzes with rounding modes.
10501
10502 2005-11-14  Jim Meyering  <jim@meyering.net>
10503
10504         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10505         replacement of mkstemp.
10506
10507 2005-11-10  Simon Josefsson  <jas@extundo.com>
10508
10509         * lib/readline.c: Remove EOL.
10510
10511 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10512
10513         * modules/gethrxtime (Depends-on): Add gettime.
10514
10515 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10516
10517         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10518         or gettimeofday; no longer needed.
10519
10520 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10521
10522         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10523         time business.
10524         (gethrxtime) [! (HAVE_NANOUPTIME
10525         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10526         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10527         our own approximation.
10528
10529 2005-11-08  Eric Blake  <ebb9@byu.net>
10530
10531         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10532
10533 2005-11-08  Eric Blake  <ebb9@byu.net>
10534
10535         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10536
10537 2005-11-04  Bruno Haible  <bruno@clisp.org>
10538
10539         * gnulib-tool: Implement --update mode.
10540
10541 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10542
10543         Fix porting problem reported by Theodoros V. Kalamatianos.
10544         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10545         Don't assume that futimes failing means we must fail.
10546
10547 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10548
10549         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10550         variables to suggest the intended function of the PATH_MAX check.
10551
10552 2005-10-30  Kean Johnston  <jkj@sco.com>
10553
10554         Trivial changes to support SCO systems.
10555         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10556         as PATH_MAX.
10557         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10558         where __ptr is null when no I/O is pending.
10559
10560 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10561
10562         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10563         leave errno alone.  Problem reported by Dmitry V. Levin.
10564
10565 2005-10-28  Simon Josefsson  <jas@extundo.com>
10566
10567         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10568         Test more.
10569
10570         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10571
10572         * modules/md2, modules/md2-tests: New files.
10573
10574 2005-10-28  Simon Josefsson  <jas@extundo.com>
10575
10576         * m4/inet_ntop.m4: More tests.
10577
10578         * m4/gc-md2.m4, md2.m4: New file.
10579
10580 2005-10-28  Simon Josefsson  <jas@extundo.com>
10581
10582         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10583         "restrict" keywords, as per POSIX.  Protect the function
10584         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10585         Don't use K&R prototypes.  Check the sprintf return values.
10586         Re-define EAFNOSUPPORT if not present.  Indent.
10587
10588         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10589         suggested by Bruno Haible <bruno@clisp.org>.
10590
10591         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10592
10593         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10594
10595         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10596         libgcrypt).
10597
10598         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10599
10600         * lib/md2.h, lib/md2.c: New files.
10601
10602 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10603
10604         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10605         errno alone.  Problem reported by Frederic Jolliton.
10606
10607 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10608
10609         * modules/verify (License): Change from GPL to LGPL.  This is a
10610         tiny module and there are apparently near-equivalents that are
10611         under the BSD license.
10612
10613 2005-10-24  Simon Josefsson  <jas@extundo.com>
10614
10615         * modules/sha1: Relicense to LGPL.
10616
10617 2005-10-24  Simon Josefsson  <jas@extundo.com>
10618
10619         * lib/md4.h: Shrink buffer size, now that we changed the type.
10620
10621 2005-10-23  Simon Josefsson  <jas@extundo.com>
10622
10623         * gnulib-tool (func_import): Fix --tests-base.
10624
10625 2005-10-22  Simon Josefsson  <jas@extundo.com>
10626
10627         * modules/arcfour (Depends-on): Need stdint.
10628
10629 2005-10-22  Simon Josefsson  <jas@extundo.com>
10630
10631         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10632         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10633
10634 2005-10-22  Simon Josefsson  <jas@extundo.com>
10635
10636         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10637         suggested by Bruno Haible <bruno@clisp.org>.
10638
10639 2005-10-22  Simon Josefsson  <jas@extundo.com>
10640
10641         * lib/crc.h: Include stddef.h, for size_t.
10642
10643 2005-10-22  Simon Josefsson  <jas@extundo.com>
10644
10645         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10646         arcfour_context struct (simplify test vector testing in GNU
10647         Shishi).
10648
10649 2005-10-21  Simon Josefsson  <jas@extundo.com>
10650
10651         * modules/des, modules/des-tests: New files.
10652
10653         * modules/gc-des, modules/gc-des-tests: New files.
10654
10655         * tests/test-des.c, tests/test-gc-des.c: New file.
10656
10657 2005-10-21  Simon Josefsson  <jas@extundo.com>
10658
10659         * modules/arctwo, modules/arctwo-tests: New files.
10660
10661         * tests/test-arctwo.c: New file.
10662
10663         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10664
10665         * tests/test-gc-arctwo.c: New file.
10666
10667 2005-10-21  Simon Josefsson  <jas@extundo.com>
10668
10669         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10670         Bruno Haible <bruno@clisp.org>.
10671
10672         * m4/gc-des.m4: New file.
10673
10674 2005-10-21  Simon Josefsson  <jas@extundo.com>
10675
10676         * m4/arctwo.m4: New file.
10677
10678         * m4/gc-arctwo.m4: New file.
10679
10680 2005-10-21  Simon Josefsson  <jas@extundo.com>
10681
10682         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10683         block.
10684
10685 2005-10-21  Simon Josefsson  <jas@extundo.com>
10686
10687         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10688         <bruno@clisp.org>.
10689
10690         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10691
10692         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10693         Bruno Haible <bruno@clisp.org>.
10694
10695         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10696         <bruno@clisp.org>.
10697
10698 2005-10-21  Simon Josefsson  <jas@extundo.com>
10699
10700         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10701
10702 2005-10-21  Simon Josefsson  <jas@extundo.com>
10703
10704         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10705
10706 2005-10-21  Simon Josefsson  <jas@extundo.com>
10707
10708         * lib/des.h, lib/des.c: New files.
10709
10710         * lib/gc-gnulib.c: Support DES.c
10711
10712 2005-10-21  Simon Josefsson  <jas@extundo.com>
10713
10714         * lib/arctwo.h, lib/arctwo.c: New files.
10715
10716         * lib/gc-gnulib.c: Support ARCTWO.
10717
10718 2005-10-21  Simon Josefsson  <jas@extundo.com>
10719
10720         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10721         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10722
10723 2005-10-21  Simon Josefsson  <jas@extundo.com>
10724
10725         * gnulib-tool (func_import, func_create_testdir): Define automake
10726         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10727         Makefile.am snippet),
10728         suggested by Bruno Haible <bruno@clisp.org>.
10729
10730         * modules/gc (Makefile.am): Use it.
10731
10732 2005-10-21  Bruno Haible  <bruno@clisp.org>
10733
10734         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10735         patch.
10736
10737 2005-10-19  Simon Josefsson  <jas@extundo.com>
10738
10739         * tests/test-gc-rijndael.c: New file.
10740
10741         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10742
10743 2005-10-19  Simon Josefsson  <jas@extundo.com>
10744
10745         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10746         interface too.
10747
10748 2005-10-19  Simon Josefsson  <jas@extundo.com>
10749
10750         * tests/test-gc-arcfour.c: New file.
10751
10752         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10753
10754 2005-10-19  Simon Josefsson  <jas@extundo.com>
10755
10756         * modules/gc-md4, modules/gc-md4-tests: New file.
10757
10758         * tests/test-gc-md4.c: New file.
10759
10760 2005-10-19  Simon Josefsson  <jas@extundo.com>
10761
10762         * m4/gc-md4.m4: New file.
10763
10764 2005-10-19  Simon Josefsson  <jas@extundo.com>
10765
10766         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10767         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10768         <kasal@ucw.cz>.
10769
10770 2005-10-19  Simon Josefsson  <jas@extundo.com>
10771
10772         * m4/gc-arcfour.m4: New file.
10773
10774         * m4/gc-rijndael.m4: New file.
10775
10776 2005-10-19  Simon Josefsson  <jas@extundo.com>
10777
10778         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10779
10780 2005-10-19  Simon Josefsson  <jas@extundo.com>
10781
10782         * lib/gc-gnulib.c: Support ARCFOUR.
10783
10784 2005-10-19  Simon Josefsson  <jas@extundo.com>
10785
10786         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10787         support.
10788
10789         * lib/gc.h: Add ECB enum type.
10790
10791         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10792
10793 2005-10-18  Simon Josefsson  <jas@extundo.com>
10794
10795         * tests/test-md5.c: New file.
10796
10797         * modules/md5-tests: New file.
10798
10799 2005-10-18  Simon Josefsson  <jas@extundo.com>
10800
10801         * tests/test-md4.c: New file.
10802
10803         * modules/md4, modules/md4-tests: New files.
10804
10805 2005-10-18  Simon Josefsson  <jas@extundo.com>
10806
10807         * m4/md4.m4: New file.
10808
10809 2005-10-18  Simon Josefsson  <jas@extundo.com>
10810
10811         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10812
10813 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10814
10815         * gnulib-tool (func_create_testdir): Omit the second check whether
10816         BUILT_SOURCES in nonempty.
10817
10818 2005-10-17  Simon Josefsson  <jas@extundo.com>
10819
10820         * tests/test-rijndael.c: New file.
10821
10822 2005-10-17  Simon Josefsson  <jas@extundo.com>
10823
10824         * modules/sha1: Depend on stdint instead of md5.
10825
10826         * modules/md5: Depend on stdint, remove uint32_t.
10827
10828 2005-10-17  Simon Josefsson  <jas@extundo.com>
10829
10830         * modules/gc-sha1-tests: New file.
10831
10832         * tests/test-gc-sha1.c: New file.
10833
10834 2005-10-17  Simon Josefsson  <jas@extundo.com>
10835
10836         * m4/md5.m4: Remove call to uint32_t.m4.
10837
10838 2005-10-17  Simon Josefsson  <jas@extundo.com>
10839
10840         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10841
10842         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10843         md5.h.
10844
10845         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10846
10847         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10848
10849 2005-10-17  Simon Josefsson  <jas@extundo.com>
10850
10851         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10852
10853 2005-10-17  Simon Josefsson  <jas@extundo.com>
10854
10855         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10856
10857 2005-10-17  Simon Josefsson  <jas@extundo.com>
10858
10859         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10860
10861         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10862
10863 2005-10-17  Bruno Haible  <bruno@clisp.org>
10864
10865         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10866         that it can also be used in a test.
10867
10868 2005-10-16  Bruno Haible  <bruno@clisp.org>
10869
10870         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10871         TESTS_ENVIRONMENT, so that individual tests can augment it.
10872
10873         * gnulib-tool (func_create_testdir): Use an intermediate target for
10874         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10875         macros, like $(ALLOCA_H), which cannot be passed through the command
10876         line.
10877
10878 2005-10-15  Simon Josefsson  <jas@extundo.com>
10879
10880         * modules/rijndael-tests: New file.
10881
10882         * modules/rijndael: New file.
10883
10884 2005-10-15  Simon Josefsson  <jas@extundo.com>
10885
10886         * m4/rijndael.m4: New file.
10887
10888 2005-10-15  Simon Josefsson  <jas@extundo.com>
10889
10890         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10891
10892         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10893
10894 2005-10-14  Simon Josefsson  <jas@extundo.com>
10895
10896         * tests/test-arcfour.c: New file.
10897
10898         * modules/arcfour, modules/arcfour-tests: New files.
10899
10900 2005-10-14  Simon Josefsson  <jas@extundo.com>
10901
10902         * m4/arcfour.m4: New file.
10903
10904 2005-10-14  Simon Josefsson  <jas@extundo.com>
10905
10906         * lib/arcfour.h, lib/arcfour.c: New files.
10907
10908 2005-10-14  Roland McGrath  <roland@redhat.com>
10909
10910         Import from libc.  [BZ #1331]
10911         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10912         macro argument.
10913         Reported by Matej Vela <vela@debian.org>.
10914
10915 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10916
10917         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10918         include <wchar.h>; no longer needed.
10919
10920 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10921
10922         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10923
10924 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10925         and  Ulrich Drepper  <drepper@redhat.com>
10926
10927         Import from libc.
10928         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10929         instead of inline stream orientation test and two separate
10930         function calls.  Pay no attention to USE_IN_LIBIO.
10931
10932 2005-10-13  Simon Josefsson  <jas@extundo.com>
10933
10934         * modules/gc-hmac-md5-tests: New file.
10935
10936         * tests/test-gc-hmac-sha1.c: New file.
10937
10938         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10939
10940         * modules/gc-hmac-md5-tests: New file.
10941
10942         * tests/test-gc-md5.c: New file.
10943
10944         * modules/gc-md5-tests: New file.
10945
10946 2005-10-13  Simon Josefsson  <jas@extundo.com>
10947
10948         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10949         Move memory allocation outside of loop.
10950
10951 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10952
10953         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10954         intermediate directory is in a read-only file system.  Problem
10955         reported by Eric Blake.
10956
10957 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10958
10959         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10960
10961 2005-10-12  Simon Josefsson  <jas@extundo.com>
10962
10963         * tests/test-hmac-sha1.c: New file.
10964
10965         * modules/hmac-sha1-tests: New file.
10966
10967         * modules/hmac-sha1: New file.
10968
10969 2005-10-12  Simon Josefsson  <jas@extundo.com>
10970
10971         * modules/gc-sha1: New file.
10972
10973 2005-10-12  Simon Josefsson  <jas@extundo.com>
10974
10975         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10976
10977         * tests/test-gc-pbkdf2-sha1.c: New file.
10978
10979 2005-10-12  Simon Josefsson  <jas@extundo.com>
10980
10981         * modules/gc-md5, modules/gc-hmac-md5: New files.
10982
10983         * modules/gc (Files): Remove md5, memxor and hmac files.
10984
10985 2005-10-12  Simon Josefsson  <jas@extundo.com>
10986
10987         * m4/gc-pbkdf2-sha1.m4: New file.
10988
10989         * m4/gc-hmac-sha1.m4: New file.
10990
10991         * m4/gc-sha1: New file.
10992
10993         * m4/hmac-sha1.m4: New file.
10994
10995 2005-10-12  Simon Josefsson  <jas@extundo.com>
10996
10997         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10998
10999         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11000
11001 2005-10-12  Simon Josefsson  <jas@extundo.com>
11002
11003         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11004         suggested by Bruno Haible <bruno@clisp.org>.
11005
11006 2005-10-12  Simon Josefsson  <jas@extundo.com>
11007
11008         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11009
11010 2005-10-12  Simon Josefsson  <jas@extundo.com>
11011
11012         * lib/gc-pbkdf2-sha1.c: New file.
11013
11014         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11015
11016 2005-10-12  Simon Josefsson  <jas@extundo.com>
11017
11018         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11019
11020         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11021
11022 2005-10-12  Simon Josefsson  <jas@extundo.com>
11023
11024         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11025         GC_USE_HMAC_MD5, respectively.
11026
11027         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11028         (gc_md5): Fix typo.
11029
11030         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11031
11032         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11033
11034         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11035
11036 2005-10-12  Bruno Haible  <bruno@clisp.org>
11037
11038         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11039         Reported by Stepan Kasal <kasal@ucw.cz>.
11040
11041 2005-10-11  Simon Josefsson  <jas@extundo.com>
11042
11043         * tests/test-crc.c: New file.
11044
11045         * modules/crc, modules/crc-tests: New files.
11046
11047 2005-10-11  Simon Josefsson  <jas@extundo.com>
11048
11049         * m4/crc.m4: New file.
11050
11051 2005-10-11  Simon Josefsson  <jas@extundo.com>
11052
11053         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11054
11055         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11056
11057         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11058
11059 2005-10-11  Simon Josefsson  <jas@extundo.com>
11060
11061         * lib/crc.h, lib/crc.c: New files.
11062
11063         * lib/gc.h (gc_hash_buffer): Add doc.
11064
11065 2005-10-11  Bruno Haible  <bruno@clisp.org>
11066
11067         * modules/c-strcasestr: New file.
11068         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11069
11070 2005-10-11  Bruno Haible  <bruno@clisp.org>
11071
11072         * modules/c-strcase: New file.
11073         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11074
11075 2005-10-11  Bruno Haible  <bruno@clisp.org>
11076
11077         * lib/strcasecmp.c: Include limits.h.
11078         (strcasecmp): Avoid integer overflow on exotic platforms.
11079         * lib/strncasecmp.c: Include limits.h.
11080         (strncasecmp): Avoid integer overflow on exotic platforms.
11081         Reported by Paul Eggert.
11082
11083 2005-10-11  Bruno Haible  <bruno@clisp.org>
11084
11085         * lib/c-strcasestr.h: New file, from GNU gettext.
11086         * lib/c-strcasestr.c: New file, from GNU gettext.
11087
11088 2005-10-11  Bruno Haible  <bruno@clisp.org>
11089
11090         * lib/c-strcase.h: New file, from GNU gettext.
11091         * lib/c-strcasecmp.c: New file, from GNU gettext.
11092         * lib/c-strncasecmp.c: New file, from GNU gettext.
11093
11094 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11095
11096         * modules/mempcpy (License): GPL -> LGPL.
11097         * modules/strchrnul (License): Likewise.
11098         * modules/sysexits (License): Likewise.
11099
11100 2005-10-08  Simon Josefsson  <jas@extundo.com>
11101
11102         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11103
11104 2005-10-07  Simon Josefsson  <jas@extundo.com>
11105
11106         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11107
11108 2005-10-06  Simon Josefsson  <jas@extundo.com>
11109
11110         * tests/test-hmac-md5.c: New file.
11111
11112         * modules/hmac-md5-tests: New file.
11113
11114         * modules/hmac-md5: New file.
11115
11116 2005-10-06  Simon Josefsson  <jas@extundo.com>
11117
11118         * m4/hmac-md5.m4: New file.
11119
11120         * m4/memxor.m4: Require gl_C_RESTRICT.
11121
11122 2005-10-06  Simon Josefsson  <jas@extundo.com>
11123
11124         * lib/memxor.c (memxor): Avoid casts and warnings.
11125
11126 2005-10-06  Simon Josefsson  <jas@extundo.com>
11127
11128         * lib/hmac-md5.c: New file.
11129
11130         * lib/hmac.h: New file.
11131
11132 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11133
11134         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11135         promotes to int, not unsigned int, to catch the AIX 5.3
11136         compiler bug.
11137
11138 2005-10-05  Simon Josefsson  <jas@extundo.com>
11139
11140         * modules/memxor: New file.
11141
11142         * modules/iconv (Files): Move config.rpath to havelib, it is used
11143         there.
11144
11145         * modules/havelib (Files): Add config.rpath.
11146
11147 2005-10-05  Simon Josefsson  <jas@extundo.com>
11148
11149         * m4/memxor.m4: New file.
11150
11151 2005-10-05  Simon Josefsson  <jas@extundo.com>
11152
11153         * lib/memxor.c (memxor): Fix compiler error.
11154
11155         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11156         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11157
11158         * lib/memxor.h, lib/memxor.c: New files.
11159
11160         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11161         we assume all systems have it, suggested by Jim Meyering
11162         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11163         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11164         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11165         same reasons.
11166
11167 2005-10-05  Simon Josefsson  <jas@extundo.com>
11168
11169         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11170
11171 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11172
11173         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11174         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11175         needed, since the source code now assumes these .h files.
11176
11177 2005-10-05  Derek Price  <derek@ximbiot.com>
11178
11179         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11180
11181 2005-10-05  Bruno Haible  <bruno@clisp.org>
11182
11183         * modules/stdint (License): Change to LGPL.
11184
11185 2005-10-04  Simon Josefsson  <jas@extundo.com>
11186
11187         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11188         D. Baushke" <mdb@gnu.org>.
11189
11190 2005-10-04  Bruno Haible  <bruno@clisp.org>
11191
11192         * lib/verify.h (verify_true): Provide alternative definition for C++.
11193
11194 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11195
11196         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11197         (SSIZE_MAX): New macro, if not already defined.
11198         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11199         than 2 GiB.
11200
11201 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11202
11203         Sync from coreutils.
11204         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11205         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11206         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11207         ULLONG_MAX doesn't work with 2.7.2.1.
11208
11209 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11210
11211         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11212         From Ben Pfaff.
11213
11214         * modules/exclude (Depends-on): Depend on verify.
11215         * modules/strtoimax (Depends-on): Likewise.
11216         * modules/utimecmp (Depends-on): Likewise.
11217
11218 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11219
11220         * lib/exclude.c: Include verify.h.
11221         (verify): Remove.  All callers changed to use verify.h's version.
11222         * lib/strtoimax.c: Likewise.
11223         * lib/utimecmp.c: Likewis.e
11224
11225         Sync from coreutils.
11226         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11227         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11228         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11229         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11230         bother returning ENOSYS if settimeofday or stime fails; just let
11231         them return whatever errno they want to return.
11232         * lib/utimens.c: Include unistd.h, for dup2.
11233         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11234         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11235
11236 2005-10-02  Jim Meyering  <jim@meyering.net>
11237
11238         Sync from coreutils.
11239         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11240         from glibc-2.2.5 that fails for read-only files.
11241
11242 2005-10-02  Jim Meyering  <jim@meyering.net>
11243
11244         Sync from coreutils.
11245         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11246         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11247         `#if HAVE_CONFIG_H'.
11248         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11249         Remove AT_FDCWD test.
11250         Do not consume the fd unless successful.
11251         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11252         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11253         block, so that we don't even try to compile it if settimeofday is
11254         available.  This works around a compilation failure on OSF1 V5.1,
11255         due to stime requiring a `long int*' while tv_sec is `int'.
11256
11257 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11258
11259         Sync from coreutils.
11260         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11261         against `yes', rather than just testing for nonempty.
11262
11263 2005-10-01  Simon Josefsson  <jas@extundo.com>
11264
11265         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11266         and Darwin.
11267
11268         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11269         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11270         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11271         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11272         Check if struct addrinfo is declared.
11273
11274 2005-10-01  Simon Josefsson  <jas@extundo.com>
11275
11276         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11277         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11278         AI_* and EAI_* definitions.  Protect function declarations.
11279
11280 2005-10-01  Jim Meyering  <jim@meyering.net>
11281
11282         Sync from coreutils.
11283
11284         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11285         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11286         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11287         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11288         in the inet and nsl libraries.  Required on Solaris 5.7.
11289
11290 2005-10-01  Jim Meyering  <jim@meyering.net>
11291
11292         Sync from coreutils.
11293         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11294         in the inet and nsl libraries.  Required on Solaris 5.7.
11295
11296 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11297
11298         * lib/getdelim.c (getdelim): Remove unused variables.
11299
11300 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11301
11302         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11303         so that the code works even with ancient cpp.  Portability problem
11304         with GCC 2.7.2.1 reported by Thomas M.Ott.
11305
11306 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11307
11308         * modules/regex (Depends-on): Add strcase.
11309
11310         * modules/gethostname (Licence): Change from GPL to LGPL, since
11311         gethostname.c is a trivial implementation of a standard library
11312         function.
11313         * modules/poll (License): Change from GPL to LGPL, since it's
11314         derived from LGPL code.
11315
11316 2005-09-27  Jim Meyering  <jim@meyering.net>
11317
11318         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11319         HAVE_CONFIG_H.
11320
11321         * lib/intprops.h (signed_type_or_expr__): Define.
11322         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11323         for unsigned types.
11324
11325 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11326
11327         * lib/verify.h (verify_expr): Remove, replacing with:
11328         (verify_true): New macro that returns true instead of void.
11329         (verify_type__): Remove.
11330         (verify): Use verify_true rather than verify_type__.
11331
11332 2005-09-26  Bruno Haible  <bruno@clisp.org>
11333
11334         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11335         is necessary.
11336         (lib_SOURCES): Remove mbchar.c.
11337         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11338         (Files): Add m4/mbrtowc.m4.
11339         * modules/mbiter: Likewise.
11340         * modules/mbuiter: Likewise.
11341
11342 2005-09-26  Bruno Haible  <bruno@clisp.org>
11343
11344         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11345         compile mbchar.c if they are not both present.
11346         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11347         * m4/mbiter.m4 (gl_MBITER): Likewise.
11348         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11349         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11350         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11351
11352 2005-09-25  Jim Meyering  <jim@meyering.net>
11353
11354         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11355         also uses socklen_t.
11356
11357 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11358
11359         * lib/utimens.c (ENOSYS): Define if not already defined.
11360         (futimens): Support having a null PATH if the file descriptor
11361         is nonnegative.
11362
11363         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11364         Remove.
11365         (__attribute): Define to empty unless GCC 3.1 or later.
11366         This works around a core dump on OpenBSD 3.4, which has GCC
11367         2.95.3, which dumps core when given __attribute__(()).  It also
11368         simplifies other tests, since we really don't want to bother with
11369         worrying about which ancient version of GCC supported what.
11370         Original problem reported by Yoann Vandoorselaere, with part of
11371         the fix suggested by Derek Price.
11372
11373 2005-09-24  Jim Meyering  <jim@meyering.net>
11374
11375         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11376         so we can once again use a positive bitfield width of 1 -- now we
11377         don't have to explain why we were using a bitfield width of 2.
11378
11379 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11380
11381         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11382         and similarly for the other external symbols.  Problem reported
11383         by James Gallager.
11384
11385         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11386         bug reported by Jim Meyering.
11387
11388         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11389         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11390         not needed, since socklen is a prerequisite module.
11391
11392 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11393
11394         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11395         Problem reported by Eric Blake.
11396         (getaddrinfo): Initialize se so that it's not garbage.
11397         Redo internal storage allocation so that it doesn't make unportable
11398         assumptions about alignment.
11399         Fix a memory leak.
11400
11401         * lib/utimens.c (futimens): Use futimesat if available.
11402         Prefer it to futimes since it doesn't have the futimes bug.
11403
11404         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11405         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11406         Instead, declare a function that returns a pointer to an array,
11407         and use verify_type__ to declare the size of the array.
11408         Problem and germ of a solution reported by Bruno Haible.
11409         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11410         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11411
11412 2005-09-23  Jim Meyering  <jim@meyering.net>
11413
11414         Sync from coreutils.
11415         Correct build failure (socklen_t not defined) on at least
11416         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11417         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11418
11419 2005-09-23  Jim Meyering  <jim@meyering.net>
11420
11421         * modules/getaddrinfo (Depends-on): Add socklen.
11422
11423 2005-09-23  Bruno Haible  <bruno@clisp.org>
11424
11425         * tests/test-verify.c: New file.
11426
11427 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11428
11429         Sync from coreutils.
11430
11431         * modules/argmatch (Depends-on): Add verify.
11432         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11433         unistd-safer.
11434         * modules/save-cwd (Depends-on): Likewise.
11435
11436         * modules/openat (Files): Add lib/openat-die.c.
11437         (Depends-on): Remove error, exitfail.
11438         Add dirname.
11439
11440         * modules/verify: New file.
11441         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11442         with "verify" module.
11443
11444 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11445
11446         Sync from coreutils.
11447
11448         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11449         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11450         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11451         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11452         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11453         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11454         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11455         Don't bother checking for string.h, stdlib.h, unistd.h.
11456         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11457         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11458         module's job.
11459         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11460         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11461
11462         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11463         (gl_GETDATE): Use it.
11464
11465         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11466
11467 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11468
11469         Sync from coreutils.
11470
11471         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11472         stat-time.h.
11473         * lib/argmatch.h: Include verify.h
11474         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11475         (ARGMATCH_ASSERT): Remove; unused.
11476         * lib/canonicalize.c: Assume STDC_HEADERS.
11477         * lib/exclude.c: Include "strcase.h".
11478         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11479         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11480         and stdio-safer.h.
11481         (getusershell): Call fopen, not fopen_safer.
11482         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11483         Do not include unistd-safer.h.
11484         (save_cwd): Don't call fd_safer; no longer needed
11485         now that we include fcntl--.h.
11486
11487         * lib/getdate.y (relative_time): New type.
11488         (RELATIVE_TIME_0): New constant.
11489         (parser_control): Use relative_time instead of doing it ourselves.
11490         (%union): Add new relative_time rel member.
11491         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11492         Now typeless.
11493         (relunit, relunit_snumber): Now of type rel.
11494         (zone, rel, relunit, get_date): Adjust to above changes.
11495
11496         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11497         Do not include unistd-safer.h.
11498         (getloadavg): Don't call fd_safer; no longer needed
11499         now that we include fcntl--.h.
11500
11501         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11502         (make_dir_parents): Treat ENOSYS like EEXIST.
11503
11504         Improve quality of diagnostics on restore_cwd failure.
11505         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11506         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11507         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11508         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11509         each time through the loop.  Do not diagnose restore_cwd failure;
11510         that is the caller's job (and perhaps the caller does not care).
11511
11512         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11513         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11514         If the file already exists but is not a directory, don't bother
11515         to try to make its parents.
11516         Close potential file descriptor leak if we can't chdir("/") (!).
11517         Don't always return true if chdir($PWD) fails; return true only
11518         if the requested action was done successfully (except for the
11519         chdir($PWD)).
11520         Don't log final directory unless we actually made it.
11521         Refactor to avoid duplicate code to fix up permissions.
11522         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11523
11524         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11525         to make it a bit faster and (I hope) clearer.
11526         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11527         Fix bug in formats like %2N.
11528
11529         * lib/verify.h: New file.
11530
11531 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11532
11533         Sync from coreutils.
11534         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11535
11536 2005-09-22  Jim Meyering  <jim@meyering.net>
11537
11538         Sync from coreutils.
11539
11540         * m4/lstat.m4 (gl_FUNC_LSTAT):
11541         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11542         Remove obsolete comment.
11543         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11544         * m4/xstrtod.m4: Likewise.
11545
11546         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11547
11548 2005-09-22  Jim Meyering  <jim@meyering.net>
11549
11550         Sync from coreutils.
11551
11552         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11553
11554         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11555         the .tm_year member, since otherwise gcc-4.0 would now warn about
11556         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11557
11558         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11559         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11560
11561         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11562         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11563         when run in a time zone for which daylight savings time is in effect
11564         for the starting date.
11565
11566         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11567         stop us from restricting permissions of just-created absolute-named
11568         directories.
11569         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11570         to restore initial working directory.
11571         * lib/mkdir-p.c (make_dir_parents): New parameter:
11572         different_working_dir, to tell caller if/when we change the working
11573         directory and are unable to return to the initial one.
11574         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11575         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11576         `return false'.  This fixes a bug introduced on 2004-07-30.
11577
11578         * lib/openat.c (fdopendir): Be sure to close the supplied
11579         file descriptor before returning.  This makes our replacement
11580         implementation a little closer to Solaris's, where fdopendir
11581         ties the file descriptor to the returned DIR* pointer.
11582         * lib/openat.c (unlinkat): New function.
11583         * lib/openat.h (unlinkat): Add prototype.
11584         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11585         (openat_restore_fail): Rename from openat_restore_die.
11586         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11587
11588         Provide an alternative to exiting immediately upon save_cwd or
11589         restore_cwd failure.  Now, an application can arrange e.g.,
11590         to perform a longjump in that case.
11591         * lib/openat.c: Include dirname.h.
11592         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11593         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11594         and openat_restore_die rather than calling error directly.
11595         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11596
11597         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11598         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11599         define.
11600
11601         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11602         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11603                             int utc, int nanoseconds);
11604         Background:
11605         date should not have to allocate a megabyte of virtual memory to
11606         handle a format argument like +%1048575T.  When implemented with
11607         strftime, it must allocate such a buffer, use strftime to fill it
11608         in, print it, then free it.
11609         With fprintftime, it simply prints everything and exits.
11610         With no need for memory allocation, that's one fewer way to fail.
11611         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11612         optional field width, not before, so we accept %9:z, not %:9z.
11613         (my_strftime): Be sure to use L_('x') for literals.
11614
11615         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11616         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11617         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11618         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11619         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11620         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11621         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11622         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11623         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11624         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11625         * lib/xgethostname.c, lib/xreadlink.c:
11626         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11627
11628         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11629         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11630         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11631         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11632         and don't include <sys/file.h>).
11633
11634 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11635
11636         Sync from coreutils.
11637
11638         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11639         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11640         [!LDAV_DONE]: Avoid unused variable warning.
11641
11642 2005-09-21  Bruno Haible  <bruno@clisp.org>
11643
11644         * lib/unicodeio.h (unicode_to_mb): New declaration.
11645
11646 2005-09-20  Derek Price  <derek@ximbiot.com>
11647
11648         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11649         getaddrinfo.h.
11650
11651 2005-09-20  Bruno Haible  <bruno@clisp.org>
11652
11653         * gnulib-tool: Remove trailing slashes from the values specified for
11654         --source-base, --m4-base, --tests-base, --aux-dir.
11655         Suggested by Simon Josefsson <jas@extundo.com>.
11656
11657 2005-09-20  Bruno Haible  <bruno@clisp.org>
11658
11659         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11660         func_modules_to_filelist, func_import, func_create_testdir): Make all
11661         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11662         change when gnulib-tool is invoked in a different locale.
11663
11664 2005-09-19  Simon Josefsson  <jas@extundo.com>
11665
11666         * m4/socklen.m4: Fix typo.
11667
11668 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11669
11670         Use a consistent style for including <config.h>.
11671         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11672         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11673         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11674         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11675         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11676         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11677         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11678         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11679         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11680         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11681         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11682         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11683         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11684         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11685         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11686         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11687         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11688         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11689         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11690         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11691         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11692         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11693         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11694         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11695         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11696         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11697         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11698         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11699         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11700         lib/xstrtoumax.c, lib/yesno.c:
11701         Standardize inclusion of config.h.
11702         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11703         lib/inttostr.h:  Removed inclusion of config.h from header files.
11704         * lib/inttostr.c:  Adjusted in-tree users.
11705         * lib/timespec.h: Remove superfluous warning to include config.h.
11706         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11707         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11708         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11709         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11710         config.h with HAVE_CONFIG_H.
11711
11712 2005-09-19  Jim Meyering  <jim@meyering.net>
11713
11714         * modules/pathmax (License): Change to LGPL.
11715
11716 2005-09-19  Derek Price  <derek@ximbiot.com>
11717
11718         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11719
11720 2005-09-19  Bruno Haible  <bruno@clisp.org>
11721
11722         * gnulib-tool (import): Provide default for --tests-base.
11723
11724 2005-09-19  Bruno Haible  <bruno@clisp.org>
11725
11726         * doc/quote.texi: New file, extracted from gnulib.texi.
11727         * doc/ctime.texi: New file, extracted from gnulib.texi.
11728         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11729         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11730         * doc/gnulib.texi: Include them.
11731
11732 2005-09-18  Bruno Haible  <bruno@clisp.org>
11733
11734         Portability fix.
11735         * gnulib-tool (func_readlink): New function.
11736         (func_ln_if_changed): Use it.
11737
11738 2005-09-18  Bruno Haible  <bruno@clisp.org>
11739
11740         * gnulib-tool: Support --with-tests also with --import.
11741         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11742         (func_import): Use variables $testsbase and $inctests. Emit a
11743         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11744         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11745         SUBDIRS += $testsdir.
11746         (func_create_testdir): Update.
11747
11748 2005-09-18  Bruno Haible  <bruno@clisp.org>
11749
11750         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11751         instead of $dry_run.
11752         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11753         (func_ln_if_changed): Don't handle dry-run here.
11754         (func_import): In dry-run mode, detect more precisely which actions
11755         would be performed, and don't use "...ing" verbs.
11756
11757 2005-09-18  Bruno Haible  <bruno@clisp.org>
11758
11759         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11760         (func_import): Use join on two temporary files instead of three nested
11761         loops, in order to determine which files are new or old.
11762
11763 2005-09-18  Bruno Haible  <bruno@clisp.org>
11764
11765         * gnulib-tool (func_import): Comment out code that spits out the
11766         new files with --dry-run.
11767
11768 2005-09-18  Bruno Haible  <bruno@clisp.org>
11769
11770         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11771
11772 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11773
11774         * lib/stat-time.h: New file.
11775         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11776         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11777         in a different way.
11778         (timespec_cmp): New function.
11779         * lib/utimecmp.c: Include stat-time.h.
11780         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11781         members exist, not on the obsolescent ST_MTIM_NSEC.
11782         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11783
11784 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11785
11786         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11787
11788 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11789
11790         * MODULES.html.sh (File system functions): Add stat-time.
11791         * modules/stat-time: New file.
11792         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11793         is now done in a different way, by the stat-time module.
11794         * modules/utimecmp (Depends-on): Add stat-time.
11795
11796 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11797
11798         * m4/st_mtim.m4: Remove.  Superseded by...
11799         * m4/stat-time.m4: New file.
11800         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11801         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11802
11803 2005-09-15  Derek Price  <derek@ximbiot.com>
11804
11805         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11806
11807 2005-09-15  Derek Price  <derek@ximbiot.com>
11808
11809         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11810         * lib/regex_internal.c: Ditto, using this...
11811         (__GNUC_PREREQ): ...new macro.
11812         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11813         using...
11814         (__GNUC_PREREQ): ...this new macro.
11815
11816         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11817
11818 2005-09-15  Derek Price  <derek@ximbiot.com>
11819             Paul Eggert  <eggert@cs.ucla.edu>
11820
11821         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11822         changes, consolidating in...
11823         * lib/regex_internal.h: ...this file.
11824
11825 2005-09-13  Jim Meyering  <jim@meyering.net>
11826
11827         * lib/canon-host.c: Filter through gnu indent and reword comments
11828         slightly.
11829         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11830
11831 2005-09-13  Derek Price  <derek@ximbiot.com>
11832
11833         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11834         failure.
11835         Reported by Jim Meyering  <jim@meyering.net>.
11836
11837 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11838
11839         * lib/base64.c: Typo.
11840         (base64_encode): Put b64str in initialized data section.
11841
11842 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11843
11844         Merge glibc and coreutils changes into gnulib, plus a few
11845         extra fixes.
11846         * lib/md5.c: Use #error rather than a string.
11847         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11848         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11849         (__attribute__): Define to empty for non recent-GCC.
11850         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11851         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11852         Renamed from their non-__ counterparts, with new macros replacing
11853         them if not _LIBC.  Add __THROW attribute.
11854         (rol): Remove.
11855         (struct md5_ctx): Align buffer if using GCC.
11856         * lib/sha1.h (struct sha1_ctx): Likewise.
11857         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11858         The old name was backwards.
11859         (NOTSWAP): Remove; not used.
11860         (rol): New macro, moved here from md5.h.
11861         (sha1_process_block): Remove a FIXME that doesn't make sense.
11862
11863 2005-09-12  Derek Price  <derek@ximbiot.com>
11864
11865         Return usable errors from canon-host.
11866         * lib/canon-host.h: New file.
11867         * lib/canon-host.c (canon_host): Wrap...
11868         (canon_host_r): ...this new function, which now relies exclusively on
11869         getaddrinfo.
11870         (ch_strerror): New function.
11871         (last_cherror): New global.
11872         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11873         interface.
11874         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11875         void *.
11876         (freeaddrinfo): Free ai->ai_canonname when set.
11877
11878 2005-09-12  Derek Price  <derek@ximbiot.com>
11879
11880         Make canon-host require getaddrinfo.
11881         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11882         AC_LIBSOURCE canon-host.h.  Call...
11883         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11884         gl_GETADDRINFO.
11885         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11886
11887 2005-09-12  Derek Price  <derek@ximbiot.com>
11888
11889         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11890         LGPL.
11891         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11892
11893 2005-09-12  Derek Price  <derek@ximbiot.com>
11894
11895         * lib/gai_strerror.c: Include config.h when available.  Include
11896         getaddrinfo.h before other headers to test interface.
11897         Reported by Larry Jones <lawrence.jones@ugs.com>.
11898
11899 2005-09-12  Derek Price  <derek@ximbiot.com>
11900             Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         * modules/glob (Files): Add glob-libc.h.
11903
11904 2005-09-12  Derek Price  <derek@ximbiot.com>
11905             Paul Eggert  <eggert@cs.ucla.edu>
11906
11907         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11908         glob_.h, glob-libc.h.
11909         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11910
11911 2005-09-12  Derek Price  <derek@ximbiot.com>
11912             Paul Eggert  <eggert@cs.ucla.edu>
11913
11914         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11915         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11916         protecting things that should be done only in gnulib contexts.
11917         * lib/glob_.h: New file, containing only the glob things needed for
11918         gnulib.
11919         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11920         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11921         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11922         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11923         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11924         and to respect the namespace rules better.
11925
11926 2005-09-08  Simon Josefsson  <jas@extundo.com>
11927
11928         * modules/socklen: New file.
11929
11930 2005-09-08  Simon Josefsson  <jas@extundo.com>
11931
11932         * m4/socklen.m4: New file.
11933
11934 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11935
11936         * modules/utimens (Files): Add m4/utimbuf.m4, since
11937         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11938         Reported by Sergey Poznyakoff.
11939
11940 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11941
11942         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11943         definitions, since that's the preferred style in glibc.
11944         Fix a minor spacing issue, and update copyright notice to match
11945         glibc's.
11946
11947 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11948
11949         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11950
11951 2005-09-06  Simon Josefsson  <jas@extundo.com>
11952
11953         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11954         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11955
11956 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11957
11958         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11959         warning.
11960
11961 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11962
11963         * config/srclist.txt: Add glibc bug 1302.
11964
11965 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11966
11967         Change bitset word type from unsigned int to unsigned long int,
11968         as this has better performance on typical 64-bit hosts.
11969         Port bitset code to hosts with unusual word sizes.
11970         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11971         (build_collating_symbol):
11972         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11973         argument is a bitset.  This is merely a style issue, but it makes
11974         it clearer that an entire array is expected.
11975         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11976         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11977         Port to the case where bitset_word is not the same as unsigned int.
11978         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11979         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11980         Likewise.
11981         * lib/regexec.c (check_dst_limits_calc_pos_1,
11982         check_subexp_matching_top):
11983         (build_trtable, group_nodes_into_DFAstates):
11984         Likewise.
11985         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11986         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11987         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11988         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11989         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11990         * lib/regcomp.c (optimize_subexps, lower_subexp):
11991         Work even if bitset_word has holes in its bitwise representation.
11992         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11993         * lib/regexec.c (check_dst_limits_calc_pos_1,
11994         check_subexp_matching_top):
11995         Likewise.
11996         * lib/regex_internal.c (re_string_reconstruct):
11997         Don't assume UCHAR_MAX == 255.
11998         * lib/regex_internal.h (bitset_set_all): Likewise.
11999         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12000         All uses changed.
12001         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12002         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12003         All uses changed.
12004         (BITSET_WORD_MAX): New macro.
12005         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12006         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12007         (bitset_empty, bitset_copy):
12008         Prefer sizeof (bitset) to multiplying it out ourselves.
12009         (bitset_not_merge): Remove; unused.
12010         (bitset_contain): Return bool, not unsigned int with one bit on.
12011         All callers changed.
12012         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12013         alignment than re_node_set; do this by defining a new internal
12014         type struct dests_alloc and using it to allocate memory.
12015
12016 2005-09-05  Bruno Haible  <bruno@clisp.org>
12017
12018         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12019         links.
12020
12021 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12022
12023         * modules/size_max (Makefile.am): Add size_max.h
12024
12025 2005-09-04  Derek Price  <derek@ximbiot.com>
12026
12027         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12028
12029 2005-09-03  Simon Josefsson  <jas@extundo.com>
12030
12031         * gnulib-tool: Fix typo.
12032
12033 2005-09-03  Simon Josefsson  <jas@extundo.com>
12034
12035         * config/srclist.txt: Add glibc bug 1293.
12036
12037 2005-09-03  Derek Price  <derek@ximbiot.com>
12038
12039         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12040         From Larry Jones <lawrence.jones@ugs.com>.
12041
12042 2005-09-02  Simon Josefsson  <jas@extundo.com>
12043
12044         * modules/socklen: New file.
12045
12046 2005-09-02  Simon Josefsson  <jas@extundo.com>
12047
12048         * modules/havelib: New module.
12049
12050         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12051         Use havelib.
12052
12053 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12054
12055         Check for arithmetic overflow when calculating sizes, to prevent
12056         some buffer-overflow issues.  These patches are conservative, in the
12057         sense that when I couldn't determine whether an overflow was possible,
12058         I inserted a run-time check.
12059         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12060         macros.
12061         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12062         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12063         (re_xnrealloc, re_x2nrealloc): New inline functions.
12064         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12065         parse_bracket_exp):
12066         (build_equiv_class, build_charclass): Check for arithmetic overflow
12067         in size expression calculations.
12068         * lib/regex_internal.c (re_string_realloc_buffers):
12069         (build_wcs_upper_buffer, re_node_set_add_intersect):
12070         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12071         (re_dfa_add_node, register_state): Likewise.
12072         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12073         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12074         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12075         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12076
12077 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12078
12079         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12080         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12081
12082 2005-09-02  Bruno Haible  <bruno@clisp.org>
12083
12084         Support for lib vs. lib64 distinction on biarch platforms.
12085         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12086         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12087         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12088
12089 2005-09-02  Bruno Haible  <bruno@clisp.org>
12090
12091         * gnulib-tool (import): In the other first-use case, provide defaults
12092         as well.
12093
12094 2005-09-02  Bruno Haible  <bruno@clisp.org>
12095
12096         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12097         patches not yet found in the latest gettext release.
12098
12099 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12100
12101         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12102         to avoid a collision with bits/local_lim.h in glibc.
12103         All uses changed.  Problem reported by Dmitry V. Levin in
12104         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12105
12106         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12107         bugs in int versus size_t comparisons.
12108         (re_string_context_at): Fix bug where the code assumed that
12109         Idx is signed.
12110
12111         Use bool where appropriate.
12112         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12113         All callers changed.
12114         (calc_eclosure_iter): Likewise, for ROOT arg.
12115         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12116         (build_charclass_op): Likewise, for NON_MATCH arg.
12117         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12118         (re_string_construct_common): Likewise, for ICASE arg.
12119         * lib/regexec.c (re_search_2_stub, re_search_stub):
12120         Likewise, for RET_LEN arg.
12121         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12122         (set_regs): Likewise, for FL_BACKTRACK arg.
12123         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12124         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12125         (calc_eclosure_iter, parse_bracket_exp):
12126         Use bool for internal variables that are booleans.
12127         * lib/regexec.c (re_search_internal, check_matching,
12128         proceed_next_node):
12129         (set_regs, build_sifted_states, sift_states_bkref):
12130         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12131         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12132         (find_collation_sequence_value):
12133         Likewise.
12134         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12135         (re_node_set_compare):
12136         Return bool, not int. All callers changed.
12137         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12138         (build_trtable, check_node_accept): Likewise.
12139         * lib/regex_internal.h: Include stdbool.h.
12140
12141         Fix bugs uncovered when converting to bool.
12142         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12143         failure instead of charging ahead blindly.
12144         * lib/regex_internal.c (register_state): Likewise.
12145         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12146         for freeing internal storage.
12147         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12148         bitset pieces used as boolean, to avoid undefined behavior
12149         on hosts that do int overflow checking.
12150
12151 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12152
12153         * config/srclist.txt: Add glibc bugs 1285-1287.
12154
12155 2005-09-01  Jim Meyering  <jim@meyering.net>
12156
12157         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12158         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12159         Require gl_STAT_MACROS, too.
12160
12161 2005-09-01  Bruno Haible  <bruno@clisp.org>
12162
12163         * gnulib-tool (import): In the first-use case, provide defaults.
12164
12165 2005-09-01  Bruno Haible  <bruno@clisp.org>
12166
12167         * gnulib-tool (func_import): Remove the .tmp files.
12168
12169 2005-09-01  Bruno Haible  <bruno@clisp.org>
12170
12171         * gnulib-tool (func_import): Fix handling of symbolic links.
12172
12173 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12174
12175         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12176         old glibc regex code mishandles strings longer than 2**31 bytes.
12177         This patch fixes this when the regex code is used in gnulib
12178         (i.e., outside glibc).
12179
12180         This patch should not affect the use of the regex code inside
12181         glibc.  No doubt this problem also needs to be handled for glibc
12182         as well, but the result will be an incompatible change to the
12183         glibc ABI, and the old ABI will have to be supported too.  That
12184         can be the the subject for another patch.
12185
12186         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12187         governing whether the rest of this patch is active.  By default,
12188         the macro is disabled and the patch has no effect.
12189         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12190         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12191         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12192         (re_match_2, re_set_registers): Use the new types.
12193         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12194         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12195         New macros.
12196         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12197         (re_string_context_at, bin_tree_t, re_dfastate_t):
12198         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12199         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12200         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12201         (re_string_char_size_at, re_string_wchar_at):
12202         (re_string_elem_size_at):
12203         Use the new types and macros to port to 64-bit hosts.
12204         Use unsigned types for internal values, so that the code
12205         mostly works even for arrays larger than SSIZE_MAX.
12206         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12207         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12208         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12209         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12210         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12211         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12212         (calc_inveclosure, parse_dup_op, build_range_exp):
12213         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12214         (fetch_number, create_token_tree, mark_opt_subexp):
12215         Likewise.
12216         * lib/regex_internal.c (re_string_construct_common,
12217         create_ci_newstate):
12218         (create_cd_newstate, re_string_allocate, re_string_construct):
12219         (re_string_realloc_buffers, build_wcs_upper_buffer):
12220         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12221         (re_string_reconstruct, re_string_peek_byte_case):
12222         (re_string_fetch_byte_case, re_string_context_at):
12223         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12224         (re_node_set_init_copy, re_node_set_add_intersect):
12225         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12226         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12227         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12228         (re_acquire_state, re_acquire_state_context, register_state):
12229         Likewise.
12230         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12231         search_cur_bkref_entry):
12232         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12233         (re_search_internal, re_search_2_stub, re_search_stub)
12234         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12235         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12236         (update_cur_sifted_state, check_dst_limits):
12237         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12238         (check_subexp_limits, sift_states_bkref, merge_state_array):
12239         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12240         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12241         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12242         (expand_bkref_cache, check_node_accept_bytes):
12243         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12244         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12245         (acquire_init_state_context, check_halt_node_context):
12246         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12247         (sift_states_backward, clean_state_log_if_needed):
12248         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12249         (find_recover_state, transit_state_sb, transit_state_mb):
12250         (transit_state_bkref, build_trtable, match_ctx_clean):
12251         Likewise.
12252         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12253         to work around an assumption that REG_MISSING is negative.
12254
12255         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12256         (seek_collating_symbol_entry) [defined _LIBC]:
12257         (lookup_collation_sequence_value) [defined _LIBC]:
12258         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12259         Use prototypes rather than old-style function definitions.
12260         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12261         (transit_state_sb) [0]:
12262         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12263
12264         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12265         rm_eo.
12266
12267         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12268         (optimize_subexps, lower_subexp):
12269         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12270         since the signed shift might overflow.  Use 1u<<31 instead.
12271         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12272         Likewise.
12273         * lib/regexec.c (check_dst_limits_calc_pos_1,
12274         check_subexp_matching_top): Likewise.
12275
12276         * lib/regcomp.c (optimize_subexps, lower_subexp):
12277         Use CHAR_BIT rather than 8, for clarity.
12278         * lib/regexec.c (check_dst_limits_calc_pos_1):
12279         (check_subexp_matching_top): Likewise.
12280         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12281         have to worry about portability issues when shifting it left.
12282         Remove no-longer-needed test for table_size > 0.
12283         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12284         in a word, as the resulting behavior is undefined.
12285         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12286         in one case, a <= should have been an <, and in another case the
12287         whole test was missing.
12288         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12289         the standard name CHAR_BIT.
12290         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12291         this is not true on one's complement and signed-magnitude hosts.
12292
12293         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12294         next_last_offset.
12295         (struct re_dfa_t): Remove unused member states_alloc.
12296         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12297
12298 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12299
12300         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12301         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12302         and large-file glibc and in 32-bit large-file Solaris.
12303
12304 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12305
12306         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12307         lengths fit in regoff_t; this isn't true if regoff_t is the same
12308         width as size_t.
12309         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12310         (= START + RANGE) instead of RANGE.  This avoids overflow
12311         problems when regoff_t is the same width as size_t.
12312         All callers changed.
12313         (re_search_2_stub): Check for overflow when adding the
12314         sizes of the two strings.
12315         (re_search_stub): Check for overflow when adding START
12316         to RANGE; if it occurs, substitute the extreme value.
12317
12318 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12319
12320         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12321
12322 2005-08-31  Jim Meyering  <jim@meyering.net>
12323
12324         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12325         a pointer-to-const.
12326         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12327         (register_state): Likewise.
12328         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12329         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12330         (group_nodes_into_DFAstates): Likewise.
12331
12332 2005-08-31  Jim Meyering  <jim@meyering.net>
12333
12334         * check-module: Add a FIXME comment.
12335
12336 2005-08-31  Eric Blake  <ebb9@byu.net>
12337
12338         * modules/unistd-safer (Files): Add unistd--.h.
12339         * modules/stdio-safer (Files): Add stdio--.h.
12340
12341 2005-08-31  Derek Price  <derek@ximbiot.com>
12342
12343         * lib/getdelim.c (getdelim): Return EOF on EOF.
12344         Reported by Larry Jones <lawrence.jones@ugs.com>.
12345
12346 2005-08-31  Bruno Haible  <bruno@clisp.org>
12347
12348         Avoid unnecessary diffs in the generated lib/Makefile.am.
12349         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12350         the generated files.
12351         (func_import): Don't set cmd.
12352
12353 2005-08-31  Bruno Haible  <bruno@clisp.org>
12354
12355         * lib/strstr.c: Include <stddef.h>, for NULL.
12356         * lib/strcasestr.c: Likewise.
12357         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12358
12359 2005-08-31  Bruno Haible  <bruno@clisp.org>
12360
12361         * gnulib-tool: New option --macro-prefix.
12362         (func_import): Use macro_prefix.
12363         (import): Handle option --macro-prefix.
12364
12365 2005-08-31  Bruno Haible  <bruno@clisp.org>
12366
12367         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12368         Also use new variables cached_lgpl, cached_libtool.
12369
12370 2005-08-31  Bruno Haible  <bruno@clisp.org>
12371
12372         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12373         always instantiating them.
12374
12375 2005-08-31  Bruno Haible  <bruno@clisp.org>
12376
12377         * gnulib-tool (func_import): Read the previous cached settings
12378         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12379         earlier added by gnulib but are now dropped. Warn when a gnulib file
12380         overwrites a non-gnulib file.
12381
12382 2005-08-31  Bruno Haible  <bruno@clisp.org>
12383
12384         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12385         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12386         projects that don't keep autogenerated files in CVS. Put into
12387         actioncmd only the specified modules, not the transitive closure.
12388
12389 2005-08-31  Bruno Haible  <bruno@clisp.org>
12390
12391         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12392         Create directories that shall be filled.
12393         (import): Don't look for gl_* macros in configure.ac. Recurse across
12394         all directories containing a gnulib-cache.m4 files, if meaningful.
12395
12396 2005-08-31  Bruno Haible  <bruno@clisp.org>
12397
12398         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12399         (import): Set seen_libtool when we see gl_LIBTOOL.
12400
12401 2005-08-31  Bruno Haible  <bruno@clisp.org>
12402
12403         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12404         declaration macro definitions from generated gnulib.m4.
12405
12406 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12407
12408         * lib/iconvme.h: Add prototype for iconv_alloc.
12409
12410 2005-08-29  Simon Josefsson  <jas@extundo.com>
12411
12412         * lib/iconvme.c: Fix errno.
12413
12414 2005-08-29  Bruno Haible  <bruno@clisp.org>
12415
12416         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12417         that it works when the directory contains spaces.
12418
12419 2005-08-29  Bruno Haible  <bruno@clisp.org>
12420
12421         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12422
12423 2005-08-29  Bruno Haible  <bruno@clisp.org>
12424
12425         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12426         Emit more advice.
12427
12428 2005-08-29  Bruno Haible  <bruno@clisp.org>
12429         and Stepan Kasal  <kasal@ucw.cz>
12430
12431         * check-module: If more parameters are given, check each of them
12432         separately; add more exceptions, as noted by Jim Meyering.
12433         (check_module): New procedure.
12434         (%exempt_header): Now contains all exceptions.
12435
12436 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12437
12438         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12439
12440 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12441
12442         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12443
12444 2005-08-28  Bruno Haible  <bruno@clisp.org>
12445
12446         * m4/gnulib-tool.m4: New file.
12447
12448 2005-08-27  Jim Meyering  <jim@meyering.net>
12449
12450         * modules/unistd-safer (Files): Add pipe-safer.c.
12451         * modules/fcntl-safer (Files): Add creat-safer.c.
12452
12453 2005-08-27  Jim Meyering  <jim@meyering.net>
12454
12455         * m4/stdlib-safer.m4: New file.  From coreutils.
12456         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12457         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12458         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12459         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12460         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12461
12462 2005-08-27  Jim Meyering  <jim@meyering.net>
12463
12464         * lib/fopen-safer.c: Merge minor changes from coreutils.
12465         * lib/dup-safer.c: Likewise.
12466         * lib/fd-safer.c: Likewise.
12467
12468         Merge from coreutils.
12469         * lib/stdio--.h: New file.
12470         * lib/stdlib--.h: New file.
12471         * lib/mkstemp-safer.c: New file.
12472
12473         GNU tar needs these.
12474         * lib/pipe-safer.c: New file.
12475         * lib/creat-safer.c: New file.
12476         * lib/fcntl--.h (creat): Define to creat_safer.
12477         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12478         * lib/unistd--.h (pipe): Define to pipe_safer.
12479         * lib/unistd-safer.h: Declare pipe_safer.
12480
12481 2005-08-26  Simon Josefsson  <jas@extundo.com>
12482
12483         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12484         Haible <bruno@clisp.org>.
12485
12486 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12487
12488         * lib/regex_internal.h: Remove all references to
12489         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12490         or better.
12491         (bitset_not, bitset_merge, bitset_not_merge):
12492         (bitset_mask, re_string_allocate, re_string_construct):
12493         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12494         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12495         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12496         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12497         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12498         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12499         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12500         (re_acquire_state_context):
12501         Remove unnecessary forward decls.
12502         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12503         Put __attribute at function definition,
12504         now that the function decl has been removed.
12505         * lib/regex_internal.c (re_string_peek_byte_case):
12506         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12507         Likewise.
12508
12509 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12510
12511         * m4/regex.m4: Add AC_PREREQ(2.50).
12512         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12513
12514 2005-08-25  Simon Josefsson  <jas@extundo.com>
12515
12516         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12517         __fsetlocking.
12518
12519 2005-08-25  Simon Josefsson  <jas@extundo.com>
12520
12521         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12522         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12523         GLIBC specific code.
12524
12525 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12526
12527         Make regex safe for g++.  This fixes one real bug (an "err"
12528         that should have been "*err").  g++ problem reported by
12529         Sam Steingold.
12530         * lib/regex_internal.h (re_calloc): New macro, consistent with
12531         re_malloc etc.  All callers of calloc changed to use re_calloc.
12532         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12533         not int.  All callers changed.
12534         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12535         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12536         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12537         (find_recover_state): Change "err" to "*err"; this fixes what
12538         appears to be a real bug.
12539         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12540         versus int.
12541
12542 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12543
12544         * modules/regex (Depends-on): Add malloc, since the code
12545         assumes that !malloc(0) means failure.
12546
12547 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12548
12549         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12550
12551         alloca modernization/simplification for regex.
12552         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12553         needs to be at the start of the file, and can be moved into
12554         regex_internal.h and simplified.
12555         * lib/regex_internal.h: Include <alloca.h>.
12556         (__libc_use_alloca) [!defined _LIBC]: New macro.
12557         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12558         now works outside glibc.
12559
12560 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12561
12562         * config/srclist.txt: Add glibc bugs 1241, 1245.
12563
12564 2005-08-25  Jim Meyering  <jim@meyering.net>
12565
12566         * lib/open-safer.c: Include <config.h>.
12567         Otherwise, we'd lose LARGEFILE support in any file using
12568         e.g. "fcntl--.h"
12569
12570 2005-08-25  Bruno Haible  <bruno@clisp.org>
12571
12572         * m4/minmax.m4: Require autoconf 2.52.
12573         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12574         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12575         alternatives of translit over the alphabet.
12576         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12577
12578 2005-08-24  Simon Josefsson  <jas@extundo.com>
12579
12580         * tests/test-getpass.c: New file.
12581
12582 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12583
12584         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12585         for GNU regex features.
12586
12587 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12588
12589         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12590         * lib/regex.h (regerror): Likewise.
12591
12592         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12593         requires this.  (The code never needed it.)
12594
12595         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12596         All uses of recently-renamed identifiers changed to use the new,
12597         POSIX-compliant names.  The code will build and run just fine
12598         without these changes, but it's better to eat our own dog food
12599         and use the standard-conforming names.
12600
12601         * lib/regex.h: Fix a multitude of POSIX name space violations.
12602         These changes have an effect only for programs that define
12603         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12604         do not change anything for programs compiled in the normal way.
12605         Also, there is no effect on the ABI.
12606
12607         (_REGEX_SOURCE): New macro.
12608         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12609         defined and _GNU_SOURCE is not; this fixes a name space violation.
12610
12611         Rename the following macros to obey POSIX requirements.
12612         The old names are still visible as macros if _REGEX_SOURCE is defined.
12613         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12614         RE_BACKSLASH_ESCAPE_IN_LISTS.
12615         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12616         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12617         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12618         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12619         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12620         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12621         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12622         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12623         (REG_INTERVALS): renamed from RE_INTERVALS.
12624         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12625         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12626         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12627         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12628         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12629         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12630         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12631         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12632         RE_UNMATCHED_RIGHT_PAREN_ORD.
12633         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12634         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12635         (REG_DEBUG): renamed from RE_DEBUG.
12636         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12637         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12638         unusual, since we can't clash with the POSIX REG_ICASE.
12639         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12640         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12641         (REG_NO_SUB): renamed from RE_NO_SUB.
12642         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12643         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12644         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12645         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12646         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12647         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12648         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12649         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12650         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12651         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12652         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12653         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12654         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12655         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12656         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12657         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12658         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12659         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12660         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12661         (REG_FIXED): Renamed from REGS_FIXED.
12662         (REG_NREGS): Renamed from RE_NREGS.
12663
12664         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12665         of other REG_* macros, since POSIX says the user is allowed to
12666         #undef these macros selectively.
12667
12668         (reg_errcode_t): Update comment stating what other tables need
12669         to be consistent.
12670
12671         Rename the following enum values to obey POSIX requirements.
12672         The old names are still visible as macros.
12673         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12674         is not defined, since GNU is supposed to be a superset of POSIX as
12675         much as possible, and since we want reg_errcode_t to be a signed
12676         type for implementation consistency.
12677         (_REG_NOERROR): Renamed from REG_NOERROR.
12678         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12679         (_REG_BADPAT): Renamed from REG_BADPAT.
12680         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12681         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12682         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12683         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12684         (_REG_EBRACK): Renamed from REG_EBRACK.
12685         (_REG_EPAREN): Renamed from REG_EPAREN.
12686         (_REG_EBRACE): Renamed from REG_EBRACE.
12687         (_REG_BADBR): Renamed from REG_BADBR.
12688         (_REG_ERANGE): Renamed from REG_ERANGE.
12689         (_REG_ESPACE): Renamed from REG_ESPACE.
12690         (_REG_BADRPT): Renamed from REG_BADRPT.
12691         (_REG_EEND): Renamed from REG_EEND.
12692         (_REG_ESIZE): Renamed from REG_ESIZE.
12693         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12694         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12695         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12696         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12697         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12698
12699         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12700         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12701         changed.  But support the old name if the new one is not defined
12702         and if _REGEX_SOURCE.
12703
12704         Change the following member names in struct re_pattern_buffer.
12705         The old names are still supported if !_REGEX_SOURCE.
12706         The new names are always supported, regardless of _REGEX_SOURCE.
12707         (re_buffer): Renamed from buffer.
12708         (re_allocated): Renamed from allocated.
12709         (re_used): Renamed from used.
12710         (re_syntax): Renamed from syntax.
12711         (re_fastmap): Renamed from fastmap.
12712         (re_translate): Renamed from translate.
12713         (re_can_be_null): Renamed from can_be_null.
12714         (re_regs_allocated): Renamed from regs_allocated.
12715         (re_fastmap_accurate): Renamed from fastmap_accurate.
12716         (re_no_sub): Renamed from no_sub.
12717         (re_not_bol): Renamed from not_bol.
12718         (re_not_eol): Renamed from not_eol.
12719         (re_newline_anchor): Renamed from newline_anchor.
12720
12721         Change the following member names in struct re_registers.
12722         The old names are still supported if !_REGEX_SOURCE.
12723         The new names are always supported, regardless of _REGEX_SOURCE.
12724         (rm_num_regs): Renamed from num_regs.
12725         (rm_start): Renamed from start.
12726         (rm_end): Renamed from end.
12727
12728         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12729         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12730         Prepend __ to parameter names.
12731
12732         Undo yesterday's changes.
12733
12734 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12735
12736         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12737         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12738         lib/regex.c.
12739
12740 2005-08-24  Jim Meyering  <jim@meyering.net>
12741
12742         Sync from coreutils.
12743         * m4/fcntl-safer.m4: New file.
12744
12745         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12746         and object files for this module.
12747
12748 2005-08-24  Jim Meyering  <jim@meyering.net>
12749
12750         Sync from coreutils.
12751         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12752
12753 2005-08-24  Jim Meyering  <jim@meyering.net>
12754
12755         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12756         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12757
12758 2005-08-24  Jim Meyering  <jim@meyering.net>
12759
12760         * modules/fcntl-safer: New module.
12761         * modules/fts (Depends-on): Add fcntl-safer.
12762         * MODULES.html.sh (File descriptor based Input/Output):
12763         Add fcntl-safer.
12764
12765 2005-08-24  Bruno Haible  <bruno@clisp.org>
12766
12767         Support for unit test modules.
12768         * modules/README: Mention tests modules.
12769         * modules/TEMPLATE-TESTS: New file.
12770         * gnulib-tool: New options --extract-tests-module, --with-tests and
12771         --tests-base (unused for the moment).
12772         (testsbase, inctests): New variables.
12773         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12774         (func_verify_module): Exclude TEMPLATE-TESTS.
12775         (func_verify_nontests_module, func_verify_tests_module): New functions.
12776         (func_get_dependencies): Add implicit dependency for tests modules.
12777         (func_get_tests_module): New function.
12778         (func_modules_transitive_closure): When --with-tests was specified,
12779         include the unit tests as well, unless explicitly avoided.
12780         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12781         (func_emit_tests_Makefile_am): New function.
12782         (func_create_testdir): When --with-tests was specified, emit a
12783         tests/ directory.
12784         * MODULES.html.sh (Future developments): Update.
12785
12786 2005-08-24  Bruno Haible  <bruno@clisp.org>
12787
12788         * modules/tls-tests: New file.
12789         * tests/test-tls.c: New file, from GNU gettext.
12790
12791 2005-08-24  Bruno Haible  <bruno@clisp.org>
12792
12793         * modules/lock-tests: New file.
12794         * tests/test-lock.c: New file, from GNU gettext.
12795
12796 2005-08-24  Bruno Haible  <bruno@clisp.org>
12797
12798         * lib/lock.h: Add multiple inclusion guard.
12799         * lib/tls.h: Add multiple inclusion guard.
12800
12801 2005-08-24  Bruno Haible  <bruno@clisp.org>
12802
12803         * gnulib-tool: Add support for the --aux-dir option to
12804         --create-testdir, --create-megatestdir, --test, --megatest.
12805         (func_create_testdir, func_create_megatestdir): Optionally emit a
12806         AC_CONFIG_AUX_DIR directive.
12807         (create-testdir, create-megatestdir, test, megatest): Provide a
12808         default value for $auxdir.
12809
12810 2005-08-24  Bruno Haible  <bruno@clisp.org>
12811
12812         * gnulib-tool (import): Use compound statement instead of subshell
12813         where possible.
12814
12815 2005-08-24  Bruno Haible  <bruno@clisp.org>
12816
12817         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12818
12819 2005-08-24  Bruno Haible  <bruno@clisp.org>
12820
12821         * gnulib-tool (func_version): Update.
12822
12823 2005-08-24  Bruno Haible  <bruno@clisp.org>
12824
12825         * gnulib-tool (func_import, func_create_testdir,
12826         func_create_megatestdir): Quote all autoconf macro arguments.
12827
12828 2005-08-24  Bruno Haible  <bruno@clisp.org>
12829
12830         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12831         option --force, because --force causes the aclocal.m4 of each
12832         subdirectory to be newer than the corresponding config.h.in.
12833
12834 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12835
12836         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12837         All contents moved to gl_REGEX.
12838         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12839         assume that it does.
12840
12841 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12842
12843         * lib/regex.h (REG_NOSYS)
12844         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12845         Define, since POSIX requires it as of 2001.
12846         (_REG_ENOSYS)
12847         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12848         New private symbol, used to keep the enum signed in all cases.
12849         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12850         Youngman in
12851         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12852
12853         * lib/regex_internal.c (re_string_skip_chars, register_state):
12854         (calc_state_hash):
12855         Remove forward decls; no longer needed now that we use prototypes.
12856         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12857         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12858         (clean_state_log_if_needed): Likewise.
12859
12860 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12861
12862         * config/srclist.txt: Add glibc bugs 1231-1233.
12863
12864 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12865
12866         Fix problems reported by Sam Steingold in
12867         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12868         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12869         assumed that reg_errcode_t is a signed type, which is not
12870         necessarily true if _XOPEN_SOURCE is not defined.
12871         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12872         since some compilers warn about it otherwise.
12873
12874 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12875
12876         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12877         (init_word_char, create_initial_state, duplicate_node_closure):
12878         (fetch_token, peek_token_bracket, build_range_exp):
12879         (build_collating_symbol): Remove forward decls; no longer needed
12880         now that we use prototypes.
12881
12882         * lib/regcomp.c:
12883         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12884         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12885         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12886         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12887         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12888         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12889         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12890         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12891         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12892         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12893         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12894         (build_charclass, build_charclass_op, fetch_number, create_tree):
12895         (create_token_tree, mark_opt_subexp, duplicate_tree):
12896         Use prototypes rather than old-style definitions.
12897
12898         * lib/regex_internal.c:
12899         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12900         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12901         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12902         (re_string_reconstruct, re_string_peek_byte_case):
12903         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12904         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12905         (re_node_set_init_copy, re_node_set_add_intersect):
12906         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12907         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12908         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12909         (re_acquire_state, re_acquire_state_context, register_state):
12910         (create_ci_newstate, create_cd_newstate, free_state):
12911         Likewise.
12912         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12913         re_search_2):
12914         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12915         (re_search_internal, prune_impossible_nodes):
12916         (acquire_init_state_context, check_matching, static):
12917         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12918         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12919         (update_regs, sift_states_backward, build_sifted_states):
12920         (clean_state_log_if_needed, merge_state_array):
12921         (update_cur_sifted_state, add_epsilon_src_nodes):
12922         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12923         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12924         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12925         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12926         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12927         (check_arrival, check_arrival_add_next_nodes):
12928         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12929         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12930         (check_node_accept_bytes, check_node_accept, extend_buffers):
12931         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12932         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12933         (sift_ctx_init):
12934         Likewise.
12935
12936         * lib/regex_internal.h:
12937         (re_string_allocate, re_string_construct, re_string_reconstruct):
12938         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12939         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12940         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12941         (re_string_context_at, re_string_peek_byte_case):
12942         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12943         is defined, since we now use prototypes always.
12944
12945         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12946         C89 or better.  All uses removed.
12947
12948 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12949
12950         * config/srclist.txt: Add glibc bugs 1220-1227.
12951
12952 2005-08-20  Jim Meyering  <jim@meyering.net>
12953
12954         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12955         of unused local, dfa.
12956
12957 2005-08-20  Bruno Haible  <bruno@clisp.org>
12958
12959         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12960
12961 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12962
12963         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12964         (re_node_set_insert_last, re_dfa_add_node):
12965         Rename local variables to avoid GCC shadowing warnings.
12966
12967 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12968
12969         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12970         [defined lint]: Suppress bogus uninitialized-variable warnings.
12971
12972         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12973         and let the caller return REG_ESPACE if out of space.  This
12974         removes an uninitialied-variable warning with GCC 4.0.1, and also
12975         avoids taking the address of a local variable.  All callers
12976         changed.
12977
12978 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12979
12980         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12981         $LIBCSRC/posix/regexec.c.
12982         Add glibc bug 1217 for regcomp.c.
12983
12984 2005-08-19  Jim Meyering  <jim@meyering.net>
12985
12986         * lib/regexec.c (proceed_next_node): Redo local variables to
12987         avoid GCC shadowing warnings.
12988
12989 2005-08-18  Bruno Haible  <bruno@clisp.org>
12990
12991         * lib/strstr.c (strstr): Fix return value in multibyte case.
12992         * lib/strcasestr.c (strcasestr): Likewise.
12993
12994 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12995
12996         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12997
12998 2005-08-17  Jim Meyering  <jim@meyering.net>
12999
13000         Make the %s format (seconds since the epoch) work for a negative
13001         number and when used with a zero-padded field width, e.g. %015s.
13002
13003         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13004         label so that it precedes the code to set `digits'.  Otherwise,
13005         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13006         print `00-22'.  Now, it prints `-0022', as it should.
13007
13008 2005-08-17  Bruno Haible  <bruno@clisp.org>
13009
13010         * modules/strstr (Files): Add m4/mbrtowc.m4.
13011         (Depends-on): Add mbuiter.
13012
13013 2005-08-17  Bruno Haible  <bruno@clisp.org>
13014
13015         * modules/strcasestr: New file.
13016         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13017         strcasestr.
13018
13019 2005-08-17  Bruno Haible  <bruno@clisp.org>
13020
13021         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13022
13023 2005-08-17  Bruno Haible  <bruno@clisp.org>
13024
13025         * modules/mbuiter: New file.
13026         * MODULES.html.sh (Extended multibyte and wide character utilities):
13027         Add mbuiter.
13028
13029 2005-08-17  Bruno Haible  <bruno@clisp.org>
13030
13031         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13032         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13033
13034 2005-08-17  Bruno Haible  <bruno@clisp.org>
13035
13036         * m4/strcasestr.m4: New file.
13037
13038 2005-08-17  Bruno Haible  <bruno@clisp.org>
13039
13040         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13041         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13042
13043 2005-08-17  Bruno Haible  <bruno@clisp.org>
13044
13045         * lib/strcasestr.h: New file.
13046         * lib/strcasestr.c: New file.
13047
13048 2005-08-17  Bruno Haible  <bruno@clisp.org>
13049
13050         * lib/strcasecmp.c: Use mbuiter.h.
13051
13052 2005-08-17  Bruno Haible  <bruno@clisp.org>
13053
13054         * lib/mbuiter.h: New file.
13055
13056 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13057
13058         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13059         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13060         and gl_GETOPT are both invoked via different paths (as happens
13061         with GNU tar CVS because it uses both argp and getopt), the former
13062         wins.
13063
13064 2005-08-16  Bruno Haible  <bruno@clisp.org>
13065
13066         * modules/tls: New file.
13067         * MODULES.html.sh (Multithreading): Add tls.
13068
13069 2005-08-16  Bruno Haible  <bruno@clisp.org>
13070
13071         * modules/strnlen1: New file.
13072         * MODULES.html.sh (String handling): Add strnlen1.
13073
13074 2005-08-16  Bruno Haible  <bruno@clisp.org>
13075
13076         * modules/strcase (Files): Add m4/mbrtowc.m4.
13077         (Depends-on): Add strnlen1, mbchar.
13078
13079 2005-08-16  Bruno Haible  <bruno@clisp.org>
13080
13081         * modules/mbiter: New file.
13082         * MODULES.html.sh (Extended multibyte and wide character utilities):
13083         Add mbiter.
13084
13085 2005-08-16  Bruno Haible  <bruno@clisp.org>
13086
13087         * modules/mbfile: New file.
13088         * MODULES.html.sh (Extended multibyte and wide character utilities):
13089         Add mbfile.
13090
13091 2005-08-16  Bruno Haible  <bruno@clisp.org>
13092
13093         * modules/mbchar: New file.
13094         * MODULES.html.sh (Extended multibyte and wide character utilities):
13095         New section.
13096
13097 2005-08-16  Bruno Haible  <bruno@clisp.org>
13098
13099         * m4/tls.m4: New file, from GNU gettext.
13100
13101 2005-08-16  Bruno Haible  <bruno@clisp.org>
13102
13103         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13104         always.
13105         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13106
13107 2005-08-16  Bruno Haible  <bruno@clisp.org>
13108
13109         * m4/mbiter.m4: New file.
13110
13111 2005-08-16  Bruno Haible  <bruno@clisp.org>
13112
13113         * m4/mbfile.m4: New file.
13114
13115 2005-08-16  Bruno Haible  <bruno@clisp.org>
13116
13117         * m4/mbchar.m4: New file.
13118
13119 2005-08-16  Bruno Haible  <bruno@clisp.org>
13120
13121         * lib/tls.h: New file, from GNU gettext.
13122         * lib/tls.c: New file, from GNU gettext.
13123
13124 2005-08-16  Bruno Haible  <bruno@clisp.org>
13125
13126         * lib/strnlen1.h: New file.
13127         * lib/strnlen1.c: New file.
13128
13129 2005-08-16  Bruno Haible  <bruno@clisp.org>
13130
13131         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13132         (mbi_init): Update.
13133         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13134         NUL byte, not after it.
13135
13136 2005-08-16  Bruno Haible  <bruno@clisp.org>
13137
13138         * lib/strcase.h (strcasecmp): Add note in comments.
13139         * lib/strncasecmp.c: Use code from strcasecmp.c.
13140         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13141         (strcasecmp): Work correctly in multibyte locales.
13142
13143 2005-08-16  Bruno Haible  <bruno@clisp.org>
13144
13145         * lib/mbiter.h: New file.
13146
13147 2005-08-16  Bruno Haible  <bruno@clisp.org>
13148
13149         * lib/mbfile.h: New file.
13150
13151 2005-08-16  Bruno Haible  <bruno@clisp.org>
13152
13153         * lib/mbchar.h: New file.
13154         * lib/mbchar.c: New file.
13155
13156 2005-08-16  Bruno Haible  <bruno@clisp.org>
13157
13158         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13159         the valid ones. Makes the comparison operations transitive:
13160         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13161         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13162
13163 2005-08-15  Simon Josefsson  <jas@extundo.com>
13164
13165         * modules/ssize_t (License): Change to 'unlimited'.
13166
13167         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13168
13169 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13170
13171         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13172         Add comments for each pending glibc patch.
13173
13174 2005-08-15  Bruno Haible  <bruno@clisp.org>
13175
13176         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13177         __cplusplus is defined.
13178
13179 2005-08-14  Jim Meyering  <jim@meyering.net>
13180
13181         Sync from coreutils.
13182
13183         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13184         Use the hash-table-based cycle-detection code not just when
13185         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13186         Reported by James Youngman in
13187         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13188         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13189         FTS_TIGHT_CYCLE_CHECK.
13190         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13191         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13192         once again.
13193         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13194         * lib/fts.c (fd_safer): Remove decl.
13195         Include fcntl--.h rather than unistd-safer.h
13196         (fts_safe_changedir): Don't call fd_safer; no longer needed
13197         now that we include fcntl--.h.
13198
13199 2005-08-12  Simon Josefsson  <jas@extundo.com>
13200
13201         * modules/getndelim2: Use ssize_t module.
13202         * modules/getnline: Likewise.
13203         * modules/safe-read: Likewise.
13204         * modules/xreadlink: Likewise.
13205
13206         * modules/ssize_t: New file.
13207
13208 2005-08-12  Simon Josefsson  <jas@extundo.com>
13209
13210         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13211
13212 2005-08-12  Simon Josefsson  <jas@extundo.com>
13213
13214         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13215         ssize_t.
13216
13217 2005-08-12  Simon Josefsson  <jas@extundo.com>
13218
13219         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13220         readline, getdelim and check_version.
13221         (Support for systems lacking ISO C 99: Sizes of integer types):
13222         Add size_max.
13223
13224 2005-08-12  Bruno Haible  <bruno@clisp.org>
13225
13226         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13227
13228 2005-08-11  Simon Josefsson  <jas@extundo.com>
13229
13230         * modules/readline: New file.
13231
13232         * modules/strnlen (Files): Add strnlen.h.
13233
13234 2005-08-11  Simon Josefsson  <jas@extundo.com>
13235
13236         * m4/readline.m4: New file.
13237
13238 2005-08-11  Simon Josefsson  <jas@extundo.com>
13239
13240         * lib/readline.h, readline.c: New file.
13241
13242 2005-08-11  Simon Josefsson  <jas@extundo.com>
13243
13244         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13245         gl_AVOID.
13246
13247 2005-08-11  Bruno Haible  <bruno@clisp.org>
13248
13249         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13250
13251 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13252
13253         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13254
13255 2005-08-10  Simon Josefsson  <jas@extundo.com>
13256
13257         * tests/test-iconvme.c: New file.
13258
13259 2005-08-10  Simon Josefsson  <jas@extundo.com>
13260
13261         * m4/strnlen.m4: New file.
13262
13263         * m4/strndup.m4: Don't check for strnlen declaration, done in
13264         strnlen.m4.
13265
13266 2005-08-10  Simon Josefsson  <jas@extundo.com>
13267
13268         * lib/strndup.c: Use strnlen.h.
13269
13270         * lib/strnlen.h: New file.
13271
13272 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13273
13274         * README: Typos.
13275
13276 2005-08-02  Simon Josefsson  <jas@extundo.com>
13277
13278         * modules/readline: New file.
13279
13280 2005-08-02  Simon Josefsson  <jas@extundo.com>
13281
13282         * modules/getdelim: New file.
13283
13284         * modules/getline: Rewrite, don't use getndelim2.
13285
13286 2005-08-02  Simon Josefsson  <jas@extundo.com>
13287
13288         * m4/getline.m4: Separate out getdelim stuff into separate module.
13289
13290         * m4/getdelim.m4: New file.
13291
13292 2005-08-02  Simon Josefsson  <jas@extundo.com>
13293
13294         * lib/getline.h, getline.c: Rewrite.
13295
13296         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13297
13298 2005-07-31  Bruno Haible  <bruno@clisp.org>
13299
13300         * lib/lock.h (gl_lock_initializer): New macro.
13301         (gl_lock_define_initialized): Use it.
13302         (gl_rwlock_initializer): New macro.
13303         (gl_rwlock_define_initialized): Use it.
13304         (gl_recursive_lock_initializer): New macro.
13305         (gl_recursive_lock_define_initialized): Use it.
13306
13307 2005-07-30  Karl Berry  <karl@gnu.org>
13308
13309         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13310         Report from Ben Pfaff, regarding getopt.
13311
13312 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13313
13314         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13315         normal way.
13316         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13317         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13318         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13319         (gl_GETOPT): Use the new macros.  Most of the implementation
13320         is moved to the new macros.  This is for programs like Emacs
13321         that don't want all the functionality of gl_GETOPT.
13322
13323 2005-07-26  Bruno Haible  <bruno@clisp.org>
13324
13325         * m4/lock.m4: Update from GNU gettext.
13326
13327 2005-07-26  Bruno Haible  <bruno@clisp.org>
13328
13329         * lib/lock.h: Update from GNU gettext.
13330         * lib/lock.c: Update from GNU gettext.
13331
13332 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13333
13334         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13335         obsolescent AC_TRY_RUN.  Include the default includes files, for
13336         'exit'.
13337
13338 2005-07-24  Bruno Haible  <bruno@clisp.org>
13339
13340         * modules/visibility: New file.
13341         * MODULES.html.sh (Misc): Add visibility.
13342
13343 2005-07-24  Bruno Haible  <bruno@clisp.org>
13344
13345         * m4/visibility.m4: New file.
13346
13347 2005-07-24  Bruno Haible  <bruno@clisp.org>
13348
13349         * doc/visibility.texi: New file.
13350
13351 2005-07-22  Bruno Haible  <bruno@clisp.org>
13352
13353         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13354         $(ALLOCA_H), redundant through BUILT_SOURCES.
13355         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13356         redundant through BUILT_SOURCES.
13357         * modules/byteswap (Makefile.am): Remove explicit dependency on
13358         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13359         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13360         $(FNMATCH_H), redundant through BUILT_SOURCES.
13361         * modules/getopt (Makefile.am): Remove explicit dependency on
13362         $(GETOPT_H), redundant through BUILT_SOURCES.
13363         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13364         redundant through BUILT_SOURCES.
13365         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13366         redundant through BUILT_SOURCES.
13367         * modules/stdbool (Makefile.am): Remove explicit dependency on
13368         $(STDBOOL_H), redundant through BUILT_SOURCES.
13369         * modules/stdint (Makefile.am): Remove explicit dependency on
13370         $(STDINT_H), redundant through BUILT_SOURCES.
13371         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13372         Remove explicit dependency on $(SYSEXITS_H).
13373         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13374
13375 2005-07-18  Simon Josefsson  <jas@extundo.com>
13376
13377         * lib/check-version.c (check_version): Accept identical versions too.
13378
13379 2005-07-18  Bruno Haible  <bruno@clisp.org>
13380
13381         * modules/lock: New file.
13382         * MODULES.html.sh (Multithreading): New section.
13383
13384 2005-07-18  Bruno Haible  <bruno@clisp.org>
13385
13386         * m4/lock.m4: New file, from GNU gettext.
13387
13388 2005-07-18  Bruno Haible  <bruno@clisp.org>
13389
13390         * lib/lock.h: New file, from GNU gettext.
13391         * lib/lock.c: New file, from GNU gettext.
13392
13393 2005-07-18  Bruno Haible  <bruno@clisp.org>
13394
13395         * lib/lock.h (gl_once_t): New type.
13396         (gl_once_define, gl_once): New macros.
13397         * lib/lock.c (fresh_once): New variable.
13398         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13399         functions.
13400
13401 2005-07-16  Simon Josefsson  <jas@extundo.com>
13402
13403         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13404         workaround, suggested by Bruno.
13405
13406 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13407
13408         * modules/xalloc (Depends-on): Add xalloc-die.
13409         * modules/xvasprintf (Depends-on): Add xalloc-die.
13410
13411 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13412
13413         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13414         with a minor change.
13415
13416 2005-07-15  Bruno Haible  <bruno@clisp.org>
13417
13418         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13419         When using lib/poll.c, define poll as rpl_poll.
13420
13421 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13422
13423         * modules/argp (Depends-on): Remove unlocked-io.
13424
13425 2005-07-14  Derek Price  <derek@ximbiot.com>
13426
13427         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13428         for glob symlink bug.
13429
13430 2005-07-14  Bruno Haible  <bruno@clisp.org>
13431
13432         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13433         Instead, test for *_unlocked function declarations directly.
13434
13435 2005-07-11  Simon Josefsson  <jas@extundo.com>
13436
13437         * modules/size_max: New file.
13438
13439         * modules/xsize: Depend on size_max module for size_max.m4.
13440
13441 2005-07-11  Simon Josefsson  <jas@extundo.com>
13442
13443         * lib/size_max.h: New file.
13444
13445 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13446
13447         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13448         copyright symbol and the year.
13449         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13450         (version_etc_va): Use parameterized copyright notice.
13451         Reword to conform to the current GNU coding standards.
13452
13453 2005-07-11  Karl Berry  <karl@gnu.org>
13454
13455         * doc/gnulib.texi (Quoting): new node.
13456         (Initial import): more info, from Patrice.
13457
13458 2005-07-11  Bruno Haible  <bruno@clisp.org>
13459
13460         * gnulib-tool (func_usage): Document option --avoid.
13461         (Command line options): Handle --avoid.
13462         (func_acceptable): New function.
13463         (func_modules_transitive_closure): Use it.
13464
13465 2005-07-11  Bruno Haible  <bruno@clisp.org>
13466
13467         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13468         Reported by Jim Meyering.
13469
13470 2005-07-10  Bruno Haible  <bruno@clisp.org>
13471
13472         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13473         Needed when size_t is smaller than 'unsigned int'.
13474         Reported by Paul Eggert.
13475
13476 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13477
13478         * modules/argp (Depends-on): Add unlocked-io
13479
13480 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13481
13482         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13483         block of defines.
13484
13485 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13486
13487         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13488         fix now.
13489
13490 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13491         and Paul Eggert  <eggert@cs.ucla.edu>
13492
13493         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13494         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13495
13496 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13497
13498         * modules/regex (Files): Add lib/regex_internal.c,
13499         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13500         (Depends-on): Add extensions.
13501         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13502
13503 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13504
13505         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13506         pathconf.
13507         * m4/same.m4 (gl_SAME): Likewise.
13508         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13509
13510         * m4/regex.m4: Adjust to new libc regex implementation.
13511         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13512         all the .c and .h parts of (the new) regex.
13513         Quote the m4 stuff better.
13514         Check for RE_ICASE bug of old gnulib.
13515         Check for REG_STARTEND of recent libc.
13516         Rename local variables from jm_* to gl_*.
13517         Quote operand of "test -f".
13518         Say "recent enough" version of libc, not "version 2".
13519         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13520         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13521         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13522         Remove check for btowc, isascii.
13523         Require AM_LANGINFO_CODESET.
13524
13525 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13526
13527         * lib/regex.c, regex.h: Sync from libc.
13528         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13529         * lib/regexec.c:
13530         New files, synced from libc, except that regex_internal.h
13531         currently has a small porting fix.
13532
13533 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13534
13535         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13536         regex_internal.c, regexec.c.
13537         Add regex_internal.h too, but as a comment, since the libc version
13538         is currently broken in gnulib mode.
13539
13540 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13541
13542         Support programs like Emacs that use gnulib but not gettext.
13543         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13544         * modules/gettext-h: New file.
13545         * modules/gettext (Files): Remove lib/gettext.h.
13546         (Depends-on): Add gettext-h.
13547         (Makefile.am): Remove lib_SOURCES.
13548         * modules/argmatch, modules/c-stack, modules/closeout:
13549         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13550         * modules/execute, modules/file-type, modules/getaddrinfo:
13551         * modules/getopt, modules/human, modules/javacomp:
13552         * modules/javaexec, modules/mkdir-p, modules/obstack:
13553         * modules/openat, modules/pagealign_alloc, modules/pipe:
13554         * modules/quotearg, modules/regex, modules/rpmatch:
13555         * modules/unicodeio, modules/userspec, modules/version-etc:
13556         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13557         * modules/xsetenv:
13558         Depend on gettext-h, not gettext.
13559
13560 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13561
13562         * gnulib-tool (func_import): Add support for 'public domain' license.
13563         * modules/alloca, modules/atexit, modules/memmove:
13564         Now public domain, not GPL.
13565         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13566         * modules/realloc, modules/strerror, modules/strtod:
13567         Now LGPL, not GPL.
13568
13569 2005-07-05  Bruno Haible  <bruno@clisp.org>
13570
13571         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13572         autoconf CVS. Needed for mingw.
13573
13574 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13575
13576         Remove the dependency of the strftime module on the tzset module.
13577         * modules/strftime (Depends-on): Remove dependency on tzset.
13578
13579 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13580
13581         Remove the dependency of the strftime module on the tzset module.
13582         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13583         gl_FUNC_TZSET_CLOBBER.
13584
13585 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13586
13587         Remove the dependency of the strftime module on the tzset module.
13588         * lib/strftime.c (my_strftime)
13589         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13590         Copy the input structure, to work around some of the bug with
13591         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13592         Solaris releases, you should also use the tzset module, but we won't
13593         require it as a dependency any more since we don't want LGPLed code
13594         to depend on GPLed code.
13595
13596 2005-07-02  Jim Meyering  <jim@meyering.net>
13597
13598         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13599         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13600         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13601         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13602
13603 2005-07-02  Jim Meyering  <jim@meyering.net>
13604
13605         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13606
13607 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13608
13609         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13610         declares only 'struct timespec;' (!).
13611
13612 2005-07-01  Jim Meyering  <jim@meyering.net>
13613
13614         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13615         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13616         * lib/save-cwd.c, tempname.c:
13617         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13618         and don't include <sys/file.h>).
13619
13620 2005-06-29  Jim Meyering  <jim@meyering.net>
13621
13622         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13623         type name.  Use the variable name instead.
13624         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13625         Likewise.
13626
13627 2005-06-28  Simon Josefsson  <jas@extundo.com>
13628
13629         * modules/check-version (Files): Add check-version.m4.
13630
13631 2005-06-28  Simon Josefsson  <jas@extundo.com>
13632
13633         * m4/check-version.m4: New file, suggested by Jim Meyering
13634         <jim@meyering.net>.
13635
13636 2005-06-28  Simon Josefsson  <jas@extundo.com>
13637
13638         * lib/check-version.h, lib/check-version.c: New files.
13639
13640 2005-06-28  Simon Josefsson  <jas@extundo.com>
13641
13642         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13643         collision with global variable.  Better indentation.  Don't
13644         increment buffer pointer beyond buffer end.  Based on comments
13645         from Paul Eggert <eggert@cs.ucla.edu>.
13646
13647         * lib/base64.h: Indent.
13648
13649 2005-06-28  Simon Josefsson  <jas@extundo.com>
13650
13651         * doc/gnulib.texi (Library version handling): New section.
13652
13653 2005-06-28  Jim Meyering  <jim@meyering.net>
13654
13655         * check-module (find_included_lib_files): Hard-code another
13656         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13657         but modules/fts-lgpl (correctly) does not list those files.
13658
13659         * modules/canonicalize (Files): Add lib/pathmax.h.
13660
13661 2005-06-25  Simon Josefsson  <jas@extundo.com>
13662
13663         * modules/check-version: New file.
13664
13665 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13666
13667         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13668         initializer of struct addrinfo, as an indication that we don't
13669         care how many members the structure has.
13670
13671 2005-06-24  Derek Price  <derek@ximbiot.com>
13672         and Bruno Haible  <bruno@clisp.org>
13673
13674         Remove stat module & update lstat.
13675         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13676         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13677         * m4/stat.m4: Remove this file.
13678
13679 2005-06-24  Derek Price  <derek@ximbiot.com>
13680         and Bruno Haible  <bruno@clisp.org>
13681
13682         Remove stat module & update lstat.
13683         * lib/stat.c: Remove this file...
13684         (slash_aware_lstat): ...moving this content and its support...
13685         * lib/lstat.c (rpl_lstat): ...into here.
13686         * lib/lstat.h: New file.
13687
13688 2005-06-24  Derek Price  <derek@ximbiot.com>
13689         and Bruno Haible  <bruno@clisp.org>
13690
13691         Remove stat module & update lstat.
13692         * config/srclist.txt (libc sources): Remove stat.
13693
13694 2005-06-24  Derek Price  <derek@ximbiot.com>
13695         and Bruno Haible  <bruno@clisp.org>
13696
13697         Remove stat module & update lstat.
13698         * MODULES.html.sh (stat): Remove.
13699         * MODULES.html: Regenerated.
13700         * modules/lstat (Description): Correct function name.
13701         (Files): Add "lstat.h".
13702         (Depends-on): Remove stat, add xalloc, stat-macros.
13703         * modules/stat: Remove this file.
13704         (Include): Add "lstat.h", remove <sys/stat.h>.
13705
13706 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13707
13708         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13709         (ranged_convert): Don't save conversion in a temporary struct.
13710         This causes a warning with GCC 4.0.0, and anyway in the typical
13711         case it's not worth the extra 100 bytes or so of code.
13712         (ranged_convert, __mktime_internal): When calling a function via a
13713         pointer P, use P () rather than (*P) (), as we now assume C89 or
13714         better.
13715
13716 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13717
13718         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13719         "who -r" failed to give output.  Problem reported by Tim Waugh.
13720
13721         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13722         (xcalloc): Use it to avoid needless tests.
13723         Problem reported by Jim Meyering.
13724
13725 2005-06-20  Derek Price  <derek@ximbiot.com>
13726
13727         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13728         unnecessary for Autoconfs > 2.59c.
13729
13730 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13731
13732         * lib/argp.h (__option_is_short): Check upper limit of
13733         __key. Isprint() requires its argument to have the value
13734         of an unsigned char or EOF.
13735
13736 2005-06-16  Jim Meyering  <jim@meyering.net>
13737
13738         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13739         when either N or S is zero.
13740
13741 2005-06-16  Derek Price  <derek@ximbiot.com>
13742
13743         * m4/bison.m4: Declare YACC & YFLAGS precious.
13744
13745 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13746
13747         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13748         multibyte string or pattern, fall back on unibyte matching.
13749         Problem reported by James Youngman.
13750
13751 2005-06-08  Bruno Haible  <bruno@clisp.org>
13752
13753         * modules/csharpcomp: New file.
13754         * MODULES.html.sh (C#): Add csharpcomp.
13755
13756 2005-06-08  Bruno Haible  <bruno@clisp.org>
13757
13758         * m4/csharpcomp.m4: New file, from GNU gettext.
13759
13760 2005-06-08  Bruno Haible  <bruno@clisp.org>
13761
13762         * lib/csharpcomp.h: New file, from GNU gettext.
13763         * lib/csharpcomp.c: New file, from GNU gettext.
13764         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13765
13766 2005-06-08  Bruno Haible  <bruno@clisp.org>
13767
13768         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13769         warning on mingw.
13770
13771 2005-06-07  Derek Price  <derek@ximbiot.com>
13772
13773         Sync from CVS.
13774         * lib/glob_.h: Indent nested #ifdef.
13775
13776 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13777
13778         Sync from coreutils.
13779         Use "file name" when talking about file names, instead of "filename"
13780         or "path", as per the GNU coding standards.
13781         * lib/mkdir-p.c: Renamed from makepath.c.
13782         (make_dir_parents): Renamed from make_path.  All callers changed.
13783         * lib/mkdir-p.h: Likewise.  All includers changed.
13784         * lib/filenamecat.c: Renamed from path-concat.c.
13785         (file_name_concat): Renamed from path_concat.  All callers changed.
13786         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13787         * lib/filenamecat.h: Likewise.  All includers changed.
13788         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13789         in comments or local variable names.
13790         * lib/basename.c: Likewise.
13791         * lib/canonicalize.c, canonicalize.h: Likewise.
13792         * lib/dirname.c, dirname.h: Likewise.
13793         * lib/euidaccess.c: Likewise.
13794         * lib/exclude.c: Likewise
13795         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13796         * lib/fsusage.c, fsuage.h: Likewise.
13797         * lib/fts.c, fts_.h: Likewise.
13798         * lib/getcwd.c: Likewise.
13799         * lib/getloadavg.c: Likewise.
13800         * lib/mkstemp.c: Likewise.
13801         * lib/mountlist.c, mountlist.h: Likewise.
13802         * lib/openat.c, openat.h: Likewise.
13803         * lib/readlink-stub.c: Likewise.
13804         * lib/readutmp.c, readutmp.h: Likewise.
13805         * lib/rename.c: Likewise.
13806         * lib/rmdir.c: Likewise.
13807         * lib/same.c: Likewise.
13808         * lib/savedir.c: Likewise.
13809         * lib/stripslash.c: Likewise.
13810         * lib/tempname.c: Likewise.
13811         * lib/xreadlink.c: Likewise.
13812         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13813         All uses changed.
13814         * lib/exclude.h: Likewise.
13815
13816         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13817         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13818         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13819         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13820         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13821         files have been getting away with it for years (MORE/BSD 4.3
13822         is extinct now).
13823         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13824         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13825
13826         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13827         Define to 256, not 255, as per modern POSIX.
13828
13829 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13830
13831         Sync from coreutils.
13832         Use "file name" when talking about file names, instead of "filename"
13833         or "path", as per the GNU coding standards.
13834         * MODULES.html.sh: mkdir-p renamed from makepath.
13835         filenamecat renamed from path-concat.
13836         * modules/filenamecat: Renamed from modules/path-concat.
13837         (Files): filenamecat.h and filenamecat.c renamed from
13838         path-concat.h and path-concat.c.
13839         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13840         (Include): filenamecat.h, not path-concat.h.
13841         * modules/mkdir-p: Renamed from modules/makepath.
13842         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13843         makepath.c.
13844         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13845         (Include): mkdir-p.h, not makepath.h.
13846
13847 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13848
13849         Sync from coreutils.
13850         * m4/mkdir-p.m4: Renamed from makepath.m4.
13851         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13852         Rename files from makepath.c to mkdir-p.c, and from
13853         makepath.h to mkdir-p.h.
13854         * m4/filenamecat.m4: Renamed from path-concat.m4.
13855         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13856         Rename files from path-concat.c to filenamecat.c,
13857         and from path-concat.h to filenamecat.h.
13858         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13859         "file name" in local variables or comments.
13860         * m4/rename.m4: Likewise.
13861
13862 2005-06-01  Bruno Haible  <bruno@clisp.org>
13863
13864         * modules/csharpexec: New file.
13865         * MODULES.html.sh (C#): New section.
13866
13867 2005-06-01  Bruno Haible  <bruno@clisp.org>
13868
13869         * m4/csharp.m4: New file, from GNU gettext.
13870         * m4/csharpexec.m4: New file, from GNU gettext.
13871
13872 2005-06-01  Bruno Haible  <bruno@clisp.org>
13873
13874         * lib/csharpexec.h: New file, from GNU gettext.
13875         * lib/csharpexec.c: New file, from GNU gettext.
13876         * lib/csharpexec.sh.in: New file, from GNU gettext.
13877
13878 2005-05-31  Derek Price  <derek@ximbiot.com>
13879             Paul Eggert  <eggert@cs.ucla.edu>
13880
13881         Sync from cvs.
13882         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13883
13884 2005-05-31  Derek Price  <derek@ximbiot.com>
13885             Paul Eggert  <eggert@cs.ucla.edu>
13886
13887         Sync from cvs.
13888         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13889
13890 2005-05-29  Derek Price  <derek@ximbiot.com>
13891
13892         * config/srclist.txt (glob_.h, glob.c): Add these files.
13893
13894 2005-05-29  Derek Price  <derek@ximbiot.com>
13895
13896         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13897         * modules/glob: New file.
13898         * modules/getlogin_r: Add link to POSIX spec in description.
13899
13900 2005-05-29  Derek Price  <derek@ximbiot.com>
13901             Paul Eggert  <eggert@cs.ucla.edu>
13902
13903         * m4/glob.m4: New file.
13904
13905 2005-05-29  Derek Price  <derek@ximbiot.com>
13906             Paul Eggert  <eggert@cs.ucla.edu>
13907
13908         * lib/glob_.h, lib/glob.c: New files.
13909
13910 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13913         * modules/fts-lgpl (Depends-on): Remove gettext.
13914
13915 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13916
13917         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13918         and don't require gt_INTTYPES_PRI.
13919
13920 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13921
13922         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13923
13924         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13925         the configuration hassle isn't worth it.
13926         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13927         (LONGEST_MODIFIER, PRIuMAX): Remove.
13928
13929 2005-05-27  Bruno Haible  <bruno@clisp.org>
13930
13931         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13932
13933 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13934
13935         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13936         _POSIX_PTHREAD_SEMANTICS for Solaris.
13937
13938 2005-05-25  Derek Price  <derek@ximbiot.com>
13939
13940         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13941
13942 2005-05-25  Derek Price  <derek@ximbiot.com>
13943             Paul Eggert  <eggert@cs.ucla.edu>
13944
13945         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13946         * lib/getlogin_r.c, getlogin_r.h: New files.
13947
13948 2005-05-25  Bruno Haible  <bruno@clisp.org>
13949             Derek Price  <derek@ximbiot.com>
13950
13951         * lib/getlogin_r.h: Simplify API documentation.
13952
13953 2005-05-23  Derek Price  <derek@ximbiot.com>
13954
13955         * modules/minmax (Files): Add m4/minmax.m4.
13956         (configure.ac): Add gl_MINMAX.
13957
13958 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13959
13960         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13961         so that unistd-safer.h (GPL'ed code) need not be included.
13962
13963 2005-05-22  Bruno Haible  <bruno@clisp.org>
13964
13965         * m4/minmax.m4: New file.
13966         Based on a patch by Derek Price <derek@ximbiot.com>.
13967
13968 2005-05-22  Bruno Haible  <bruno@clisp.org>
13969
13970         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13971         (INT64_MIN): Fix definition.
13972         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13973
13974         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13975         NEED_SIGNED_INT_TYPES.
13976
13977         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13978         HAVE_SYSTEM_INTTYPES.
13979
13980 2005-05-22  Bruno Haible  <bruno@clisp.org>
13981
13982         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13983         Also include <sys/param.h> if it defines MIN, MAX.
13984         Based on a patch by Derek Price <derek@ximbiot.com>.
13985
13986 2005-05-21  Jim Meyering  <jim@meyering.net>
13987
13988         * modules/fts (Files): Add m4/inttypes-pri.m4.
13989         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13990
13991 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13992
13993         New fts module.
13994         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13995         (setup_dir, free_dir): New functions.
13996         (enter_dir, leave_dir): Define trivial
13997         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13998         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13999         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14000         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14001         Move to fts-cycle.c.
14002         (fts_open): Use setup_dir.
14003         (fts_close): Use free_dir.
14004         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14005         This adds a label and some gotos, but the alternatives were messier.
14006         Check for memory allocation failure when entering a dir.
14007         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14008         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14009         (FTS): New member fts_cycle, that is a union that contains the
14010         old active_dir_ht and cycle_state.  All uses changed to mention
14011         fts_cycle.ht and fts_cycle.state.
14012         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14013         fts.c, with the following changes:
14014         (setup_dir, free_dir): New functions.
14015         (enter_dir): Now returns bool.  Return true if successful, false
14016         if memory exhausted.  All callers changed.
14017         Do not bother partly cleaning up on
14018         memory allocation failure; that is free_dir's job.
14019         However, free ad if hash_insert fails, to avoid memory leak.
14020         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14021         fts->fts_options to see which union member to use.
14022
14023 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14024
14025         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14026         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14027
14028 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14029
14030         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14031
14032 2005-05-20  Jim Meyering  <jim@meyering.net>
14033
14034         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14035         Now a macro, to pacify GCC.
14036
14037 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14038
14039         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14040         of -1.
14041
14042 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14043
14044         * lib/chown.c (rpl_chown): Return -1 on failure.
14045
14046 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14047
14048         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14049         Don't check for stddef.h.
14050         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14051         don't use its results.
14052         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14053         since we include them unconditionally.  Don't require
14054         AM_STDBOOL_H, since stdbool is a prerequisite.
14055         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14056         since we assume C89 or better.
14057         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14058         as we don't use their results.
14059         Don't check for fchdir, memmove, memset, strrchr, as we use
14060         them unconditionally.
14061         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14062         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14063
14064 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14065
14066         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14067         Include <stddef.h> unconditionally, since we assume C89 now.
14068         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14069         * lib/fts.c: Include fts_.h first, to check interface.
14070         Do not include intprops.h; no longer needed.
14071         Include cycle-check.h and hash.h, since fts_.h no longer does.
14072         Remove unnecessary casts of closedir to void.
14073         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14074         decide whether to decrement nlinks.
14075         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14076         (FTS): Use struct hash_table * instead of Hash_table, so that
14077         we no longer need to include hash.h here.
14078
14079 2005-05-18  Jim Meyering  <jim@meyering.net>
14080
14081         * modules/dirfd (License): Change to LGPL.  Most of the code
14082         is already in the public domain.
14083
14084 2005-05-18  Jim Meyering  <jim@meyering.net>
14085
14086         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14087         Reported by Yoann Vandoorselaere.
14088
14089 2005-05-17  Jim Meyering  <jim@meyering.net>
14090
14091         * m4/fts.m4: New file, from coreutils.
14092
14093 2005-05-17  Jim Meyering  <jim@meyering.net>
14094
14095         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14096
14097 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14098
14099         Sync from coreutils.
14100         * m4/unlinkdir.m4: New file.
14101
14102 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14103
14104         Sync from coreutils.
14105         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14106         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14107         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14108         White space changes only.
14109         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14110         special.
14111         * lib/yesno.c: Include getline.h, not ctype.h.
14112         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14113         Use getline to remove arbitrary restriction on response length.
14114
14115 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14116
14117         * config/srclist-update: Spell out "Street" in FSF postal
14118         mail address; this is the style the FSF seems to prefer.
14119
14120         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14121         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14122         this updates FSF postal mail address.
14123
14124         Sync from coreutils.
14125         * modules/unlinkdir: New file.
14126         * modules/yesno (Depends-on): Add getline.
14127         * MODULES.html.sh (File system functions): Add unlinkdir.
14128
14129 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14130
14131         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14132         lib/strsep.h:
14133         Change the initial comment to refer to GPL, not LGPL.
14134         gnulib-tool will change it to LGPL as needed.
14135
14136         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14137         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14138         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14139         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14140         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14141         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14142         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14143         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14144         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14145         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14146         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14147         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14148         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14149         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14150         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14151         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14152         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14153         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14154         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14155         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14156         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14157         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14158         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14159         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14160         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14161         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14162         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14163         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14164         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14165         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14166         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14167         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14168         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14169         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14170         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14171         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14172         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14173         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14174         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14175         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14176         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14177         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14178         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14179         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14180         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14181         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14182         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14183         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14184         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14185         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14186         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14187         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14188         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14189         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14190         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14191         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14192         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14193         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14194         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14195         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14196         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14197         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14198         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14199         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14200         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14201         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14202         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14203         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14204         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14205         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14206         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14207         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14208         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14209         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14210         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14211         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14212         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14213         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14214         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14215         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14216         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14217         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14218         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14219         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14220         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14221         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14222         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14223         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14224         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14225         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14226         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14227         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14228         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14229         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14230         lib/yesno.c, lib/yesno.h:
14231         Update FSF postal mail address.
14232
14233 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14234
14235         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14236         tests/test-memmem.c, tests/test-stpncpy.c:
14237         Update FSF postal mail address.
14238
14239 2005-05-13  Bruno Haible  <bruno@clisp.org>
14240
14241         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14242         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14243         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14244         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14245         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14246         Add support for 64-bit integers in the MSVC compiler.
14247
14248 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14249
14250         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14251
14252 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14253
14254         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14255
14256 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14257
14258         * doc/getdate.texi (General date syntax): Don't say that date
14259         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14260         Problem reported by Nic Ferrier.
14261
14262 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14263
14264         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14265         specified in ai_socktype. Fix invalid ai_protocol
14266         check. ai_protocol is usually set to 0 or depending on
14267         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14268         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14269         ai_socktype / ai_protocol in the returned addrinfo structure.
14270
14271 2005-05-10  Simon Josefsson  <jas@extundo.com>
14272
14273         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14274         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14275
14276 2005-05-10  Karl Berry  <karl@gnu.org>
14277
14278         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14279         (from http://www.gnu.org/licenses).
14280         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14281         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14282         fdl.texi suffices.
14283
14284 2005-05-10  Karl Berry  <karl@gnu.org>
14285
14286         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14287         (COPYING.DOC): remove.
14288
14289         * config/srclist-update: new FSF address.
14290
14291 2005-05-10  Derek Price  <derek@ximbiot.com>
14292
14293         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14294         possible.
14295
14296 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14297             Bruno Haible  <bruno@clisp.org>
14298
14299         * modules/inet_ntop: New file.
14300         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14301         inet_ntop.
14302
14303 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14304             Bruno Haible  <bruno@clisp.org>
14305
14306         * m4/inet_ntop.m4: New file.
14307
14308 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14309             Bruno Haible  <bruno@clisp.org>
14310
14311         * lib/inet_ntop.h: New file.
14312         * lib/inet_ntop.c: New file, from glibc with modifications.
14313
14314 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14315
14316         * modules/time_r (License): Change to LGPL.
14317         * modules/extensions (License): Change to LGPL.  Actually,
14318         the license is more permissive than that, but currently gnulib-tool
14319         doesn't know how to handle more-permissive licenses.
14320
14321         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14322         Problem reported by Dave Love.
14323
14324 2005-05-08  Jim Meyering  <jim@meyering.net>
14325
14326         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14327         blank.
14328
14329 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14330
14331         * modules/argmatch (Depends-on): Add stdbool.
14332         * modules/backupfile (Depends-on): Likewise.
14333         * modules/chdir-long (Depends-on): Likewise.
14334         * modules/closeout (Depends-on): Likewise.
14335         * modules/cycle-check (Depends-on): Likewise.
14336         * modules/dirname (Depends-on): Likewise.
14337         * modules/fnmatch (Depends-on): Likewise.
14338         * modules/fsusage (Depends-on): Likewise.
14339         * modules/fwriteerror (Depends-on): Likewise.
14340         * modules/getcwd (Depends-on): Likewise.
14341         * modules/getloadavg (Depends-on): Likewise.
14342         * modules/hard-locale (Depends-on): Likewise.
14343         * modules/makepath (Depends-on): Likewise.
14344         * modules/mountlist (Depends-on): Likewise.
14345         * modules/nanosleep (Depends-on): Likewise.
14346         * modules/posixtm (Depends-on): Likewise.
14347         * modules/quotearg (Depends-on): Likewise.
14348         * modules/readtokens (Depends-on): Likewise.
14349         * modules/readtokens0 (Depends-on): Likewise.
14350         * modules/readutmp (Depends-on): Likewise.
14351         * modules/save-cwd (Depends-on): Likewise.
14352         * modules/strftime (Depends-on): Likewise.
14353         * modules/userspec (Depends-on): Likewise.
14354         * modules/utimecmp (Depends-on): Likewise.
14355         * modules/xgetcwd (Depends-on): Likewise.
14356         * modules/xnanosleep (Depends-on): Likewise.
14357         * modules/xstrtod (Depends-on): Likewise.
14358         * modules/yesno (Depends-on): Likewise.
14359
14360 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14361
14362         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14363         needless checks.
14364
14365 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14366
14367         Merge from coreutils.  Among other things,
14368         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14369         * lib/fd-safer.c: New file.
14370         * lib/fcntl-safer.h, open-safer.c: Remove.
14371         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14372         * lib/dup-safer.c: Include unistd-safer.h first.
14373         Don't include errno.h.
14374         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14375         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14376         * lib/file-type.c: Rely on file-type.h change.
14377         * lib/getloadavg.c: Include unistd-safer.h.
14378         (getloadavg): Use safer open.
14379         * lib/getusershell.c: Include "stdio-safer.h".
14380         (getusershell): Use safer fopen.
14381         * lib/long-options.c (long_options): Use NULL rather than 0.
14382         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14383         'free'.
14384         * lib/modechange.c: Likewise.
14385         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14386         (MODE_DONE): New constant.
14387         (struct mode_change): Remove 'next' member.
14388         (make_node_op_equals): New function; like the old one of the
14389         same name, except it allocates an array.
14390         (mode_compile, mode_create_from_ref): Use it.
14391         (mode_compile): Allocate result as an array, not a linked list.
14392         Parse octal string ourself, so that we catch mistakes like "+0".
14393         (mode_adjust): Arg is an array, not a linked list.
14394         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14395         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14396         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14397         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14398         Remove.  This is now stat-macros.h's job.
14399         (talloc): Remove.  All callers replaced by xalloc, so that
14400         our invokers don't have to worry about reporting memory failures.
14401         (make_node_op_equals): Remove.
14402         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14403         New constants.
14404         (struct mode_change): Moved here from modechange.h.
14405         (mode_append_entry): Remove.
14406         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14407         apps to have incorrect behavior.  Use simpler algorithm for head
14408         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14409         Detect more invalid usages rather than having somewhat-random behavior.
14410         Don't insert an "a=" action, as that leads to incorrect behavior.
14411         (mode_compile, mode_create_from_ref): Return NULL on error instead
14412         of an enum, since now there's only one way to have an error.  All
14413         callers changed.
14414         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14415         at the correct time.  Simplify calculation of "+u" and its ilk.
14416         Don't mishandle "+X".
14417         (mode_free): Remove "register" and localize decls.
14418         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14419         (struct mode_change): Move to modechange.c; callers don't
14420         need to see this stuff.
14421         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14422         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14423         (mode_change, mode_adjust): Reflect the new signatures noted above.
14424         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14425         that might redefine system include files.
14426         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14427         (my_usleep): Use NULL rather than (void *) 0.
14428         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14429         Use siginterrupt to specify that system calls should be interrupted.
14430         (rpl_nanosleep): Move initialization of suspended closer to call of
14431         my_usleep.
14432         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14433         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14434         (desirable_utmp_entry): New function.
14435         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14436         using x2nrealloc, to simplify logic.
14437         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14438         size calculation.  Do not assume utmp file is a regular file.
14439         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14440         (READ_UTMP_CHECK_PIDS): New constant.
14441         * lib/save-cwd.c: Include unistd-safer.h.
14442         (save_cwd): Use fd_safer.
14443         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14444         [!_LIBC] Include "stat-macros.h" instead.
14445         * lib/unistd-safer.h (fd_safer): New decl.
14446
14447 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14448
14449         * modules/getloadavg (Depends-on): Add unistd-safer.
14450         * modules/getusershell (Depends-on): Add stdio-safer.
14451         * modules/lstat (Depends-on): Remove xalloc.
14452         * modules/mkstemp (Depends-on): Add stat-macros.
14453         * modules/modechange (Depends-on): Remove xstrtol.
14454         Add stat-macros, xalloc.
14455         * modules/save-cwd (Depends-on): Add unistd-safer.
14456         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14457         * modules/unistd-safer (Files): Add lib/fd-safer.c
14458         (Makefile.am): Remove lib_SOURCES.
14459
14460         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14461         Remove fcntl-safer; unistd-safer supersedes it.
14462
14463 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14464
14465         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14466         AC_HEADER_STAT.
14467         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14468         (gl_PREREQ_CHOWN): Remove.
14469         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14470         it.  Don't require AC_HEADER_STAT.
14471         (gl_PREREQ_LSTAT): Remove.
14472         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14473         Don't require AC_HEADER_STAT.
14474         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14475         (gl_PREREQ_RMDIR): Remove.
14476         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14477         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14478         the stat-macros module a prerequisite.
14479         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14480         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14481         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14482         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14483         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14484         variable names.
14485         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14486         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14487         variable prefixes.
14488         * m4/fcntl-safer.m4: Remove.
14489         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14490         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14491         Invoke gl_PREREQ_FD_SAFER.
14492         (gl_PREREQ_FD_SAFER): New macro.
14493         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14494         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14495         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14496         Remove duplicate call to AC_LIBOBJ(readutmp).
14497         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14498
14499         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14500         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14501
14502 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14503
14504         * MODULES.html.sh (Misc): Add byteswap.
14505
14506 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14507
14508         * modules/getcwd (Depends-on): Add extensions.
14509         * modules/openat (Depends-on): Likewise.
14510
14511 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14512
14513         * modules/byteswap: New file.
14514
14515 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14516
14517         * m4/byteswap.m4: New file.
14518
14519 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14520
14521         * lib/byteswap_.h: New file.
14522
14523 2005-04-25  Karl Berry  <karl@gnu.org>
14524
14525         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14526
14527 2005-04-25  Albert Chin  <china@thewrittenword.com>
14528
14529         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14530         Toolkit C bug.
14531
14532 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14533
14534         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14535         (func_ln_if_changed) Remove forcibly for no error message
14536         in case file does not exist.
14537
14538 2005-04-19  Simon Josefsson  <jas@extundo.com>
14539
14540         * gnulib-tool (Options): Make --symlink mean --symbolic.
14541
14542 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14543
14544         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14545
14546 2005-04-16  Simon Josefsson  <jas@extundo.com>
14547
14548         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14549
14550 2005-04-15  Simon Josefsson  <jas@extundo.com>
14551
14552         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14553
14554 2005-04-15  Simon Josefsson  <jas@extundo.com>
14555
14556         * gnulib-tool: Rename --symlink to --symbolic.
14557
14558 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14559
14560         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14561         symbolic links to files instead of copying/moving.  Add --aux-dir,
14562         specifying directory relative --dir where auxiliary build tools
14563         are placed.
14564
14565 2005-04-14  Bruno Haible  <bruno@clisp.org>
14566
14567         * modules/allocsa (License): Change to LGPL.
14568         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14569
14570 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14571
14572         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14573         that "UTC +1 second" continues to work.  Problem reported
14574         by Dmitry V. Levin.
14575         (relunit_snumber): New rule.
14576         (relunit): Use it.
14577
14578 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14579
14580         * lib/getdate.y (universal_time_zone_table): New constant.
14581         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14582         universal_time_zone_table.
14583         (lookup_zone): Prefer universal_time_zone_table to
14584         local_time_zone_table, so that "GMT" time stamps are allowed in
14585         London during the summer.  Problem reported by Ian Abbott.
14586
14587 2005-04-12  Jim Meyering  <jim@meyering.net>
14588
14589         * lib/human.c (humblock): Set *options even when returning due to
14590         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14591         warning from gcc-4.
14592
14593 2005-04-09  Jim Meyering  <jim@meyering.net>
14594
14595         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14596         -Wuninitialized: initialize tm0.tm_year.
14597
14598 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14599
14600         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14601         count, since there's no maximum.  All uses changed.
14602         Add member dsts_seen.
14603         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14604         not being INT_MAX.
14605         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14606         Use pc_rels_seen to decide whther a date is absolute.
14607
14608         * lib/getdate.y (number): Don't overwrite year.
14609         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14610         check.
14611
14612 2005-04-02  Simon Josefsson  <jas@extundo.com>
14613
14614         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14615         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14616
14617 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14618
14619         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14620         where no absolute path name can be longer than PATH_MAX.
14621
14622 2005-03-27  Jim Meyering  <jim@meyering.net>
14623
14624         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14625
14626 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14627
14628         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14629         "one's complement" -> "ones' complement" in comment, as per Knuth.
14630         "value of type" -> "type or expression" in comment.
14631         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14632
14633 2005-03-26  Jim Meyering  <jim@meyering.net>
14634
14635         Comment nits.
14636         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14637         Correct typos: s/or/of/.
14638
14639 2005-03-26  Jim Meyering  <jim@meyering.net>
14640
14641         * modules/check-include-files: Move to ../ and rename to...
14642         * check-module: ...this.
14643
14644 2005-03-25  Jim Meyering  <jim@meyering.net>
14645
14646         * modules/xvasprintf (Files): Add xalloc.h.
14647
14648 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14649
14650         * modules/gettext (Files): config/config.rpath ->
14651         build-aux/config.rpath
14652         * modules/iconv (Files): Likewise.
14653         Problem reported by Oskar Liljeblad.
14654
14655 2005-03-23  Jim Meyering  <jim@meyering.net>
14656
14657         * modules/check-include-files: New script to check for
14658         missing dependencies, multiple includes, etc.
14659
14660         * modules/c-strtold (Depends-on): Add xalloc.
14661         * modules/c-strtod (Depends-on): Add xalloc.
14662         * modules/hash (Depends-on): Add xalloc.
14663         (Files): Remove lib/xalloc.h.
14664
14665         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14666         * modules/userspec (Files): Add lib/inttostr.h.
14667
14668 2005-03-23  Jim Meyering  <jim@meyering.net>
14669
14670         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14671
14672 2005-03-22  Jim Meyering  <jim@meyering.net>
14673
14674         * modules/stat-macros: New module.
14675         * modules/canonicalize, modules/euidaccess, modules/file-type,
14676         * modules/filemode, modules/lchown, modules/makepath,
14677         * modules/rmdir, modules/stat: Depend on new stat-macros module
14678         rather than listing lib/stat-macros.h manually.
14679         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14680
14681 2005-03-22  Jim Meyering  <jim@meyering.net>
14682
14683         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14684
14685 2005-03-22  Bruno Haible  <bruno@clisp.org>
14686
14687         * config/srclist.txt: Replace target directory 'config' with
14688         'build-aux'.
14689         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14690         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14691         ../build-aux/.
14692
14693 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14694
14695         * modules/chdir-long (Depends-on): Add mempcpy.
14696
14697         * modules/acl, modules/backupfile, modules/c-strtod,
14698         modules/c-strtold, modules/canon-host, modules/canonicalize,
14699         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14700         modules/exclude, modules/exitfail, modules/file-type,
14701         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14702         modules/getdate, modules/getline, modules/getpagesize,
14703         modules/getpass, modules/getugroups, modules/group-member,
14704         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14705         modules/inttostr, modules/long-options, modules/makepath,
14706         modules/md5, modules/memcasecmp, modules/memcoll,
14707         modules/modechange, modules/mountlist, modules/path-concat,
14708         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14709         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14710         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14711         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14712         modules/strftime, modules/strndup, modules/strverscmp,
14713         modules/timespec, modules/unlocked-io, modules/userspec,
14714         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14715         modules/yesno:
14716         Remove lib_SOURCES line from Makefile.am section, as this is now
14717         done automatically by the corresponding Autoconf macro.
14718
14719 2005-03-21  Jim Meyering  <jim@meyering.net>
14720
14721         Changes imported from coreutils.
14722
14723         * lib/cycle-check.c: Don't include xalloc.h.
14724
14725         * lib/path-concat.c: Don't include assert.h.
14726         (path_concat): Remove assertion that would have triggered
14727         for ABASE starting with more than one slash.
14728         Reported by Andreas Schwab.
14729
14730         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14731         properly when ABASE is an absolute file name.
14732         Correct the description of this function.
14733         Include <assert.h>.
14734         Add an assertion and a test driver.
14735         This fixes a bug introduced on 2004-07-02.
14736         Andreas Schwab reported the resulting failure of cp --parents:
14737         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14738
14739 2005-03-21  Jim Meyering  <jim@meyering.net>
14740
14741         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14742         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14743
14744 2005-03-21  Jim Meyering  <jim@meyering.net>
14745         and  Paul Eggert  <eggert@cs.ucla.edu>
14746
14747         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14748         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14749         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14750         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14751         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14752         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14753         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14754         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14755         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14756         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14757         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14758         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14759         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14760         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14761         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14762         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14763         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14764         for these modules.
14765
14766 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14767
14768         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14769         (which shouldn't happen), generate nothing instead of returning 0
14770         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14771
14772 2005-03-16  Bruno Haible  <bruno@clisp.org>
14773
14774         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14775         HAVE_LONGLONG_64BIT.
14776
14777 2005-03-16  Bruno Haible  <bruno@clisp.org>
14778
14779         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14780         HAVE_LONGLONG_64BIT.
14781
14782 2005-03-16  Bruno Haible  <bruno@clisp.org>
14783
14784         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14785         HAVE_LONGLONG_64BIT.
14786
14787 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14788
14789         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14790         reliably distinguish strftime failure from empty output on POSIX
14791         hosts.
14792
14793 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14794
14795         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14796         (iconv_string): Don't guess a size-zero buffer, as that might cause
14797         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14798         result would be 'too large', where 'too large' is (heuristically)
14799         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14800         overflow concerns.  This will prevent some unwanted malloc failures
14801         when the inputs are very large.
14802
14803 2005-03-15  Karl Berry  <karl@gnu.org>
14804
14805         * config/srclist.txt (config.rpath): from gettext.
14806         * config/config.rpath: update.
14807
14808 2005-03-15  Bruno Haible  <bruno@clisp.org>
14809
14810         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14811         to 'negate'.
14812
14813         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14814         variable.
14815
14816         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14817         results.
14818
14819 2005-03-14  Simon Josefsson  <jas@extundo.com>
14820
14821         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14822         <fx@gnu.org>.
14823
14824 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14827         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14828         intprops.h.
14829         * lib/strtol.c: Likewise.
14830
14831 2005-03-14  Jim Meyering  <jim@meyering.net>
14832
14833         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14834         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14835         to be nonzero so that we (and caller) can detect the difference
14836         between a valid zero-length expansion and an error return, even
14837         when the underlying strftime fails before writing anything into
14838         that location.
14839
14840 2005-03-14  Bruno Haible  <bruno@clisp.org>
14841
14842         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14843         Update from GNU gettext 0.14.3.
14844
14845 2005-03-10  Jim Meyering  <jim@meyering.net>
14846
14847         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14848
14849 2005-03-10  Jim Meyering  <jim@meyering.net>
14850
14851         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14852         so that this module works on systems without fchdir.
14853
14854 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14855
14856         Factor int-properties macros into a single file, except for
14857         glibc-related files.
14858         * lib/intprops.h: New file.
14859         * lib/getloadavg.c: Include it instead of limits.h.
14860         (INT_STRLEN_BOUND): Remove.
14861         * lib/human.c: Include intprops.h.
14862         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14863         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14864         302/1000.
14865         * lib/inttostr.h: Include intprops.h instead of limits.h.
14866         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14867         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14868         for consistency with intprops.h.
14869         (time_t_is_integer, twos_complement_arithmetic): Use them.
14870         * lib/sig2str.h: Include <signal.h>, intprops.h.
14871         (INT_STRLEN_BOUND): Remove.
14872         * lib/strftime.c (TYPE_SIGNED): Remove.
14873         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14874         * lib/strtol.c: Adjust comments to match intprops.h.
14875         * lib/userspec.c: Include intprops.h.
14876         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14877         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14878         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14879         instead of rolling our own expressions.
14880         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14881
14882         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14883         instead of int.
14884         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14885         the right thing even if adding 1900 would overflow.  Similarly
14886         for tm_mon + 1 and tm_yday + 1.
14887         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14888         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14889         (DO_SIGNED_NUMBER): New macro.
14890         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14891
14892 2005-03-07  Bruno Haible  <bruno@clisp.org>
14893
14894         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14895
14896 2005-03-07  Bruno Haible  <bruno@clisp.org>
14897
14898         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14899
14900 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14901
14902         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14903         (func_import): Only replace files via --import when they have actually
14904         changed.
14905
14906 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14907
14908         * m4/mmap-anon.m4: New file.
14909         * m4/pagealign_alloc.m4: New file.
14910
14911 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14912             Bruno Haible  <bruno@clisp.org>
14913
14914         * modules/pagealign_alloc: New file.
14915         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14916
14917 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14918             Bruno Haible  <bruno@clisp.org>
14919
14920         * lib/pagealign_alloc.h: New file.
14921         * lib/pagealign_alloc.c: New file.
14922
14923 2005-03-03  Bruno Haible  <bruno@clisp.org>
14924
14925         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14926         Use an all-permissive copyright notice, recommended by RMS.
14927
14928 2005-03-02  Bruno Haible  <bruno@clisp.org>
14929
14930         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14931         of AIX, the replacement has to be done only after <string.h> is
14932         included, therefore not in config.h. stpncpy.h does the replacement,
14933         and stpncpy.c uses it.
14934
14935 2005-03-02  Bruno Haible  <bruno@clisp.org>
14936
14937         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14938         stpncpy.c uses it.
14939
14940 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14941
14942         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14943         The workaround isn't strictly needed for POSIX conformance, and
14944         it's too much of a pain to configure and maintain.  We'll ask
14945         people to fix their kernels instead.
14946         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14947         (NANOSLEEP_BUG_WORKAROUND): Remove.
14948         (xnanosleep): Remove the workaround.
14949
14950 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14951
14952         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14953         Reported by Derek Price.
14954         (Include): Add "timespec.h".
14955
14956         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14957
14958 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14959
14960         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14961         to detect nanosleep bug.
14962
14963 2005-03-01  Bruno Haible  <bruno@clisp.org>
14964
14965         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14966
14967 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14968
14969         * modules/gethrxtime: New file.
14970         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14971         (Depends-on): Add gethrxtime.
14972         (configure.ac): Add gl_XNANOSLEEP.
14973         (Makefile.am): Remove lib_SOURCES line.
14974
14975 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14976
14977         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14978         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14979
14980 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14981
14982         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14983         * lib/timespec.h (gettime): Return void, since it always
14984         succeeds now.  All uses changed.
14985         * lib/gettime.c (gettime) Likewise.
14986         [HAVE_NANOTIME]: Prefer nanotime.
14987         Assume gettimeofday succeeds, as POSIX requires.
14988         Assime time () succeeds, since other code already does.
14989         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14990         (timespec_subtract): Remove.
14991         (NANOSLEEP_BUG_WORKAROUND): New constant.
14992         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14993         things considerably.  Use it only on GNU/Linux hosts, since the
14994         workaround shouldn't be needed elsewhere.
14995
14996 2005-02-24  Bruno Haible  <bruno@clisp.org>
14997
14998         * modules/gettext (Files): Add m4/glibc2.m4.
14999
15000 2005-02-24  Bruno Haible  <bruno@clisp.org>
15001
15002         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15003         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15004         * m4/progtest.m4:
15005         Update from GNU gettext 0.14.2.
15006         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15007
15008 2005-02-24  Bruno Haible  <bruno@clisp.org>
15009
15010         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15011         * lib/config.charset: Update from GNU gettext 0.14.2.
15012
15013 2005-02-24  Bruno Haible  <bruno@clisp.org>
15014
15015         * lib/gettext.h: Update from GNU gettext 0.14.2.
15016
15017 2005-02-23  Simon Josefsson  <jas@extundo.com>
15018
15019         * m4/iconvme.m4: New file.
15020
15021 2005-02-23  Jim Meyering  <jim@meyering.net>
15022
15023         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15024         change.
15025         Thanks to Bruno Haible for catching it.
15026
15027 2005-02-22  Simon Josefsson  <jas@extundo.com>
15028
15029         * modules/iconvme: New file.
15030
15031         * MODULES.html.sh: Add iconvme.
15032
15033 2005-02-22  Simon Josefsson  <jas@extundo.com>
15034
15035         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15036
15037 2005-02-22  Simon Josefsson  <jas@extundo.com>
15038
15039         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15040
15041 2005-02-22  Jim Meyering  <jim@meyering.net>
15042
15043         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15044         s/ifndef/ifdef/.
15045
15046 2005-02-20  Neil Conway  <neilc@samurai.com>
15047
15048         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15049         returned by OSX/Darwin if the specified buffer is not large
15050         enough for the hostname.
15051
15052 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15053
15054         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15055         pass it to _help, otherwise the latter coredumps trying to
15056         dereference state.root_argp.
15057
15058 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15059
15060         * modules/chdir-long (Depends-on): Add memrchr.
15061         * modules/memrchr (Files): Add lib/memrchr.h.
15062         (Include): "memrchr.h".
15063
15064 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15065
15066         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15067
15068 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15069
15070         * lib/memrchr.h: New file.
15071         * lib/chdir-long.c: Include it.
15072         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15073         Don't bother including stddef.h.
15074
15075 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15076
15077         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15078         inclusion.
15079         Include <sys/types.h>, for dev_t.
15080         (ME_DUMMY, ME_REMOTE): Move from here....
15081         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15082         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15083         Dmitry V. Levin.
15084         Include mountlist.h first, to test the interface.
15085
15086 2005-01-29  Bruno Haible  <bruno@clisp.org>
15087
15088         * lib/progname.c (program_name): Initialize.
15089         Needed when linking statically on MacOS X.
15090
15091 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15092
15093         Sync from coreutils.
15094         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15095         (Depends-on): Add c-strtod.
15096         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15097
15098 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15099
15100         Sync from coreutils.
15101         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15102
15103         Remove files that are specific to coreutils.
15104         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15105
15106 2005-01-28  Bruno Haible  <bruno@clisp.org>
15107
15108         * modules/javacomp: New file.
15109         * MODULES.html.sh (Java): Add javacomp.
15110
15111 2005-01-28  Bruno Haible  <bruno@clisp.org>
15112
15113         * m4/javacomp.m4: New file, from GNU gettext.
15114
15115 2005-01-28  Bruno Haible  <bruno@clisp.org>
15116
15117         * lib/javacomp.sh.in: New file, from GNU gettext.
15118         * lib/javacomp.h: New file, from GNU gettext.
15119         * lib/javacomp.c: New file, from GNU gettext.
15120
15121 2005-01-26  Simon Josefsson  <jas@extundo.com>
15122
15123         * lib/gai_strerror.c: Use GPL in header.
15124
15125 2005-01-26  Bruno Haible  <bruno@clisp.org>
15126
15127         * modules/javaexec: New file.
15128         * MODULES.html.sh (Java): Add javaexec.
15129
15130 2005-01-26  Bruno Haible  <bruno@clisp.org>
15131
15132         * m4/javaexec.m4: New file, from GNU gettext.
15133
15134 2005-01-26  Bruno Haible  <bruno@clisp.org>
15135
15136         * lib/javaexec.sh.in: New file, from GNU gettext.
15137         * lib/javaexec.h: New file, from GNU gettext.
15138         * lib/javaexec.c: New file, from GNU gettext.
15139
15140 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15141
15142         * modules/lchown (Depends-on): Remove lchown.h
15143
15144 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15145
15146         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15147         must be defined if the header file was not found, in order
15148         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15149
15150 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15151
15152         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15153         initializers for struct pentry_state.
15154         (__argp_error): Check return value of __asprintf
15155         (__argp_failure): Translate error message
15156
15157         * lib/argp-parse.c: Removed braces around the expansion of N_()
15158
15159 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15160
15161         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15162         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15163         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15164         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15165         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15166         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15167         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15168         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15169         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15170         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15171         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15172         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15173         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15174         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15175         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15176         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15177         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15178         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15179         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15180         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15181         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15182         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15183         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15184         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15185         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15186         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15187         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15188         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15189         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15190         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15191         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15192         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15193         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15194         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15195         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15196         Use an all-permissive copyright notice, recommended by RMS.
15197
15198 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * modules/chdir-long (Depends-on): Remove mempcpy.
15201
15202 2005-01-21  Jim Meyering  <jim@meyering.net>
15203
15204         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15205         same value as for Solaris 9.
15206
15207         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15208         component length.  This included changing the parameter to be
15209         of type `char *' rather than `char const *'.
15210         * lib/chdir-long.h (chdir_long): Update prototype.
15211
15212         * lib/openat.c (fdopendir, fstatat): New functions.
15213         * lib/openat.h: Include headers required for use of DIR and struct
15214         stat.
15215         [AT_SYMLINK_NOFOLLOW]: Define.
15216         (fdopendir, fstatat): Add prototypes.
15217
15218 2005-01-21  Bruno Haible  <bruno@clisp.org>
15219
15220         * modules/classpath: New file.
15221         * MODULES.html.sh (Java): Add classpath.
15222
15223 2005-01-21  Bruno Haible  <bruno@clisp.org>
15224
15225         * lib/classpath.h: New file, from GNU gettext.
15226         * lib/classpath.c: New file, from GNU gettext.
15227
15228 2005-01-20  Simon Josefsson  <jas@extundo.com>
15229
15230         * modules/version-etc-fsf: New file.
15231
15232 2005-01-20  Simon Josefsson  <jas@extundo.com>
15233
15234         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15235         * lib/version-etc.c: Remove version_etc_copyright.
15236         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15237         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15238
15239 2005-01-20  Simon Josefsson  <jas@extundo.com>
15240
15241         * lib/base64.h (isbase64): Add.
15242
15243         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15244         using a unsigned prototype, don't inline.
15245         (base64_decode): Use it.
15246
15247 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15248
15249         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15250         it.
15251
15252 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15253
15254         * lib/save-cwd.c (save_cwd): Remove code to support the case
15255         where fchdir is missing or flaky.
15256
15257 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15258
15259         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15260
15261 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15262
15263         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15264         AC_LIBSOURCES now does this.
15265         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15266         with new ullong_max module.
15267
15268 2005-01-19  Bruno Haible  <bruno@clisp.org>
15269
15270         * modules/sh-quote: New file.
15271         * MODULES.html.sh (Executing programs): Add sh-quote.
15272
15273 2005-01-19  Bruno Haible  <bruno@clisp.org>
15274
15275         * lib/sh-quote.h: New file, from GNU gettext.
15276         * lib/sh-quote.c: New file, from GNU gettext.
15277
15278 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15279
15280         Merge from coreutils.
15281         * m4/ullong_max.m4: New file.
15282         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15283         (gl_MACROS): Assume localeconv exists.
15284
15285 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15286
15287         Merge changes from coreutils, as described below in several
15288         changelogs dated today.
15289
15290         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15291         (O_DIRECTORY): Remove; not needed here, since "." must be
15292         a directory.  All uses removed.
15293         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15294         universal on Suns, and we also need to test for IRIX.
15295         Revamp code to use 'if' rather than '#if'.
15296         Avoid unnecessary comparison of cwd->desc to 0.
15297
15298         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15299         for known valid error numbers rather than observed invalid ones.
15300
15301 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15302
15303         * modules/ullong_max: New file.
15304
15305         * modules/chdir-long, modules/openat: New files.
15306         * modules/save-cwd (Depends-on): Depend on chdir-long.
15307         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15308
15309 2005-01-18  Jim Meyering  <jim@meyering.net>
15310
15311         Merge from coreutils.
15312         * m4/chdir-long.m4, m4/openat.m4: New files.
15313         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15314         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15315         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15316         is sane and DOES follow symlinks.  Besides, testing 20 different
15317         systems found no broken chown implementations.
15318         Prompted by a change in rsync's copy of this macro.
15319         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15320
15321         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15322
15323         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15324         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15325         NULL-means-set-to-current-time semantics.
15326         Remove temporary file immediately, rather than waiting
15327         for configure's at-exit trap code to do it.
15328
15329 2005-01-18  Jim Meyering  <jim@meyering.net>
15330
15331         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15332
15333         * lib/utimens.c (futimens): Account for the fact that futimes
15334         can also fail with errno == ENOSYS or errno == ENOENT.
15335         Patch from Dmitry V. Levin.
15336
15337         Change the name of the robust chdir function from chdir to chdir_long.
15338         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15339         (restore_cwd): Use chdir_long, not chdir.
15340         * lib/chdir-long.c: Renamed from chdir.c.
15341         * lib/chdir-long.h: Renamed from chdir.h.
15342         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15343         Hurd.
15344
15345 2005-01-18  Bruno Haible  <bruno@clisp.org>
15346
15347         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15348         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15349         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15350         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15351         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15352         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15353         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15354         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15355         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15356         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15357         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15358         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15359         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15360         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15361         Use an all-permissive copyright notice, recommended by RMS.
15362
15363 2005-01-18  Bob Proulx  <bob@proulx.com>
15364
15365         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15366         simplify offsetof() macro construct to avoid compile failure with
15367         native HP-UX 11.0 ANSI C compiler.
15368
15369 2005-01-17  Bruno Haible  <bruno@clisp.org>
15370
15371         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15372         redundant because stpncpy.m4 takes care of it.
15373
15374 2005-01-17  Bruno Haible  <bruno@clisp.org>
15375
15376         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15377
15378 2005-01-17  Bruno Haible  <bruno@clisp.org>
15379
15380         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15381         used.
15382
15383 2005-01-17  Bruno Haible  <bruno@clisp.org>
15384
15385         * lib/fwriteerror.h (fwriteerror): Change specification to include
15386         fclose.
15387         * lib/fwriteerror.c: Include <stdbool.h>.
15388         (fwriteerror): At the end, close the file stream. Record whether
15389         stdout was already closed.
15390
15391 2005-01-17  Bruno Haible  <bruno@clisp.org>
15392
15393         * lib/execute.c (environ): Declare if needed.
15394         * lib/pipe.c (environ): Likewise.
15395         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15396
15397 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15398
15399         * modules/argp: Depend on vsnprintf
15400
15401 2005-01-10  Jim Meyering  <jim@meyering.net>
15402
15403         * modules/closeout (Depends-on): Add atexit.
15404
15405 2005-01-06  Bruno Haible  <bruno@clisp.org>
15406
15407         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15408
15409 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15410
15411         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15412         definitions to be after all include files, to avoid collisions.
15413         Problem reported by Bob Proulx.
15414
15415 2005-01-04  Jim Meyering  <jim@meyering.net>
15416
15417         Changes imported from coreutils.
15418         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15419         as the mkstemp template, use a temporary directory and an
15420         8.3-friendly template to avoid trouble on systems like DJGPP.
15421         Reported by Juan M. Guerrero via Stepan Kasal.
15422         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15423         close. Remove the temporary directory right away, rather than waiting
15424         for configure's at-exit trap code to do it.
15425         Suggestion from Stepan Kasal.
15426
15427 2005-01-01  Simon Josefsson  <jas@extundo.com>
15428
15429         * gnulib-tool: Print #include directives when --import'ing.
15430
15431 2004-12-28  Simon Josefsson  <jas@extundo.com>
15432
15433         * tests/test-base64.c: Include required header files.  Remove
15434         unused variables.
15435
15436 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15437
15438         * modules/error (Depends-on): Remove gettext.
15439
15440 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15441
15442         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15443         not needed.  This removes a dependency on the gettext module.
15444         [defined _LIBC]: Do not include <libintl.h>; not needed.
15445
15446 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15447
15448         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15449         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15450
15451 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15452
15453         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15454         HAVE_DECL_STRTOLD.
15455
15456 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15457
15458         * modules/getdate (Depends-on): Remove alloca-opt.
15459
15460 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15461
15462         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15463
15464 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15465
15466         * lib/argp-parse.c: Include <stddef.h>.
15467         (alignof, alignto): New macros.
15468         (parser_init): Don't assume that void * is aligned sufficiently
15469         for struct option.
15470
15471         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15472         need to extend the stack.
15473         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15474         large.
15475
15476 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15477
15478         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15479
15480 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15481
15482         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15483         (2004-10-24) change.  Apparently this was a false alarm.
15484
15485         * modules/getdate: Depend on alloca-opt, not alloca.
15486
15487 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15488
15489         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15490         Remove now-obsolete comment about AIX.
15491         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15492         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15493         (YYMAXDEPTH): New macro.
15494
15495 2004-12-18  Simon Josefsson  <jas@extundo.com>
15496
15497         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15498
15499 2004-12-18  Bruno Haible  <bruno@clisp.org>
15500
15501         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15502
15503 2004-12-18  Bruno Haible  <bruno@clisp.org>
15504
15505         * lib/fatal-signal.c (fatal_signals): Make non-const.
15506         (init_fatal_signals): New function.
15507         (uninstall_handlers, install_handlers): Ignore signals that were set to
15508         SIG_IGN.
15509         (at_fatal_signal): Call init_fatal_signals.
15510         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15511         SIG_IGN.
15512         Reported by Paul Eggert.
15513
15514 2004-12-18  Bruno Haible  <bruno@clisp.org>
15515
15516         * doc/alloca.texi: New file.
15517         * doc/alloca-opt.texi: New file.
15518
15519 2004-12-17  Jim Meyering  <jim@meyering.net>
15520
15521         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15522         Otherwise, install-sh could exit with improper exit status when
15523         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15524
15525 2004-12-16  Simon Josefsson  <jas@extundo.com>
15526
15527         * tests/test-base64.c: Add license.
15528
15529 2004-12-15  Stepan Kasal  <address@hidden>
15530
15531         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15532
15533 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15534
15535         * modules/getcwd (Files): Add m4/d-ino.m4.
15536         Suggested by Mark D. Baushke.
15537
15538 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15539
15540         * lib/getdate.y (textint): New member "negative".
15541         (time_zone_hhmm): New function.
15542         Expect 14 shift-reduce conflicts, not 13.
15543         (o_colon_minutes): New rule.
15544         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15545         (yylex): Set the "negative" member of signed numbers.
15546
15547 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15548
15549         * doc/getdate.texi (Time of day items, Time zone items):
15550         Describe new formats +00:00, UTC+00:00.
15551
15552 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15553
15554         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15555         spurious "-l"s.  Problem reported by Stepan Kasal.
15556
15557 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15558
15559         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15560         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15561
15562 2004-12-04  Simon Josefsson  <jas@extundo.com>
15563
15564         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15565         Vandoorselaere <yoann@prelude-ids.org>.
15566
15567 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15568
15569         Changes imported from coreutils.
15570         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15571         exist.
15572         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15573
15574 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15575
15576         Changes imported from coreutils.
15577         * lib/hard-locale.c: Assume <locale.h> exists.
15578         Include "strdup.h".
15579         (GLIBC_VERSION): New macro.
15580         (hard_locale): Assume setlocale exists.
15581         Rewrite to avoid #ifdef.
15582         Use strdup rather than malloc + strcpy.
15583         * lib/human.c: Assume <locale.h> exists.
15584         (human_readable): Assume localeconv exists.
15585
15586 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15587
15588         * modules/hard-locale (Depends-on): Add strdup.
15589
15590 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15591
15592         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15593         convert T2, not T.  (Imported from libc.)
15594
15595 2004-11-30  Simon Josefsson  <jas@extundo.com>
15596
15597         * modules/restrict (License): Change to LGPL.
15598
15599 2004-11-30  Simon Josefsson  <jas@extundo.com>
15600
15601         * m4/restrict.m4: Add copyright and copying conditions.
15602
15603 2004-11-30  Simon Josefsson  <jas@extundo.com>
15604
15605         * m4/base64.m4: New file.
15606
15607 2004-11-30  Simon Josefsson  <jas@extundo.com>
15608
15609         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15610         base64.
15611
15612         * tests/test-base64.c: New file.
15613
15614         * modules/base64: New file.
15615
15616 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15617
15618         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15619         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15620
15621         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15622
15623 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15624
15625         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15626         (__getcwd.c): Don't restore errno; glibc doesn't.
15627         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15628         first, falling back to our code only if its results look suspicious.
15629         Ensure that the resulting buffer is only as large as necessary.
15630
15631         * lib/readutmp.c: Include readutmp.h first.
15632         Include <errno.h>, since readutmp.h no longer does that.
15633         * lib/readutmp.h: Don't include <errno.h>,
15634         <sys/param.h>, <time.h>; not needed to establish interface.
15635         (errno): Remove decl.
15636         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15637         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15638         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15639
15640 2004-11-28  Simon Josefsson  <jas@extundo.com>
15641
15642         * lib/base64.h, base64.c: New file.
15643
15644 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15645
15646         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15647
15648 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15649
15650         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15651         (Depends-on): Remove pathmax, same.  Add mempcpy.
15652         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15653         (Makefile.am): Append getcwd.h to lib_SOURCES.
15654         (Include): Add getcwd.h.
15655         (Maintainer): Change from Jim Meyering to "all, glibc",
15656         since getdate now uses intended-for-glibc code.
15657         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15658         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15659
15660 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15661
15662         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15663         HP's ANSI C compiler.
15664         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15665         Declaring int functions causes warnings on some modern systems and
15666         shouldn't be needed to compile on ancient ones.
15667         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15668         defined.
15669
15670         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15671         with the following changes.
15672         (__set_errno): Parenthesize properly.
15673         Include <stdbool.h>.
15674         (MIN, MAX, MATCHING_INO): New macros.
15675         (__getcwd): Define with prototype, not K&R form.
15676         Use heuristics to allocate default buffer on stack if possible.
15677         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15678         behavior, and to avoid the PATH_MAX limit when computing
15679         ../../../../...
15680         Use MATCHING_INO to compare inode number to file.
15681         Check for arithmetic overflow in size calculations.
15682         Fix bug in reallocation of dot array that caused getcwd to fail
15683         on directories nested deeper than 75.
15684         Be more careful about saving errno on error.
15685         Do not use realloc; use only free+malloc, as this is a bit
15686         more flexible and avoids a needless copy operation.
15687         Do not inspect st_dev and st_ino for symbolic links; POSIX
15688         doesn't specify the latter.
15689         Check for closedir errors.
15690         Avoid needless casts.
15691         Use "#ifdef weak_alias" around weak_alias, to be like other
15692         glibc code.
15693         The following changes to getcwd.c have effect only when used in
15694         gnulib; they have no effect inside glibc proper.
15695         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15696         as alloca isn't used.
15697         (alloca, __alloca): Likewise.
15698         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15699         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15700         unconditionally, as gnulib assumes C89 or better.
15701         Do not include <sys/param.h>.
15702         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15703         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15704         better.
15705         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15706         Include <dirent.h> in a way that is compatible with modern Autoconf.
15707         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15708         New macros, if not already defined.
15709         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15710         Use "_LIBC", not "defined _LIBC", for consistency.
15711         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15712         a mempcpy module.
15713         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15714         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15715         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15716         credit only to Jim Meyering and adjust the copyright dates.
15717         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15718         <stdlib.h>, <unistd.h>, "pathmax.h".
15719         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15720         (INITIAL_BUFFER_SIZE): Remove.
15721         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15722
15723 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15724
15725         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15726         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15727         Use the _ONCE methods, for efficiency.
15728         Check for fcntl.h.  In test program, include <errno.h>
15729         and <fcntl.h> if available.  Remove old K&R cruft from
15730         test program.  Check for common errors in GNU/Linux,
15731         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15732         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15733         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15734         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15735         name accordingly.
15736         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15737         accommodate new getcwd.c.
15738         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15739         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15740         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15741         that's all we need now.
15742
15743 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15744
15745         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15746         argp-parse.c depends on getopt internals, that means we should
15747         always use our getopt, to be on the safe side.
15748         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15749         order not to spoil the result of an eventual previous invocation
15750         of gl_GETOPT_SUBSTITUTE.
15751
15752 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15753
15754         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15755         redefinition warnings. To avoid them, include the defines
15756         in `#if !defined __need_getopt ... #endif'. The only place
15757         where __getopt_argv_const is used is in definitions
15758         of getopt_long and getopt_long_only below, which are as well
15759         protected by `#ifndef __need_getopt'.
15760         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15761         __need_getopt after including <stdio.h> and <unistd.h> These
15762         headers might have defined it.
15763
15764 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15765
15766         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15767
15768 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15769
15770         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15771         (futimens): New function, which uses futimes if available.
15772         (futimens, utimens): Support timespec==NULL, with same semantics
15773         as utime and utimens.
15774         * lib/utimens.h (futimens): New decl.
15775
15776 2004-11-23  Jim Meyering  <jim@meyering.net>
15777
15778         * lib/getopt_.h: Remove trailing blanks.
15779
15780 2004-11-23  Jim Meyering  <jim@meyering.net>
15781
15782         * lib/__fpending.c: Add comment.
15783
15784 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15785
15786         * modules/canonicalize (Depends-on): Add xreadlink.
15787         Problem reported by James Youngman.
15788
15789 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15790
15791         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15792         New macros.
15793         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15794         optopt): Use them instead of invoking ## directly; otherwise, the
15795         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15796
15797 2004-11-19  Bruno Haible  <bruno@clisp.org>
15798
15799         * lib/strtok_r.c: Move comments from here...
15800         * lib/strtok_r.h: ... to here.
15801
15802 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15803
15804         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15805         implementations that mishandle size_t overflow.
15806
15807 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15808
15809         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15810         might fail.  Problem reported by Yoann Vandoorselaere.
15811         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15812         implementations that mishandle size_t overflow.
15813
15814 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15815
15816         * modules/canon-host (Depends-on): Add strdup.
15817
15818 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15819
15820         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15821
15822 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15823
15824         * lib/canon-host.c: Include "strdup.h".
15825         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15826         Use strdup instead of malloc/strcpy to duplicate strings.
15827
15828         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15829         (human_space_before_unit): New constant.
15830         * lib/human.c (human_readable): Support it.
15831
15832         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15833         (xgetcwd): Set errno correctly when failing.
15834         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15835         the failure is actually due to a PATH_MAX problem.
15836
15837         Further getopt changes to make it more likely that glibc will
15838         buy the changes back.
15839         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15840         (getopt): Use it, so to preserve glibc semantic
15841         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15842         when compiling for libc.
15843         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15844         (getopt_long, getopt_long_only): Use it.
15845
15846         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15847         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15848         (getopt): Argv is now char * const *, as per standard.
15849         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15850         not char *__getopt_argv_const *.
15851         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15852         _getopt_long_only_r): Likewise.
15853         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15854         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15855         _getopt_long_r, _getopt_long_only_r): Likewise.
15856         * lib/getopt_.h (__getopt_argv_const): Remove.
15857         (getopt): Argv is now char * const *, as per standard.
15858
15859         * lib/getdate.y (tORDINAL): New token.
15860         (day, relunit): Allow it for relative times.
15861         (relative_time_table): Use tORDINAL for ordinals.
15862
15863 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15864
15865         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15866         Document that "second" isn't allowed as an ordinal number.
15867
15868 2004-11-16  Jim Meyering  <jim@meyering.net>
15869
15870         * modules/closeout (Depends-on): Add fpending.
15871
15872 2004-11-15  Jim Meyering  <jim@meyering.net>
15873
15874         * lib/closeout.c: Include "__fpending.h" once again.
15875         Include <stdbool.h>.
15876         (close_stdout): Don't fail just because stdout was closed initially,
15877         since some programs don't write to stdout in the normal course of
15878         operation (other than --version and --help), and we don't want this
15879         function to make e.g. `touch file >&-' fail.
15880         But do fail if it was closed and someone has tried to write to it.
15881         E.g., `printf foo >&-' must fail.
15882
15883 2004-11-13  Jim Meyering  <jim@meyering.net>
15884
15885         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15886
15887 2004-11-12  Simon Josefsson  <jas@extundo.com>
15888
15889         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15890         small doc fix is still pending.
15891
15892 2004-11-11  Simon Josefsson  <jas@extundo.com>
15893
15894         * modules/strtok_r: New file.
15895
15896         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15897         strtok_r.
15898
15899 2004-11-11  Simon Josefsson  <jas@extundo.com>
15900
15901         * m4/strtok_r.m4: New file.
15902
15903         * m4/getopt.m4: Replace opterr.
15904
15905 2004-11-11  Simon Josefsson  <jas@extundo.com>
15906
15907         * lib/strtok_r.h, strtok_r.c: New file.
15908
15909 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15910
15911         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15912         of replacing opterr, getopt, etc.  This should handle the
15913         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15914
15915 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15916
15917         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15918         we can stop lying to compilers about the constness of argv when we
15919         are compiled outside glibc.
15920         (getopt, getopt_long, getopt_long_only): Use it.
15921         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15922         _getopt_internal, getopt): Likewise.
15923         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15924         _getopt_long_only_r): Likewise.
15925         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15926         _getopt_long_r, _getopt_long_only_r): Likewise.
15927
15928         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15929         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15930         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15931         the other external symbols.
15932         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15933         declaration, since the above renaming now works around collisions.
15934
15935 2004-11-11  Jim Meyering  <jim@meyering.net>
15936
15937         * lib/linebreak.c: Remove trailing blanks.
15938         * lib/alloca_.h: Likewise.
15939         * lib/acosl.c: Likewise.
15940         * lib/euidaccess.c: Likewise.
15941         * lib/allocsa.h: Likewise.
15942
15943 2004-11-10  Simon Josefsson  <jas@extundo.com>
15944
15945         * m4/getaddrinfo.m4: New file.
15946
15947 2004-11-10  Simon Josefsson  <jas@extundo.com>
15948
15949         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15950
15951 2004-11-10  Simon Josefsson  <jas@extundo.com>
15952
15953         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15954         getaddrinfo.
15955
15956         * modules/getaddrinfo: New file.
15957
15958 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15959
15960         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15961
15962 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15963
15964         * lib/mktime.c (SHR): New macro, which is a portable
15965         substitute for >> that should work even on Crays.
15966         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15967         Problem reported by Mark D. Baushke in
15968         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15969         * lib/getdate.y (SHR): Likewise.
15970         (tm_diff): Use it.
15971         * lib/strftime.c (SHR): Likewise.
15972         (tm_diff): Use it.
15973         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15974         quote_these_too, so that right shifts are well defined.  All uses
15975         changed.
15976
15977 2004-11-10  Jim Meyering  <jim@meyering.net>
15978
15979         Ensure that no close failure goes unreported.
15980         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15981         return early when it seems there's nothing to flush.
15982         Don't include __fpending.h.
15983
15984 2004-11-10  Jim Meyering  <jim@meyering.net>
15985
15986         * modules/closeout (Depends-on): Remove fpending.
15987
15988 2004-11-10  Jim Meyering  <jim@meyering.net>
15989
15990         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15991
15992 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15993
15994         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15995         gl_FUNC_STRFTIME.
15996         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15997         and AC_REQUIRE when possible, to avoid duplicate checks.
15998         Check for <wchar.h>.
15999
16000 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16001
16002         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16003
16004 2004-11-09  Bruno Haible  <bruno@clisp.org>
16005
16006         * m4/sockpfaf.m4: New file.
16007
16008 2004-11-05  Bruno Haible  <bruno@clisp.org>
16009
16010         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16011         Reported by Mark D. Baushke <mdb@cvshome.org>.
16012
16013 2004-11-04  Bruno Haible  <bruno@clisp.org>
16014
16015         2004-09-11  Bruno Haible  <bruno@clisp.org>
16016                 * allocsa.valgrind: New file.
16017         2004-02-06  Bruno Haible  <bruno@clisp.org>
16018                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16019                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16020                 Reported by Christopher Seip <chris.seip@hp.com>.
16021
16022 2004-11-04  Bruno Haible  <bruno@clisp.org>
16023
16024         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16025         (Makefile.am): Distribute it.
16026
16027 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16028
16029         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16030         with errno == ERANGE if the buffer is too small.
16031         Problem reported by Mark D. Baushke.
16032
16033 2004-11-03  Albert Chin  <china@thewrittenword.com>
16034             Paul Eggert  <eggert@cs.ucla.edu>
16035
16036         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16037         equivalent, substitute $ac_type for equivalent type rather than
16038         blindly using uint32_t *always* which won't work if uint32_t is not
16039         available.  Define _UINT32_T to work around typedef of uint32_t if
16040         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16041         2.5.1.
16042
16043 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16044
16045         * m4/jm-macros.m4: Sync from coreutils.
16046         (gl_MACROS): Check for mbrlen, for pathchk.
16047         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16048
16049 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16050
16051         * lib/xreadlink.c (MAXSIZE): New macro.
16052         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16053         size does not exceed MAXSIZE.  Avoid cast.
16054         As suggested by Mark D. Baushke in
16055         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16056         if readlink fails with buffer size just under MAXSIZE, try again
16057         with MAXSIZE.
16058
16059 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16060
16061         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16062
16063 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16064         and  Paul Eggert  <eggert@cs.ucla.edu>
16065
16066         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16067         (get_date): Overparenthesize to avoid GCC warning.
16068
16069 2004-11-02  Bruno Haible  <bruno@clisp.org>
16070
16071         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16072         returns void.
16073
16074 2004-11-02  Bruno Haible  <bruno@clisp.org>
16075
16076         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16077         function returns void.
16078
16079 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16080
16081         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16082         fflush_unlocked, flockfile, funlockfile, funlockfile,
16083         fputs_unlocked, putc_unlocked.
16084
16085 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16086
16087         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16088         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16089         already declared.
16090
16091 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16092
16093         * modules/getdate (Files): Add doc/getdate.texi.
16094         (Depends-on): Add setenv, xalloc.
16095
16096 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16097
16098         * lib/getdate.y: Add support for TZ="foo" within a date string.
16099         Fix some bugs near time_t boundaries.  Reject dates with
16100         out-of-range components, e.g., "Sept 31".
16101         Include <stdlib.h>, "setenv.h", "xalloc.h".
16102         (ISDIGIT_LOCALE): Remove; unused.
16103         Note that the TZ and time functions used here are not reentrant.
16104         (mktime_ok, get_tz): New functions.
16105         (TZBUFSIZE): New constant.
16106         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16107         This requires that we sometimes generate our own TZ="XXX..." setting.
16108
16109 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16110
16111         * doc/getdate.texi: New file, from coreutils with modifications for
16112         the new TZ parsing.
16113
16114 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16115
16116         * lib/mktime.c (not_equal_tm): Remove redundant check.
16117
16118 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16119
16120         * modules/regex (lib_SOURCES): Add regex.c.
16121         Reported by James Youngman in
16122         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16123
16124 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16125
16126         * lib/getdate.y: Use Bison 1.875 features, and some minor
16127         code cleanups.  This change does not affect semantics.
16128         Don't include <stdlib.h>; no longer needed.
16129         Don't include unlocked-io.h; only the "#if TEST" code uses
16130         stdio, and performance isn't crucial there.
16131         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16132         Bison 1.875 features as described below.
16133         All uses of "PC." replaced by "pc->".
16134         (YYSTYPE): Add a forward declaration.
16135         (yylex, yyerror): Use full prototypes in forward decls.
16136         Use "%pure-parser" rather than obsolescent "%pure_parser".
16137         Use %parse-param and %lex-param instead of obsolescent
16138         YYPARSE_PARAM and YYLEX_PARAM.
16139         (meridian_table, month_and_day_table, time_units_table,
16140         relative_time_table, time_zone_table, military_table,
16141         lookup_zone, lookup_word, get_date):
16142         Use NULL instead of 0 where appropriate.
16143         (to_hour): Avoid abort (), to avoid a dependency on
16144         stdlib.h.
16145         (yyerror, yylex): Now accepts parser_control * arg.
16146         (main) [TEST]: Use '\0' rather than 0 for char.
16147
16148 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16149
16150         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16151
16152 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16153
16154         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16155         It's now the caller's responsibility to handle the case where
16156         !HAVE_GETPAGESIZE && !defined getpagesize.
16157
16158         * lib/mktime.c (leapyear): Arg is long int, not int.
16159
16160 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16161
16162         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16163
16164 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16165
16166         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16167         missing.  Problem reported by James Youngman.
16168
16169 2004-10-16  Simon Josefsson  <jas@extundo.com>
16170
16171         * gnulib-tool: Fix comments.  Fix parse problem.
16172         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16173
16174 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16175
16176         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16177         implementation of getopt_long.  Problem reported by Alexander Taler in:
16178         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16179
16180 2004-10-15  Bruno Haible  <bruno@clisp.org>
16181
16182         * gnulib-tool: Untabify. Initialize supplied_libname.
16183         (func_usage): More homogenous output.
16184         (func_modules_transitive_closure, func_modules_to_filelist,
16185         func_emit_lib_Makefile_am): New functions.
16186         (func_import): New function, extracted from big case statement. Use
16187         func_get_license, func_modules_transitive_closure,
16188         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16189         opt_lgpl. Don't use test -a, as it's not portable.
16190         (func_create_testdir): Use func_modules_transitive_closure,
16191         func_modules_to_filelist, func_emit_lib_Makefile_am.
16192
16193 2004-10-15  Bruno Haible  <bruno@clisp.org>
16194
16195         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16196
16197 2004-10-15  Bruno Haible  <bruno@clisp.org>
16198
16199         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16200         the portions belonging to each module.
16201         Suggested by Derek Robert Price <derek@ximbiot.com>.
16202
16203 2004-10-12  Simon Josefsson  <jas@extundo.com>
16204
16205         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16206         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16207         to real functions.
16208
16209 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16210
16211         * modules/vsnprintf: New file.
16212
16213 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16214
16215         * m4/vsnprintf.m4: New file.
16216
16217 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16218
16219         * lib/vsnprintf.h: New file.
16220         * lib/vsnprintf.c: New file.
16221
16222 2004-10-11  Bruno Haible  <bruno@clisp.org>
16223
16224         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16225         vsnprintf.
16226
16227 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16228
16229         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16230
16231 2004-10-07  Bruno Haible  <bruno@clisp.org>
16232
16233         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16234         fits into the provided buffer.
16235
16236 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16237
16238         * lib/diacrit.c, diacrit.h: Add GPL notice.
16239
16240         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16241         notice.
16242         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16243         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16244         This avoids a potential constant-folding bug.
16245
16246 2004-10-05  Bruno Haible  <bruno@clisp.org>
16247
16248         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16249         for the declaration of strsep.
16250
16251 2004-10-05  Bruno Haible  <bruno@clisp.org>
16252
16253         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16254
16255 2004-10-04  Simon Josefsson  <jas@extundo.com>
16256
16257         * modules/memmem: New file.
16258         * tests/test-memmem.c: New file.
16259         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16260
16261 2004-10-04  Simon Josefsson  <jas@extundo.com>
16262
16263         * m4/memmem.m4: New file.
16264
16265 2004-10-04  Simon Josefsson  <jas@extundo.com>
16266
16267         * lib/memmem.h: New file.
16268         * lib/memmem.c: New file, taken from glibc.
16269
16270 2004-10-04  Simon Josefsson  <jas@extundo.com>
16271
16272         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16273         '#ifdef USE_UNLOCKED_IO'.
16274
16275 2004-10-04  Simon Josefsson  <jas@extundo.com>
16276
16277         * config/srclist.txt: Add memmem from glibc.
16278
16279 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16280
16281         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16282
16283         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16284         modules/exclude, modules/getdate, modules/getline,
16285         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16286         modules/getusershell, modules/linebuffer, modules/md5,
16287         modules/mountlist, modules/posixtm, modules/readtokens,
16288         modules/readutmp, modules/regex, modules/sha1,
16289         modules/version-etc, modules/yesno:
16290         Remove dependency on unlocked-io.
16291
16292 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16293
16294         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16295
16296         * m4/unlocked-io.m4: Add copyright notice.
16297         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16298
16299 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16300
16301         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16302         * lib/xmalloc.c (xmemdup): Likewise.
16303         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16304         XFREE): Remove these long-obsolescent macros.
16305         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16306         * lib/xstrdup.c: Remove.
16307
16308         * lib/regex.c (re_comp): Cast gettext return value to char *,
16309         Problem reported by Martin Neitzel via Mark D. Baushke.
16310
16311 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16312
16313         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16314         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16315         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16316         regex.c, sha1.c, version-etc.c, yesno.c:
16317         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16318         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16319         the includer's responsibility.
16320
16321         Sync from coreutils.
16322
16323         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16324         points to the start of a string, as the C Standard says the
16325         resulting behavior is undefined.
16326
16327         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16328         simple -> simple_backups, numbered_existing ->
16329         numbered_existing_backups, numbered -> numbered_backups
16330         to avoid shadowing problems.  All uses changed.
16331         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16332         * lib/backupfile.c (check_extension, numbered_backup):
16333         Rename locals to avoid shadowing 'basename'.
16334         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16335         once.
16336
16337         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16338         * lib/.cvsignore: Add getopt.h.
16339
16340 2004-10-04  Bruno Haible  <bruno@clisp.org>
16341
16342         * modules/README: New file.
16343         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16344         not a module.
16345
16346 2004-10-02  Jim Meyering  <jim@meyering.net>
16347
16348         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16349
16350 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16351
16352         * modules/strsep: New file.
16353
16354 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16355
16356         * m4/strsep.m4: New file.
16357
16358 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16359
16360         * lib/strsep.h: New file.
16361         * lib/strsep.c: New file.
16362
16363 2004-10-01  Simon Josefsson  <jas@extundo.com>
16364
16365         * lib/snprintf.c (snprintf): Handle size==0.
16366
16367 2004-10-01  Simon Josefsson  <jas@extundo.com>
16368             Bruno Haible  <bruno@clisp.org>
16369
16370         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16371         (snprintf): Declare 'args'.
16372
16373 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16374
16375         * lib/snprintf.c: Remove comments as to why each header is needed.
16376
16377 2004-10-01  Bruno Haible  <bruno@clisp.org>
16378
16379         * MODULES.html.sh: Add strsep.
16380
16381 2004-09-30  Simon Josefsson  <jas@extundo.com>
16382
16383         * modules/snprintf: New file.
16384
16385 2004-09-30  Simon Josefsson  <jas@extundo.com>
16386
16387         * m4/snprintf.m4: New file.
16388
16389 2004-09-30  Simon Josefsson  <jas@extundo.com>
16390
16391         * lib/snprintf.h, lib/snprintf.c: New files.
16392
16393 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16394
16395         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16396         (hol_entry_help): Never translate an empty string.
16397         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16398         * lib/argp.h (OPTION_NO_TRANS): New option.
16399
16400 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16401
16402         * modules/argp (Maintainer): Replace Simon Josefsson
16403         by Sergey Poznyakoff.
16404
16405 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16406
16407         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16408         changes merged back into glibc.
16409
16410 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16411
16412         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16413
16414 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16415
16416         * lib/xvasprintf.c: Include xalloc.h.
16417         (xvasprintf): Use xalloc_die, not xmalloc_die.
16418
16419 2004-09-29  Bruno Haible  <bruno@clisp.org>
16420
16421         * modules/alloca-opt: New file, derived from modules/alloca.
16422         * modules/allocsa: Depend on alloca-opt instead of alloca.
16423         * modules/setenv: Likewise.
16424         * modules/vasnprintf: Likewise.
16425         * MODULES.html.sh: Add alloca-opt.
16426
16427 2004-09-28  Simon Josefsson  <jas@extundo.com>
16428
16429         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16430         LGPL, and to replace license template from GPL to LGPL.
16431
16432 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16433
16434         * modules/dummy: Change license to LGPL.
16435
16436 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16437
16438         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16439
16440 2004-09-24  Simon Josefsson  <jas@extundo.com>
16441
16442         * modules/minmax (License): Change from GPL to LGPL.
16443
16444 2004-09-23  Simon Josefsson  <jas@extundo.com>
16445
16446         * gnulib-tool (--import): Typo.
16447
16448 2004-09-23  Simon Josefsson  <jas@extundo.com>
16449
16450         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16451
16452 2004-09-22  Bruno Haible  <bruno@clisp.org>
16453
16454         * modules/*: Add 'License' field.
16455         * gnulib-tool: Accept --extract-license option.
16456         (func_get_license): New function.
16457
16458 2004-09-21  Bruno Haible  <bruno@clisp.org>
16459
16460         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16461         Reported by Simon Josefsson.
16462
16463 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16464
16465         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16466         gl_AC_TYPE_LONG_LONG.
16467
16468 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16469
16470         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16471
16472 2004-09-18  Simon Josefsson  <jas@extundo.com>
16473         and  Paul Eggert  <eggert@cs.ucla.edu>
16474
16475         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16476         calls with autoreconf.  Define GL_LIB.
16477
16478 2004-09-14  Karl Berry  <karl@gnu.org>
16479
16480         * config/srclist.txt: unsync setenv.c, sigh.
16481
16482 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16483
16484         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16485         Problem reported by Bruno Haible in:
16486         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16487
16488 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16489
16490         * config/srclist.txt: Comment out argp-pvh.c.
16491
16492 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16493
16494         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16495         in case some system header has #define'd it.  Problem reported by
16496         Soeren D. Schulze in
16497         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16498
16499 2004-09-09  Karl Berry  <karl@gnu.org>
16500
16501         * regex.[ch]: delete from the root.  These were supposed to be
16502                 synced with emacs cvs, but this has not happened for about
16503                 a year, and anyway nothing else uses emacs regex.[ch].
16504                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16505                 lib/regex[.ch] is untouched.
16506
16507 2004-09-09  Bruno Haible  <bruno@clisp.org>
16508
16509         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16510
16511 2004-09-09  Bruno Haible  <bruno@clisp.org>
16512
16513         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16514         modifications.
16515         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16516
16517 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16518
16519         * modules/xvasprintf: New file.
16520         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16521
16522 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16523
16524         * lib/xvasprintf.h: New file.
16525         * lib/xvasprintf.c: New file.
16526         * lib/xasprintf.c: New file.
16527
16528 2004-09-08  Bruno Haible  <bruno@clisp.org>
16529
16530         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16531
16532 2004-09-08  Bruno Haible  <bruno@clisp.org>
16533
16534         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16535         length is > INT_MAX.
16536         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16537         more.
16538
16539 2004-09-08  Bruno Haible  <bruno@clisp.org>
16540
16541         * lib/stdint_.h: New file, taken from GNU clisp.
16542
16543 2004-09-08  Bruno Haible  <bruno@clisp.org>
16544             Oskar Liljeblad  <oskar@osk.mine.nu>
16545
16546         * modules/stdint: New file.
16547         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16548
16549 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16550
16551         Import from coreutils.
16552         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16553         strings on unbounded length.  alloca's performance benefits aren't
16554         that important here.
16555         (V_STRDUP): Remove.
16556         (parse_with_separator): New function, with most of the internals
16557         of the old parse_user_spec.  Allow user to omit both user and group,
16558         for compatibility with FreeBSD.
16559         Clone only the user name, not the entire spec.
16560         Do not set *uid, *gid unless entirely successful.
16561         Avoid memory leak in some failing cases.
16562         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16563         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16564         (parse_user_spec): Rewrite to use parse_with_separator.
16565
16566 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16567
16568         * modules/userspec: Don't depend on alloca.
16569
16570 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16571
16572         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16573
16574 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16575
16576         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16577         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16578         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16579
16580 2004-08-16  Simon Josefsson  <jas@extundo.com>
16581
16582         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16583         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16584         Add --dry-run for --import.
16585         Let user provided command line parameters override configure.ac
16586         settings.
16587
16588 2004-08-12  Simon Josefsson  <jas@extundo.com>
16589
16590         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16591         as discussed with Paul Eggert in threads rooted at
16592         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16593         and
16594         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16595         Before, the test was empty, and relied on ELIDE_CODE in source
16596         code.)
16597         (gl_PREREQ_GETOPT): New macro.
16598         (gl_GETOPT): Use them.
16599
16600 2004-08-12  Simon Josefsson  <jas@extundo.com>
16601
16602         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16603         * lib/getopt_.h: Renamed from getopt.h.
16604
16605 2004-08-12  Simon Josefsson  <jas@extundo.com>
16606
16607         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16608         Change default library name from libfoo to libgnu.
16609         Now, if you have a configure.ac that says:
16610                 gl_SOURCE_BASE(gl)
16611                 gl_M4_BASE(gl/m4)
16612                 gl_MODULES(error getopt etcetera)
16613                 gl_INIT
16614         you can import all you need by running:
16615                 ../gnulib/gnulib-tool --import
16616
16617         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16618         (Makefile.am): Rewrite, use logic from argz.
16619         (Include): Use <getopt.h> instead of "getopt.h".
16620
16621 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16622
16623         * modules/argp (Files): Add m4/unlocked-io.m4.
16624         (Depends-on): Add extensions.
16625
16626 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16627
16628         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16629         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16630         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16631         Check for program_invocation_name, program_invocation_short_name,
16632         flockfile, funlockfile, features.h, _getopt_long_only_r.
16633
16634 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16635
16636         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16637         its complicated substitute.
16638         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16639         and program_invocation_name.
16640         (__argp_basename) [!_LIBC]: Remove; the only use was
16641         replaced by its body.
16642         (__argp_short_program_name): Change condition from
16643         !defined __argp_short_program_name to
16644         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16645         to match argp-namefrob.h.
16646         (__argp_failure): Don't assume strerror_r returns char *.
16647         * lib/argp-parse.c (N_): Define unconditionally.
16648         (argp_default_options): Fill out initializers with 0 to avoid
16649         gcc warnings.
16650
16651 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16652
16653         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16654         getopt1.c.
16655
16656 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16657
16658         Merge from coreutils.
16659
16660         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16661
16662         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16663         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16664
16665 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16666
16667         Merge from coreutils.
16668
16669         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16670         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16671         for Reliant Unix 5.43.
16672
16673         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16674         (union fooround): Use uintmax_t, not long int.
16675         The rest is a merge from libc:
16676         [defined _LIBC]: Include <shlib-compat.h>.
16677         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16678
16679         * lib/settime.c (settime): Recode to avoid warning with
16680         Sun Forte C 6U2.
16681
16682         * lib/strverscmp.c: Convert to UTF-8.
16683
16684 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16685
16686         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16687         m4/uintmax_t.m4.
16688
16689 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16690
16691         * modules/xalloc-die: New file.
16692         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16693
16694         * modules/md5 (Files): Add m4/uint32_t.m4.
16695         * modules/sha1: Renamed from modules/sha.
16696         (Files):
16697         Rename lib/sha.h to lib/sha1.h.
16698         Rename lib/sha.c to lib/sha1.c.
16699         Rename m4/sha.m4 to m4/sha1.m4.
16700         (lib_SOURCES): Likewise.
16701         (configure.ac): Rename gl_SHA to gl_SHA1.
16702         (Include): sha.h -> sha1.h.
16703
16704 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16705
16706         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16707         * m4/sha1.m4: Renamed from sha.m4.
16708         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16709
16710 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16711
16712         * lib/obstack.h (obstack_empty_p):
16713         Don't assume that chunk->contents is suitably aligned.
16714         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16715         Likewise. Problem reported by Benno in
16716         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16717
16718         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16719         readable.  This could be improved further but it'd take some work.
16720
16721 2004-08-08  Simon Josefsson  <jas@extundo.com>
16722
16723         * modules/xgethostname (Depends-on): Remove exit and error (not
16724         used).
16725
16726         * modules/getpass-gnu: Add getpass.h.
16727         (Depends-on): Add stdbool.
16728         * modules/getpass: Add getpass.h.
16729
16730 2004-08-08  Simon Josefsson  <jas@extundo.com>
16731
16732         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16733         Check getpass declaration.
16734
16735 2004-08-08  Simon Josefsson  <jas@extundo.com>
16736
16737         * lib/xgethostname.c: Don't include error.h (not used).
16738
16739         * lib/getpass.h: Add.
16740         * lib/getpass.c: Include getpass.h first.
16741
16742 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16743
16744         * lib/xalloc-die.c: New file.
16745         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16746         All uses removed.
16747         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16748         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16749         xalloc-die.c.
16750         (_, N_, xalloc_die): Move to xalloc-die.c.
16751         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16752         so that we needn't mess with xalloc_msg_memory_exhausted.
16753
16754         * lib/sha1.h: Renamed from sha.h.
16755         (SHA1_H): Renamed from _SHA_H.
16756         (sha1_ctx): Renamed from sha_ctx.
16757         (sha1_init_ctx): Renamed from sha_init_ctx.
16758         (sha1_process_block): Renamed from sha_process_block.
16759         (sha1_process_bytes): Renamed from sha_process_bytes.
16760         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16761         (sha1_read_ctx): Renamed from sha_read_ctx.
16762         (sha1_stream): Renamed from sha_stream.
16763         (sha1_buffer): Renamed from sha_buffer.
16764         * lib/sha1.c: Likewise; renamed from sha.c.
16765         Do not include <sys/types.h>.
16766         Include <stddef.h> rather than <stdlib.h>.
16767
16768 2004-08-08  Bruno Haible  <bruno@clisp.org>
16769
16770         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16771         FILESYSTEM_PREFIX_LEN.
16772         * lib/progreloc.c: Likewise.
16773         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16774
16775 2004-08-06  Simon Josefsson  <jas@extundo.com>
16776
16777         * modules/progname (Depends-on): Don't depend on stdbool.
16778
16779 2004-08-06  Simon Josefsson  <jas@extundo.com>
16780
16781         * modules/getsubopt: New file.
16782         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16783         getsubopt.
16784
16785 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16786
16787         More merge from coreutils.
16788
16789         * m4/utimens.m4, m4/utimecmp.m4: New files.
16790         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16791         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16792         prereq.m4, sha.m4: Import changes from coreutils.
16793
16794 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16795
16796         More merge from coreutils.
16797         * modules/raise, modules/readtokens0, modules/utimens:
16798         * modules/utimecmp, module/xnanosleep: New files.
16799         * modules/strftime: Add lib/strftime.h.
16800         Change include from <time.h> to "strftime.h".
16801         * modules/yesno: Add lib/yesno.h.
16802         * modules/backupfile: Remove lib/addext.c.
16803         * modules/euidaccess: Add stat-macros.h.
16804         * modules/canonicalize, modules/euidaccess,
16805         modules/filemode, modules/lchown, modules/makepath,
16806         modules/rmdir, modules/stat: Likewise.
16807
16808 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16809
16810         Merge from tar.
16811         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16812         SIZE_MAX is a valid preprocessor constant.
16813         (__argp_basename): Change from "#ifndef _LIBC"
16814         to "#ifndef __argp_short_program_name", so that
16815         we don't compile these functions for tar.
16816
16817         More merges from coreutils.
16818         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16819         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16820         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16821         * lib/addext.c: Remove; no longer needed.
16822         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16823         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16824         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16825         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16826         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16827         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16828         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16829         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16830         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16831         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16832         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16833         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16834         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16835         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16836         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16837         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16838         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16839         Import changes from coreutils.
16840
16841 2004-08-05  Simon Josefsson  <jas@extundo.com>
16842
16843         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16844
16845 2004-08-05  Simon Josefsson  <jas@extundo.com>
16846
16847         * m4/getsubopt.m4: New file.
16848
16849 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16850
16851         Merge from coreutils.
16852
16853         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16854         * m4/getcwd-path-max.m4: New files.
16855
16856         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16857         FILESYSTEM_PREFIX_LEN ->
16858         FILE_SYSTEM_PREFIX_LEN.
16859         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16860         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16861         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16862         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16863
16864         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16865         prerequisite modules now handle the DOS stuff.
16866         Don't check for unistd.h.
16867
16868 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16869
16870         Merge from coreutils.
16871
16872         * lib/.gdb-history: Remove; this doesn't belong here.
16873
16874         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16875         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16876         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16877         * lib/getcwd.c: New files.
16878
16879         * lib/dirname.h: Include <stdbool.h>.
16880         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16881         for consistency with POSIX terminology.  All uses changed.
16882         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16883         (strip_trailing_slashes): Use bool for booleans.
16884         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16885
16886         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16887         sometimes returns a positive errno value even when it succeeds.
16888         (print_errno_message) [!LIBC]: Fall back on strerror if
16889         __strerror_r fails.
16890
16891         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16892         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16893         (longest_relative_suffix): New function.
16894         (path_concat): Use it.  Assume first argument is not NULL.
16895         Port to DOS.  Omit redundant separators.
16896         Report an error instead of returning NULL.
16897         Use mempcpy instead of memcpy.
16898         (xpath_concat): Remove: not declared or used.
16899
16900         * lib/same.h: Include <stdbool.h>
16901         (same_name): Return bool, not int.
16902         * lib/same.c (same_name): Likewise.
16903         (errno): Don't declare; we assume C89 or better now.
16904
16905         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16906         if not already defined.
16907
16908         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16909         * lib/dup-safer.c (errno): Likewise.
16910
16911 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16912
16913         Merge from coreutils.
16914         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16915         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16916         * modules/path-concat: Don't depend on strdup.
16917
16918 2004-08-03  Simon Josefsson  <jas@extundo.com>
16919
16920         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16921         * lib/progname.h: Don't include stdbool.h.
16922
16923 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16924
16925         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16926         * MODULES.html.sh (func_all_modules): Remove fatal.
16927
16928 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16929
16930         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16931
16932 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16933
16934         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16935         working.
16936
16937 2004-08-02  Simon Josefsson  <jas@extundo.com>
16938
16939         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16940         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16941         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16942
16943 2004-08-01  Simon Josefsson  <jas@extundo.com>
16944
16945         * lib/xgetdomainname.c: Include stdlib.h, for free().
16946
16947 2004-07-19  Bruno Haible  <bruno@clisp.org>
16948
16949         * MODULES.html.sh (func_all_modules): Add dummy.
16950
16951 2004-07-16  Simon Josefsson  <jas@extundo.com>
16952
16953         * modules/dummy: New file.
16954
16955 2004-07-16  Simon Josefsson  <jas@extundo.com>
16956
16957         * lib/dummy.c: New file.
16958
16959 2004-07-16  Bruno Haible  <bruno@clisp.org>
16960
16961         * lib/backupfile.h: Add extern "C" for C++.
16962         * lib/closeout.h: Likewise.
16963         * lib/copy-file.h: Likewise.
16964         * lib/findprog.h: Likewise.
16965         * lib/full-write.h: Likewise.
16966         * lib/pathname.h: Likewise.
16967         * lib/progname.h: Likewise.
16968         * lib/stpcpy.h: Likewise.
16969         * lib/stpncpy.h: Likewise.
16970         * lib/strcase.h: Likewise.
16971         * lib/strstr.h: Likewise.
16972         * lib/xalloc.h: Likewise.
16973
16974         * lib/mbswidth.h: Add extern "C" for C++.
16975         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16976
16977 2004-07-13  Robert Millan  <robertmh@gnu.org>
16978
16979         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16980
16981 2004-07-09  Simon Josefsson  <jas@extundo.com>
16982
16983         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16984         failed without this.)
16985
16986 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16987
16988         * modules/chown (Files): Add lib/fchown-stub.c, since
16989         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16990
16991 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16992
16993         * lib/fchown-stub.c: New file.
16994
16995 2004-06-24  Jim Meyering  <jim@meyering.net>
16996
16997         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16998
16999 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17000
17001         * modules/argz: Omit "#include".
17002
17003         * MODULES.html.sh (func_all_modules): Add calloc, to match
17004         2004-06-01 addition of calloc module.
17005
17006 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17007
17008         * m4/argz.m4: New file, which is autoupdated from libtool.
17009
17010 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17011
17012         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17013         libtool.
17014
17015 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17016
17017         * config/srclist-update: Don't insist on "USA." before the
17018         close-comment, as libtool omits the period and puts the */ on a
17019         separate line.
17020         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17021         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17022
17023 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17024
17025         * modules/argz: New file.
17026         * MODULES.html.sh (func_all_modules): Add argz.
17027
17028 2004-06-12  Jim Meyering  <jim@meyering.net>
17029         and  Paul Eggert  <eggert@cs.ucla.edu>
17030
17031         * modules/hash (Files): Add lib/xalloc.h.
17032         * modules/pipe (Depends-on): Add wait-process.
17033         * modules/stat (Depends-on): Add xalloc.
17034         * modules/userspec (Files): Add lib/userspec.h.
17035         * modules/xstrto
17036
17037         Upgrade from gettext-0.13.
17038         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17039         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17040         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17041
17042 2004-06-10  Jim Meyering  <jim@meyering.net>
17043
17044         * lib/calloc.c: New file.
17045
17046 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17047
17048         * lib/getdate.y (yylex): Allow space between sign and number.
17049         Problem reported by Dan Jacobson.
17050
17051 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17052
17053         Merge from coreutils CVS.
17054
17055         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17056         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17057         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17058         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17059         xstrtol.m4: Fix copyright date and/or serial number.
17060
17061         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17062         See if we need an fchown replacement.
17063         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17064         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17065         and use the replacement function if we detect either defect.
17066
17067         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17068         gl_UTIMECMP.
17069
17070 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17071         and  Jim Meyering  <jim@meyering.net>
17072
17073         Merge from coreutils CVS.
17074
17075         * lib/stat-macros.h: New file, with contents from file-type.h
17076         and coreutils' system.h.
17077         * lib/file-type.c: Include "stat-macros.h".
17078         * lib/file-type.h (file_type): Move all macro definitions to new file,
17079         stat-macros.h.
17080
17081         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17082         Wrap old code with this conditional.
17083         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17084         function that does not dereference symlinks.
17085         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17086
17087         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17088         dependency problems.
17089         (xreadlink): Accept new arg SIZE, for efficiency.
17090         All decls and uses changed.
17091         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17092
17093         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17094         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17095
17096         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17097         sysexits.h.
17098
17099 2004-06-01  Jim Meyering  <jim@meyering.net>
17100
17101         * m4/calloc.m4: New file.
17102
17103 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17106         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17107         Also, fix a typo in a diagnostic.
17108
17109 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17110
17111         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17112         or AC_FUNC_REALLOC.
17113
17114 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17115
17116         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17117         macros to be defined.
17118         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17119         the allocator returns NULL because the requested size is zero.
17120
17121 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17122
17123         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17124         var.  Add comment explaining why libc still defines it.  This
17125         merges the following patch from glibc:
17126         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17127
17128 2004-05-20  Andreas Schwab  <schwab@suse.de>
17129
17130         * m4/free.m4: Replace free if it not known to work, not the other
17131         way round.
17132
17133 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17134
17135         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17136         present in glibc since revision 1.1 of this file.
17137         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17138         obstack_alignment_mask, obstack_alloc, obstack_base,
17139         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17140         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17141         obstack_grow0, obstack_init, obstack_int_grow,
17142         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17143         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17144         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17145         nonexistent functions.
17146
17147 2004-05-18  Karl Berry  <karl@gnu.org>
17148
17149         * config/srclist.txt: break link for vasnprintf.c.
17150
17151 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17152
17153         Port obstack to the AS/400, where pointers are 16 bytes wide and
17154         you cannot cast an integer to a valid pointer.  This patch is
17155         currently waiting to be integrated into glibc; see
17156         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17157
17158         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17159         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17160         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17161         (struct obstack): temp member is now a union of a pointer and
17162         an integer, instead of an integer.  All integer uses changed.
17163         This does not affect the physical layout of struct obstack,
17164         except on hosts (like the AS/400) where the size or alignment of
17165         void * is greater than that of ptrdiff_t.
17166         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17167         __STDC__)]: Store temporary in pointer member of union, not
17168         integer member.
17169         * lib/obstack.c: Include <stddef.h>, for offsetof.
17170         (struct fooalign): Remove; it doesn't need a name.
17171         (union fooround): Change double to long double, and add void *.
17172         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17173         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17174         not a macro.  Hence the values are always int; so remove all
17175         casts-to-int in uses.
17176
17177 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17178
17179         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17180         we can get this patch merged into glibc.
17181
17182 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17183             Paul Eggert  <eggert@cs.ucla.edu>
17184
17185         * m4/argp: Depend on alloca.
17186
17187 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17188             Paul Eggert  <eggert@cs.ucla.edu>
17189
17190         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17191         freecoding.
17192
17193 2004-05-17  Bruno Haible  <bruno@clisp.org>
17194
17195         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17196         precision that consists of a '.' followed by an empty digit string.
17197         Patch by Tor Lillqvist <tml@iki.fi>.
17198
17199 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17200
17201         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17202         for backward compatibility with older code.  We need our own
17203         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17204         it under some other name, and our alloca.h will define it.
17205
17206 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17207             Derek Price  <derek@ximbiot.com>
17208
17209         * lib/alloca.c: Include <alloca.h>, to get our interface.
17210         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17211         include <alloca.h> first.  Use C89 prototype for alloca; this
17212         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17213         Use #elif for simplicity, since we can assume C89 now.
17214         Don't try to source the system alloca.h since it will not be found
17215         and to prevent recursively including its replacement.
17216         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17217         * lib/regex.c: Likewise.
17218
17219 2004-05-16  Derek Price  <derek@ximbiot.com>
17220             Paul Eggert  <eggert@cs.ucla.edu>
17221
17222         getline cleanup.  This changes the getndelim2 API: both order of
17223         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17224         no delimiter).
17225
17226         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17227         interface does that.
17228         (getline): Always use getdelim, so that we don't have two
17229         copies of this code.
17230         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17231         if available.
17232         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17233         (GETNDELIM2_MAXIMUM): New macro.
17234         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17235         instead of the old practice of delim2==0.  All callers changed.
17236         Return -1 on overflow, instead of returning junk.
17237         Do not set *linesize unless allocation succeeds.
17238         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17239         that we include sys/types.h.
17240         * lib/getnline.h: Likewise.
17241         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17242         (getndelim2): Reorder arguments.
17243         * lib/getnline.c (getnline, getndelim):
17244         Don't discard the NMAX argument.
17245         (getnline): Invoke getndelim, to avoid code duplication.
17246         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17247         of (size_t) -1 by callers of the getnline family.
17248
17249 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17250
17251         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17252         Check for gettimeofday.
17253         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17254         Check for settimeofday, stime.
17255
17256 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         * lib/nanosleep.c (suspended): Change its type from int to
17259         sig_atomic_t volatile.
17260         (first_call): Make it private to rpl_nanosleep, and have it
17261         be zero initially as that's a bit faster.
17262         (my_usleep): Round up fractional times instead of truncating them,
17263         as this is the usual meaning for 'sleep'.
17264
17265         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17266         doesn't work.
17267         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17268         (ENOSYS): Define if not defined.
17269         (settime): Fall back on stime if it exists and settimeofday fails.
17270         But don't bother with fallbacks if a method fails with errno == EPERM.
17271
17272 2004-05-11  Jim Meyering  <jim@meyering.net>
17273
17274         Prior to this change, the save_cwd caller required read access to the
17275         current directory on most systems (ones with the fchdir function).
17276
17277         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17278         fails, try write-only, and finally, resort to using xgetcwd.
17279
17280 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17281
17282         * lib/obstack.c, obstack.h: Import changes from libc.
17283
17284 2004-04-28  Bruno Haible  <bruno@clisp.org>
17285
17286         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17287         also implicitly appends .exe to executables.
17288         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17289         accepts Windows pathnames.
17290         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17291         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17292         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17293         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17294         Reported by Derek Robert Price <derek@ximbiot.com>.
17295
17296 2004-04-21  Karl Berry  <karl@gnu.org>
17297
17298         * config/srclist.txt (localcharset.c): break sync.
17299
17300 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17301
17302         * m4/host-os.m4: Add a copyright notice.
17303
17304 2004-04-20  Jim Meyering  <jim@meyering.net>
17305
17306         Change UTILS_ to gl_ in AC_DEFINE'd names.
17307         Change utils_- and jm_-prefixed variables, too.
17308         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17309         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17310         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17311
17312         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17313         Don't emit trailing blanks.
17314         Also rename jm_-prefixed variables to have gl_ prefix.
17315
17316         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17317         Also rename jm_-prefixed variables to have gl_ prefix.
17318
17319         * m4/jm-macros.m4: Reflect the renamings.
17320         * m4/prereq.m4: Likewise.
17321
17322 2004-04-20  Jim Meyering  <jim@meyering.net>
17323
17324         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17325         memory.
17326
17327 2004-04-20  Jim Meyering  <jim@meyering.net>
17328             Bruno Haible  <bruno@clisp.org>
17329
17330         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17331         memory when realloc fails.
17332
17333 2004-04-19  Jim Meyering  <jim@meyering.net>
17334
17335         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17336         now that readutmp.c may call `free (0)'.
17337
17338 2004-04-19  Bruno Haible  <bruno@clisp.org>
17339
17340         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17341         * m4/inttypes_h.m4: Likewise.
17342         * m4/stdint_h.m4: Likewise.
17343         * m4/intmax_t.m4: Likewise.
17344         * m4/uintmax_t.m4: Likewise.
17345
17346 2004-04-18  Jim Meyering  <jim@meyering.net>
17347
17348         * m4/prereq.m4: Don't forbid jm_ prefix.
17349
17350         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17351         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17352         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17353         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17354         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17355         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17356         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17357         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17358         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17359         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17360         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17361         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17362         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17363         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17364         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17365         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17366         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17367         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17368         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17369
17370 2004-04-18  Jim Meyering  <jim@meyering.net>
17371
17372         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17373         failure, don't leak memory and do call END_UTMP_ENT.
17374
17375 2004-04-16  Jim Meyering  <jim@meyering.net>
17376
17377         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17378         coreutils' stat program.
17379         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17380
17381 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17382
17383         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17384         C89.
17385         (CHAR_BIT): Remove, since we assume C89.
17386         Include <stdint.h> if available, as per current Autoconf CVS advice.
17387
17388 2004-03-31  Jim Meyering  <jim@meyering.net>
17389
17390         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17391         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17392         * m4/xalloc.m4: Likewise.
17393
17394 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17395
17396         Merge from coreutils.
17397
17398         * m4/inttostr.m4: New file.
17399         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17400         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17401         Require gl_CLOCK_TIME.
17402         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17403
17404 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17405
17406         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17407         not bool, to be more consistent with Unix conventions.
17408         Suggested by Bruno Haible.
17409
17410         Merge from coreutils.
17411
17412         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17413         * lib/umaxtostr.c: New files.
17414
17415         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17416         the usual <time.h> dance.
17417         (get_date): Change signature to support fractional time stamps.
17418         All callers changed.
17419         * lib/getdate.y: Include "getdate.h" first, as we can now
17420         assume C89 and don't need to worry about 'const'.
17421         Similarly, include "unlocked-io.h" near start, not in middle.
17422         Include <limits.h>.
17423         (textint.value): Use long int rather than int.
17424         (textint.digits): Use size_t rather than int.
17425         (BILLION, LOG10_BILLION): New constants.
17426         (parser_control): New member rel_ns.  Members day_ordinal,
17427         time_zone, month, day, hour, minutes, rel_year, rel_month,
17428         rel_day, rel_hour, rel_minutes, rel_seconds
17429         are now long int, not int.  Member seconds is now struct timespec,
17430         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17431         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17432         not int.
17433         (%union.intval): Now long int, not int.
17434         New member timespec.
17435         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17436         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17437         (spec): Now is a timespec or an item list.
17438         (timespec, items): New nonterminals.
17439         (time, rel, relunit, number, get_date):
17440         Add support for fractional seconds.
17441         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17442         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17443         (to_hour): First arg is now long int, not int.
17444         (to_year): Returns long int, not int.
17445         Don't treat year -70 like 70.
17446         (tm_diff): Returns long int, not int.
17447         (lookup_word): Use bool instead of int when appropriate.
17448         (yylex): Use size_t for count, not int.
17449         Detect overflow when parsing large integer constants.
17450         Add support for fractions.
17451         (get_date): Make pointers 'const' if possible.
17452         Use more-portable code to detect integer overflow.
17453         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17454         Don't use ctime; it's not reliable if the year has >4 digits.
17455
17456         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17457         This is for compatibility with BSD.
17458
17459         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17460         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17461         From coreutils' system.h.
17462
17463         * lib/userspec.c: Don't include "posixver.h".
17464         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17465         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17466         compatible extension.  Simplify code by removing a boolean int
17467         that was always nonzero if a string was nonnull.
17468
17469 2004-03-30  Jim Meyering  <jim@meyering.net>
17470
17471         Merge from coreutils.
17472
17473         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17474         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17475         on some systems one must include <grp.h> before it.
17476         Reported by Christian Krackowizer.
17477
17478 2004-03-30  Jim Meyering  <jim@meyering.net>
17479
17480         Merge from coreutils.
17481
17482         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17483
17484         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17485         an empty input stream.
17486
17487         * lib/readtokens.c: Include <stdbool.h>.
17488         (readtoken): Use `size_t' rather than int/long.
17489         All callers adjusted.
17490         Use `bool' rather than `int' where appropriate.
17491         Use memset rather than an explicit loop.
17492         Use x2nrealloc rather than xrealloc.
17493         Allow the use of `\0' as a delimiter.
17494         (readtokens): Likewise.
17495         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17496
17497 2004-03-30  Jim Meyering  <jim@meyering.net>
17498
17499         * m4/realloc.m4: Remove file, since now it does no more than
17500         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17501         the `configure.ac' section of module/realloc.
17502         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17503
17504 2004-03-30  Bruno Haible  <bruno@clisp.org>
17505
17506         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17507         nonnull.
17508
17509 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17510
17511         Merge changes to getloadavg.c from coreutils and Emacs.
17512
17513         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17514         Define to an expression, not to the empty string.
17515         Include cloexec.h and xalloc.h.
17516         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17517         Use set_cloexec_flag rather than rolling our own.
17518         * lib/cloexec.c, lib/cloexec.h: New files.
17519
17520 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17521
17522         * m4/cloexec.m4: New file.
17523
17524 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17525
17526         * lib/getopt.h: Sync with libc CVS.
17527
17528 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17529             Bruno Haible  <bruno@clisp.org>
17530
17531         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17532         mbswidth.
17533
17534 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17535             Bruno Haible  <bruno@clisp.org>
17536
17537         * lib/mbswidth.h: Include <wchar.h> only if
17538         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17539         <wchar.h>.
17540         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17541
17542 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17543
17544         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17545         Sync with libc CVS.
17546         * lib/getopt_int.h: New file, also synced from libc.
17547
17548 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17549
17550         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17551         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17552         Bring back getopt.c, getopt.h, getopt1.c.
17553
17554 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17555
17556         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17557         All uses changed.  Check for sa_sigaction member; this fixes
17558         a bug first reported by Jason Andrade in
17559         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17560
17561 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17562
17563         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17564         '#if' expressions.  Unlike the code it replaces, it does not
17565         depend on (defined _SC_PAGESIZE).  However, it does depend on
17566         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17567         first reported by Jason Andrade in
17568         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17569
17570 2004-02-25  Simon Josefsson  <jas@extundo.com>
17571
17572         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17573
17574 2004-02-25  Simon Josefsson  <jas@extundo.com>
17575
17576         * lib/strdup.h: New file.
17577         * lib/strdup.c: Include it.
17578         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17579         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17580
17581 2004-02-23  Karl Berry  <karl@gnu.org>
17582
17583         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17584         (from fencepost.gnu.org:/gd/gnuorg).
17585
17586 2004-02-23  Karl Berry  <karl@gnu.org>
17587
17588         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17589         * config/srclist.txt: add maintain/standards documents.
17590
17591 2004-02-18  Bruno Haible  <bruno@clisp.org>
17592
17593         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17594         Reported by Derek Robert Price <derek@ximbiot.com>.
17595
17596 2004-02-16  Karl Berry  <karl@gnu.org>
17597
17598         * config/mkinstalldirs, install-sh: update from automake.
17599
17600 2004-02-06  Karl Berry  <karl@gnu.org>
17601
17602         * m4/po.m4: update from gettext 0.14.1.
17603
17604 2004-02-06  Karl Berry  <karl@gnu.org>
17605
17606         * lib/config.charset: update from gettext 0.14.1.
17607
17608 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17609
17610         Add comments and code, prompted by suggestions from Bruno Haible
17611         for sh-quote.
17612         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17613         describing the enum quoting_style values.
17614         * lib/quotearg.c (quotearg_alloc): New function.
17615         (quotearg_buffer_restyled): Treat lone { and } as special.
17616         Treat = as special.  Work around bug with older shells
17617         that "see" a '\' that is really the 2nd byte of a multibyte char.
17618         Quote empty string with shell_quoting_style.
17619
17620 2004-02-03  Bruno Haible  <bruno@clisp.org>
17621
17622         * m4/pipe.m4: New file, from GNU gettext.
17623
17624 2004-02-03  Bruno Haible  <bruno@clisp.org>
17625
17626         * lib/pipe.h: New file, from GNU gettext.
17627         * lib/pipe.c: New file, from GNU gettext.
17628
17629 2004-01-27  Bruno Haible  <bruno@clisp.org>
17630
17631         * m4/execute.m4: New file, from GNU gettext.
17632
17633 2004-01-27  Bruno Haible  <bruno@clisp.org>
17634
17635         * lib/execute.h: New file, from GNU gettext.
17636         * lib/execute.c: New file, from GNU gettext.
17637         * lib/w32spawn.h: New file, from GNU gettext.
17638
17639 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17640
17641         Merge from diffutils.
17642
17643         * lib/file-type.c (file_type): Add typed memory objects.
17644         * lib/file-type.h (S_TYPEISTMO): New macro.
17645
17646         * lib/c-stack.h (c_stack_action): Remove argv argument.
17647         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17648         (die): Don't calculate message unless segv_action returns.
17649         (get_stack_location, min_address_from_argv, max_address_from_argv,
17650         volatile stack_base, volatile_stack_size): Remove.
17651         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17652         that every segmentation violation is a stack overflow.  (Ouch!)
17653         See Debian bug 136249 (still outstanding) for more info about why
17654         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17655
17656 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17657
17658         Exit-status fix from coreutils.
17659
17660         Use exit_failure consistently in place of EXIT_FAILURE,
17661         so that program exit statuses are consistent on failure.
17662
17663         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17664         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17665         * lib/argmatch.h: Comment fix to match the above.
17666         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17667         Now a macro referring to exit_failure, instead of a separate
17668         variable.  Include "exitfail.h" to get it.
17669         * lib/xstrtol.h: Include "exitfail.h".
17670         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17671
17672         * lib/long-options.c (parse_long_options): Use prototype
17673         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17674         for clarity.
17675
17676 2004-01-21  Jim Meyering  <jim@meyering.net>
17677
17678         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17679         so as not to conflict with a different-sized __mktime_internal
17680         function in GNU libc.
17681         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17682         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17683
17684 2004-01-20  Karl Berry  <karl@gnu.org>
17685
17686         * config/config.guess: update from config.
17687
17688         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17689
17690 2004-01-20  Bruno Haible  <bruno@clisp.org>
17691
17692         Safer stack allocation.
17693         * lib/setenv.c: Include allocsa.h.
17694         (alloca): Remove fallback definition.
17695         (freea): Remove macro.
17696         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17697         instead of freea.
17698
17699 2004-01-20  Bruno Haible  <bruno@clisp.org>
17700
17701         * m4/eealloc.m4: New file, from GNU gettext.
17702
17703 2004-01-20  Bruno Haible  <bruno@clisp.org>
17704
17705         * m4/allocsa.m4: New file, from GNU gettext.
17706
17707 2004-01-20  Bruno Haible  <bruno@clisp.org>
17708
17709         * lib/xallocsa.h: New file, from GNU gettext.
17710         * lib/xallocsa.c: New file, from GNU gettext.
17711
17712 2004-01-20  Bruno Haible  <bruno@clisp.org>
17713
17714         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17715
17716 2004-01-20  Bruno Haible  <bruno@clisp.org>
17717
17718         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17719         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17720         specially.
17721
17722 2004-01-20  Bruno Haible  <bruno@clisp.org>
17723
17724         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17725         patch.
17726
17727 2004-01-20  Bruno Haible  <bruno@clisp.org>
17728
17729         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17730
17731 2004-01-20  Bruno Haible  <bruno@clisp.org>
17732
17733         * lib/eealloc.h: New file.
17734
17735 2004-01-20  Bruno Haible  <bruno@clisp.org>
17736
17737         * lib/binary-io.h: Avoid warnings on Cygwin.
17738
17739 2004-01-20  Bruno Haible  <bruno@clisp.org>
17740
17741         * lib/allocsa.h: New file, from GNU gettext.
17742         * lib/allocsa.c: New file, from GNU gettext.
17743
17744 2004-01-18  Karl Berry  <karl@gnu.org>
17745
17746         * doc/gpl.texi, doc/lgpl.texi: new files.
17747
17748 2004-01-18  Karl Berry  <karl@gnu.org>
17749
17750         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17751         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17752
17753 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17754
17755         Merge from coreutils.
17756
17757         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17758         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17759         (gl_DEFAULT_POSIX2_VERSION): Move
17760         the documentation from 'configure' into 'config.hin',
17761         so that 'configure --help' isn't burdened by it and
17762         we don't have to worry about its formatting there.
17763         Reword the documentation so that it's more succinct
17764         and can be run together into a single paragraph.
17765         * m4/same.m4 (gl_SAME): Check for pathconf.
17766
17767 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17768
17769         Merge from coreutils.
17770
17771         * lib/posixver.c: Include posixver.h.
17772
17773         * lib/same.c: Include <stdbool.h>, <limits.h>.
17774         (_POSIX_NAME_MAX): Define if not defined.
17775         (MIN): New macro.
17776         (same_name): If file names are silently truncated, report
17777         that the file names are the same if they are the same after
17778         the silent truncation.
17779
17780         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17781         conversion function.
17782         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17783         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17784         longer needed.
17785
17786 2004-01-15  Jim Meyering  <jim@meyering.net>
17787
17788         Merge from coreutils.
17789
17790         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17791         if no library is required.
17792         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17793         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17794         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17795         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17796         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17797         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17798         value, $ac_cv_search_crypt, if it's "none required".
17799         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17800         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17801         not gl_FUNC_GETLOADAVG.
17802         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17803         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17804
17805 2004-01-15  Jim Meyering  <jim@meyering.net>
17806
17807         Merge from coreutils.
17808
17809         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17810         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17811         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17812
17813         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17814         optional configure-time default.
17815
17816         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17817
17818         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17819
17820 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17821
17822         Merge from coreutils.
17823
17824         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17825         value, $ac_cv_search_nanosleep, if it's "none required".
17826
17827 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17828
17829         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17830         with like-named macro in fnmatch.c.
17831         (EXT): Use an internal constant instead.
17832
17833         Merge fnmatch patches from glibc.
17834         * lib/fnmatch.c (mbsinit): Remove define.
17835         Add libc_hidden_ver (__fnmatch, fnmatch).
17836         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17837         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17838
17839 2004-01-14  Karl Berry  <karl@gnu.org>
17840
17841         * config/install-sh: update from automake.
17842
17843 2004-01-13  Karl Berry  <karl@gnu.org>
17844
17845         * config/install-sh: update from automake.
17846
17847 2004-01-09  Karl Berry  <karl@gnu.org>
17848
17849         * config/install-sh: update from automake.
17850
17851 2004-01-05  Karl Berry  <karl@gnu.org>
17852
17853         * config/config.{sub,guess}: update from config.
17854
17855 2003-12-31  Karl Berry  <karl@gnu.org>
17856
17857         * config/depcomp: update from automake.
17858
17859 2003-12-14  Karl Berry  <karl@gnu.org>
17860
17861         * lib/config.charset: update from gettext-runtime.
17862
17863 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17864
17865         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17866         Bug reported by Alfred M. Szmidt.
17867
17868 2003-12-03  Bruno Haible  <bruno@clisp.org>
17869
17870         * m4/gettext.m4: Upgrade from gettext-0.13.
17871         * m4/po.m4: Upgrade from gettext-0.13.
17872         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17873         * m4/intmax.m4: New file, from gettext-0.13.
17874         * m4/printf-posix.m4: New file, from gettext-0.13.
17875
17876 2003-11-29  Karl Berry  <karl@gnu.org>
17877
17878         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17879
17880 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17881             Bruno Haible  <bruno@clisp.org>
17882
17883         * lib/printf-parse.h: Don't include sys/types.h.
17884         (ARG_NONE): New macro.
17885         (char_directive): Change type of *arg_index fields to size_t.
17886         * lib/printf-parse.c: Don't include sys/types.h.
17887         (SSIZE_MAX): Remove macro.
17888         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17889         Remove unnecessary overflow check.
17890         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17891         fields.
17892
17893 2003-11-25  Bruno Haible  <bruno@clisp.org>
17894
17895         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17896
17897 2003-11-25  Bruno Haible  <bruno@clisp.org>
17898
17899         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17900         gt_TYPE_SSIZE_T.
17901
17902 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17903
17904         * modules/alloca: Remove dependency on xalloc.
17905
17906 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17907
17908         * lib/alloca.c: Remove dependency on xalloc module.
17909         (xalloc_die): Remove.
17910         (memory_full) [!defined emacs]: New macro.
17911         [!defined emacs]: Don't include xalloc.h.
17912         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17913         address arithmetic overflows.  Change datatypes a bit to avoid
17914         unnecessary casts.
17915
17916 2003-11-22  Jim Meyering  <jim@meyering.net>
17917
17918         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17919         s/size/size_t/.
17920
17921 2003-11-21  Karl Berry  <karl@gnu.org>
17922
17923         * config/config.{sub,guess}: update from config.
17924
17925 2003-11-18  Karl Berry  <karl@gnu.org>
17926
17927         * config/config.{sub,guess}: update from config.
17928
17929         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17930
17931 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17932
17933         * README: Mention that S+T cannot overflow if S is the size of
17934         an existing object and T is sufficiently small.
17935
17936 2003-11-17  Jim Meyering  <jim@meyering.net>
17937
17938         On systems without utime and without a utimes function capable of
17939         dealing with a NULL struct utimbuf* argument, this utime replacement
17940         could -- in unusual circumstances -- leak a file descriptor.
17941         * lib/utime.c: Include <unistd.h> and <errno.h>.
17942         (utime_null): Be sure to close `fd' and to preserve errno.
17943         Reported by Geoff Collyer via Arnold Robbins.
17944
17945 2003-11-17  Bruno Haible  <bruno@clisp.org>
17946
17947         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17948         (Depends-on): Add xsize.
17949
17950 2003-11-17  Bruno Haible  <bruno@clisp.org>
17951
17952         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17953
17954 2003-11-17  Bruno Haible  <bruno@clisp.org>
17955
17956         * lib/vasnprintf.c (alloca): Remove fallback definition.
17957         (freea): Remove definition.
17958         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17959         Reported by Paul Eggert.
17960
17961 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17962             Bruno Haible  <bruno@clisp.org>
17963
17964         Protect against address arithmetic overflow.
17965         * lib/printf-args.h: Include stddef.h.
17966         (arguments): Change type of field 'count' to size_t.
17967         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17968         'unsigned int' where appropriate.
17969         * lib/printf-parse.h: Include sys/types.h.
17970         (char_directive): Change type of *arg_index fields to ssize_t.
17971         (char_directives): Change type of fields 'count', max_*_length to
17972         size_t.
17973         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17974         (SSIZE_MAX): Define fallback value.
17975         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17976         instead of 'int' where appropriate. Check a_allocated, d_allocated
17977         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17978         * lib/vasnprintf.c: Include xsize.h.
17979         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17980         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17981         overflow. Avoid wraparound when converting a width or precision from
17982         decimal to binary.
17983
17984 2003-11-16  Bruno Haible  <bruno@clisp.org>
17985
17986         Update from GNU gettext.
17987         * lib/printf-parse.c: Generalize to it can be compiled for wide
17988         strings.
17989         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17990         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17991         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17992         SNPRINTF): New macros.
17993         Don't include <alloca.h> if the file is used inside libintl.
17994         (local_wcslen): New function, for Solaris 2.5.1.
17995         (VASNPRINTF): Use it instead of wcslen.
17996
17997 2003-11-16  Bruno Haible  <bruno@clisp.org>
17998
17999         * lib/xsize.h (xmax): New function.
18000         (xsum, xsum3, xsum4): Declare as "pure" functions.
18001
18002 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18003
18004         * modules/xalloc (Files): Undo latest change, since xalloc.h
18005         no longer needs SIZE_MAX or PTRDIFF_MAX.
18006
18007 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18008
18009         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18010         gl_PTRDIFF_MAX.
18011
18012 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18013
18014         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18015         "return", to pacify some unknown compiler.  Problem reported
18016         by Joerg Schilling.
18017
18018 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18019
18020         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18021         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18022         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18023         heuristic is just as accurate as far as we know, and it removes a
18024         dependency on size_max.m4 and ptrdiff_max.m4.
18025
18026 2003-11-11  Bruno Haible  <bruno@clisp.org>
18027
18028         * modules/xsize (Files): Add m4/size_max.m4.
18029         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18030
18031 2003-11-11  Bruno Haible  <bruno@clisp.org>
18032
18033         * m4/size_max.m4: New file.
18034         * m4/ptrdiff_max.m4: New file.
18035         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18036         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18037         (gl_XALLOC): Invoke it.
18038
18039 2003-11-11  Bruno Haible  <bruno@clisp.org>
18040
18041         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18042         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18043         defined.
18044
18045 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18046
18047         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18048         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18049         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18050         From Bruno Haible.
18051         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18052         not (size_t) -1, since it's defined here.
18053
18054 2003-11-09  Karl Berry  <karl@gnu.org>
18055
18056         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18057
18058 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18059
18060         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18061         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18062         Reject sizes of exactly SIZE_MAX bytes.
18063         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18064         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18065
18066 2003-11-05  Bruno Haible  <bruno@clisp.org>
18067
18068         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18069         SIZE_MAX defined in <limits.h> on Solaris.
18070
18071 2003-11-04  Jim Meyering  <jim@meyering.net>
18072
18073         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18074         variable names, rather than @VAR@.
18075         * modules/poll: Likewise.
18076
18077 2003-11-04  Bruno Haible  <bruno@clisp.org>
18078
18079         * modules/xsize: New file.
18080         * modules/linebreak: Depend on xsize.
18081         * MODULES.html.sh (func_all_modules): Add xsize.
18082
18083 2003-11-04  Bruno Haible  <bruno@clisp.org>
18084
18085         * m4/xsize.m4: New file.
18086
18087 2003-11-04  Bruno Haible  <bruno@clisp.org>
18088
18089         * lib/xsize.h: New file.
18090         * lib/linebreak.c: Include xsize.h.
18091         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18092         argument for overflow.
18093         Suggested by Paul Eggert.
18094
18095 2003-11-03  Karl Berry  <karl@gnu.org>
18096
18097         * config/config.{guess,sub}: update from config.
18098
18099 2003-11-03  Jim Meyering  <jim@meyering.net>
18100
18101         * modules/userspec (lib_SOURCES): Add userspec.h.
18102         (Include): Add "userspec.h".
18103         Improve description.
18104
18105 2003-11-03  Jim Meyering  <jim@meyering.net>
18106
18107         * lib/userspec.c: Include "userspec.h".
18108         * lib/userspec.h: New file.
18109
18110 2003-11-03  Bruno Haible  <bruno@clisp.org>
18111
18112         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18113
18114 2003-11-03  Bruno Haible  <bruno@clisp.org>
18115
18116         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18117         available, to avoid (extremely rare) race condition.
18118         Suggested by Paul Eggert.
18119
18120 2003-11-02  Karl Berry  <karl@gnu.org>
18121
18122         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18123
18124 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18125
18126         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18127         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18128         (read_filesystem_list): Set and use me_type_malloced.
18129         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18130         whatever the type happens to be), for brevity and consistency.
18131         Check for size calculation overflow on Alphas running OSF/1.
18132
18133 2003-10-31  Jim Meyering  <jim@meyering.net>
18134
18135         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18136
18137         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18138
18139 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18140             Bruno Haible  <bruno@clisp.org>
18141
18142         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18143         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18144
18145 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18146
18147         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18148         netbsd*-gnu*.  Suggested by Robert Millan.
18149
18150 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18151
18152         * modules/group-member: Depend on stdbool.
18153
18154 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18155
18156         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18157
18158 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18159
18160         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18161         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18162         after the 'gnu' in these cases.  This fixes some bugs in the
18163         previous change, and is based on suggestions by Robert Millan.
18164
18165 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18166
18167         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18168         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18169         no longer needed.
18170         * lib/quotearg.c (quotearg_n_options): Use it.
18171         * lib/group-member.c: Include <stdbool.h>.
18172         (free_group_info): Arg is now const *; don't free arg.
18173         (get_group_info): Now returns bool and accepts struct group_info *,
18174         rather than returning a malloc'ed struct group_info *.
18175         All uses changed.  Check for overflow in internal size calculation.
18176
18177         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18178         rather than xmalloc/xrealloc.
18179         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18180         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18181         conformance bug: the old code used a pointer after freeing the
18182         storage that it addressed.
18183         * lib/hash.c (hash_initialize): Simplify the code by using
18184         xalloc_oversized rather than doing it by hand.
18185         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18186         the buffer preserved.  Use free and xmalloc instead.
18187         * lib/quotearg.c (quotearg_n_options): Likewise.
18188         Use a simpler test for size overflow.  Don't use xalloc_oversized
18189         because unsigned int might be wider than size_t (!); this suggests
18190         that we should switch from unsigned int to size_t for slot numbers.
18191
18192 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18193
18194         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18195         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18196         NetBSD kernels.  Requested by Richard Stallman.
18197
18198 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18199
18200         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18201         to allocate the returned structure.  Do not allocate a subarray,
18202         as x2nrealloc will do that.
18203         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18204         instead of xnrealloc.
18205         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18206
18207 2003-10-27  Bruno Haible  <bruno@clisp.org>
18208
18209         * lib/stdbool_.h: Better support for BeOS.
18210
18211 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18212
18213         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18214         now uses inline.
18215
18216 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18217
18218         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18219         callers that want to do their own size-overflow checking.  Include
18220         <stdbool.h>, since xalloc_oversized returns bool.
18221         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18222         to use xalloc_oversized.
18223
18224         Add two functions x2realloc, x2nrealloc, for programs that grow
18225         arrays dynamically by doubling their sizes.
18226         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18227         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18228         New functions.
18229
18230         Port to C99 semantics for 'inline' of external functions.
18231         Bug reported by Bruno Haible.
18232         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18233         with the old contents of xnmalloc.
18234         (xnmalloc, xmalloc): Use it.
18235         (xnrealloc_inline): New static inline function,
18236         with the old contents of xnrealloc.
18237         (xnrealloc, xrealloc): Use it.
18238
18239         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18240         that.
18241
18242 2003-10-26  Karl Berry  <karl@gnu.org>
18243
18244         * config/srclist.txt (COPYING.DOC): no longer available from
18245         /gd/gnuorg; don't know where the ultimate source is.
18246
18247 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18248
18249         Fix several address-calculation bugs in the hash modules,
18250         plus some minor code cleanup.
18251
18252         * lib/hash.h: Include <stdbool.h>, for bool.
18253         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18254         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18255         hash_get_n_entries, hash_get_max_bucket_length,
18256         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18257         hash_rehash): Use size_t rather than unsigned.
18258         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18259         hash_get_n_buckets_used, hash_get_n_entries,
18260         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18261         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18262         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18263         Likewise.
18264         (SIZE_MAX): Define if not defined.
18265         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18266         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18267         hash_print):
18268         Use const * when possible.
18269         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18270         (check_tuning): Fix bug: if tuning parameters were very close to
18271         0 or 1, rounding errors could have caused subscript violations.
18272         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18273         (hash_initialize): Add 'fail:' label
18274         to free table and return NULL, and use it to simplify code.
18275         Use calloc rather than clearing the storage ourself.
18276         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18277         buffer size calculations.
18278         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18279         Include <stddef.h>, for size_t.
18280         * lib/hash-pjw.c (hash_pjw): Likewise.
18281         Switch to method described by Bruno Haible.
18282         Include <limits.h>, for CHAR_BIT.
18283         (SIZE_BITS): New macro.
18284
18285 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18286
18287         * m4/getline.m4 (AM_FUNC_GETLINE):
18288         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18289         hosts.  Problem reported by Derek Robert Price in
18290         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18291         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18292         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18293
18294 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18295
18296         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18297         ceiling the allocation at NMAX bytes rather than silently
18298         discarding input bytes before NMAX is reached.  This makes
18299         a difference only if NMAX exceeds SIZE_MAX / 2.
18300
18301         * lib/obstack.c: Merge from glibc.
18302         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18303         Add libc_hidden_def (_obstack_newchunk).
18304         (_obstack_free) [! defined _LIBC]: Remove.
18305         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18306         a clone of the function body.
18307         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18308         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18309
18310         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18311         glibc.
18312         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18313         arg to memcpy.
18314
18315         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18316         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18317         Don't use lvalue casts, as GCC plans to remove support for them
18318         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18319         was also present in the non-GCC version, indicating that this
18320         code had always been buggy and had never been widely used.
18321         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18322         Use the fast variant of each macro, rather than copying the
18323         definiens of the fast variant; that way, we'll be more likely to
18324         catch future bugs in the fast variants.
18325
18326 2003-10-20  Bruno Haible  <bruno@clisp.org>
18327
18328         * modules/wait-process: New file.
18329         * MODULES.html.sh (func_all_modules): Add wait-process.
18330
18331 2003-10-20  Bruno Haible  <bruno@clisp.org>
18332
18333         * m4/wait-process.m4: New file.
18334
18335 2003-10-20  Bruno Haible  <bruno@clisp.org>
18336
18337         * lib/wait-process.h: New file, from GNU gettext.
18338         * lib/wait-process.c: New file, from GNU gettext.
18339
18340 2003-10-19  Jim Meyering  <jim@meyering.net>
18341
18342         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18343         HPUX 10.20.
18344
18345 2003-10-18  Karl Berry  <karl@gnu.org>
18346
18347         * config/config.guess: update from config.
18348
18349 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18350
18351         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18352         (getgroups): First arg is int, not size_t.
18353         Don't let 'free' mangle errno.
18354
18355 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18356
18357         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18358
18359 2003-10-16  Karl Berry  <karl@gnu.org>
18360
18361         * config/config.{guess,sub}: update from config.
18362
18363 2003-10-16  Jim Meyering  <jim@meyering.net>
18364
18365         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18366         memcpy.
18367
18368 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18369
18370         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18371         (SIZE_MAX): Remove.
18372         (new_exclude, add_exclude_file): Initial size no longer needs to
18373         be a power of 2.
18374         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18375         our own address arithmetic overflow checking.
18376
18377         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18378         (fnmatch): Do not alloca more than 2000 wide characters;
18379         instead, use malloc for large buffers.
18380         Check for address arithmetic overflow, and return -1
18381         with errno set to ENOMEM in that case.
18382         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18383         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18384         instead, return -1.  Check for address arithmetic overflow.
18385
18386 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18387
18388         Handle invalid suffixes and overflow independently, so that
18389         callers can treat them independently as needed.  Fix some bugs in
18390         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18391         suffix for a human-readable blocksize.  The major caller-visible
18392         change is the addition of a new
18393         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18394         that both overflow and suffix chars were found.
18395
18396         * lib/human.c (humblock): Don't check separately for invalid suffix
18397         char; that is xstrtoumax's job (now that its bug is fixed).
18398         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18399         INTMAX_MAX]: New macros.
18400         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18401         TYPE_MAXIMUM): New macros.
18402         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18403         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18404         if overflow occurs, as it's what __strtol does and it's more useful
18405         in practice.
18406         (__xstrtol): If __strtol reports some error other than ERANGE,
18407         reflect it to the caller as LONGINT_INVALID.  If it reports
18408         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18409         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18410         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18411         value.
18412         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18413         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18414         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18415         [defined UINTMAX_MAX]: New macros.
18416
18417 2003-10-14  Bruno Haible  <bruno@clisp.org>
18418
18419         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18420
18421 2003-10-14  Bruno Haible  <bruno@clisp.org>
18422
18423         * m4/sig_atomic_t: New file, from GNU gettext.
18424         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18425
18426 2003-10-14  Bruno Haible  <bruno@clisp.org>
18427
18428         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18429         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18430         Also use volatile where needed.
18431
18432 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18433
18434         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18435         Change maintainer from Bruno Haible to 'all'.
18436
18437 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18438
18439         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18440
18441 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18442
18443         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18444         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18445         and define in terms of the other primitives.
18446         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18447         (SIZE_MAX): Define if not already defined.
18448         (array_size_overflow): New function.
18449         (xalloc_die): Abort instead of exiting if 'error' returns.
18450         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18451         (xmalloc, xrealloc): Use them.
18452         (xcalloc): Check for address arithmetic overflow.
18453         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18454         a bit faster than strcpy.
18455
18456 2003-10-10  Simon Josefsson  <jas@extundo.com>
18457
18458         * modules/argp (Depends-on): Add restrict and strcase.
18459
18460 2003-10-10  Simon Josefsson  <jas@extundo.com>
18461
18462         * m4/argp.m4: Add AC_C_INLINE.
18463
18464 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18465
18466         Merge getpass from libc, plus a few fixes.
18467
18468         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18469         Include <stdbool.h>.
18470         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18471         __fsetlocking to empty.
18472         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18473         do include <bits/libc-lock.h>.
18474         Do not include <fcntl.h>; not needed.
18475         [_LIBC]: Include <wchar.h>.
18476         (NOTCANCEL_MODE): New macro.
18477         (flockfile, funlockfile) [_LIBC]: New macros.
18478         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18479         [!_LIBC]: New macros.
18480         (call_fclose): New function.
18481         (getpass): Use it.  Save tty stream separately; this simplifies the
18482         code and makes it more reliable if stdin happens to equal stdout.
18483         Invoke __fsetlocking on tty.
18484         Handle thread cancellation if needed.
18485         Namespace cleanup (use __tcgetattr, __getline).
18486         Use bool for Booleans.
18487         [USE_IN_LIBIO]: Handle wide streams.
18488         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18489         stream might go where.
18490
18491         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18492         doesn't have to include <stdio.h> before us.
18493         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18494         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18495         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18496         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18497         if not declared, so that we can use getpass.c code from libc without
18498         rewriting it.
18499         (flockfile, ftrylockfile, funlockfile): New macros.
18500
18501 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18502
18503         * modules/getpass: Depend on stdbool.
18504
18505 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18506
18507         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18508
18509 2003-10-07  Karl Berry  <karl@gnu.org>
18510
18511         * config/config.{guess,sub}: update from config.
18512
18513 2003-10-06  Jim Meyering  <jim@meyering.net>
18514             Bruno Haible  <bruno@clisp.org>
18515
18516         This lets translators provide better translations for the
18517         "Written by ..." part of --version output.
18518         * lib/version-etc.h: Include stdarg.h.
18519         (version_etc_copyright): Declare as readonly.
18520         (version_etc): Make this function variadic with a NULL-terminated list
18521         of author name strings.
18522         (version_etc_va): New declaration.
18523         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18524         (version_etc_copyright): Declare as readonly.
18525         (version_etc_va): New function. Provide a different translatable string
18526         for each possible number of authors < 10. Abbreviate when there are 10
18527         authors or more.
18528         (version_etc): Make this function variadic. Call version_etc_va.
18529         Suggestion from Gary V. Vaughan.
18530
18531         * lib/long-options.h (parse_long_options): Change prototype: the
18532         authors string is moved to the end and becomes variadic.
18533         * lib/long-options.c: Include stdarg.h.
18534         (parse_long_options): Make this function variadic, too.
18535         Call version_etc_va, not version_etc.
18536
18537 2003-10-06  Bruno Haible  <bruno@clisp.org>
18538
18539         * modules/version-etc-2: Remove file.
18540         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18541
18542 2003-10-06  Bruno Haible  <bruno@clisp.org>
18543
18544         * modules/fatal-signal: New file.
18545         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18546
18547 2003-10-06  Bruno Haible  <bruno@clisp.org>
18548
18549         * m4/fatal-signal.m4: New file.
18550         * m4/signalblocking.m4: New file, from GNU gettext.
18551
18552 2003-10-06  Bruno Haible  <bruno@clisp.org>
18553
18554         * lib/version-etc-2.h: Remove file.
18555         * lib/version-etc-2.c: Remove file.
18556
18557 2003-10-06  Bruno Haible  <bruno@clisp.org>
18558
18559         * lib/fatal-signal.h: New file, from GNU gettext.
18560         * lib/fatal-signal.c: New file, from GNU gettext.
18561
18562 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18563
18564         * README: Rework advice for preventing empty .o files.
18565         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18566         not <sys/types.h>.
18567
18568 2003-10-04  Karl Berry  <karl@gnu.org>
18569
18570         * lib/argp*: update from libc.
18571
18572 2003-10-04  Karl Berry  <karl@gnu.org>
18573
18574         * config/config.{guess,sub}: update from config.
18575
18576 2003-10-02  Bruno Haible  <bruno@clisp.org>
18577
18578         * modules/lchown (Include): Add lchown.h.
18579         * modules/time_r (Include): Use "..." syntax.
18580         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18581
18582 2003-10-01  Simon Josefsson  <jas@extundo.com>
18583
18584         * MODULES.html.sh (func_all_modules): Move gethostname from section
18585         'based on' to section 'lacking' POSIX:2001.
18586
18587 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18588
18589         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18590         to output mode on the same stream.
18591
18592 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18593
18594         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18595         Fix arg typo in previous patch.
18596
18597 2003-09-28  Jim Meyering  <jim@meyering.net>
18598
18599         * lib/error.c: Correct cpp indentation.
18600
18601 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18602
18603         * modules/free: New file.
18604
18605 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18606
18607         * m4/free.m4: New file.
18608
18609 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18610
18611         * lib/minmax.h (MIN, MAX)
18612         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18613         Omit the special code that used __typeof__, since we worry that
18614         it could be more trouble than it's worth.  See:
18615         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18616         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18617
18618         * lib/free.c: New file.
18619
18620 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18621
18622         Trivial fixes to Makefile.am parts of module listings.
18623         * modules/strstr: Append strstr.h to lib_SOURCES.
18624         * modules/strcase: Likewise, for strcase.h.
18625
18626 2003-09-27  Karl Berry  <karl@gnu.org>
18627
18628         * config/mkinstalldirs: update from automake.
18629
18630 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18631
18632         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18633         (error_tail): Do not loop, reallocating temporary buffer, since
18634         the output cannot contain more wide characters than the input
18635         contains bytes, the size must be big enough already.  This avoids
18636         one potential size overflow calculation.  Check for size overflow
18637         when calculating temporary buffer size.  Free temporary buffer
18638         when done, if it was allocated with malloc; this plugs a memory
18639         leak.  Remove casts from void * to pointers, that are no longer
18640         needed now that we're assuming C89 or better.
18641
18642         Merge error changes from glibc.
18643
18644         * lib/error.c, error.h: Update copyright notice header to match glibc.
18645         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18646         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18647         Disable cancellation while printing error.
18648         * lib/error.h: Prepend __ to parameter names.
18649
18650 2003-09-26  Jim Meyering  <jim@meyering.net>
18651
18652         * lib/error.c (error_tail): Move some declarations
18653         into inner scope where the local variables are used.
18654
18655 2003-09-26  Bruno Haible  <bruno@clisp.org>
18656
18657         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18658         stpncpy().
18659         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18660
18661 2003-09-26  Bruno Haible  <bruno@clisp.org>
18662
18663         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18664         (stpncpy): Define as alias for gnu_stpncpy.
18665         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18666
18667 2003-09-25  Simon Josefsson  <jas@extundo.com>
18668
18669         * lib/xgetdomainname.h: New file.
18670         * lib/xgetdomainname.c: New file.
18671
18672 2003-09-25  Simon Josefsson  <jas@extundo.com>
18673             Bruno Haible  <bruno@clisp.org>
18674
18675         * modules/getdomainname: New file.
18676         * modules/xgetdomainname: New file.
18677         * MODULES.html.sh (func_all_modules): Add getdomainname,
18678         xgetdomainname.
18679
18680 2003-09-25  Simon Josefsson  <jas@extundo.com>
18681             Bruno Haible  <bruno@clisp.org>
18682
18683         * m4/getdomainname.m4: New file.
18684
18685 2003-09-25  Simon Josefsson  <jas@extundo.com>
18686             Bruno Haible  <bruno@clisp.org>
18687
18688         * lib/getdomainname.h: New file.
18689         * lib/getdomainname.c: New file.
18690
18691 2003-09-25  Karl Berry  <karl@gnu.org>
18692
18693         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18694
18695 2003-09-25  Karl Berry  <karl@gnu.org>
18696
18697         * config/install-sh: update from automake.
18698
18699 2003-09-25  Bruno Haible  <bruno@clisp.org>
18700
18701         * modules/version-etc-2: New file, from modules/version-etc with
18702         modifications.
18703         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18704
18705 2003-09-25  Bruno Haible  <bruno@clisp.org>
18706
18707         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18708         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18709
18710 2003-09-24  Simon Josefsson  <jas@extundo.com>
18711
18712         * modules/xgethostname: Add xgethostname.h.
18713
18714 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18715
18716         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18717         the buffer associated with the argument.  Bug reported by
18718         Simon Josefsson.
18719
18720 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18721
18722         * README: Document assumptions that 'int' is at least 32 bits
18723         wide, that integer arithmetic is 2's complement without overflow,
18724         that there are no holes in integer values, that adding sizes of
18725         two nonoverlapping objects can't overflow, and that all-bits-zero
18726         yields scalar zero.  Fix spelling and capitalization typos.
18727
18728 2003-09-19  Karl Berry  <karl@gnu.org>
18729
18730         * lib/argp.h: update from libc.
18731
18732 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18733
18734         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18735         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18736         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18737
18738 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18739
18740         * gnulib-tool: Use "test -h", not "test -L", for portability
18741         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18742         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18743         (sed_extract_prog): Issue s commands one-by-one, rather than
18744         using \| in one s command.
18745
18746 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18747
18748         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18749         input error, instead of returning NULL the next time we are called
18750         (and therefore losing track of errno).
18751
18752 2003-09-16  Bruno Haible  <bruno@clisp.org>
18753
18754         * gnulib-tool (func_create_testdir): Warn about duplicated
18755         dependencies.
18756
18757 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18758
18759         * modules/argmatch, modules/fatal, modules/obstack,
18760         modules/xalloc, modules/xgethostname: Sort dependencies by
18761         importance, not alphabetically.
18762
18763 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18764
18765         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18766         fails, so that the caller gets the proper errno.
18767
18768         * lib/readutmp.c (read_utmp): Likewise.
18769         Check for fstat error.  Close stream and free storage
18770         when failing.
18771
18772 2003-09-14  Karl Berry  <karl@gnu.org>
18773
18774         * config/srclist.txt (strdup.c): disable for c89 changes.
18775
18776 2003-09-14  Jim Meyering  <jim@meyering.net>
18777
18778         * lib/getloadavg.c: Correct cpp indentation.
18779         * lib/strdup.c: Likewise.
18780         * lib/vasnprintf.c: Likewise.
18781
18782 2003-09-14  Bruno Haible  <bruno@clisp.org>
18783
18784         * modules/fwriteerror: New file.
18785         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18786
18787 2003-09-14  Bruno Haible  <bruno@clisp.org>
18788
18789         * lib/fwriteerror.h: New file.
18790         * lib/fwriteerror.c: New file.
18791
18792 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18793
18794         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18795         modules/xgethostname, modules/xalloc: Depend on exit.
18796
18797 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18798
18799         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18800
18801         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18802         and AC_MINIX, too, so that their extensions are available.
18803
18804         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18805         This macro has been superseded by gl_BACKUPFILE.
18806
18807         More patches to assume C89 or better.
18808
18809         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18810
18811         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18812         unconditionally.
18813         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18814         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18815         Include <string.h>, <stdlib.h> unconditionally.
18816         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18817         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18818         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18819         headers or for string.h.
18820         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18821         or strtoul.
18822
18823         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18824         headers.
18825         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18826         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18827         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18828         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18829         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18830         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18831         memcpy, memset.
18832         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18833         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18834         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18835         strtol.
18836         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18837         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18838         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18839         strtoul.
18840
18841 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18842
18843         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18844         * lib/obstack.c [!defined _LIBC]: Likewise.
18845         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18846         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18847         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18848
18849         More changes to assume C89 or better.
18850
18851         * lib/error.c (error_tail): Assume vprintf.
18852
18853         * lib/argmatch.c (getenv): Remove decl.
18854         * lib/progreloc.c (get_full_program_name): Define via prototype.
18855         * lib/setenv.c (clearenv): Likewise.
18856         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18857         needed.
18858         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18859         (malloc, memcpy): Remove decls.
18860         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18861         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18862         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18863         (memcpy): Remove macro.
18864         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18865         (__P): Remove.  All uses removed.
18866         (PTR): Remove.  All uses changed to void *.
18867         (CHAR_BIT, NULL): Remove.
18868         (spaces, zeros, memset_space, memset_zero)
18869         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18870         Remove.
18871         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18872         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18873         Define with prototype.
18874         Remove now-unnecessary prototype decl.
18875         (extra_args_spec): Assume ANSI C.  All uses changed.
18876         (extra_args_spec_iso): Remove.
18877         (my_strftime, emacs_strftimeu): Define via prototype.
18878         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18879         unconditionally.
18880         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18881         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18882         (strtoul, strtol): Remove decls.
18883         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18884         LONG_MAX): Remove.
18885         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18886         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18887         (LOCALE_PARAM_PROTO): New macro.
18888         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18889         (INTERNAL (strtol), strtol): Define with a prototype.
18890         (PARAMS): Remove.  All uses removed.
18891         * lib/tempname.c: Include <string.h> unconditionally.
18892         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18893         * lib/xgethostname.c (main): Define with a prototype.
18894         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18895         Include <stdlib.h> unconditionally.
18896         (calloc, malloc, realloc, free): Remove decls.
18897         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18898         Include <stdlib.h> unconditionally.  Sort include file names.
18899         (strtod): Remove.
18900         (xstrtod): Define with a prototype.
18901         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18902         (strtol, strtoul): Remove decls.
18903
18904 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18905
18906         More patches to assume C89 or better.
18907         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18908         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18909         string.h, memchr, STDC_HEADERS.
18910
18911 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18912
18913         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18914         Include <stdlib.h>, <string.h> unconditionally.
18915         Remove now-unnecessary cast to char *.
18916         * lib/strnlen.c: Include <string.h> unconditionally.
18917         * lib/yesno.c (yesno): Define with a prototype.
18918
18919 2003-09-11  Bruno Haible  <bruno@clisp.org>
18920
18921         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18922
18923 2003-09-10  Jim Meyering  <jim@meyering.net>
18924
18925         * lib/error.c: Correct indentation of cpp directives.
18926
18927 2003-09-10  Bruno Haible  <bruno@clisp.org>
18928
18929         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18930         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18931         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18932         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18933         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18934         <stdlib.h> and <string.h> checks.
18935         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18936         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18937
18938 2003-09-10  Bruno Haible  <bruno@clisp.org>
18939
18940         * lib/strcspn.c: Include <string.h> unconditionally.
18941         * lib/strpbrk.c: Include <string.h> unconditionally.
18942         * lib/strstr.c: Include <string.h> unconditionally.
18943         * lib/unicodeio.c: Include <string.h> unconditionally.
18944         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18945         * lib/unsetenv.c: Likewise.
18946         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18947         * lib/yesno.c: Include <stdlib.h> unconditionally.
18948         (rpmatch): Add prototype.
18949
18950 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18951
18952         More patches to assume C89 or better.
18953         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18954         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18955         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18956         or for string.h.
18957         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18958         stdlib.h.
18959         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18960         C headers.
18961         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18962         string.h.
18963         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18964         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18965         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18966         or for string.h.
18967         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18968         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18969         C headers.
18970         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18971         memcpy.
18972         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18973         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18974         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18975         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18976         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18977         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18978         string.h, free.
18979         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18980         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18981         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18982         C headers, or for string.h.
18983         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18984         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18985         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18986         headers, memory.h, stdlib.h, string.h, strings.h.
18987         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18988         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18989         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18990         strchr.
18991         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18992         headers, memory.h, string.h.
18993         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18994         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18995         free.
18996         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18997         headers.
18998         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18999         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19000         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19001         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19002         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19003
19004 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19005
19006         More K&R removal.
19007
19008         * lib/acosl.c (main): Use a prototype.
19009         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19010         tanl.c: Likewise.
19011
19012         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19013
19014         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19015         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19016         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19017         with a prototype.
19018         * lib/getopt.c (const): Remove macro.
19019         Include <string.h> unconditionally.
19020         (my_index): Remove; all uses changed to strchr.
19021         (strlen): Remove decl.
19022         (exchange): Remove forward decl; no longer needed.
19023         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19024         Define with prototype.
19025         * lib/getopt1.c (const): Remove macro.
19026         (getopt_long, getopt_long_only, main): Define with prototype.
19027
19028         * lib/getugroups.c: Include <string.h> unconditionally.
19029
19030         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19031         (getusershell, setusershell, endusershell, readname, main):
19032         Define with prototypes.
19033
19034         * lib/group-member.c: Include group-member.h first.
19035         Include <stdlib.h> unconditionally.
19036
19037         * lib/hard-locale.c: Include hard-locale.h first.
19038         Include <stdlib.h>, <string.h> unconditionally.
19039
19040         * lib/hash.c (free, malloc): Remove decls.
19041         Include <stdlib.h> unconditionally.
19042
19043         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19044         (getenv): Do not declare.
19045
19046         * lib/idcache.c: Include <string.h> unconditionally.
19047
19048         * lib/long-options.c: Include long-options.h first, to test interface.
19049         Include <stdlib.h> unconditionally.
19050
19051         * lib/makepath.c: Include makepath.h first, to test interface.
19052         Include <stdlib.h> and <string.h> unconditionally.
19053
19054         * lib/linebuffer.c: Include <stdlib.h>.
19055         (free): Remove decl.
19056
19057         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19058         stddef.h. rpl_malloc returns void *, not char *.
19059         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19060         prototype.
19061
19062         * lib/md5.h: Include <limits.h> unconditionally.
19063         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19064         (__P): Remove; all uses removed.
19065         * lib/md5.c: Include "md5.h" first.
19066         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19067         md5_buffer, md5_process_bytes, md5_process_block):
19068         Define with prototypes.
19069         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19070         * lib/sha.c: Include "sha.h" first.
19071         Include <stdlib.h>, <string.h> unconditionally.
19072
19073         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19074         * lib/memcmp.c (__ptr_t): Likewise.
19075         * lib/memrchr.c (__ptr_t): Likewise.
19076         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19077         Include <string.h> unconditionally.
19078         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19079         * lib/memchr.c: Include <stdlib.h> unconditionally.
19080         * lib/memchr.c (LONG_MAX): Remove.
19081         * lib/memrchr.c (LONG_MAX): Likewise.
19082         * lib/memchr.c (__memchr): Define via a prototype.
19083         * lib/memrchr.c (__memrchr): Likewise.
19084         * lib/memcmp.c (__P): Remove, and remove all uses.
19085         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19086         Remove forward decls; no longer needed.
19087         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19088         Use types required by C89 in prototype.
19089
19090         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19091         * lib/savedir.c: Likewise.
19092         * lib/mkdir.c (free): Remove decl.
19093         * lib/rmdir.c (rmdir): Define with a prototype.
19094         * lib/savedir.c: Include savedir.h first, to test interface.
19095
19096         * lib/mktime.c (STDC_HEADERS): Remove.
19097         Include <stdlib.h>, <string.h> unconditionally.
19098
19099         * lib/modechange.c: Include <stdlib.h> unconditionally.
19100         (malloc): Remove decl.
19101
19102         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19103         (free): Remove decl.
19104
19105         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19106         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19107         (This type really should be intptr_t, but that's a C99ism.)
19108         (_obstack_memcpy): Remove: all uses changed to memcpy.
19109         Include <string.h> unconditionally.
19110         (struct obstack): Assume __STDC__ for types of members
19111         chunkfun, freefun, extra_arg.
19112         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19113         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19114         obstack_begin, obstack_specify_allocation,
19115         obstack_specify_allocation_with_arg, obstack_chunkfun,
19116         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19117         Remove unprototyped decls and the macros that use them.
19118         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19119         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19120         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19121         (defined __STDC__ && __STDC__)]:
19122         Remove nonprototyped code.
19123         Include <stdlib.h> unconditionally.
19124         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19125         _obstack_allocated_p, _obstack_free, obstack_free,
19126         _obstack_memory_used, print_and_abort):
19127         Define using prototypes.
19128         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19129         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19130         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19131         obstack_next_free, obstack_object_size, obstack_room) [0]:
19132         Remove unused, unprototyped code.
19133
19134         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19135
19136         * lib/physmem.c (physmem_total, physmem_available, main): Define
19137         with prototypes.
19138
19139         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19140         (main): Define with a prototype.
19141
19142         * lib/posixver.c (getenv): Remove decl.
19143
19144         * lib/putenv.c (malloc): Returns void *, not char *.
19145         Include <string.h> unconditionally.
19146         (strchr, memcpy, NULL): Do not define.
19147
19148         * lib/readtokens.c: Include readtokens.h first, to test interface.
19149         Include <stdlib.h>, <string.h> unconditionally.
19150         (init_tokenbuffer): Define with a prototype.
19151
19152         * lib/regex.c (PARAMS): Remove.  All uses removed.
19153         All uses of _RE_ARGS removed, too.
19154         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19155         unconditionally.
19156         (bzero): Assume memset exists.
19157         (memcmp, memcpy, NULL): Remove.
19158         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19159         char, or assignments to local vars of type signed char.
19160         (init_syntax_once, PREFIX(extract_number_and_incr),
19161         PREFIX(print_partial_compiled_pattern),
19162         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19163         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19164         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19165         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19166         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19167         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19168         wcs_compile_range, byte_compile_range, truncate_wchar,
19169         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19170         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19171         count_mbs_length, wcs_re_match_2_internal,
19172         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19173         PREFIX(alt_match_null_string_p),
19174         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19175         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19176         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19177         now-unnecessary declaration, if any.
19178         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19179         regcomp, regexec):
19180         Remove now-unnecessary casts among pointer types.
19181         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19182
19183         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19184         (free): Remove decl.
19185
19186         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19187
19188         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19189         (free): Remove decl.
19190
19191         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19192         * lib/xgetcwd.c: Likewise.
19193
19194         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19195         (free): Remove decl.
19196
19197         * lib/strchrnul.c (strchrnul): Define with a prototype.
19198         Fix bug: c_in was not converted to char before searching.
19199
19200         The following changes are not K&R related:
19201
19202         * lib/group-member.h: Include <sys/types.h>, so that this file is
19203         self-contained.
19204         * lib/makepath.h: Likewise.
19205
19206         * lib/getusershell.c (readname, default_index, line_size, readname):
19207         Use size_t, not int, for sizes.
19208         (readname): If the size overflows, report an error instead of
19209         looping forever.
19210
19211 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19212
19213         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19214         libc.
19215
19216 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19217
19218         * README: New section: portability guidelines.
19219
19220 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19221
19222         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19223         C89 spec.
19224
19225 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19226
19227         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19228
19229 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19230
19231         Assume C89 or better; remove K&R cruft.
19232         A few of these changes were first proposed by Derek Robert Price
19233         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19234
19235         * lib/addext.c: Include <string.h> unconditionally.
19236         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19237         Don't declare getenv or malloc.
19238
19239         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19240         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19241         (NULL): Remove.
19242         (find_stack_direction, alloca): Use prototypes.
19243
19244         * lib/atexit.c (atexit): Define using a prototype.
19245
19246         * lib/basename.c, dirname.c, stripslash.c:
19247         Include <string.h> unconditionally.
19248
19249         * lib/bcopy.c: Include <stddef.h>.
19250         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19251
19252         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19253
19254         * lib/error.h (error, error_at_line, error_print_progname)
19255         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19256         * lib/error.c: Include error.h first, to check interface.
19257         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19258         (VA_START): Remove; all uses changeed to va_start.
19259         (exit, strerror): Remove decls.
19260         (error_print_progname): Prototype uncondionally.
19261         Don't include <errno.h>; no longer needed.
19262         (private_strerror): Remove.
19263         (error_tail): Always define.
19264         (error, error_at_line): Assume C89 or better; always use prototypes.
19265         * lib/fatal.c: Include "fatal.h" first, to test interface.
19266         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19267         (VA_START): Remove; all uses changed to va_start.
19268         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19269         this case.
19270         (exit): Remove decl.
19271         (fatal): Prototype unconditionally.  Assume va_start works.
19272         Abort at end, to pacify gcc.
19273
19274         * lib/euidaccess.c (main): Define with a prototype.
19275
19276         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19277
19278         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19279
19280         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19281         prototypes.
19282         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19283         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19284         (getenv): Remove decl.
19285         (fnmatch): Define using a prototype.
19286         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19287         (FCT): Define using a prototype.
19288
19289         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19290
19291         * lib/gethostname.c: Include <stddef.h>.
19292         (gethostname): Define with prototype.  Length is size_t, not int.
19293
19294 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19295
19296         Assume C89 or better; remove K&R cruft.
19297         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19298         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19299         string.h, getenv, malloc.
19300         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19301         headers.
19302         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19303         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19304         do not check for strerror.
19305         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19306         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19307         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19308         do not check for doprnt or vprintf.
19309         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19310         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19311
19312 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19313
19314         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19315         getversion.c should have been removed then, but was accidentally
19316         preserved.
19317
19318         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19319         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19320
19321 2003-09-08  Karl Berry  <karl@gnu.org>
19322
19323         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19324                 config, forget about prep.
19325
19326         * config/depcomp, missing: update from automake.
19327
19328 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19329
19330         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19331         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19332
19333 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19334
19335         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19336         copy_tm_result.  Bug reported by Simon Josefsson in
19337         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19338
19339 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19340
19341         * m4/time_r.m4: New file.
19342         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19343         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19344         is. Check for timegm declaration.
19345         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19346         Do not check for gmtime_r.
19347         Replace mktime if __mktime_internal does not exist and if mktime
19348         hasn't been replaced already.
19349
19350 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19351
19352         * lib/time_r.c, lib/time_r.h: New files.
19353
19354         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19355         __localtime_r.
19356         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19357         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19358
19359         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19360         __gmtime_r.
19361         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19362         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19363         Include <time_r.h>.
19364
19365         * lib/timegm.c: Switch to glibc implementation, with the following
19366         changes:
19367         [defined HAVE_CONFIG_H]: Include <config.h>.
19368         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19369         (__mktime_internal) [!defined _LIBC]: New decl.
19370         (__gmtime_r) [!defined _LIBC]: New macro and function.
19371         (timegm): Use a prototype, since gnulib assumes C89.
19372         Do not bother declaring tmp to be const, as it's not really usefu.
19373         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19374         (timegm): Declare only if HAVE_DECL_TIMEGM.
19375
19376 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19377
19378         * MODULES.html.sh (func_all_modules): Add time_r.
19379         * modules/time_r: New file.
19380         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19381         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19382
19383 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19384
19385         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19386         Bug reported by Lute Kamstra in
19387         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19388
19389         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19390         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19391         course with correspondingly smaller numbers for tomorrow and
19392         yesterday.  From Tadayoshi Funaba.  Originally installed into
19393         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19394         coreutils merge?).
19395
19396 2003-08-31  Simon Josefsson  <jas@extundo.com>
19397
19398         * modules/timegm: New file.
19399         * MODULES.html.sh (func_all_modules): Add timegm.
19400
19401 2003-08-31  Simon Josefsson  <jas@extundo.com>
19402
19403         * m4/timegm.m4: New file.
19404
19405 2003-08-31  Simon Josefsson  <jas@extundo.com>
19406
19407         * lib/timegm.h: New file.
19408         * lib/timegm.c: New file.  Based on
19409         wget-1.8.2/src/http.c:mktime_from_utc.
19410
19411 2003-08-31  Karl Berry  <karl@gnu.org>
19412
19413         * lib/argp.h: update from libc.
19414
19415 2003-08-28  Bruno Haible  <bruno@clisp.org>
19416
19417         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19418         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19419         followed by '#define fnmatch fnmatch_posix' gives an error.
19420
19421 2003-08-28  Bruno Haible  <bruno@clisp.org>
19422
19423         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19424         warning on QNX, which defines O_BINARY to 000000.
19425
19426 2003-08-27  Jim Meyering  <jim@meyering.net>
19427
19428         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19429         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19430         would fail after 32.  Reported by Danny Levinson.  Details here:
19431         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19432
19433 2003-08-24  Bruno Haible  <bruno@clisp.org>
19434
19435         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19436         MSVC7 <stdio.h> is included later.
19437
19438 2003-08-22  Simon Josefsson  <jas@extundo.com>
19439
19440         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19441
19442 2003-08-20  Karl Berry  <karl@gnu.org>
19443
19444         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19445
19446 2003-08-20  Bruno Haible  <bruno@clisp.org>
19447
19448         * modules/progname: New file.
19449         * MODULES.html.sh (func_all_modules): Add progname.
19450
19451 2003-08-20  Bruno Haible  <bruno@clisp.org>
19452
19453         * lib/progname.h: New file, from GNU gettext.
19454         * lib/progname.c: New file, from GNU gettext.
19455         * lib/progreloc.c: New file, from GNU gettext.
19456
19457 2003-08-19  Jim Meyering  <jim@meyering.net>
19458
19459         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19460         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19461
19462 2003-08-19  Bruno Haible  <bruno@clisp.org>
19463
19464         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19465         more.
19466
19467 2003-08-19  Bruno Haible  <bruno@clisp.org>
19468
19469         * lib/xstrdup.c: Assume <string.h> exists.
19470
19471 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19472
19473         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19474         in makefile rules.
19475
19476 2003-08-18  Jim Meyering  <jim@meyering.net>
19477
19478         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19479         * m4/lib-ld.m4: Likewise.
19480
19481 2003-08-18  Jim Meyering  <jim@meyering.net>
19482
19483         * lib/setenv.h: Indent nested cpp directive.
19484         * lib/vasnprintf.c: Remove trailing blanks.
19485
19486 2003-08-17  Simon Josefsson  <jas@extundo.com>
19487
19488         * modules/xstrndup: New file.
19489         * MODULES.html.sh (func_all_modules): Add xstrndup.
19490
19491 2003-08-17  Simon Josefsson  <jas@extundo.com>
19492
19493         * modules/argp: Fix autoconf macro name. Add more dependencies.
19494
19495 2003-08-17  Simon Josefsson  <jas@extundo.com>
19496
19497         * m4/xstrndup.m4: New file.
19498
19499 2003-08-17  Simon Josefsson  <jas@extundo.com>
19500
19501         * m4/argp.m4: New file.
19502
19503 2003-08-17  Simon Josefsson  <jas@extundo.com>
19504             Bruno Haible  <bruno@clisp.org>
19505
19506         * lib/xstrndup.h: New file.
19507         * lib/xstrndup.c: New file.
19508
19509 2003-08-17  Bruno Haible  <bruno@clisp.org>
19510
19511         * modules/strndup (Files, Include): Add lib/strndup.h.
19512
19513 2003-08-17  Bruno Haible  <bruno@clisp.org>
19514
19515         * modules/euidaccess (Files): Add lib/euidaccess.h.
19516
19517 2003-08-17  Bruno Haible  <bruno@clisp.org>
19518
19519         * lib/strndup.h: New file.
19520
19521 2003-08-17  Bruno Haible  <bruno@clisp.org>
19522
19523         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19524         like AC_GNU_SOURCE.
19525         * modules/extensions (configure.ac): Comment out the invocation of
19526         gl_USE_SYSTEM_EXTENSIONS.
19527
19528 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19529
19530         Merges from coreutils, etc.
19531         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19532         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19533         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19534         fixing a typo.
19535         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19536         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19537
19538 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19539
19540         Document merge from coreutils.
19541         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19542         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19543         * modules/utime: Add m4/utimes-null.m4.
19544
19545 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19546
19547         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19548         space, undoing this 2003-08-12 change:
19549         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19550
19551 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19552
19553         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19554         strtoul.c from libc, undoing this 2003-08-12 change:
19555         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19556
19557 2003-08-16  Jim Meyering  <jim@meyering.net>
19558
19559         Merges from coreutils.
19560         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19561         prefix.  Adjust cache variables similarly.  Create 500 rather than
19562         just 300 files, to exercise bug on Darwin6.5, too.
19563         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19564         $missing_dir.
19565         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19566         AM_SYS_POSIX_TERMIOS.
19567         Reported by mkc@mathdogs.com.
19568         Also change use of $am_cv_sys_posix_termios
19569         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19570         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19571         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19572         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19573         in /proc/mounts until it finds one with matching device number.  This
19574         is unnecessary when the FILE argument *is* a mount point.  No stat call
19575         is necessary in that case.  So, disable the statvfs-testing code on
19576         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19577         as RedHat bug# 84846.
19578         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19579         to 1MB, so as not to render systems with no stack size limit (e.g.,
19580         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19581         Include <unistd.h>.  On some systems,
19582         it is required for the definition of _SC_PAGESIZE.
19583
19584 2003-08-16  Jim Meyering  <jim@meyering.net>
19585
19586         Merge from coreutils.
19587         * lib/xstrtoimax.c: #else #if -> #elif.
19588         * lib/xstrtoumax.c: Likewise.
19589
19590 2003-08-16  Jim Meyering  <jim@meyering.net>
19591
19592         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19593         * m4/utimes.m4: Removed.
19594         * m4/utimes-null.m4: Renamed from utimes.m4.
19595
19596         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19597         to 1MB, so as not to render systems with no stack size limit (e.g.,
19598         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19599         Include <unistd.h>.  On some systems,
19600         it is required for the definition of _SC_PAGESIZE.
19601
19602 2003-08-16  Jim Meyering  <jim@meyering.net>
19603         and Paul Eggert  <eggert@cs.ucla.edu>
19604
19605         Merges from coreutils, etc.
19606
19607         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19608         using the latest version from cvs.  This avoids problems with #line
19609         directives using a vendor (Sun) compiler.
19610         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19611         Don't set GETGROUPS_LIB here; now it's
19612         done via getgroups.m4's wrapper function.
19613         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19614         rather than just in sh-util/configure.in, so that the
19615         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19616         same.
19617         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19618         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19619         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19620         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19621         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19622         Remove code that is now done by the newly-required macros.
19623         Append $(EXEEXT) to DF_PROG.
19624         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19625         Do not invoke or require the following here,
19626         since prereq.m4 or some gnulib .m4 now does this for us:
19627         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19628         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19629         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19630         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19631         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19632         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19633         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19634         AC_FUNC_OBSTACK.
19635         Do not replace the following functions, as this is now the job
19636         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19637         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19638         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19639         atexit getpass, strdup, getpagesize.
19640         Replace 'raise'.
19641         Do not check for the following functions, as this is now the job
19642         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19643         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19644         setregid.
19645         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19646         Check for sys/sysctl.h.
19647         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19648         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19649         of checking for ssize_t ourselves.
19650
19651         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19652         Require every macro that gnulib/modules/* suggests for us.
19653         (jm_PREREQ_ADDEXT): New macro.
19654         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19655         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19656
19657         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19658         (gl_PHYSMEM): Use it.
19659         Also check for `table' function.
19660         Check for new headers and functions.
19661         Add check for sys/sysmp.h.
19662         With suggestions from Kaveh Ghazi.
19663         Ignore headers that are present but cannot be compiled.  This
19664         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19665         C 5.4.
19666
19667 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19668
19669         Document merge from coreutils.
19670         * modules/userspec: Depend on posixver.
19671         * modules/strftime: Depend on tzset.
19672
19673 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19674
19675         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19676         rather than tab, after '#' in shell-script copyright notices.
19677         Suggested by Bruno Haible.
19678
19679 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19680
19681         * config/srclist-update: Use three spaces, rather than tab, after '#'
19682         in shell-script copyright notices.  Suggested by Bruno Haible.
19683         Remove unnecessary parenthesization in regular expression.
19684
19685 2003-08-15  Jim Meyering  <jim@meyering.net>
19686
19687         Merge from coreutils.
19688         * lib/xgethostname.c: Include <stdlib.h>.
19689         (xghostname): Don't exit for anything other than memory-related
19690         failure; just return NULL.
19691         * lib/userspec.c: Include "posixver.h".
19692         (parse_user_spec): Accept `.' as a separator only
19693         in pre-POSIX-200112 mode.
19694         * lib/strtoimax.c: Use #elif rather than #else #if.
19695         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19696         Remove function, now that we can rely on a working tzset function.
19697         [!_LIBC]: Ensure that the required autoconf test has been run.
19698         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19699         Use underlying_strftime for %r.
19700         * lib/sha.c: Merge in some clean-up and optimization changes from
19701         glibc.
19702         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19703         Ensure that it is a multiple of 64.
19704         Rearrange loop exit tests so as to avoid performing an
19705         additional fread after encountering an error or EOF.
19706         * lib/realloc.c: Update copyright date.
19707
19708 2003-08-15  Jim Meyering  <jim@meyering.net>
19709         and Paul Eggert  <eggert@twinsun.com>
19710
19711         Merge from coreutils.
19712         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19713         member but strut utmpx does not.  Needed for AIX 4.3.3.
19714         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19715
19716 2003-08-15  Jim Meyering  <jim@meyering.net>
19717         and Paul Eggert  <eggert@cs.ucla.edu>
19718
19719         Merges from coreutils, etc.
19720         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19721         Require gl_FUNC_TZSET_CLOBBER.
19722         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19723         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19724         members.
19725
19726 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19727
19728         Help the merge from coreutils.
19729         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19730         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19731         * m4/tzset.m4: Use it too.
19732
19733 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19734
19735         * modules/tzset: New file.
19736
19737 2003-08-14  Jim Meyering  <jim@meyering.net>
19738
19739         Merges from coreutils.
19740         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19741         variable names, rather than @FNMATCH_H@.
19742         * modules/alloca: Likewise for $(ALLOCA_H).
19743
19744         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19745         the three copies of the literal target, `fnmatch.h'.
19746         * modules/alloca (alloca.h): Likewise.
19747
19748 2003-08-14  Jim Meyering  <jim@meyering.net>
19749
19750         Merge from coreutils.
19751         * m4/tzset.m4: New file.
19752         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19753         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19754         otherwise, AIX 5.1 systems would end up using the latter.
19755         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19756         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19757         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19758         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19759
19760 2003-08-14  Jim Meyering  <jim@meyering.net>
19761
19762         Merge from coreutils.
19763         * lib/obstack.h: Whitespace changes.
19764         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19765         and xcalloc return values.
19766         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19767         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19768         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19769         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19770         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19771         error from mntctl.
19772         Use mntctl's return value to drive the entry-processing loop, since
19773         we can't rely on the value of the vmt_length member in the last
19774         entry.  On some systems doing so could result in exhausting
19775         virtual memory.  Based in part on a patch from Mike Jetzer.
19776
19777 2003-08-14  Jim Meyering  <jim@meyering.net>
19778         and Paul Eggert  <eggert@twinsun.com>
19779
19780         Merges from coreutils, plus other fixes.
19781         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19782         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19783         for credits and details.  Thanks to Kaveh Ghazi for helping
19784         to keep these files in sync.
19785         (ARRAY_SIZE): Define it.
19786         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19787         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19788         (memcasecmp): Don't assume size_t fits in unsigned int.
19789         Remove casts and duplicate code.
19790         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19791         (memcpy): Remove definition.
19792         Merge in some clean-up and optimization changes from glibc.
19793         [BLOCKSIZE]: Move definition to top of file.
19794         Ensure that it is a multiple of 64.
19795         Rearrange loop exit tests so as to avoid performing an
19796         additional fread after encountering an error or EOF.
19797         * lib/md5.h (md5_uintptr): Define.
19798         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19799         return to the initial working directory.  Preserve errno
19800         for caller.
19801         * lib/idcache.c: Include "xalloc.h".
19802         (xmalloc, xrealloc): Remove decls.
19803         (getuser): Remove casts no longer required in C89.
19804         * lib/human.c: Include stdio.h, for sprintf.
19805         * lib/group-member.c: Include "xalloc.h".
19806         (xmalloc, xrealloc): Remove decls.
19807         (get_group_info): Remove casts no longer required in C89.
19808         * lib/getusershell.c (readname): Remove casts no longer required in
19809         C89.
19810         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19811         * lib/getline.c: Whitespace fix, from coreutils.
19812
19813 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19814
19815         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19816         Check for isascii.
19817
19818         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19819         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19820         Undo previous (whitespace-only) change.
19821
19822 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19823
19824         * lib/exclude.c: Include <ctype.h>
19825         (IN_CTYPE_DOMAIN): New macro.
19826         (is_space): New fn.
19827         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19828         and empty lines.
19829
19830         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19831         Undo previous (whitespace-only) change.
19832
19833 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19834
19835         * config/srclist-update: Change update back to the old behavior,
19836         leaving whitespace alone.  Use one 'sed' command rather than a
19837         pipeline.
19838         (fixlicense): Now a variable, not a function.
19839         (remove_trailing_blanks): Remove.
19840         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19841         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19842         Undo previous (whitespace-only) change.
19843
19844 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19845
19846         Merge from coreutils.
19847         * modules/euidaccess: Add lib_SOURCES, include for new
19848         file euidaccess.h
19849
19850 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19851
19852         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19853         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19854         Normalize leading white space and remove trailing white space.
19855
19856         Merge from coreutils
19857         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19858
19859         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19860         0.12.1.  These files are now being upgraded automatically by
19861         ../config/srclist-update.
19862
19863 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19864
19865         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19866         Normalize leading white space and remove trailing white space.
19867         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19868         notice, as per ../config/srclist-update.
19869
19870         Merge from coreutils.
19871         * lib/euidaccess.h: New file.
19872         * lib/euidaccess.c: Include it.
19873         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19874         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19875         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19876
19877 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19878
19879         * config/srclist-update: Add copyright notice.
19880         (remove_id_lines, remove_trailing_blanks): New constants.
19881         (fixfile): Use them to normalize spacing a bit in copied files.
19882         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19883         Normalize leading white space and remove trailing white space.
19884
19885         * config/texinfo.tex: Sync with texinfo.
19886
19887         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19888         strtoul.c from libc, to merge coreutils whitespace changes.
19889
19890         * config/srclist.txt: Get the following m4 files from gettext:
19891         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19892         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19893         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19894         wint_t.m4.
19895
19896 2003-08-12  Karl Berry  <karl@gnu.org>
19897
19898         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19899         been made.
19900
19901 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19902
19903         * modules/gnu-source, m4/gnu-source.m4:
19904         Remove; we're assuming Autoconf 2.54 or later now.
19905         Suggested by Bruno Haible.
19906         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19907
19908 2003-08-11  Bruno Haible  <bruno@clisp.org>
19909
19910         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19911
19912 2003-08-11  Bruno Haible  <bruno@clisp.org>
19913
19914         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19915         (vasnprintf): Use it instead of wcslen.
19916
19917 2003-08-11  Bruno Haible  <bruno@clisp.org>
19918
19919         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19920         value to ensure that _Bool promotes to int. Use #define for _Bool when
19921         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19922
19923 2003-08-10  Karl Berry  <karl@gnu.org>
19924
19925         * lib/regex.h: update from libc (whitespace fix).
19926
19927 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19928
19929         Merge some files from coreutils.  These changes were
19930         originally made by Jim Meyering.
19931         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19932         many older Unixes require this.
19933         * lib/alloca.c (alloca): Remove cast to argument of free;
19934         no longer needed in C89.
19935         * lib/alloca_.h, regex.h: Fix white space to match
19936         what GNU indent does.
19937
19938 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19939
19940         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19941         apparently Emacs's Unicode mode got confused before my 2003-08-05
19942         checkin.
19943
19944 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19945
19946         * m4/extensions.m4: New file.
19947         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19948         Require gl_USE_SYSTEM_EXTENSIONS.
19949         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19950         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19951
19952 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19953
19954         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19955         * modules/extensions, modules/gnu-source: New files.
19956         * modules/timespec, modules/unlocked-io: Depend on extensions.
19957
19958 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19959
19960         * modules/restrict: New file.
19961         * MODULES.html.sh (func_all_modules): Add restrict.
19962         * modules/regex: Depend on restrict.
19963
19964 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19965
19966         * m4/restrict.m4: New file.
19967         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19968
19969 2003-08-07  Bruno Haible  <bruno@clisp.org>
19970
19971         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19972         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19973
19974 2003-08-07  Bruno Haible  <bruno@clisp.org>
19975
19976         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19977         makes the module 'getndelim2' compatible with the module 'getline'.
19978
19979 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19980
19981         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19982         byte with "\201" to avoid glitches when editing that source file
19983         with multi-gnome-terminal.
19984
19985 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19986
19987         * lib/bumpalloc.h: Remove.
19988
19989 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19990
19991         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19992         * modules/bumpalloc: Remove.
19993
19994 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19995
19996         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19997         GNU coding style.
19998
19999         Merge from coreutils.
20000         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20001         1. From glibc.
20002         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20003         from Karl Berry, implemented by Jim Meyering.
20004         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20005         from Dmitry V. Levin.
20006         Remove anachronistic cast of xrealloc.
20007         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20008         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20009         type. Otherwise, it wouldn't compile with at least /bin/cc on
20010         ymp-cray-unicos9.0.2.X.
20011         Combine two mostly-identical uses of alloca into one.
20012         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20013
20014 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20015
20016         [From Emacs.]
20017
20018         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20019         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20020         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20021         obsolete NLIST_NAME_UNION.
20022         [__GNU__]: Undef BSD and FSCALE.
20023         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20024
20025 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20026
20027         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20028         an enum type, so that it's guaranteed to promote to int.  See:
20029         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20030
20031 2003-08-03  Karl Berry  <karl@gnu.org>
20032
20033         * config/depcomp: update from automake.
20034
20035 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20036
20037         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20038         (strerror): Don't assume that a printable int fits in 14 bytes.
20039
20040 2003-07-31  Bruno Haible  <bruno@clisp.org>
20041
20042         * modules/getpass-gnu: New file.
20043         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20044
20045 2003-07-31  Bruno Haible  <bruno@clisp.org>
20046
20047         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20048
20049 2003-07-24  Karl Berry  <karl@gnu.org>
20050
20051         * config/missing: update from automake.
20052
20053 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20054             Bruno Haible  <bruno@clisp.org>
20055
20056         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20057         * lib/getline.c (getline, getdelim): Likewise.
20058         Remove _GNU_SOURCE define; now it's defined in config.h through
20059         m4/getline.m4.
20060
20061 2003-07-23  Karl Berry  <karl@gnu.org>
20062
20063         * config/config.sub: update from prep.
20064
20065 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20066
20067         * modules/xalloc (Depends-on): Add exitfail.
20068         * modules/xmemcoll: Likewise.
20069
20070 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20071
20072         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20073         over-parenthesization in macros.
20074
20075         Sync with coreutils.
20076
20077         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20078         required by C99.
20079
20080         Use `exit_failure' for xalloc and xmemcoll instead of their own
20081         private exit-failure variables.
20082         * lib/xalloc.h (xalloc_exit_failure): Remove.
20083         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20084         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20085         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20086         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20087         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20088
20089 2003-07-20  Jim Meyering  <jim@meyering.net>
20090
20091         * modules/closeout (Depends-on): Add exitfail.
20092         Suggestion from Bruno Haible.
20093
20094 2003-07-19  Karl Berry  <karl@gnu.org>
20095
20096         * config/config.sub: update from prep.
20097
20098 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20099
20100         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20101         Remove.
20102         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20103         to test that it can stand by itself.  Include "exitfail.h".
20104         Clients should set exit_failure instead.
20105         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20106
20107 2003-07-18  Bruno Haible  <bruno@clisp.org>
20108
20109         * modules/getndelim2: New file.
20110         * modules/getline: Share files with module getndelim2.
20111         * modules/getnline: Depend on getndelim2 instead of sharing files with
20112         it. Add getnline.c to lib_SOURCES.
20113         * MODULES.html.sh (func_all_modules): Add getndelim2.
20114
20115 2003-07-18  Bruno Haible  <bruno@clisp.org>
20116
20117         * m4/getndelim2.m4: New file.
20118         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20119         invoke gl_PREREQ_GETNDELIM2.
20120         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20121         gl_PREREQ_GETNDELIM2.
20122         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20123         gl_GETNDELIM2.
20124
20125 2003-07-18  Bruno Haible  <bruno@clisp.org>
20126
20127         * lib/getndelim2.h: New file.
20128         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20129         getndelim2.h.
20130         (getndelim2): Make non-static. Change return type to ssize_t.
20131         * lib/getline.h: Change argument names.
20132         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20133         * lib/getnline.c: Include getndelim2.h.
20134
20135 2003-07-18  Andreas Schwab  <schwab@suse.de>
20136
20137         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20138
20139 2003-07-17  Karl Berry  <karl@gnu.org>
20140
20141         * config/config.sub: update from prep.
20142
20143 2003-07-17  Bruno Haible  <bruno@clisp.org>
20144
20145         * modules/getnline: New file.
20146         * modules/getline: Add lib/getndelim2.c to source file list.
20147         * MODULES.html.sh (func_all_modules): Add getnline.
20148
20149 2003-07-17  Bruno Haible  <bruno@clisp.org>
20150
20151         * m4/getnline.m4: New file.
20152
20153 2003-07-17  Bruno Haible  <bruno@clisp.org>
20154
20155         * m4/Makefile.am.in: Remove file.
20156         * m4/Makefile.am: Remove file.
20157         * m4/Makefile.in: Remove file.
20158
20159 2003-07-17  Bruno Haible  <bruno@clisp.org>
20160
20161         * lib/getnline.h: New file.
20162         * lib/getnline.c: New file.
20163         * lib/getndelim2.c: New file, extracted from getline.c.
20164         (getndelim2): Renamed from getdelim2, with added nmax argument.
20165         * lib/getline.c: Include getndelim2.c.
20166         (getdelim2): Moved out to getndelim2.c.
20167         (getline, getdelim): Update.
20168
20169 2003-07-17  Bruno Haible  <bruno@clisp.org>
20170
20171         * lib/Makefile.am: Remove file.
20172         * lib/Makefile.in: Remove file.
20173
20174 2003-07-17  Bruno Haible  <bruno@clisp.org>
20175
20176         * configure.in: Remove file.
20177         * Makefile.in: Remove file.
20178
20179 2003-07-17  Bruno Haible  <bruno@clisp.org>
20180
20181         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20182
20183 2003-07-16  Karl Berry  <karl@gnu.org>
20184
20185         * config/srclist-update: was running fixlicense twice, which caused
20186                 texinfo.tex to be nullified for some reason.  Simplify,
20187                 $gplsrc is no longer needed as far as I can see?
20188
20189 2003-07-16  Jim Meyering  <jim@meyering.net>
20190
20191         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20192
20193 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20194
20195         * config/srclist.txt: Get the following files from gettext-runtime/intl
20196         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20197         ref-del.sin.  From Bruno Haible.
20198         * config/srclist-update (fixfile): Change grep pattern again, since the
20199         previous fix didn't work (there was another trailing $).  Use
20200         '[$]' to escape the $s.
20201
20202 2003-07-15  Karl Berry  <karl@gnu.org>
20203
20204         * lib/vasnprintf.c: update from gettext.
20205
20206 2003-07-15  Karl Berry  <karl@gnu.org>
20207
20208         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20209         gets expanded when surrounded by '$'.
20210
20211 2003-07-15  Jim Meyering  <jim@meyering.net>
20212
20213         * modules/save-cwd: Don't depend on error.  From Derek Price.
20214
20215 2003-07-15  Jim Meyering  <jim@meyering.net>
20216
20217         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20218
20219 2003-07-14  Simon Josefsson  <jas@extundo.com>
20220
20221         * modules/mempcpy: New file.
20222         * MODULES.html.sh (func_all_modules): Add mempcpy.
20223
20224 2003-07-14  Simon Josefsson  <jas@extundo.com>
20225
20226         * m4/mempcpy.m4: New file.
20227
20228 2003-07-14  Simon Josefsson  <jas@extundo.com>
20229
20230         * lib/mempcpy.h: New file.
20231         * lib/mempcpy.c: New file.
20232
20233 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20234
20235         * modules/getdate, modules/posixtm: Depend on mktime.
20236
20237 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20238
20239         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20240         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20241         unicodeio.c, unicodeio.h, unlocked-io.h:
20242         Switch from LGPL to GPL.
20243
20244 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20245
20246         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20247         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20248         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20249         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20250         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20251         updated automatically by ../config/srclist-update.  This changes
20252         their license from LPGL to GPL.
20253
20254 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20255
20256         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20257         assumed to refer to the root of the most recent stable gettext version.
20258         * config/srclistvars.sh: Add defaults for eggert.
20259         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20260         Match "This program" as well as "The program".  This is needed
20261         for gettext.
20262
20263 2003-07-14  Jim Meyering  <jim@meyering.net>
20264
20265         Don't emit diagnostics.  Let callers do that.
20266         * lib/save-cwd.c: Don't include "error.h".
20267         (save_cwd): Don't call error.  Ensure that errno is valid
20268         when returning nonzero.
20269
20270         * lib/save-cwd.h (restore_cwd): Update prototype.
20271         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20272         Simplify.  Don't call error upon failure.  Let callers do that.
20273         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20274         when auditing is enabled.  But don't bother updating the #if.
20275
20276 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20277
20278         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20279         it breaks C++ compilation.
20280         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20281
20282 2003-07-10  Simon Josefsson  <jas@extundo.com>
20283
20284         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20285
20286 2003-07-10  Jim Meyering  <jim@meyering.net>
20287
20288         * m4/clock_time.m4: Remove trailing blank.
20289         * m4/intmax_t.m4: Likewise.
20290
20291 2003-07-10  Jim Meyering  <jim@meyering.net>
20292
20293         * lib/vasnprintf.c: Remove trailing blanks.
20294         Make cpp indentation consistent.
20295
20296 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20297
20298         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20299         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20300         Switch from LGPL to GPL.
20301
20302 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20303
20304         * config/srclist.txt: Sort sublists.  Add
20305         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20306         that differ from gnulib for one reason or another; we'd like this list
20307         to be smaller but for now let's document what we have.
20308
20309 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20310
20311         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20312         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20313         and sweeter "eval x=$x".
20314         * config/srclist.txt: Get lib/argp* from glibc.
20315
20316 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20317
20318         * lib/mktime.c: Fix some boundary cases and remove need for floating
20319         point.
20320
20321         Issue a compile-time diagnostic if time_t is floating point, or if
20322         two's complement arithmetic is not in effect, or if arithmetic
20323         right shift does not propagate the sign.  These assumptions were
20324         all in the original code but they weren't checked.
20325
20326         (TIME_T_MIDPOINT, verify): New macros.
20327         (__isleap): Remove; it has integer overflow problems.
20328         (leapyear): New function, without those problems.
20329         (ydhms_tm_diff): Remove; splitting into two parts.
20330         (ydhms_diff): New function, containing the arithmetic part of
20331         the old ydhms_tm_diff function.  Issue a compile-time
20332         diagnostic if we are not using C99 integer division.
20333         Avoid casts when possible.
20334         (guess_time_tm): New function, containing the checking part of
20335         the old ydhms_tm_diff function.  Return the new value, rather than
20336         the difference between it and the old.  Accept a new argument T
20337         so that *T specifies the old value.  Check for overflow in the result.
20338
20339         (__mktime_internal): Use a time_t offset, not a long int offset.
20340         This undoes the 2003-06-04 change, which is no longer needed now
20341         that we have better overflow checking.
20342         (localtime_offset): Likewise.
20343
20344         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20345         and long are 64-bit but int is only 32-bit.
20346         (ydhms_diff): Use long int to store year1 and yday1.
20347         Issue a compile-time diagnostic if long int is not wide enough.
20348
20349         (__mktime_internal): Use long int to store adjusted year and yday.
20350         Use plain C rather than preprocessor commands, if that doesn't
20351         affect efficiency.
20352         Check for overflow (and try to repair) after each probe
20353         rather than checking only at the very end.  This avoids some bugs
20354         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20355         does not equal GMT offset at maximum time).
20356         Use integer to check for overflow rather than floating point; this
20357         is more portable to non-IEEE hosts, and is a tad faster.
20358         When we detect that we are oscillating between two values,
20359         don't check whether tm_isdst has the requested value, since
20360         we already know the answer.  When tm_isdst has the wrong value,
20361         use a different heuristic to find the right one, based on the
20362         extreme values actually observed in practice in tz2003a,
20363         rather than the (overly optimistic) "previous 3 calendar quarters".
20364
20365         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20366         "T const" to accommodate glibc style.
20367         (check_result): Use less-confusing report format.  "long" -> "long int.
20368         (main): Likewise.
20369         Don't loop if the iteration overflows time_t.
20370         Allow a negative step in the iteration.
20371
20372 2003-07-06  Karl Berry  <karl@gnu.org>
20373
20374         * config/depcomp: update from automake.
20375         * config/config.sub: update from prep.
20376
20377 2003-07-03  Karl Berry  <karl@gnu.org>
20378
20379         * config/config.guess: update from prep.
20380
20381 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20382
20383         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20384         xreadlink.c now includes it unconditionally.
20385
20386 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20387
20388         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20389         having it depend on HAVE_SYS_TYPES_H.
20390
20391 2003-07-01  Bruno Haible  <bruno@clisp.org>
20392
20393         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20394         <sys/types.h> should be sufficient.
20395         Reported by Paul Eggert.
20396
20397 2003-06-26  Karl Berry  <karl@gnu.org>
20398
20399         * config/depcomp: update from automake.
20400
20401 2003-06-26  Bruno Haible  <bruno@clisp.org>
20402
20403         * modules/human: Depend on module stdbool.
20404
20405 2003-06-25  Bruno Haible  <bruno@clisp.org>
20406
20407         * modules/readlink: New file.
20408         * modules/xreadlink: Depend on it.
20409         * MODULES.html.sh (func_all_modules): Add readlink.
20410
20411 2003-06-25  Bruno Haible  <bruno@clisp.org>
20412
20413         * m4/readlink.m4: New file.
20414
20415 2003-06-25  Bruno Haible  <bruno@clisp.org>
20416
20417         * lib/readlink.c: New file.
20418
20419 2003-06-22  Karl Berry  <karl@gnu.org>
20420
20421         * config/srclist.txt: update mkinstalldirs from automake.
20422         * config/mkinstalldirs: update.
20423
20424 2003-06-22  Bruno Haible  <bruno@clisp.org>
20425
20426         Portability to mingw32.
20427         * m4/ssize_t.m4: New file, from GNU gettext.
20428         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20429         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20430
20431 2003-06-22  Bruno Haible  <bruno@clisp.org>
20432
20433         * modules/safe-read: Add m4/ssize_t.m4.
20434         * modules/xreadlink: Add m4/ssize_t.m4.
20435
20436 2003-06-20  Bruno Haible  <bruno@clisp.org>
20437
20438         Assume C89, so PARAMS isn't needed.
20439         * lib/unicodeio.h (PARAMS): Remove.
20440         * lib/unicodeio.c: Don't use PARAMS.
20441
20442 2003-06-18  Karl Berry  <karl@gnu.org>
20443
20444         * config/config.{guess,sub}: update from prep.
20445
20446 2003-06-18  Jim Meyering  <jim@meyering.net>
20447
20448         Merge changes from coreutils.
20449         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20450         Remove explicit declarations of xmalloc and realloc.
20451         Include xalloc.h.
20452         (read_utmp): Remove anachronistic cast of xmalloc.
20453
20454 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20455
20456         Assume C89, so PARAMS isn't needed.
20457         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20458         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20459         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20460         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20461         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20462         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20463         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20464         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20465         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20466         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20467         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20468         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20469         no longer needed. Anyway, config.h should always be included before any
20470         other file.
20471
20472 2003-06-11  Simon Josefsson  <jas@extundo.com>
20473
20474         * modules/sysexits: New file.
20475         * MODULES.html.sh (func_all_modules): Add sysexits.
20476
20477 2003-06-11  Simon Josefsson  <jas@extundo.com>
20478
20479         * lib/sysexit_.h: New file.
20480
20481 2003-06-11  Derek Price  <derek@ximbiot.com>
20482
20483         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20484         necessary.
20485
20486 2003-06-11  Bruno Haible  <bruno@clisp.org>
20487
20488         * m4/sysexits.m4: New file.
20489
20490 2003-06-10  Simon Josefsson  <jas@extundo.com>
20491
20492         * lib/argp.h: New file, from glibc.
20493         * lib/argp-ba.c: New file, from glibc.
20494         * lib/argp-eexst.c: New file, from glibc.
20495         * lib/argp-fmtstream.c: New file, from glibc.
20496         * lib/argp-fmtstream.h: New file, from glibc.
20497         * lib/argp-fs-xinl.c: New file, from glibc.
20498         * lib/argp-help.c: New file, from glibc.
20499         * lib/argp-namefrob.h: New file, from glibc.
20500         * lib/argp-parse.c: New file, from glibc.
20501         * lib/argp-pv.c: New file, from glibc.
20502         * lib/argp-pvh.c: New file, from glibc.
20503         * lib/argp-xinl.c: New file, from glibc.
20504
20505 2003-06-10  Simon Josefsson  <jas@extundo.com>
20506
20507         * modules/strchrnul: New file.
20508
20509 2003-06-10  Simon Josefsson  <jas@extundo.com>
20510
20511         * modules/argp: New file.
20512
20513 2003-06-10  Simon Josefsson  <jas@extundo.com>
20514
20515         * m4/strchrnul.m4: New file.
20516
20517 2003-06-10  Simon Josefsson  <jas@extundo.com>
20518
20519         * lib/strchrnul.h: New file.
20520         * lib/strchrnul.c: New file.
20521
20522 2003-06-10  Bruno Haible  <bruno@clisp.org>
20523
20524         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20525
20526 2003-06-07  Karl Berry  <karl@gnu.org>
20527
20528         * config/config.{guess,sub}: update from prep.
20529
20530 2003-06-07  Jim Meyering  <jim@meyering.net>
20531
20532         * modules/strtod: Use $(...) notation, not @...@ for
20533         AC_REPLACE'd variables.
20534         * modules/localcharset: Likewise.
20535
20536 2003-06-07  Jim Meyering  <jim@meyering.net>
20537
20538         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20539         in place of my name in the copyright comment.
20540         Remove definition and uses of __P.
20541
20542         From coreutils.
20543         * lib/stat.c: Don't declare xmalloc explicitly.
20544         Instead, include "xalloc.h".
20545         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20546         xrealloc, and xcalloc return values.
20547         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20548         Improve comment.
20549         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20550
20551 2003-06-07  Bruno Haible  <bruno@clisp.org>
20552
20553         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20554         avoid AC_CONFIG_LINKS.
20555         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20556         fnmatch.h, to avoid AC_CONFIG_LINKS.
20557         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20558
20559 2003-06-07  Bruno Haible  <bruno@clisp.org>
20560
20561         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20562         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20563         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20564         directory.
20565         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20566         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20567         directory.
20568
20569 2003-06-06  Jim Meyering  <jim@meyering.net>
20570
20571         Merge from coreutils.
20572         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20573         Consolidate declarations and initializations of *_base* locals.
20574
20575         Merge from coreutils.
20576         This avoids a core dump on systems without GNU putenv,
20577         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20578         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20579         (unsetenv): New static function, from GNU libc.
20580         (rpl_putenv): Use it.
20581
20582         * lib/modechange.c: Remove trailing blanks.
20583
20584         Merge from coreutils.
20585         * lib/fsusage.c: Remove declaration of statfs.
20586         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20587
20588         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20589
20590 2003-06-06  Jim Meyering  <jim@meyering.net>
20591
20592         * lib/stdbool_.h: Renamed from stdbool.h.in.
20593
20594 2003-06-06  Jim Meyering  <jim@meyering.net>
20595             Bruno Haible  <bruno@clisp.org>
20596
20597         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20598         Adjust Makefile.am snippet not to redirect directly to target.
20599         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20600
20601 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20602
20603         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20604         mismatch, look in future quarters as well as past.  This fixes a
20605         bug when processing fall-backwards gaps immediately after a long
20606         period of daylight-saving time.
20607
20608         * lib/mktime.c: Assume freestanding C89 or better.
20609         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20610         (__P): Remove; not used.
20611         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20612         (mktime, not_equal_tm, print_tm, check_result,
20613         main): Use prototypes.  Use const * where appropriate.
20614         (main): Fix typo in testing code that uncovered by above changes.
20615         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20616
20617 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20618
20619         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20620         locale.h, localeconv.  This merges changes from coreutils.
20621
20622         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20623         It can be removed after the next Autoconf is released.
20624         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20625         needed.
20626
20627 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20628
20629         * lib/mktime.c: Fix Debian bug 177940
20630         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20631         (localtime_offset): Now long int, not time_t, because we want it
20632         to be guaranteed to be signed.  All uses changed.
20633         (__mktime_internal): If overflow would occur when adding offset,
20634         don't add it.
20635
20636         Merge 'human' changes from coreutils.  Rewrite to support
20637         locale-specific notations like thousands separators.
20638         * lib/human.c: Simplify authorship notice.
20639         Include human.h immediately after config.h.
20640         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20641         <limits.h>: Do not include, since human.h does.
20642         (SIZE_MAX, UINTMAX_MAX): New macros.
20643         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20644         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20645         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20646         (power_letter): Renamed from suffixes.
20647         (generate_suffix_backwards): Remove.
20648         (adjust_value): Now takes int style (because of human.h changes)
20649         and long double value (for greater precision on some platforms).
20650         (group_number): New function.
20651         (human_readable): Use it.  Use integer options, not enum.
20652         Put the options before the sizes in the arg list.
20653         Support all the new options.
20654         The old human_readable function has been removed;
20655         use inttostr.h instead.
20656         (human_readable, default_block_size, humblock):
20657         Use uintmax_t, not int, for block sizes.
20658         (human_readable_inexact, block_size_types): Remove.
20659         (block_size_opts): New constant.
20660         (human_options): Renamed from human_block_size, with new signature
20661         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20662         * lib/human.h: Add copyright and authorship notice.
20663         Include <limits.h> and <stdbool.h> unconditionally.
20664         (PARAMS): Remove.  All uses removed.
20665         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20666         (enum human_inexact_style): Remove tag; now a nameless enum.
20667         (human_floor, human_ceiling, human_round_to_even): Now have
20668         values 2, 0, 1 rather than -1, 1, 0.
20669         (human_group_digits, human_suppress_point_zero, human_autoscale,
20670         human_base_1024, human_SI, human_B): New constants.
20671         (human_readable_inexact, human_block_size): Remove.
20672         (human_readable): Size args are now uintmax_t, not int.
20673         (human_options): New decl.
20674
20675         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20676         unnecessary now that we assume C89 or better.  This change
20677         imported from coreutils.
20678
20679         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20680         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20681         in the 2003-05-30 sync from glibc.
20682
20683         .h files should stand alone, but we shouldn't include <sys/types.h>
20684         if we can get away with just <stddef.h>.
20685
20686         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20687         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20688         rather than <sys/types.h>, as we merely need size_t.
20689         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20690         to get size_t.
20691         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20692         Include <stdio.h>, to get FILE.
20693         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20694         memcasecmp.h has included <stddef.h> and all we need is size_t.
20695         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20696         our interface, instead of including <sys/types.h>
20697
20698 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20699
20700         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20701         now, as glibc mktime is buggy on non-glibc systems.
20702
20703 2003-06-03  Karl Berry  <karl@gnu.org>
20704
20705         * config/config.sub: update from prep.
20706
20707 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20708
20709         [from coreutils]
20710         Fix some minor time-related bugs with POSIX time arguments.
20711         Some valid time stamps were being rejected (notably -1, and
20712         time stamps before 1900 on 64-bit hosts).  And some invalid
20713         time stamps were being accepted, e.g. September 31.
20714
20715         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20716         that we can return (time_t) -1 successfully.
20717         * lib/posixtm.c: Likewise.
20718         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20719         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20720         (t): Remove static var.
20721         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20722         of static var.  All uses changed.
20723         (year): Do not reject years before 1900; they can occur with
20724         64-bit time_t.
20725         (posix_time_parse): Do not check for out-of-range components;
20726         that is now the caller's responsibility, since our checks were
20727         only approximations.
20728         (posixtime): Use mktime to check for out-of-range components,
20729         since it knows them exactly.
20730         If mktime returns (time_t) -1, check whether an error actually occurred
20731         by invoking localtime on -1.
20732         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20733         posixtime failures better.
20734         Improve the test data (in comments only).
20735
20736 2003-06-02  Karl Berry  <karl@gnu.org>
20737
20738         * config/mkinstalldirs (version): new variable.
20739         (--version): new option.
20740         (usage): improve message.
20741
20742 2003-05-30  Karl Berry  <karl@gnu.org>
20743
20744         * lib/mktime.c: update from libc.
20745
20746 2003-05-30  Bruno Haible  <bruno@clisp.org>
20747
20748         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20749         * config/config.rpath: Upgrade to gettext-0.12.1.
20750
20751 2003-05-30  Bruno Haible  <bruno@clisp.org>
20752
20753         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20754         * m4/nls.m4: New file, from gettext-0.12.1.
20755         * m4/po.m4: New file, from gettext-0.12.1.
20756         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20757
20758 2003-05-30  Bruno Haible  <bruno@clisp.org>
20759
20760         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20761         * lib/localcharset.h: Likewise.
20762         * lib/localcharset.c: Likewise.
20763
20764 2003-05-29  Karl Berry  <karl@gnu.org>
20765
20766         * config/config.rpath: update from gettext.
20767
20768 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20769
20770         Assume the headers required for C89 freestanding compilers.
20771         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20772         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20773         * m4/human.m4 (gl_HUMAN): Likewise.
20774         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20775         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20776         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20777         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20778         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20779         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20780
20781 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20782
20783         Assume the headers required for C89 freestanding compilers.
20784         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20785         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20786         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20787         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20788         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20789         define, since <limits.h> is guaranteed to do that.
20790         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20791         * lib/exclude.c: Include <stdbool.h> unconditionally.
20792         * lib/tempname.c: Include <stddef.h> unconditionally.
20793         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20794         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20795         <stddef.h> does that.
20796         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20797         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20798         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20799         needed.
20800         * lib/xstrtol.c: Likewise.
20801         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20802         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20803
20804         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20805         warnings on some platforms.
20806
20807         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20808         arbitrarily.
20809
20810 2003-05-26  Jim Meyering  <jim@meyering.net>
20811
20812         Merge in a change from coreutils:
20813         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20814         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20815         that condition, rather than `-1' which is slightly misleading.
20816         Change the name of the cache variable to have the gl_ prefix.
20817         Prompted by a patch from Richard Dawe for DJGPP.
20818
20819 2003-05-24  Karl Berry  <karl@gnu.org>
20820
20821         * config/config.guess: update from prep.
20822
20823 2003-05-22  Karl Berry  <karl@gnu.org>
20824
20825         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20826
20827 2003-05-20  Karl Berry  <karl@gnu.org>
20828
20829         * config/config.guess: update from prep.
20830
20831 2003-05-18  Karl Berry  <karl@gnu.org>
20832
20833         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20834         might actually be set by the user.
20835
20836         * config/depcomp, install-sh, mdate-sh: update from automake.
20837
20838 2003-05-17  Bruno Haible  <bruno@clisp.org>
20839
20840         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20841         invalid expansion for AC_EGREP_CPP.
20842         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20843         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20844         Suggested by Akim Demaille <akim@epita.fr> in
20845         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20846
20847 2003-05-12  Jim Meyering  <jim@meyering.net>
20848
20849         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20850         the space-padded-by-default conversion specifiers, %e, %k, %l.
20851
20852 2003-05-12  Bruno Haible  <bruno@clisp.org>
20853
20854         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20855         the string is longer than 4 KB.
20856
20857 2003-05-11  Karl Berry  <karl@gnu.org>
20858
20859         * config/config.{guess,sub}: update from prep.
20860
20861 2003-05-09  Bruno Haible  <bruno@clisp.org>
20862
20863         * modules/error: Add m4/strerror_r.m4 to file list.
20864
20865 2003-05-03  Bruno Haible  <bruno@clisp.org>
20866
20867         Upgrade to Unicode-4.0.
20868         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20869         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20870         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20871         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20872         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20873         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20874         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20875         Change width of U+E0100..U+E01EF from 1 to 0.
20876
20877 2003-04-25  Jim Meyering  <jim@meyering.net>
20878
20879         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20880         of type size_t, not int.
20881
20882 2003-04-25  Bruno Haible  <bruno@clisp.org>
20883
20884         * lib/copy-file.c: Include <stddef.h>, for size_t.
20885
20886 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20887
20888         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20889         code which expansion is under static control.  Patch imported from
20890         Akim Demaille's patch to Bison; see
20891         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20892
20893 2003-04-14  Bruno Haible  <bruno@clisp.org>
20894
20895         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20896
20897 2003-04-11  Jim Meyering  <jim@meyering.net>
20898
20899         Merge changes from Coreutils.
20900
20901         2003-03-22  Jim Meyering  <jim@meyering.net>
20902
20903         * lib/strftime.c (widen): Cast alloca return value to proper type.
20904
20905         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20906
20907         From GNU libc.
20908         * lib/strftime.c (my_strftime): Handle very large width
20909         specifications for numeric values correctly.  Improve checks for
20910         overflow.
20911
20912         2003-01-19  Jim Meyering  <jim@meyering.net>
20913
20914         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20915         definitions.
20916         (nl_get_alt_digit) [! defined my_strftime]: Define.
20917         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20918         _nl_get_alt_digit and _nl_get_walt_digit.
20919
20920         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20921         libc. These changes have no effect outside of _LIBC.
20922
20923 2003-04-10  Bruno Haible  <bruno@clisp.org>
20924
20925         * modules/findprog: New file.
20926         * MODULES.html.sh (func_all_modules): Add it.
20927
20928 2003-04-10  Bruno Haible  <bruno@clisp.org>
20929
20930         * m4/findprog.m4: New file.
20931         * m4/eaccess.m4: New file.
20932
20933 2003-04-10  Bruno Haible  <bruno@clisp.org>
20934
20935         * lib/findprog.h: New file, from GNU gettext.
20936         * lib/findprog.c: New file, from GNU gettext.
20937
20938 2003-04-05  Jim Meyering  <jim@meyering.net>
20939
20940         Merge changes from Coreutils.
20941
20942         * lib/exclude.h (PARAMS): Remove definition and uses.
20943         * lib/exclude.c: Remove uses of `PARAMS'.
20944
20945         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20946         Add test-cases for DOS filenames. Declare program_name.
20947         (main): Set up program_name.  Patch by Rich Dawe.
20948
20949         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20950         error from mntctl.
20951         Use mntctl's return value to drive the entry-processing loop, since
20952         we can't rely on the value of the vmt_length member in the last
20953         entry.  On some systems doing so could result in exhausting
20954         virtual memory.  Based in part on a patch from Mike Jetzer.
20955
20956 2003-04-04  Bruno Haible  <bruno@clisp.org>
20957
20958         * modules/linebreak: New file.
20959         * MODULES.html.sh (func_all_modules): Add it.
20960
20961 2003-04-04  Bruno Haible  <bruno@clisp.org>
20962
20963         * m4/linebreak.m4: New file.
20964
20965 2003-04-04  Bruno Haible  <bruno@clisp.org>
20966
20967         * lib/linebreak.h: New file, from GNU gettext.
20968         * lib/linebreak.c: New file, from GNU gettext with slight
20969         modifications.
20970         * lib/lbrkprop.h: New file, from GNU gettext.
20971
20972 2003-04-03  Bruno Haible  <bruno@clisp.org>
20973
20974         * modules/utf8-ucs4: New file.
20975         * modules/utf16-ucs4: New file.
20976         * modules/ucs4-utf8: New file.
20977         * modules/ucs4-utf16: New file.
20978         * MODULES.html.sh (func_all_modules): Add them.
20979
20980 2003-04-03  Bruno Haible  <bruno@clisp.org>
20981
20982         * m4/utf-ucs4.m4: New file.
20983         * m4/ucs4-utf.m4: New file.
20984
20985 2003-04-03  Bruno Haible  <bruno@clisp.org>
20986
20987         * lib/utf8-ucs4.h: New file, from GNU gettext.
20988         * lib/utf16-ucs4.h: New file, from GNU gettext.
20989         * lib/ucs4-utf8.h: New file, from GNU gettext.
20990         * lib/ucs4-utf16.h: New file, from GNU gettext.
20991
20992 2003-04-02  Bruno Haible  <bruno@clisp.org>
20993
20994         * modules/binary-io: New file.
20995         * MODULES.html.sh (func_all_modules): Add it.
20996
20997 2003-04-02  Bruno Haible  <bruno@clisp.org>
20998
20999         * lib/binary-io.h: New file, from GNU gettext.
21000
21001 2003-04-01  Bruno Haible  <bruno@clisp.org>
21002
21003         * modules/pathname: New file.
21004         * MODULES.html.sh (func_all_modules): Add it.
21005
21006 2003-04-01  Bruno Haible  <bruno@clisp.org>
21007
21008         * lib/pathname.h: New file, from GNU gettext.
21009         * lib/concatpath.c: New file, from GNU gettext.
21010
21011 2003-03-30  Bruno Haible  <bruno@clisp.org>
21012
21013         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21014
21015 2003-03-30  Bruno Haible  <bruno@clisp.org>
21016
21017         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21018         function chown() doesn't exist.
21019
21020 2003-03-28  Bruno Haible  <bruno@clisp.org>
21021
21022         * modules/copy-file: New file.
21023         * MODULES.html.sh (func_all_modules): Add it.
21024
21025 2003-03-28  Bruno Haible  <bruno@clisp.org>
21026
21027         * m4/copy-file.m4: New file.
21028
21029 2003-03-28  Bruno Haible  <bruno@clisp.org>
21030
21031         * lib/copy-file.h: New file, from GNU gettext.
21032         * lib/copy-file.c: New file, from GNU gettext.
21033
21034 2003-03-18  Jim Meyering  <jim@meyering.net>
21035
21036         * lib/quote.c (quote_n): Fix typo in comment.
21037
21038 2003-03-18  Bruno Haible  <bruno@clisp.org>
21039
21040         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21041         checking.
21042         * m4/onceonly_2_57.m4: Likewise.
21043
21044 2003-03-17  Bruno Haible  <bruno@clisp.org>
21045
21046         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21047         (m4_quote): Remove macro.
21048         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21049
21050 2003-03-14  Jim Meyering  <jim@meyering.net>
21051
21052         Merge changes from Coreutils.
21053         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21054         to be const, in order to avoid warnings.
21055         (obstack_room): Likewise.
21056         (obstack_empty_p): Likewise.
21057
21058 2003-03-14  Bruno Haible  <bruno@clisp.org>
21059
21060         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21061         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21062
21063 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21064
21065         Merge changes from Bison.
21066         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21067         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21068         when compiling Bison 1.875's `bitset bset = obstack_alloc
21069         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21070         * lib/hash.c: Include <stdbool.h> unconditionally.
21071
21072 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21073
21074         * m4/onceonly.m4 (m4_quote): New macro.
21075         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21076         Quote AC_FOREACH variable-expansions properly.
21077
21078 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21079
21080         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21081
21082 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21083
21084         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21085         Reported by Bruce Becker; see:
21086         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21087
21088 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21089             Bruno Haible  <bruno@clisp.org>
21090
21091         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21092         Reported by John Hughes, see
21093         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21094
21095 2003-02-20  Bruno Haible  <bruno@clisp.org>
21096
21097         * MODULES.html.sh (func_all_modules): Add poll.
21098
21099 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21100
21101         * modules/poll: New file.
21102
21103 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21104
21105         * lib/poll_.h: New file.
21106         * lib/poll.c: New file.
21107
21108 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21109
21110         * m4/poll.m4: New file.
21111
21112 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21113
21114         * modules/mathl: New file.
21115
21116 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21117
21118         * lib/mathl.h: New file.
21119         * lib/acosl.c: New file.
21120         * lib/asinl.c: New file.
21121         * lib/atanl.c: New file.
21122         * lib/ceill.c: New file.
21123         * lib/cosl.c: New file.
21124         * lib/expl.c: New file.
21125         * lib/floorl.c: New file.
21126         * lib/frexpl.c: New file.
21127         * lib/ldexpl.c: New file.
21128         * lib/logl.c: New file.
21129         * lib/sincosl.c: New file.
21130         * lib/sinl.c: New file.
21131         * lib/sqrtl.c: New file.
21132         * lib/tanl.c: New file.
21133         * lib/trigl.c: New file.
21134         * lib/trigl.h: New file.
21135
21136 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21137
21138         * m4/mathl.m4: New file.
21139
21140 2003-02-18  Bruno Haible  <bruno@clisp.org>
21141
21142         * MODULES.html.sh (func_all_modules): Add mathl.
21143
21144 2003-02-17  Bruno Haible  <bruno@clisp.org>
21145
21146         * modules/mkdtemp: New module.
21147         * MODULES.html.sh (func_all_modules): Add it.
21148
21149 2003-02-17  Bruno Haible  <bruno@clisp.org>
21150
21151         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21152
21153 2003-02-17  Bruno Haible  <bruno@clisp.org>
21154
21155         * lib/mkdtemp.h: New file, from GNU gettext.
21156         * lib/mkdtemp.c: New file, from GNU gettext.
21157
21158 2003-02-02  Jim Meyering  <jim@meyering.net>
21159
21160         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21161         e.g. glibc-2.2.93.
21162
21163 2003-01-31  Bruno Haible  <bruno@clisp.org>
21164
21165         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21166         'rpl_rename'.
21167         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21168         'rpl_strnlen'.
21169         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21170         'rpl_strtod'.
21171         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21172         'rpl_utime'.
21173
21174 2003-01-31  Bruno Haible  <bruno@clisp.org>
21175
21176         * lib/rename.c: #undef rename before defining rpl_rename.
21177         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21178
21179 2003-01-30  Bruno Haible  <bruno@clisp.org>
21180
21181         * modules/vasnprintf, modules/vasprintf: New modules.
21182         * MODULES.html.sh (func_all_modules): Add them.
21183
21184 2003-01-30  Bruno Haible  <bruno@clisp.org>
21185
21186         * m4/signed.m4: New file, from GNU gettext.
21187         * m4/longdouble.m4: New file, from GNU gettext.
21188         * m4/wchar_t.m4: New file, from GNU gettext.
21189         * m4/wint_t.m4: New file, from GNU gettext.
21190         * m4/vasnprintf.m4: New file.
21191         * m4/vasprintf.m4: New file.
21192
21193 2003-01-30  Bruno Haible  <bruno@clisp.org>
21194
21195         * lib/printf-args.h: New file, from GNU gettext.
21196         * lib/printf-args.c: New file, from GNU gettext.
21197         * lib/printf-parse.h: New file, from GNU gettext.
21198         * lib/printf-parse.c: New file, from GNU gettext.
21199         * lib/vasnprintf.h: New file, from GNU gettext.
21200         * lib/vasnprintf.c: New file, from GNU gettext.
21201         * lib/asnprintf.c: New file, from GNU gettext.
21202         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21203         * lib/vasprintf.c: New file, from GNU gettext.
21204         * lib/asprintf.c: New file, from GNU gettext.
21205
21206 2003-01-29  Bruno Haible  <bruno@clisp.org>
21207
21208         * modules/stpncpy: New module.
21209         * MODULES.html.sh (func_all_modules): Add it.
21210
21211 2003-01-29  Bruno Haible  <bruno@clisp.org>
21212
21213         * m4/stpncpy.m4: New file.
21214
21215 2003-01-29  Bruno Haible  <bruno@clisp.org>
21216
21217         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21218         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21219
21220 2003-01-28  Bruno Haible  <bruno@clisp.org>
21221
21222         * modules/c-ctype: New module.
21223         * MODULES.html.sh (func_all_modules): Add it.
21224
21225 2003-01-28  Bruno Haible  <bruno@clisp.org>
21226
21227         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21228         Paul Eggert.
21229         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21230         Paul Eggert.
21231
21232 2003-01-27  Bruno Haible  <bruno@clisp.org>
21233
21234         * modules/xsetenv: New module.
21235         * MODULES.html.sh (func_all_modules): Add it.
21236
21237 2003-01-27  Bruno Haible  <bruno@clisp.org>
21238
21239         * lib/xsetenv.h: New file, from GNU gettext.
21240         * lib/xsetenv.c: New file, from GNU gettext.
21241
21242 2003-01-23  Jim Meyering  <jim@meyering.net>
21243
21244         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21245         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21246
21247 2003-01-23  Bruno Haible  <bruno@clisp.org>
21248
21249         * modules/minmax: New module.
21250         * MODULES.html.sh (func_all_modules): Add it.
21251
21252 2003-01-23  Bruno Haible  <bruno@clisp.org>
21253
21254         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21255         Eggert.
21256
21257 2003-01-22  Bruno Haible  <bruno@clisp.org>
21258
21259         * modules/exit: New module.
21260         * MODULES.html.sh (func_all_modules): Add it.
21261
21262 2003-01-22  Bruno Haible  <bruno@clisp.org>
21263
21264         * lib/exit.h: New file, from GNU gettext.
21265
21266 2003-01-19  Bruno Haible  <bruno@clisp.org>
21267
21268         * gnulib-tool: Recognize option --extract-maintainer.
21269         (func_get_maintainer): New function.
21270         * modules/*: Add Maintainer entry.
21271
21272 2003-01-16  Jim Meyering  <jim@meyering.net>
21273
21274         * m4/regex.m4: The `regex' struct is both input and output.
21275         Initialize it before each use.  Patch by Tim Waugh.
21276
21277 2003-01-16  Bruno Haible  <bruno@clisp.org>
21278
21279         * MODULES.html.sh: Add a table of contents. Add the module name as
21280         leftmost column. Add hyperlinks.
21281
21282 2003-01-15  Bruno Haible  <bruno@clisp.org>
21283
21284         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21285
21286 2003-01-15  Bruno Haible  <bruno@clisp.org>
21287
21288         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21289         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21290         suffix.
21291
21292 2003-01-15  Bruno Haible  <bruno@clisp.org>
21293
21294         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21295
21296 2003-01-15  Bruno Haible  <bruno@clisp.org>
21297
21298         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21299         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21300
21301 2003-01-14  Jim Meyering  <jim@meyering.net>
21302
21303         * lib/same.c (same_name): Tweak a comment.
21304
21305 2003-01-14  Bruno Haible  <bruno@clisp.org>
21306
21307         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21308         when a string comparison is sufficient.
21309
21310 2003-01-14  Bruno Haible  <bruno@clisp.org>
21311
21312         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21313         'unsigned int'.
21314
21315 2003-01-14  Bruno Haible  <bruno@clisp.org>
21316
21317         * lib/hash-pjw.c: Add comment about low quality of this function.
21318
21319 2003-01-13  Bruno Haible  <bruno@clisp.org>
21320
21321         * modules/stpcpy: Distribute lib/stpcpy.h.
21322         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21323
21324 2003-01-13  Bruno Haible  <bruno@clisp.org>
21325
21326         * modules/*: Add a description.
21327         * modules/strpbrk: Fix Makefile.am snippet.
21328         * modules/strtoimax: Fix dependencies.
21329         * modules/strtoumax: Likewise.
21330
21331 2003-01-13  Bruno Haible  <bruno@clisp.org>
21332
21333         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21334         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21335         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21336
21337 2003-01-13  Bruno Haible  <bruno@clisp.org>
21338
21339         * gnulib-tool (func_create_testdir): Store config/* files in the main
21340         directory.
21341         * config.rpath: Move to ...
21342         * config/config.rpath: ... here.
21343         * modules/gettext: Contains config/config.rpath, not config.rpath.
21344         * modules/iconv: Likewise.
21345
21346 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21347
21348         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21349         to avoid collisions with libcurses and libreadline.
21350
21351         * m4/getstr.m4: Remove.
21352         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21353
21354 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21355
21356         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21357         to avoid collisions with libcurses and libreadline.
21358
21359         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21360         * lib/getstr.h, getstr.c: Remove.
21361         * lib/getline.c: Include "getline.h", to check interface.
21362         Move body of old getstr.c here: this defines MIN_CHUNK and
21363         declares getdelim2, which is renamed from getstr.
21364         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21365
21366         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21367         All uses changed.
21368         * lib/linebuffer.h: Likewise.
21369         (readline): Remove backward-compatibility macro.
21370
21371 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21372
21373         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21374         to avoid collisions with libcurses and libreadline.
21375         * getstr: Remove.
21376         * MODULES.html.sh: Remove getstr.
21377         * modules/getline: Depend on unlocked-io, not getstr.
21378
21379 2003-01-12  Jim Meyering  <jim@meyering.net>
21380
21381         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21382
21383 2003-01-10  Bruno Haible  <bruno@clisp.org>
21384
21385         * modules/alloca: Change Makefile.am requirements. Simplify Include
21386         requirements. Add lib/alloca_.h to file list.
21387
21388 2003-01-10  Bruno Haible  <bruno@clisp.org>
21389
21390         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21391
21392 2003-01-10  Bruno Haible  <bruno@clisp.org>
21393
21394         * lib/alloca_.h: New file.
21395         * lib/getdate.y: Unconditionally include alloca.h.
21396         * lib/makepath.c: Likewise.
21397         * lib/setenv.c: Likewise.
21398         * lib/userspec.c: Likewise.
21399
21400 2003-01-09  Karl Berry  <karl@gnu.org>
21401
21402         * MODULES.html.sh: include `dirname $0` in PATH, to find
21403         gnulib-tool.
21404
21405 2003-01-09  Bruno Haible  <bruno@clisp.org>
21406
21407         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21408         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21409
21410 2003-01-09  Bruno Haible  <bruno@clisp.org>
21411
21412         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21413
21414 2003-01-09  Bruno Haible  <bruno@clisp.org>
21415
21416         * lib/stdbool.h.in: New file.
21417
21418 2003-01-09  Bruno Haible  <bruno@clisp.org>
21419
21420         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21421         * MODULES.html.sh: Likewise.
21422
21423 2003-01-08  Jim Meyering  <jim@meyering.net>
21424
21425         * lib/full-write.c: Undefine and define-away `const' after inclusion
21426         of errno.h, not before.  Suggestion from Bruno Haible.
21427
21428 2003-01-08  Bruno Haible  <bruno@clisp.org>
21429
21430         * modules/full-read: Depend on full-write.
21431
21432 2003-01-08  Bruno Haible  <bruno@clisp.org>
21433
21434         * lib/safe-read.c: Include specification header first, to ensure its
21435         selfcontainedness.
21436         * lib/full-write.c: Likewise.
21437
21438 2003-01-07  Jim Meyering  <jim@meyering.net>
21439
21440         * lib/full-write.c: Rework so that it may serve to define full_read,
21441         too.
21442         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21443
21444 2003-01-07  Bruno Haible  <bruno@clisp.org>
21445
21446         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21447         <inttypes.h>.
21448         * lib/xstrtol.h: Likewise.
21449         * lib/xstrtoimax.c: Likewise.
21450         * lib/xstrtoumax.c: Likewise.
21451         * lib/human.h: Likewise.
21452
21453         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21454         on systems that have <inttypes.h> but not <stdint.h>.
21455
21456 2003-01-07  Bruno Haible  <bruno@clisp.org>
21457
21458         * MODULES.html.sh: Add copyright notice.
21459         (missed_files): Omit CVS directory entries.
21460         (func_module): Make it work with sed-3.02.
21461         * MODULES.txt: Remove file.
21462
21463 2003-01-06  Jim Meyering  <jim@meyering.net>
21464
21465         * lib/version-etc.c: Update year in translatable copyright string.
21466
21467 2003-01-03  Karl Berry  <karl@gnu.org>
21468
21469         * config/config.{guess,sub}: update from prep.
21470
21471 2003-01-02  Karl Berry  <karl@gnu.org>
21472
21473         * doc/COPYING.DOC: belatedly updated to 1.2.
21474
21475 2003-01-01  Karl Berry  <karl@gnu.org>
21476
21477         * gnulib-tool (func_verify_module): report module name $module in
21478         error message, not $1.
21479         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21480         be created, only if it doesn't exist.
21481         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21482
21483 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21484
21485         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21486
21487 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21488
21489         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21490         memcmp if strcoll doesn't work.
21491
21492 2002-12-31  Bruno Haible  <bruno@clisp.org>
21493
21494         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21495         nonempty.
21496
21497 2002-12-31  Bruno Haible  <bruno@clisp.org>
21498
21499         * lib/memcoll.c (STRCOLL): New macro.
21500         (memcoll): Use it.
21501
21502 2002-12-31  Bruno Haible  <bruno@clisp.org>
21503
21504         * lib/localcharset.h: New file.
21505         * lib/localcharset.c: Include it.
21506         * lib/unicodeio.c: Likewise.
21507
21508 2002-12-31  Bruno Haible  <bruno@clisp.org>
21509
21510         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21511         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21512
21513 2002-12-31  Bruno Haible  <bruno@clisp.org>
21514
21515         * lib/getline.h: Include <stddef.h>, for size_t.
21516
21517         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21518         * lib/unicodeio.c: Don't include <stddef.h>.
21519
21520 2002-12-31  Bruno Haible  <bruno@clisp.org>
21521
21522         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21523         HAVE_TM_ZONE.
21524
21525 2002-12-24  Karl Berry  <karl@gnu.org>
21526
21527         * config/config.guess: update from prep.
21528
21529 2002-12-24  Bruno Haible  <bruno@clisp.org>
21530
21531         General infrasructure.
21532         * m4/README: Rewritten.
21533         * m4/onceonly.m4: New file.
21534         * m4/onceonly_2_57.m4: New file.
21535
21536         Module atexit.
21537         * m4/atexit.m4: New file.
21538
21539         Module strtod.
21540         * m4/strtod.m4: New file.
21541
21542         Module strtol.
21543         * m4/strtol.m4: New file.
21544
21545         Module strtoul.
21546         * m4/strtoul.m4: New file.
21547
21548         Module memchr.
21549         * m4/memchr.m4: New file.
21550
21551         Module memcmp.
21552         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21553         (jm_FUNC_MEMCMP): Invoke it.
21554
21555         Module memcpy.
21556         * m4/memcpy.m4: New file.
21557
21558         Module memmove.
21559         * m4/memmove.m4: New file.
21560
21561         Module memset.
21562         * m4/memset.m4: New file.
21563
21564         Module strcspn.
21565         * m4/strcspn.m4: New file.
21566
21567         Module strpbrk.
21568         * m4/strpbrk.m4: New file.
21569
21570         Module strstr.
21571         * m4/strstr.m4: New file.
21572
21573         Module strerror.
21574         * m4/strerror.m4: New file.
21575
21576         Module mktime.
21577         * m4/mktime.m4: Renamed from jm-mktime.m4.
21578         (gl_PREREQ_MKTIME): New macro.
21579         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21580
21581         Module malloc.
21582         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21583         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21584         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21585
21586         Module realloc.
21587         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21588         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21589         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21590
21591         Module strftime.
21592         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21593         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21594         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21595         gl_TM_GMTOFF.
21596         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21597
21598         Module xalloc.
21599         * m4/xalloc.m4: New file.
21600
21601         Module alloca.
21602         * m4/alloca.m4: New file.
21603
21604         Module putenv.
21605         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21606         (jm_FUNC_PUTENV): Invoke it.
21607
21608         Module setenv.
21609         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21610         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21611         when invoked twice.
21612         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21613         gt_FUNC_SETENV.
21614
21615         Module memrchr.
21616         * m4/memrchr.m4: New file.
21617
21618         Module stpcpy.
21619         * m4/stpcpy.m4: New file.
21620
21621         Module strcase.
21622         * m4/strcase.m4: New file.
21623
21624         Module strdup.
21625         * m4/strdup.m4: New file.
21626
21627         Module strnlen.
21628         * m4/strnlen.m4: New file.
21629
21630         Module strndup.
21631         * m4/strndup.m4: New file.
21632
21633         Module xstrtod.
21634         * m4/xstrtod.m4: New file.
21635
21636         Module xstrtol.
21637         * m4/xstrtol.m4: New file.
21638
21639         Module getdate.
21640         * m4/getdate.m4: New file.
21641
21642         Module unlocked-io.
21643         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21644         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21645         * m4/jm-glibc-io.m4n: Remove file.
21646
21647         Module long-options.
21648         * m4/long-options.m4: New file.
21649
21650         Module md5.
21651         * m4/md5.m4: New file.
21652
21653         Module sha.
21654         * m4/sha.m4: New file.
21655
21656         Module getstr.
21657         * m4/getstr.m4: New file.
21658
21659         Module getline.
21660         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21661         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21662         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21663         simply getline. Infoke gl_PREREQ_GETLINE.
21664
21665         Module obstack.
21666         * m4/obstack.m4: New file.
21667
21668         Module hash.
21669         * m4/hash.m4: New file.
21670
21671         Module readtokens.
21672         * m4/readtokens.m4: New file.
21673
21674         Module strverscmp.
21675         * m4/strverscmp.m4: New file.
21676
21677         Module stdbool.
21678         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21679         OSF/1.
21680
21681         Module strtoll.
21682         * m4/strtoll.m4: New file.
21683
21684         Module strtoull.
21685         * m4/strtoull.m4: New file.
21686
21687         Module strtoimax.
21688         * m4/strtoimax.m4: New file.
21689
21690         Module strtoumax.
21691         * m4/strtoumax.m4: New file.
21692
21693         Module xstrtoimax.
21694         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21695         jm_AC_PREREQ_XSTRTOIMAX.
21696         Moved the strtol prerequisites to strtol.m4.
21697         Moved the strtoll prerequisites to strtoll.m4.
21698         Moved the strtoimax prerequisites to strtoimax.m4.
21699
21700         Module xstrtoumax.
21701         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21702         jm_AC_PREREQ_XSTRTOUMAX.
21703         Moved the strtoul prerequisites to strtoul.m4.
21704         Moved the strtoull prerequisites to strtoull.m4.
21705         Moved the strtoumax prerequisites to strtoumax.m4.
21706
21707         Module chown.
21708         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21709         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21710
21711         Module dup2.
21712         * m4/dup2.m4: New file.
21713
21714         Module ftruncate.
21715         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21716         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21717
21718         Module getgroups.
21719         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21720         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21721
21722         Module gettimeofday.
21723         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21724         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21725         gl_PREREQ_GETTIMEOFDAY.
21726
21727         Module mkdir.
21728         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21729         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21730
21731         Module mkstemp.
21732         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21733         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21734         jm_AC_TYPE_UINTMAX_T.
21735         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21736
21737         Module stat.
21738         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21739         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21740
21741         Module lstat.
21742         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21743         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21744
21745         Module timespec.
21746         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21747         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21748         * m4/st_mtim.m4: Indentation.
21749
21750         Module nanosleep.
21751         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21752         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21753         gl_PREREQ_NANOSLEEP.
21754
21755         Module regex.
21756         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21757         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21758         (gl_REGEX): New macro.
21759
21760         Module rename.
21761         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21762         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21763
21764         Module rmdir.
21765         * m4/rmdir.m4: New file.
21766
21767         Module utime.
21768         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21769         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21770         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21771
21772         Module dirname.
21773         * m4/dirname.m4: New file.
21774
21775         Module getopt.
21776         * m4/getopt.m4: New file.
21777
21778         Module unistd-safer.
21779         * m4/unistd-safer.m4: New file.
21780
21781         Module fnmatch.
21782         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21783         declaration.
21784         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21785         (gl_FUNC_FNMATCH_POSIX): New macro.
21786         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21787         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21788         simply fnmatch.
21789
21790         Module exclude.
21791         * m4/exclude.m4: New file.
21792
21793         Module human.
21794         * m4/human.m4: New file.
21795
21796         Module acl.
21797         * m4/acl.m4: Nop.
21798
21799         Module backupfile.
21800         * m4/backupfile.m4: New file.
21801         * m4/d-ino.m4: Indentation.
21802
21803         Module fsusage.
21804         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21805         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21806         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21807
21808         Module dirfd.
21809         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21810         requirements.
21811
21812         Module euidaccess.
21813         * m4/euidaccess.m4: New file.
21814
21815         Module file-type.
21816         * m4/file-type.m4: New file.
21817
21818         Module fileblocks.
21819         * m4/fileblocks.m4: New file.
21820
21821         Module filemode.
21822         * m4/filemode.m4: New file.
21823
21824         Module isdir.
21825         * m4/isdir.m4: New file.
21826
21827         Module lchown.
21828         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21829         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21830
21831         Module makepath.
21832         * m4/makepath.m4: New file.
21833
21834         Module modechange.
21835         * m4/modechange.m4: New file.
21836
21837         Module mountlist.
21838         * m4/mountlist.m4: New file.
21839         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21840         Indentation.
21841
21842         Module path-concat.
21843         * m4/path-concat.m4: New file.
21844
21845         Module pathmax.
21846         * m4/pathmax.m4: New file.
21847
21848         Module same.
21849         * m4/same.m4: New file.
21850
21851         Module save-cwd.
21852         * m4/save-cwd.m4: New file.
21853
21854         Module savedir.
21855         * m4/savedir.m4: New file.
21856
21857         Module xgetcwd.
21858         * m4/xgetcwd.m4: New file.
21859         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21860
21861         Module xreadlink.
21862         * m4/xreadlink.m4: New file.
21863
21864         Module safe-read.
21865         * m4/safe-read.m4: New file.
21866
21867         Module safe-write.
21868         * m4/safe-write.m4: New file.
21869
21870         Module closeout.
21871         * m4/closeout.m4: New file.
21872
21873         Module stdio-safer.
21874         * m4/stdio-safer.m4: New file.
21875
21876         Module getpass.
21877         * m4/getpass.m4: New file.
21878
21879         Module getugroups.
21880         * m4/getugroups.m4: New file.
21881
21882         Module group-member.
21883         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21884         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21885
21886         Module idcache.
21887         * m4/idcache.m4: New file.
21888
21889         Module userspec.
21890         * m4/userspec.m4: New file.
21891
21892         Module gettime.
21893         * m4/clock_time.m4: New file.
21894         * m4/gettime.m4: New file.
21895
21896         Module settime.
21897         * m4/settime.m4: New file.
21898
21899         Module posixtm.
21900         * m4/posixtm.m4: New file.
21901
21902         Module gethostname.
21903         * m4/gethostname.m4: New file.
21904
21905         Module canon-host.
21906         * m4/canon-host.m4: New file.
21907
21908         Module gettext.
21909         * m4/codeset.m4: New file, from gettext-0.11.5.
21910         * m4/gettext.m4: New file, from gettext-0.11.5.
21911         * m4/glibc21.m4: New file, from gettext-0.11.5.
21912         * m4/iconv.m4: New file, from gettext-0.11.5.
21913         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21914         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21915         * m4/inttypes.m4: New file, from gettext-0.11.5.
21916         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21917         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21918         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21919         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21920         * m4/lib-link.m4: New file, from gettext-0.11.5.
21921         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21922         * m4/progtest.m4: New file, from gettext-0.11.5.
21923         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21924         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21925         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21926
21927         Module localcharset.
21928         * m4/localcharset.m4: New file.
21929
21930         Module hard-locale.
21931         * m4/hard-locale.m4: New file.
21932
21933         Module mbswidth.
21934         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21935         onceonly macros.
21936         * m4/mbrtowc.m4: Add comment.
21937
21938         Module memcasecmp.
21939         * m4/memcasecmp.m4: New file.
21940
21941         Module memcoll.
21942         * m4/memcoll.m4: New file.
21943
21944         Module unicodeio.
21945         * m4/unicodeio.m4: New file.
21946
21947         Module rpmatch.
21948         * m4/rpmatch.m4: New file.
21949
21950         Module yesno.
21951         * m4/yesno.m4: New file.
21952
21953         Module exitfail.
21954         * m4/exitfail.m4: New file.
21955
21956         Module c-stack.
21957         * m4/c-stack.m4 (gl_C_STACK): New macro.
21958         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21959
21960         Module error.
21961         * m4/error.m4 (gl_ERROR): New macro.
21962         (jm_PREREQ_ERROR): Use onceonly macros.
21963
21964         Module fatal.
21965         * m4/fatal.m4: New file.
21966
21967         Module getloadavg.
21968         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21969         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21970
21971         Module getpagesize.
21972         * m4/getpagesize.m4: New file.
21973
21974         Module getusershell.
21975         * m4/getusershell.m4: New file.
21976
21977         Module physmem.
21978         * m4/physmem.m4: New file.
21979
21980         Module posixver.
21981         * m4/posixver.m4: New file.
21982
21983         Module quotearg.
21984         * m4/quotearg.m4: New file.
21985
21986         Module quote.
21987         * m4/quote.m4: New file.
21988
21989         Module readutmp.
21990         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21991
21992         Module sig2str.
21993         * m4/sig2str.m4: New file.
21994
21995         Other.
21996         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21997         ulonglong.m4.
21998         * m4/intmax_t.m4: New file.
21999         * m4/d-type.m4: Indentation.
22000         * m4/jm-macros.m4: Update.
22001         * m4/prereq.m4 (jm_PREREQ): Update.
22002         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22003         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22004         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22005         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22006         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22007         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22008         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22009         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22010         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22011         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22012         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22013         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22014         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22015         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22016         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22017         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22018         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22019         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22020         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22021
22022 2002-12-24  Bruno Haible  <bruno@clisp.org>
22023
22024         * MODULES.txt: Update according to m4/ changes.
22025
22026         Module gettext.
22027         * config.rpath: New file, from gettext-0.11.5.
22028
22029         * modules/*: New module descriptions.
22030         * gnulib-tool: New file.
22031         * MODULES.html.sh: New file.
22032
22033 2002-12-21  Karl Berry  <karl@gnu.org>
22034
22035         * doc/fdl.texi: update to version 1.2.
22036
22037 2002-12-19  Karl Berry  <karl@gnu.org>
22038
22039         * config/config.guess: update from prep.
22040
22041 2002-12-18  Bruno Haible  <bruno@clisp.org>
22042
22043         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22044         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22045
22046 2002-12-17  Bruno Haible  <bruno@clisp.org>
22047
22048         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22049         stdlib.h, string.h.
22050
22051 2002-12-17  Bruno Haible  <bruno@clisp.org>
22052
22053         * lib/canon-host.c (strdup): Remove unused declaration.
22054
22055         * lib/fsusage.c: Include full_read.h.
22056         (get_fs_usage): Use full_read instead of safe_read.
22057
22058         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22059
22060 2002-12-12  Karl Berry  <karl@gnu.org>
22061
22062         * config/config.guess: update from prep.
22063
22064 2002-12-11  Bruno Haible  <bruno@clisp.org>
22065
22066         * m4/setenv.m4: New file, from gettext-0.11.5.
22067
22068 2002-12-11  Bruno Haible  <bruno@clisp.org>
22069
22070         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22071         not unsetenv().
22072         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22073         modifications:
22074
22075         2002-12-11  Bruno Haible  <bruno@clisp.org>
22076
22077                 * setenv.c (alloca): Fall back to malloc.
22078                 (freea): New macro.
22079                 (setenv): Use freea() to free memory allocated with alloca().
22080
22081         2002-11-13  Bruno Haible  <bruno@clisp.org>
22082
22083                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22084                 function declarations.
22085                 * unsetenv.c (unsetenv): Likewise.
22086
22087         2002-03-04  Bruno Haible  <bruno@clisp.org>
22088
22089                 Portability to AIX 4.3.3.
22090                 * unsetenv.c: New file, extracted from setenv.c.
22091                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22092
22093         2001-12-20  Bruno Haible  <bruno@clisp.org>
22094
22095                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22096                 use malloc instead. For SunOS 4.
22097
22098         2001-12-11  Bruno Haible  <bruno@clisp.org>
22099
22100                 * setenv.c: Declare alloca.
22101                 (compar_fn_t): New typedef.
22102                 (KNOWN_VALUE, STORE_VALUE): Use it.
22103
22104         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22105         setenv.h.
22106
22107 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22108
22109         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22110         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22111         Choose values that are less likely to collide with system fnmatch
22112         options.
22113         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22114         defined (e.g., a pure POSIX system).
22115         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22116         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22117
22118 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22119
22120         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22121         a pain in practice to deal with generated m4 files.  This change
22122         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22123
22124         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22125         and jm-glibc-io.m4, as they are no longer a special case.
22126         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22127         kludge and the auto-generation stuff.  Check only whether the
22128         functions are declared, not whether they exist, since older hosts
22129         that don't declare the functions can't use the optimization anyway.
22130
22131 2002-12-06  Jim Meyering  <jim@meyering.net>
22132
22133         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22134
22135         Merge in changes from libc's misc/error.c, in preparation
22136         for the merge of gnulib's changes back into libc.
22137
22138         * lib/error.c (_): Define only if not already defined.
22139         Move definition to follow all #include directives.
22140         Include unlocked-io.h only if !_LIBC.
22141         [_LIBC]: Include <libio/libioP.h>.
22142         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22143         (fflush): Tweak definition to use INTUSE.
22144         (putc): Define.
22145
22146 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22147
22148         * lib/alloca.c [defined emacs]: Include "lisp.h".
22149         (xalloc_die) [defined emacs]: New macro.
22150         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22151         [! defined emacs]: Include <xalloc.h>.
22152         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22153         (pointer): Typedef to POINTER_TYPE *.
22154         (malloc): Remove decl; we now always use xmalloc.
22155         (alloca): Use old-style definition, since Emacs needs this.
22156         Check for arithmetic overflow when computing combined size.
22157
22158 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22159
22160         Do not generate unlocked-io.h automatically, since it's easier to
22161         maintain it by hand.
22162
22163         * lib/unlocked-io.h: New file, from GNU diffutils,
22164         but with proper copyright notice and attribution.
22165         * lib/gen-uio: Remove.
22166         * lib/Makefile.am: Add copyright notice.
22167         (libfetish_a_SOURCES): Add unlocked-io.h.
22168         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22169         (DISTCLEANFILES, io_functions): Remove macros.
22170         (EXTRA_DIST): Remove gen_uio.
22171         (unlocked-io.h): Remove rule.
22172
22173 2002-12-04  Jim Meyering  <jim@meyering.net>
22174
22175         Reflect the fact that stat.c and lstat.c are no longer generated.
22176         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22177         (DISTCLEANFILES): Likewise.
22178         (EXTRA_DIST): Likewise.
22179         (all_local): Don't depend on stat.c or lstat.c.
22180         (stat.c, lstat.c): Remove rules.
22181         (EXTRA_DIST): Remove xstat.in.
22182
22183         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22184         * lib/stat.c: New file.  Contents mostly from xstat.in.
22185         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22186         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22187
22188         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22189         too.
22190         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22191
22192 2002-12-03  Jim Meyering  <jim@meyering.net>
22193
22194         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22195         but not semantics, to minimize the differences between these two files.
22196         (safe_read): Change comment to mention SAFE_READ_ERROR.
22197
22198         * lib/safe-read.c (IS_EINTR): Define.
22199         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22200
22201 2002-12-02  Jim Meyering  <jim@meyering.net>
22202
22203         * lib/safe-read.c (EINTR): Define.
22204         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22205         (INT_MAX): Provide fallback.
22206         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22207
22208         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22209
22210 2002-12-02  Bruno Haible  <bruno@clisp.org>
22211
22212         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22213         Define, taken from safe-read.c.
22214         (INT_MAX): Provide fallback.
22215         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22216         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22217
22218         * lib/safe-read.c (EINTR): Remove definition.
22219         (safe_read): Don't use EINTR if it is absent.
22220
22221 2002-12-01  Jim Meyering  <jim@meyering.net>
22222
22223         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22224         zero.
22225         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22226
22227 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22228
22229         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22230         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22231         with `if (! (value < limit)) abort ();', for readability.
22232
22233 2002-11-26  Karl Berry  <karl@gnu.org>
22234
22235         * lib/strdup.c: copy from libc again, with jim's ok.
22236         * lib/.cppi-disable: re-add strdup.c
22237
22238 2002-11-25  Karl Berry  <karl@gnu.org>
22239
22240         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22241         instead of "strtol.c".
22242
22243 2002-11-25  Karl Berry  <karl@gnu.org>
22244
22245         * config/install-sh: update from automake for variable quoting, $0 in
22246         error msgs, etc.
22247
22248         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22249         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22250         entry.
22251
22252 2002-11-25  Jim Meyering  <jim@meyering.net>
22253
22254         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22255
22256 2002-11-24  Karl Berry  <karl@gnu.org>
22257
22258         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22259         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22260
22261 2002-11-24  Jim Meyering  <jim@meyering.net>
22262
22263         Update from coreutils:
22264
22265         * lib/mktime.c: Merge in changes from libc.
22266
22267         Avoid a link-time failure on some Linux systems.
22268         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22269         (otherwise).
22270         (__mon_yday): Declare with the STATIC attribute.
22271         (__mktime_internal): Likewise.
22272         Based on a report from Greg Schafer.
22273
22274 2002-11-23  Jim Meyering  <jim@meyering.net>
22275
22276         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22277         Use `unsigned', not `int', as type of index.
22278
22279         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22280
22281         * lib/fsusage.c: Remove unneeded parentheses around operands of
22282         `defined'.
22283
22284 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22285
22286         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22287         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22288         so that we can be included first.
22289         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22290         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22291         No need to include stddef.h or sys/types.h any more.
22292         Surround local include files with "", not "<>".
22293         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22294         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22295         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22296         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22297         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22298         (ISPRINT): Remove; no longer needed now that we assume C89.
22299
22300         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22301         Preserve errno.
22302
22303         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22304         quotearg_char): Use SIZE_MAX rather than
22305         (size_t) -1 when we are talking about "infinity".
22306
22307         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22308
22309 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22310
22311         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22312         hint that one should use `if (! x) abort ();' rather than `assert
22313         (x);', and anyway it's one less thing to worry about configuring.
22314         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22315         hash_rehash, hash_insert): Use abort rather than assert.
22316
22317 2002-11-22  Bruno Haible  <bruno@clisp.org>
22318
22319         * lib/safe-read.h: Assume C89. Add comments.
22320         (safe_read): Change return type to size_t.
22321         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22322         byte counts > SSIZE_MAX correctly.
22323         * lib/safe-write.h: New file.
22324         * lib/safe-write.c: New file.
22325         * lib/full-read.h: New file.
22326         * lib/full-read.c: New file.
22327         * lib/full-write.h: Assume C89. Add comments.
22328         * lib/full-write.c: Include safe-write.h.
22329         (full_write): Rewritten to use safe_write.
22330         Suggested by Jim Meyering and Paul Eggert.
22331
22332 2002-11-21  Jim Meyering  <jim@meyering.net>
22333
22334         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22335
22336         Merge in changes from the coreutils.
22337
22338         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22339         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22340         <stdint.h>.
22341         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22342         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22343         int.  Work more efficiently if X is the same width as uintmax_t.
22344         Do not compare X to -1, to avoid bogus compiler warning.
22345         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22346         Don't assume that f_frsize and f_bsize are the same type.
22347
22348         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22349         warning on FreeBSD.
22350
22351         * lib/makepath.c (make_path): Restore umask *before* creating the final
22352         component.
22353         (make_path): Minor reformatting.
22354
22355         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22356         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22357         HAVE_MALLOC/HAVE_REALLOC.
22358
22359         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22360         dummy ones.  At least on GNU/Linux systems, `auto' means something
22361         else.
22362         From Michael Stone.
22363
22364 2002-11-21  Bruno Haible  <bruno@clisp.org>
22365
22366         Remove case insensitive option matching.
22367         * lib/argmatch.h (argcasematch): Remove declaration.
22368         (ARGCASEMATCH): Remove macro.
22369         (__xargmatch_internal): Remove case_sensitive argument.
22370         (XARGMATCH): Update.
22371         (XARGCASEMATCH): Remove macro.
22372         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22373         case_sensitive argument.
22374         (argcasematch): Remove function.
22375         (__xargmatch_internal): Remove case_sensitive argument.
22376         (main): Use XARGMATCH instead of XARGCASEMATCH.
22377
22378         * lib/xmalloc.c: Change compile-time error message. Add comment about
22379         required autoconf version.
22380
22381 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22382
22383         Merge argmatch cleanups from Bison.  Assume C89.
22384
22385         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22386         Include stdlib.h, for EXIT_FAILURE.
22387         Always include <string.h>, since we assume C89.
22388         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22389         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22390         Include <stddef.h> instead, since it's all we need for size_t.
22391         (PARAMS): Remove.  All uses removed.
22392         (ARRAY_CARDINALITY): Do not bother to #undef.
22393         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22394         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22395         Remove unnecessary parentheses.
22396         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22397         Insert necessary parentheses.
22398         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22399         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22400
22401 2002-11-19  Bruno Haible  <bruno@clisp.org>
22402
22403         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22404         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22405
22406         * lib/mbswidth.h (PARAMS): Remove macro.
22407         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22408         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22409
22410         * lib/gcd.h (PARAMS): Remove macro.
22411         (gcd): Use ANSI C function declarations.
22412         * lib/gcd.c (gcd): Likewise.
22413
22414 2002-11-15  Bruno Haible  <bruno@clisp.org>
22415
22416         * lib/strcspn.c: Include <stddef.h>.
22417         (strcspn): Use ANSI C function declaration. Change return type to
22418         size_t. Use NULL.
22419         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22420         (strpbrk): Use NULL.
22421         * lib/strpbrk.h (PARAMS): Remove macro.
22422         (strpbrk): Use ANSI C function declaration.
22423         * lib/strstr.c: Don't include <sys/types.h>.
22424         * lib/strstr.h (PARAMS): Remove macro.
22425         (strstr): Use ANSI C function declarations.
22426
22427 2002-11-14  Karl Berry  <karl@gnu.org>
22428
22429         * config/mkinstalldirs: `do' on separate line, instead of
22430         `for var; do'.
22431
22432 2002-11-06  Bruno Haible  <bruno@clisp.org>
22433
22434         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22435         * lib/gcd.c (gcd): Likewise.
22436
22437 2002-11-05  Bruno Haible  <bruno@clisp.org>
22438
22439         * lib/gcd.h: New file, from gettext-0.11.5.
22440         * lib/gcd.c: New file, from gettext-0.11.5.
22441
22442 2002-11-05  Bruno Haible  <bruno@clisp.org>
22443
22444         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22445         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22446         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22447         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22448
22449         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22450         <libintl.h>.
22451         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22452         <libintl.h>.
22453
22454         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22455         * lib/human.c: Include gettext.h instead of <libintl.h>.
22456         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22457         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22458         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22459         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22460         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22461         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22462         (textdomain): Remove definition.
22463         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22464
22465         * lib/long-options.c: Remove include of <libintl.h> and definition of
22466         _.
22467         * lib/same.c: Remove include of <libintl.h> and definition of _.
22468
22469 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22470
22471         * lib/config.charset: A few additions for Solaris.
22472
22473 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22474
22475         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22476         * lib/localcharset.c (locale_charset): Declare as extern "C".
22477
22478 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22479
22480         * lib/config.charset: msdos in uk_UA uses CP1125.
22481
22482 2002-11-04  Bruno Haible  <bruno@clisp.org>
22483
22484         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22485         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22486         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22487         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22488         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22489
22490 2002-11-04  Bruno Haible  <bruno@clisp.org>
22491
22492         * lib/localcharset.c (locale_charset): Don't return an empty string.
22493
22494 2002-11-04  Bruno Haible  <bruno@clisp.org>
22495
22496         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22497         aliases.
22498
22499 2002-11-04  Bruno Haible  <bruno@clisp.org>
22500
22501         * lib/config.charset: Update for newest glibc. Add canonical names
22502         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22503
22504 2002-11-04  Bruno Haible  <bruno@clisp.org>
22505
22506         * lib/config.charset: Add support for NetBSD.
22507
22508 2002-11-04  Bruno Haible  <bruno@clisp.org>
22509
22510         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22511
22512 2002-11-01  Bruno Haible  <bruno@clisp.org>
22513
22514         * configure.in: Add AC_CONFIG_AUX_DIR call.
22515         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22516         test/Makefile.
22517         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22518
22519 2002-09-28  Karl Berry  <karl@gnu.org>
22520
22521         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22522         installed automake until the next release, since changes have been
22523         made.
22524
22525 2002-09-25  Karl Berry  <karl@gnu.org>
22526
22527         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22528         * lib/getopt*: copy from libc/posix.
22529         * lib/gettext.h: copy from gettext.
22530         * lib/.cppi-disable: add strdup.c, gettext.h.
22531
22532 2002-09-25  Karl Berry  <karl@gnu.org>
22533
22534         * config/srclist.txt: enable gettext.h check.
22535         * config/config.{guess,sub}: update from prep.
22536         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22537                 from automake 1.6.3.
22538         See srclist*.
22539
22540 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22541
22542         * regex.c (PATFETCH): Remove the translating fetch.
22543         (PATFETCH_RAW): Rename to PATFETCH.
22544         (set_image_of_range): New fun.
22545         (SET_RANGE_TABLE_WORK_AREA): Use it.
22546         (regex_compile): Don't translate the pattern chars so eagerly.
22547         Only do it when inserting an `exactn' bytecode or when handling
22548         a char-range.
22549         (mutually_exclusive_p): Avoid empty statement.
22550
22551 2002-07-06  Jim Meyering  <meyering@lucent.com>
22552
22553         * m4/README: Don't mention Makefile.am.in.
22554         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22555
22556 2002-07-01  Jim Meyering  <meyering@lucent.com>
22557
22558         * lib/c-stack.c: Include sys/time.h.
22559         From Volker Borchert.
22560
22561 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22562
22563         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22564
22565 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22566
22567         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22568         New macro.  Use it uniformly instead of
22569         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22570         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22571         reported by Vin Shelton.
22572
22573 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22574
22575         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22576         Do not assume SA_SIGINFO behavior.
22577         Bug reported by Jim Meyering on NetBSD 1.5.2.
22578
22579 2002-06-22  Jim Meyering  <meyering@lucent.com>
22580
22581         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22582         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22583
22584         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22585         now that configure.ac uses AC_GNU_SOURCE.
22586         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22587         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22588
22589         Update to latest tools.  Suggestions from Paul Eggert.
22590         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22591         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22592         * m4/fnmatch.m4: Likewise.
22593         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22594         to AC_HEADER_STDBOOL
22595
22596 2002-06-22  Jim Meyering  <meyering@lucent.com>
22597
22598         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22599         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22600
22601 2002-06-22  Jim Meyering  <meyering@lucent.com>
22602
22603         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22604
22605         * lib/exitfail.c, exitfail.h: Likewise.
22606         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22607
22608         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22609         of fnmatch.h.
22610         (EXTRA_DIST): Add fnmatch_loop.c.
22611         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22612
22613         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22614         * lib/fnmatch.c: Update from diffutils-2.8.2.
22615         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22616         * lib/fnmatch.h: Remove file.
22617
22618 2002-06-21  Jim Meyering  <meyering@lucent.com>
22619
22620         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22621         * m4/mbrtowc.m4: Likewise.
22622
22623         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22624         * m4/mbswidth.m4: Reflect name change:
22625         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22626         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22627
22628         * m4/lib-link.m4: Update from gettext-0.11.2.
22629         * m4/gettext.m4: Likewise.
22630
22631         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22632         From Alfred M. Szmidt.
22633
22634 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22635
22636         * lib/file-type.h: Report an error if neither S_ISREG nor
22637         S_IFREG is defined, instead of using a test specific to glibc
22638         2.2.  This should be safe, since POSIX requires S_ISREG and
22639         Unix Version 7 had S_IFREG.  We don't need to check for
22640         <sys/types.h> since we don't use any symbols that it defines.
22641
22642 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22643
22644         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22645         $@-t, so that each temporary file name is unique and valid in the first
22646         8 characters, for operation under DOS.
22647
22648 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22649
22650         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22651
22652 2002-06-15  Jim Meyering  <meyering@lucent.com>
22653
22654         Work even with DJGPP 2.03, which lacks support for symlinks.
22655         From Richard Dawe.
22656         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22657         is defined.
22658         * lib/lchown.c (S_ISLNK): Likewise.
22659
22660 2002-06-15  Jim Meyering  <meyering@lucent.com>
22661
22662         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22663         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22664         have been included before this file.
22665
22666 2002-06-14  Jim Meyering  <meyering@lucent.com>
22667
22668         * lib/file-type.h: Use the version from diffutils-2.8.2.
22669         * lib/file-type.c: Likewise.
22670
22671 2002-06-07  Jim Meyering  <meyering@lucent.com>
22672
22673         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22674         They're needed at least for NetBSD 1.5.2.
22675         ($statxfs_includes): Include those same headers.
22676         ($statxfs_includes): Include sys/vfs.h if available.
22677         ($statxfs_includes): Likewise for sys/statvfs.h.
22678         Check for the following members in both structs statfs and statvfs:
22679         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22680
22681 2002-06-01  Jim Meyering  <meyering@lucent.com>
22682
22683         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22684         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22685
22686 2002-05-28  Jim Meyering  <meyering@lucent.com>
22687
22688         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22689         Reported by Volker Borchert.
22690
22691 2002-05-27  Jim Meyering  <meyering@lucent.com>
22692
22693         Fix a problem seen only on nonconforming systems whereby ls.c's
22694         use of localtime, and then of gettimeofday would cause trouble:
22695         the localtime call used to initialize rpl_gettimeofday's save
22696         mechanism would clobber ls's current local time information so
22697         that in any long listing the first file would always be listed
22698         with date 1970-01-01.  Analysis by Volker Borchert.
22699
22700         * lib/gettimeofday.c (localtime): Undefine.
22701         (rpl_localtime): New function.
22702
22703 2002-05-27  Jim Meyering  <meyering@lucent.com>
22704
22705         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22706         localtime.
22707
22708         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22709         use the replacement function; it wouldn't resolve at link time.
22710         Reported by Volker Borchert.
22711
22712 2002-05-22  Jim Meyering  <meyering@lucent.com>
22713
22714         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22715         file-type.h.
22716         * lib/file-type.h: New file.
22717         * lib/file-type.c (file_type): New file/function.  Extracted from
22718         diffutils.
22719
22720 2002-04-30  Jim Meyering  <meyering@lucent.com>
22721
22722         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22723
22724 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22725
22726         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22727
22728 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22729
22730         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22731         Do not check for alloca.h (no longer used) or stdbool.h (was never
22732         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22733
22734 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22735
22736         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22737
22738 2002-04-29  Jim Meyering  <meyering@lucent.com>
22739
22740         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22741         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22742         Use AC_FUNC_STRNLEN here instead.
22743
22744         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22745         With autoconf-2.53a, it's part of AC_PROG_CC.
22746
22747 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22748
22749         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22750         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22751
22752 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22753
22754         * lib/sig2str.h, lib/sig2str.c: New files.
22755         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22756
22757 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22758
22759         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22760         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22761         of 127, since 64 is the largest conceivable number for ancient
22762         nonstandard hosts.
22763         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22764
22765 2002-04-28  Jim Meyering  <meyering@lucent.com>
22766
22767         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22768
22769 2002-04-24  Jim Meyering  <meyering@lucent.com>
22770
22771         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22772         (jm_PREREQ): Use it.
22773
22774         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22775         mach/mach.h fcntl.h.
22776         Check for this function: setlocale.
22777
22778 2002-04-24  Jim Meyering  <meyering@lucent.com>
22779
22780         * lib/gettext.h: New file, from Gettext.
22781         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22782         (libfetish_a_SOURCES): Add gettext.h.
22783
22784 2002-04-16  Jim Meyering  <meyering@lucent.com>
22785
22786         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22787         ut_pid, ut_id, ut_exit.
22788
22789 2002-04-16  Jim Meyering  <meyering@lucent.com>
22790
22791         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22792         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22793         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22794
22795 2002-04-12  Jim Meyering  <meyering@lucent.com>
22796
22797         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22798         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22799         existence of the getmntinfo function.  Needed for Darwin 5.3.
22800
22801         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22802         This is necessary at least on Darwin 5.3.
22803
22804         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22805         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22806         strnlen.o in the library, and that makes some versions of ranlib
22807         object.
22808
22809 2002-04-12  Jim Meyering  <meyering@lucent.com>
22810
22811         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22812
22813 2002-04-09  Jim Meyering  <meyering@lucent.com>
22814
22815         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22816         to be more precise.  Rather than saying we're checking whether the
22817         function `works', say what we're testing.
22818         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22819         Reported by Bruno Haible.
22820
22821 2002-03-10  Jim Meyering  <meyering@lucent.com>
22822
22823         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22824         Suggestion from Santiago Vila.
22825
22826 2002-03-08  Jim Meyering  <meyering@lucent.com>
22827
22828         * lib/rename.c: Mention that this wrapper is needed also on
22829         mips-dec-ultrix4.4 systems.
22830
22831 2002-03-02  Jim Meyering  <meyering@lucent.com>
22832
22833         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22834         not HAVE_CLOCK_SETTIME.
22835
22836 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22837
22838         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22839         Check for clock_settime.
22840
22841 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22842
22843         * lib/nanosleep.h: Rename to....
22844         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22845
22846         * lib/gettime.c: New file.
22847         * lib/settime.c: New file.
22848         * lib/stime.c: Remove.
22849
22850         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22851         timespec.h.  Remove nanosleep.h.
22852
22853 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22854
22855         * m4/acl.m4: New file.
22856         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22857         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22858
22859 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22860
22861         * lib/acl.c, lib/acl.h: New files.
22862         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22863
22864 2002-02-24  Jim Meyering  <meyering@lucent.com>
22865
22866         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22867         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22868         cause trouble.  Reported by Nelson Beebe.
22869
22870 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22871
22872         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22873         compilers that don't know that xalloc_die never returns.
22874
22875 2002-02-20  Jim Meyering  <meyering@lucent.com>
22876
22877         * lib/getdate.c: Regenerate using bison-1.33.
22878
22879 2002-02-17  Jim Meyering  <meyering@lucent.com>
22880
22881         * config/config.guess (main): Don't use `head -1'; it's no longer
22882         portable. Use `sed 1q' instead.
22883
22884 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22885
22886         * m4/codeset.m4: Upgrade to gettext-0.11.
22887         * m4/gettext.m4: Upgrade to gettext-0.11.
22888         * m4/glibc21.m4: Upgrade to gettext-0.11.
22889         * m4/iconv.m4: Upgrade to gettext-0.11.
22890         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22891         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22892         * m4/lib-ld.m4: New file, from gettext-0.11.
22893         * m4/lib-link.m4: New file, from gettext-0.11.
22894         * m4/lib-prefix.m4: New file, from gettext-0.11.
22895         * m4/progtest.m4: Upgrade to gettext-0.11.
22896
22897 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22898
22899         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22900         (jm_PREREQ): Use it.
22901
22902 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22903
22904         * lib/posixver.c, lib/posixver.h: New files.
22905         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22906
22907 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22908             Bruno Haible  <bruno@clisp.org>
22909
22910         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22911         (fwrite_success_callback): New declaration.
22912         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22913         print_unicode_char. Call failure callback instead of error.
22914         (fwrite_success_callback): New function.
22915         (exit_failure_callback): New function.
22916         (fallback_failure_callback): New function.
22917         (print_unicode_char): Call unicode_to_mb.
22918
22919 2002-01-26  Jim Meyering  <meyering@lucent.com>
22920
22921         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22922         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22923
22924 2002-01-26  Jim Meyering  <meyering@lucent.com>
22925
22926         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22927
22928 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22929
22930         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22931
22932 2002-01-22  Jim Meyering  <meyering@lucent.com>
22933
22934         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22935         Otherwise, some versions of automake would omit the rule that makes
22936         Makefile from Makefile.in.
22937
22938 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22939
22940         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22941         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22942         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22943         (memcoll): Set errno to zero if there is no error.
22944
22945         * lib/quotearg.c (quotearg_buffer_restyled):
22946         Fix bug with quoting buffers containing NUL when backslashing escapes.
22947         This bug was exposed by the other changes in this patch.
22948         (quotearg_n_options): New arg ARGSIZE.
22949         All callers changed.
22950         (quoting_options_from_style): New function.
22951         (quotearg_n_style): Use it.
22952         (quotearg_n_style_mem): New function.
22953
22954         * lib/quotearg.h (quotearg_n_style_mem): New function.
22955
22956 2002-01-19  Jim Meyering  <meyering@lucent.com>
22957
22958         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22959         Remove useless quotes: DF_PROG="df".
22960         * m4/strnlen.m4: New file.
22961
22962 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22963
22964         * lib/backupfile.c (ISDIGIT): Comment fix.
22965         * lib/getdate.y (ISDIGIT): Likewise.
22966         * lib/posixtm.c (ISDIGIT, year): Likewise.
22967         * lib/strverscmp.c (ISDIGIT): Likewise.
22968         * lib/userspec.c (ISDIGIT): Likewise.
22969
22970 2002-01-16  Jim Meyering  <meyering@lucent.com>
22971
22972         * lib/getdate.y: Add three semicolons, each just before a closing
22973         brace. Bison (as of version 1.31) no longer papers over that mistake.
22974
22975 2002-01-05  Jim Meyering  <meyering@lucent.com>
22976
22977         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22978
22979 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22980
22981         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22982         not silently exit merely because the output buffer happens to
22983         have nothing pending.
22984
22985 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22986
22987         See the big note in ../ChangeLog.
22988         * lib/human.c (suffixes): Prefer K to k for 1024.
22989         (generate_suffix_backwards): New function.
22990         (human_readable_inexact): Use it.
22991         * lib/xstrtol.c (__xstrtol): If there is no number but there
22992         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22993         Accept 'K' as well as 'k'.
22994
22995 2001-12-15  Jim Meyering  <meyering@lucent.com>
22996
22997         * lib/regex.h (__restrict_arr): Update from libc.
22998
22999         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23000         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23001         (STREQ): Define.
23002
23003 2001-12-14  Jim Meyering  <meyering@lucent.com>
23004
23005         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23006         Suggestion from Bruno Haible.
23007
23008 2001-12-10  Jim Meyering  <meyering@lucent.com>
23009
23010         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23011         xrealloc, Instead, include "xalloc.h".
23012         (initbuffer): Don't cast xmalloc return value to char*.
23013         (readline): Reword comment.
23014         Don't cast xrealloc return value to char*
23015         Return NULL, not 0.
23016
23017 2001-12-09  Jim Meyering  <meyering@lucent.com>
23018
23019         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23020         about `signed and unsigned type in conditional expression'.
23021         * lib/posixtm.c (posix_time_parse): Likewise.
23022
23023         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23024
23025         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23026         to avoid a pedantic warning.
23027
23028         * lib/getstr.c: Don't include assert.h.
23029         (getstr): Remove warning-evoking assertions.
23030         Return -1 if offset parameter is out of bounds.
23031         Change the type of a local from int to size_t.
23032
23033         * lib/strftime.c (my_strftime_localtime_r): Include this function
23034         definition in the `#if ! HAVE_TM_GMTOFF' block.
23035
23036         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23037         Include xalloc.h instead.
23038
23039 2001-12-02  Jim Meyering  <meyering@lucent.com>
23040
23041         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23042         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23043         included.
23044
23045         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23046         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23047
23048 2001-11-30  Akim Demaille  <akim@epita.fr>
23049
23050         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23051         before being defined.
23052
23053 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23054
23055         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23056         First arg is int, not unsigned.
23057         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23058         (SIZE_MAX, UINT_MAX): New macros.
23059         (quotearg_n_options): Abort if N is negative.
23060         Avoid overflow check on hosts where size_t is 64 bits and int
23061         is 32 bits, as overflow is impossible there.
23062         Fix off-by-one typo that caused unnecessary reallocation.
23063
23064 2001-11-27  Jim Meyering  <meyering@lucent.com>
23065
23066         * lib/tempname.c: Merge with version from libc.
23067         * lib/regex.c: Likewise.
23068
23069         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23070         systems for which STDC_HEADERS is 0, it was not included, resulting in
23071         a warning about an integer-to-pointer conversion problem with getenv.
23072         Reported by Volker Borchert.
23073
23074 2001-11-26  Jim Meyering  <meyering@lucent.com>
23075
23076         * lib/gtod.h: Remove file.
23077         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23078         * lib/gettimeofday.c: Don't include gtod.h.
23079         (GTOD_init): Remove function.
23080         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23081         Suggestion from Volker Borchert.
23082
23083 2001-11-23  Jim Meyering  <meyering@lucent.com>
23084
23085         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23086         it.
23087         * lib/hash.c (struct hash_table): Define it here instead.
23088
23089 2001-11-22  Jim Meyering  <meyering@lucent.com>
23090
23091         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23092
23093 2001-11-20  Jim Meyering  <meyering@lucent.com>
23094
23095         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23096         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23097
23098 2001-11-19  Jim Meyering  <meyering@lucent.com>
23099
23100         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23101         directory.  Use "conftestXXXXXX" as the template.
23102         Suggestion from Paul Eggert.
23103
23104         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23105         immediately, so the test doesn't mistakenly hit the max-open-files
23106         limit.
23107
23108 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23109
23110         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23111         (TEMPORARIES): New macro.
23112         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23113         removes an artificial limitation (e.g. HP-UX 10.20, where
23114         TMP_MAX is 17576).
23115
23116 2001-11-18  Jim Meyering  <meyering@lucent.com>
23117
23118         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23119
23120 2001-11-18  Jim Meyering  <meyering@lucent.com>
23121
23122         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23123         on SunOS 4.
23124
23125         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23126         files will be created before anything else.
23127
23128 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23129
23130         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23131         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23132
23133 2001-11-17  Jim Meyering  <meyering@lucent.com>
23134
23135         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23136         Prompted by a report from Bob Proulx.
23137
23138         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23139         Instead, require UTILS_FUNC_MKSTEMP.
23140
23141 2001-11-17  Jim Meyering  <meyering@lucent.com>
23142
23143         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23144         Now, that's done as part of AC_FUNC_STRTOD.
23145
23146 2001-11-17  Jim Meyering  <meyering@lucent.com>
23147
23148         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23149         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23150         rather than group writable.  Patch by Juan F. Codagnone.
23151
23152         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23153         xrealloc, Instead, include "xalloc.h".
23154
23155         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23156         Remove explicit declarations of xmalloc, xrealloc,
23157         and xstrdup.  Instead, include "xalloc.h".
23158
23159         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23160         unlocked-io.h.
23161         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23162         Likewise.
23163         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23164
23165         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23166         Reported by Padraig Brady.
23167
23168         * lib/mkstemp.c: #undef mkstemp.
23169         Include config.h.
23170         (rpl_mkstemp): Rename from mkstemp.
23171         Protoize.
23172
23173 2001-11-16  Jim Meyering  <meyering@lucent.com>
23174
23175         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23176         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23177         determine the amount of total physical memory, use pstat_getstatic.
23178         HPUX-11 doesn't define _SC_PHYS_PAGES.
23179         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23180         If sysconf couldn't be used to determine the amount of available
23181         physical memory, use both pstat_getstatic and pstat_getdynamic.
23182         Based on a patch from Bob Proulx.
23183
23184 2001-11-10  Jim Meyering  <meyering@lucent.com>
23185
23186         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23187         (jm_PREREQ): Use it.
23188
23189 2001-11-09  Jim Meyering  <meyering@lucent.com>
23190
23191         * m4/jm-macros.m4: Require autoconf-2.52f.
23192         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23193         Use these AC_-prefixed names, not the AM_-prefixed ones.
23194
23195         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23196
23197 2001-11-05  Jim Meyering  <meyering@lucent.com>
23198
23199         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23200
23201 2001-11-04  Jim Meyering  <meyering@lucent.com>
23202
23203         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23204         $DEFS.
23205
23206 2001-11-03  Jim Meyering  <meyering@lucent.com>
23207
23208         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23209         of AC_DEFUN.
23210
23211         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23212         know the name of the variable in the macro definition.
23213
23214 2001-11-03  Jim Meyering  <meyering@lucent.com>
23215
23216         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23217         in argmatch_to_argument call.
23218
23219         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23220         argument.
23221
23222         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23223         e.g., a fault due to an attempt to free a NULL pointer.
23224
23225 2001-11-01  Jim Meyering  <meyering@lucent.com>
23226
23227         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23228         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23229
23230 2001-11-01  Jim Meyering  <meyering@lucent.com>
23231
23232         * lib/dirfd.c, lib/dirfd.h: New files.
23233         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23234
23235         * lib/hash.c (hash_print) [TESTING]: Clean up.
23236
23237 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23238
23239         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23240         to avoid a warning if -Wall.
23241
23242 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23243
23244         * README: New file
23245         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23246         (per RMS's instructions, this is now the canonical source)
23247         * lgpl/, gpl/: New directories.
23248
23249 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23250
23251         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23252
23253 2001-10-21  Jim Meyering  <meyering@lucent.com>
23254
23255         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23256         this code would end up calling gettext even in packages built
23257         with --disable-nls.
23258         * lib/getopt.c (_): Likewise.
23259         * lib/regex.c (_): Likewise.
23260
23261 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23262
23263         * m4/error.m4 (jm_PREREQ_ERROR):
23264         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23265         AC_FUNC_STRERROR_R does that.
23266         Check for strerror declaration.
23267
23268         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23269         are supposed to have them these days.
23270         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23271         Merge changes from latest Autoconf CVS.
23272         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23273         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23274         POSIX decided to standardize on the int flavor of strerror_r.
23275
23276 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23277
23278         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23279         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23280         Use strerror_r that is only a macro, even if it is not a function.
23281         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23282         (private_strerror): Use prototypes, not old-style function definition.
23283         (print_errno_message): New function.
23284         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23285         char*-flavored one.
23286         (error_tail, error, error_at_line): Use it.
23287
23288 2001-10-11  Jim Meyering  <meyering@lucent.com>
23289
23290         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23291         and quote_n (1, ... to avoid clobbering a buffer.
23292
23293 2001-10-05  Jim Meyering  <meyering@lucent.com>
23294
23295         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23296         hash-pjw.h.
23297         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23298         * lib/hash-pjw.h: New file.
23299
23300 2001-09-30  Jim Meyering  <meyering@lucent.com>
23301
23302         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23303         `struct fsstat' has the `f_fstypename' member.
23304         Use that to define FS_TYPE, which is now used to make
23305         the getfsstat link test tighter.
23306
23307 2001-09-30  Jim Meyering  <meyering@lucent.com>
23308
23309         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23310         Include <sys/ucred.h>, for Apple Darwin.
23311         Include sys/mount.h and sys/fs_types.h only if available.
23312         (FS_TYPE): Define.
23313         (read_filesystem_list): Use FS_TYPE.
23314
23315 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23316
23317         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23318         a boolean context.
23319
23320 2001-09-29  Jim Meyering  <meyering@lucent.com>
23321
23322         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23323         [one-argument getmntent function]): Include stdio.h before mntent.h.
23324         SunOS 4.1.x needs it for the declaration of `FILE'.
23325         Patch by Volker Borchert.
23326
23327         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23328         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23329         sys/fs_types.h, and make the link-test for getfsstat guard #include
23330         directives with appropriate #if HAVE_*_H tests so that we can
23331         detect getfsstat on Apple Darwin1.3.7 systems.
23332         Reported by Nelson Beebe.
23333         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23334
23335 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23336
23337         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23338         #defines strtoimax.  Also treat the other strto* functions
23339         like strtoimax.
23340
23341         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23342         Check for strtoul and strtoumax,
23343         as those declarations are made even in the signed case.
23344         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23345         Likewise, for strtol and strtoimax.
23346
23347 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23348
23349         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23350         #defines strtoimax.  Also treat the other strto* functions
23351         like strtoimax.
23352
23353         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23354         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23355         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23356
23357 2001-09-26  Jim Meyering  <meyering@lucent.com>
23358
23359         Most macros in unlocked-io.h had the wrong number of arguments.
23360         * lib/gen-uio: New script.
23361         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23362         * lib/unlocked-io.hin: Remove file.
23363         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23364         rather than trying to embed it here.
23365         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23366         Reported by Padraig Brady.
23367
23368 2001-09-25  Volker Borchert  <bt@teknon.de>
23369
23370         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23371         `result'.
23372
23373 2001-09-24  Jim Meyering  <meyering@lucent.com>
23374
23375         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23376
23377 2001-09-23  Jim Meyering  <meyering@lucent.com>
23378
23379         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23380         instead of the mere test for existence of mntent.h.  The latter
23381         would get a false-positive on AIX 3.4 systems.
23382         In the outer getmntent if-block, don't die if neither of the getmntent
23383         tests succeeds.  Instead, just fall through and continue with the
23384         remaining tests.
23385
23386 2001-09-23  Jim Meyering  <meyering@lucent.com>
23387
23388         * lib/mountlist.c: Remove useless parentheses in #if directives.
23389         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23390         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23391
23392 2001-09-22  Jim Meyering  <meyering@lucent.com>
23393
23394         * m4/gettext.m4: New file.  From gettext.
23395         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23396         * m4/progtest.m4: Likewise
23397         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23398         * m4/glibc21.m4: Likewise.
23399
23400         * m4/libintl.m4: Remove.  No longer used.
23401
23402 2001-09-22  Jim Meyering  <meyering@lucent.com>
23403
23404         * lib/localcharset.c: Update from latest gettext.
23405         * lib/config.charset: Likewise.
23406
23407 2001-09-20  Jim Meyering  <meyering@lucent.com>
23408
23409         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23410         strtoimax.
23411         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23412         strtoumax.
23413
23414 2001-09-20  Jim Meyering  <meyering@lucent.com>
23415
23416         * lib/xstrtol.c (strtoimax): Guard declaration with
23417         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23418         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23419         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23420         (strtoumax): Likewise, for completeness (it wasn't necessary).
23421
23422 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23423
23424         * lib/strtoimax.c (HAVE_LONG_LONG):
23425         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23426         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23427         to work around bug in IBM C compiler.
23428
23429 2001-09-17  Jim Meyering  <meyering@lucent.com>
23430
23431         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23432         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23433         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23434         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23435         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23436         whenever the right hand side need not be expanded by the shell.
23437
23438 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23439
23440         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23441         library.  It's not correct, as some older glibcs are buggy.
23442         fnmatch wasn't fixed until glibc 2.2.
23443
23444         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23445         special shell magic here.
23446
23447 2001-09-16  Jim Meyering  <meyering@lucent.com>
23448
23449         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23450         * m4/jm-macros.m4: Require it.
23451
23452 2001-09-16  Jim Meyering  <meyering@lucent.com>
23453
23454         * lib/mkdir.c: New file.
23455
23456 2001-09-15  Jim Meyering  <meyering@lucent.com>
23457
23458         * m4/jm-macros.m4: Check for help2man.
23459
23460 2001-09-11  Jim Meyering  <meyering@lucent.com>
23461
23462         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23463         The body, by Paul Eggert, was moved here from configure.in.
23464         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23465
23466 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23467
23468         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23469         (jm_PREREQ): Use it.
23470
23471 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23472
23473         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23474         Use ssize_t, not int, to store result of readlink.
23475         Check for ssize_t overflow as well as size_t overflow,
23476         as POSIX says the result of readlink is implementation-defined
23477         when ssize_t overflows.
23478         Remove unnecessary cast to char*.
23479         Use free+malloc instead of realloc, as the storage doesn't need
23480         to be preserved and it's clearer and can be more efficient that way.
23481         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23482         * lib/xreadlink.h (xreadlink): Update prototype.
23483
23484 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23485
23486         * lib/xgetcwd.c: Revert some of the previous change; intead,
23487         fix the HAVE_GETCWD_NULL code to behave more like the
23488         !HAVE_GETCWD_NULL code used to.
23489
23490         Include "xalloc.h".
23491         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23492         invoke xalloc_die.
23493
23494 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23495
23496         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23497         sys/param.h, as pathmax.h includes them.
23498
23499 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23500
23501         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23502         (jm_PREREQ_XGETCWD): New macro.
23503
23504         * m4/getcwd.m4: New file.
23505
23506 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23507
23508         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23509         like the HAVE_GETCWD_NULL code.
23510         Include pathmax.h if not HAVE_GETCWD.
23511         Do not include xalloc.h.
23512         (INITIAL_BUFFER_SIZE): New symbol.
23513         Do not use xmalloc / xrealloc, since the caller is responsible for
23514         handling errors.  Preserve errno around `free' during failure.
23515         Do not overrun buffer when using getwd.
23516
23517 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23518
23519         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23520         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23521         getcwd (NULL, 0).
23522
23523 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23524
23525         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23526         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23527         spotted by Jim Meyering.
23528
23529 2001-09-03  Jim Meyering  <meyering@lucent.com>
23530
23531         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23532         failure.
23533
23534 2001-09-02  Jim Meyering  <meyering@lucent.com>
23535
23536         * lib/error.c: Update from GNU libc.
23537
23538 2001-09-01  Jim Meyering  <meyering@lucent.com>
23539
23540         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23541         Used by df.
23542
23543 2001-09-01  Jim Meyering  <meyering@lucent.com>
23544
23545         * lib/xreadlink.c: New file.
23546         * lib/xreadlink.h: New file.
23547         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23548         xreadlink.h.
23549
23550         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23551         doesn't conflict with sparc Solaris 7's definition in
23552         /usr/include/sys/int_types.h.
23553
23554         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23555         files.
23556         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23557         and strncasecmp as r-values.  Unixware didn't have declarations.
23558
23559 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23560
23561         * lib/xstrtol.h: Add copyright notice.
23562         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23563         LONGINT_INVALID_SUFFIX_CHAR.
23564
23565 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23566
23567         * lib/xstrtol.c (strtoimax): New decl.
23568
23569 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23570
23571         * lib/xgetcwd.c: Don't include pathmax.h.
23572         Include stdlib.h and unistd.h if available.
23573         Include xalloc.h.
23574         (xmalloc, xstrdup, free): Remove decls.
23575         (xgetcwd): Don't assume sizes fit in unsigned.
23576         Check for overflow when computing sizes.
23577         Simplify reallocation code.
23578
23579 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23580
23581         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23582         a directory's st_size can have an arbitrary value, so the old
23583         usage could waste an arbitrary amount of memory.  All uses
23584         changed.
23585         * lib/savedir.h: Update prototype.
23586
23587 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23588
23589         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23590
23591         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23592         old strtoimax.c.
23593
23594         Also, make the following further changes to make this file's
23595         configuration more similar to that of strtol.c:
23596         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23597         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23598         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23599         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23600         changed to signed values.
23601
23602         And make the following changes as well:
23603         Fix copyright notice, as 1999 was missing.
23604         (verify): New macro.
23605         (strtoimax): Check sizes at compile-time, not run-time.
23606         Prefer strtol to strtoll if both work.
23607         (main): Remove; it was not that useful and was a pain to maintain.
23608
23609         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23610
23611 2001-08-31  Jim Meyering  <meyering@lucent.com>
23612
23613         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23614         Use an initial, malloc'd, buffer of length 128 rather than
23615         a statically allocated one of length 1024.
23616
23617 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23618
23619         Simplify code, partly by assuming autoconf 2.52 semantics.
23620
23621         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23622
23623         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23624         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23625         All uses removed.
23626         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23627         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23628         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23629         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23630         jm_AC_HEADER_INTTYPES_H.
23631         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23632
23633         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23634
23635         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23636         Quote first arg of AC_DEFUN.
23637         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23638         since they are needed to parse the include file even if we need
23639         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23640         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23641         but with opposite signedness.
23642
23643 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23644
23645         Merge 'exclude' changes from tar 1.13.22.
23646         This fixes one or two unlikely storage allocation overflow bugs,
23647         but doesn't change user-visible behavior otherwise.
23648
23649 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23650
23651         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23652         (jm_PREREQ_EXCLUDE): New macro.
23653
23654 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23655
23656         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23657         tm to be declared.
23658
23659 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23660
23661         * lib/hash.c: Remove '2001' from copyright notice.
23662
23663 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23664
23665         * lib/full-write.h: New file.
23666         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23667         * lib/full-write.c: Correct credits, as cccp.c no longer
23668         exists and anyway it was so heavily changed from the old cccp
23669         code as to be unrecognizable.  Include full-write.h.
23670         (full_write) Return size_t, with short writes meaning failure.
23671         All callers changed.  This fixes a bug with large buffers
23672         on 64-bit hosts.
23673         * lib/utime.c: Include full-write.h.
23674
23675 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23676
23677         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23678         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23679         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23680         Include if available.
23681         (<xalloc.h>): Include
23682         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23683         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23684         collide with FNM macros.
23685         (struct patopts): New struct.
23686         (struct exclude): Use it, as exclude patterns now come with options.
23687         (new_exclude): Support above changes.
23688         (new_exclude, add_exclude_file):
23689         Initial size must now be a power of two to simplify overflow checking.
23690         (free_exclude, fnmatch_no_wildcards): New function.
23691         (excluded_filename): No longer requires options arg, as the options
23692         are determined by add_exclude.  Now returns bool, not int.
23693         (excluded_filename, add_exclude):
23694         Add support for the fancy new exclusion options.
23695         (add_exclude, add_exclude_file): Now takes int options arg.
23696         Check for arithmetic overflow when computing sizes.
23697         (add_exclude_file): xrealloc might modify errno, so don't
23698         realloc until after errno might be used.
23699
23700         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23701         New macros.
23702         (free_exclude): New decl.
23703         (add_exclude, add_exclude_file): Now takes int options arg.
23704         (excluded_filename): No longer requires options arg, as the options
23705         are determined by add_exclude.  Now returns bool, not int.
23706
23707 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23708
23709         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23710
23711 2001-08-27  Jim Meyering  <meyering@lucent.com>
23712
23713         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23714
23715         * lib/version-etc.c (N_): Remove definition.
23716         Revert most of last change.
23717         Instead, simply don't mark the `Copyright...' string for translation.
23718         Based on advice from Paul Eggert.
23719
23720         * lib/strtoxmax.c: Tweak comment.
23721
23722 2001-08-26  Jim Meyering  <meyering@lucent.com>
23723
23724         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23725
23726         * m4/xstrtoimax.m4: New file.
23727         * m4/xstrtoumax.m4: Add comments explaining why we
23728         AC_REPLACE_FUNCS(strtol).
23729
23730 2001-08-26  Jim Meyering  <meyering@lucent.com>
23731
23732         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23733         of copyright with `%s' so translators don't get an untranslated
23734         message in 2002.
23735         (COPYRIGHT_YEAR): Define.
23736         (version_etc): Use fprintf rather than fputs.
23737         Suggestion from Ulrich Drepper.
23738
23739         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23740
23741         * lib/strtoll.c: New file, from GNU libc.
23742         * lib/xstrtoimax.c: New file.
23743
23744         * lib/xstrtol.h: Add xstrtoimax.
23745         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23746         * lib/strtoimax.c: New file.  Likewise, but first define
23747         STRTOUXMAX_SIGNED.
23748
23749         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23750         ...
23751         * lib/strtoxmax.c: ... then renamed to this.
23752
23753 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23754
23755         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23756         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23757         (jm_AC_TYPE_INTMAX_T): New macro.
23758         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23759
23760         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23761
23762         * m4/longlong.m4: Renamed from ulonglong.m4.
23763         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23764         * m4/uintmax_t.m4: Removed.
23765
23766 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23767
23768         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23769         Port to Solaris 8, where 'sed' requires a space after the 'r'
23770         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23771         Redirect output to $tmp just once.
23772
23773 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23774
23775         * lib/addext.c (<errno.h>): Include.
23776         (errno): Declare if not defined.
23777         (addext): Work correctly when pathconf returns -1 and leaves
23778         errno alone because there is no limit.  Also, work even if
23779         pathconf returns a value greater than SIZE_MAX.
23780
23781 2001-08-12  Jim Meyering  <meyering@lucent.com>
23782
23783         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23784         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23785         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23786         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23787         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23788         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23789         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23790         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23791         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23792         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23793         utime.m4, utimes.m4, xstrtoumax.m4:
23794         Quote the first argument in each use of AC_DEFUN.
23795
23796 2001-08-12  Jim Meyering  <meyering@lucent.com>
23797
23798         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23799         Simply `return getcwd (NULL, 0);'.
23800         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23801         Use 1300 as initial value for length, not PATH_MAX.
23802
23803         * lib/pathmax.h: Clean up cpp syntax.
23804
23805 2001-08-12  Jim Meyering  <meyering@lucent.com>
23806
23807         * lib/gettimeofday.c: New file.
23808         * lib/gtod.h: New file.
23809         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23810
23811 2001-08-05  Jim Meyering  <meyering@lucent.com>
23812
23813         * m4/jm-macros.m4: Require autoconf-2.52.
23814
23815 2001-08-04  Jim Meyering  <meyering@lucent.com>
23816
23817         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23818         stmt, to get in sync with glibc.
23819
23820 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23821
23822         The following changes are from gettext 0.10.39 as maintained by
23823         Bruno Haible.
23824
23825         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23826         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23827         with inverted sense.  All uses changed.
23828
23829         * lib/mbswidth.c: Don't include <limits.h>.
23830         Include <stdlib.h> and <string.h> unconditionally.
23831         (iswcntrl, mbsinit, ISCNTRL): New macros.
23832         (mbsnwidth): Use K&R style function declarations.
23833         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23834         can optimize it when MB_CUR_MAX == 1.
23835         The width of control characters is zero, not 1.
23836
23837 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23838
23839         The following changes are from gettext 0.10.39 as maintained by
23840         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23841
23842         * m4/codeset.m4: Upgrade to serial AM1.
23843         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23844         all uses changed.  Quote first arg of AC_DEFUN.
23845         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23846
23847         * m4/iconv.m4: Upgrade to serial AM2.
23848         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23849         Add --with-libconv-prefix.
23850         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23851         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23852         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23853         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23854         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23855
23856         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23857         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23858         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23859         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23860         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23861         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23862         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23863         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23864         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23865
23866         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23867         string.h any more.
23868
23869         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23870         not the default value.
23871
23872         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23873         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23874         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23875         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23876         Also check for iswcntrl, used for wcwidth fallback.
23877         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23878         to Autoconf 2.13.
23879
23880 2001-08-03  Jim Meyering  <meyering@lucent.com>
23881
23882         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23883         as it was in the original.  Reported by Paul Eggert.
23884
23885 2001-07-16  Jim Meyering  <meyering@lucent.com>
23886
23887         * m4/gettimeofday.m4: New file.
23888         Prompted by a report from Bernhard Baehr.
23889
23890 2001-07-15  Jim Meyering  <meyering@lucent.com>
23891
23892         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23893         stuff. Now it's in ../Makefile.cfg.
23894
23895 2001-07-15  Jim Meyering  <meyering@lucent.com>
23896
23897         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23898         (BUILT_SOURCES): Add unlocked-io.h.
23899         (io_functions): Define.
23900         (unlocked-io.h): New rule.
23901         (DISTCLEANFILES): Add unlocked-io.h.
23902         (all-local): Depend on unlocked-io.h, to ensure it is created.
23903
23904         * lib/unlocked-io.hin: New file
23905
23906         * lib/regex.c: Update from glibc.
23907
23908 2001-07-05  Jim Meyering  <meyering@lucent.com>
23909
23910         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23911         recommendation.
23912         (libfetish_a_SOURCES): Put all .h files here instead.
23913         Remove a thus-exposed (better checks in automake) duplicate and
23914         two unnecessary .h files.
23915
23916 2001-07-04  Jim Meyering  <meyering@lucent.com>
23917
23918         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23919         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23920         distcheck failure.
23921
23922 2001-07-02  Jim Meyering  <meyering@lucent.com>
23923
23924         The following changes were prompted by suggestions from Bruno Haible.
23925
23926         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23927         is now generated.
23928         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23929         definition of EXTRA_DIST.
23930         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23931         ensure that the generated file is created/updated whenever the list
23932         of $(unlocked_functions) is changed.
23933         (jm-glibc-io.m4): New rule.
23934         (unlocked-io.h): New rule -- currently unused.
23935
23936 2001-06-24  Jim Meyering  <meyering@lucent.com>
23937
23938         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23939         unmatched right bracket, rather than kludging it with an extra,
23940         falsely-matching quote in a comment.  Patch by Akim Demaille.
23941
23942 2001-06-11  Jim Meyering  <meyering@lucent.com>
23943
23944         * lib/regex.c: Update from GNU libc.
23945
23946 2001-05-27  Jim Meyering  <meyering@lucent.com>
23947
23948         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23949         Check for ut_type in struct utmp.
23950
23951 2001-05-27  Jim Meyering  <meyering@lucent.com>
23952
23953         * lib/readutmp.h (UT_TYPE): Define.
23954
23955 2001-05-24  Jim Meyering  <meyering@lucent.com>
23956
23957         * lib/argmatch.c: Include "quote.h".
23958         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23959         quote function.  Reported by Göran Uddeborg.
23960
23961 2001-05-22  Jim Meyering  <meyering@lucent.com>
23962
23963         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23964         now that we use the package-supplied version unconditionally.
23965         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23966
23967 2001-05-21  Jim Meyering  <meyering@lucent.com>
23968
23969         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23970         shell syntax errors.
23971
23972 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23973
23974         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23975
23976 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23977
23978         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23979         Don't bother to check library strftime, since
23980         we'll be using our own my_strftime function anyway.
23981         Define my_strftime instead of strftime.
23982
23983 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23984
23985         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23986         which is not yet declared.
23987
23988 2001-05-15  Jim Meyering  <meyering@lucent.com>
23989
23990         * m4/regex.m4: Use proper quoting so brackets appear in the test
23991         program.
23992         Reported by, and with help from, Bruno Haible.
23993
23994 2001-05-13  Jim Meyering  <meyering@lucent.com>
23995
23996         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23997         undefined.
23998
23999 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24000
24001         dirname code cleanup.  base_name now behaves more compatibly
24002         with POSIX basename when given file names that have trailing
24003         slashes, and similarly for dir_name.  Add new primitives
24004         base_len and dir_len.  Put the directory-name-related decls
24005         into dirname.h.
24006
24007         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24008         * lib/backupfile.c (base_name): Likewise.
24009         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24010         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24011         * lib/makepath.c (strip_trailing_slashes): Likewise.
24012         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24013         ISSLASH): Likewise.
24014         * lib/rename.c (strip_trailing_slashes): Likewise.
24015         * lib/same.c (base_name): Likewise.
24016         * lib/stripslash.c (ISSLASH): Likewise.
24017
24018         * lib/addext.c: Include <dirname.h> after size_t is defined.
24019         * lib/backupfile.c: Likewise.
24020
24021         * lib/addext.c (addext): Use base_len to trim redundant
24022         trailing slashes instead of doing it ourselves.
24023         But do not trim the last slash if it is not redundant.
24024
24025         * lib/backupfile.c (find_backup_file_name,
24026         max_backup_version): Use base_len instead of rolling it ourselves.
24027         Handle the case of "" and (on DOS) "C:" correctly.
24028
24029         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24030         needed. Include <string.h>, <dirname.h>.
24031         (base_name): Allow file names ending in slashes, other than names
24032         that are all slashes.  In this case, return the basename followed
24033         by the slashes.  This is more general, and can be used in places
24034         where the original base_name purposely had an assertion failure.
24035         (base_len): New function.
24036
24037         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24038         Do not include <assert.h>; no longer needed.
24039         Include xalloc.h.
24040         (memrchr): Remove decl.
24041         (dir_name_r): Remove.
24042         (dir_len): Renamed from dirlen.  All callers changed.
24043         Rewrite in terms of base_name, for simplicity and consistency.
24044         (dir_name): Never return NULL.  All callers changed.
24045         Do not include <stdlib.h> in test program; no longer needed.
24046         return 0; is fine for test program.
24047
24048         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24049         New macros.
24050         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24051
24052         * lib/path-concat.c (path_concat): Use base_len to compute
24053         base length, not strlen; this means we cannot rely on memcpy
24054         to null-terminate.
24055
24056         * lib/same.c (STREQ): Remove.
24057         (same_name): Handle the case where the basename ends in trailing '/'.
24058
24059         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24060         a slash was stripped.  Do not strip the last slash after a
24061         file system prefix.
24062
24063 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24064
24065         * lib/Makefile.am (libfetish_a_SOURCES):
24066         Add strftime.c, since we now compile it on all hosts.
24067
24068         * lib/strftime.c (my_strftime):
24069         Define to nstrftime if emacs, but only if my_strftime is not defined.
24070         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24071         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24072         Add one more extra argument: a nanoseconds value.
24073         All uses changed.
24074         (ns): New macro.
24075         (my_strftime function): Add %N format.
24076         (emacs_strftimeu): Renamed from emacs_strftime,
24077         with extra ut argument.
24078
24079 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24080
24081         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24082
24083 2001-04-21  Jim Meyering  <meyering@lucent.com>
24084
24085         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24086         doesn't interfere.
24087
24088 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24089
24090         * m4/ftruncate.m4: Check for chsize.
24091         Link with ftruncate.o unconditionally if ftruncate is missing.
24092         This was required when cross-compiling to i586-mingw32msvc.
24093
24094 2001-04-08  Jim Meyering  <meyering@lucent.com>
24095
24096         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24097         recomputed; that's necessary when the offset spans a DST transition.
24098         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24099
24100 2001-04-02  Jim Meyering  <meyering@lucent.com>
24101
24102         * lib/regex.h, regex.c: Update from GNU libc.
24103
24104 2001-03-24  Jim Meyering  <meyering@lucent.com>
24105
24106         * m4/jm-macros.m4: Require autoconf-2.49d.
24107
24108 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24109
24110         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24111
24112 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24113
24114         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24115
24116 2001-03-17  Jim Meyering  <meyering@lucent.com>
24117
24118         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24119         now that the version in autoconf is equivalent.
24120         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24121
24122         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24123         Suggestion from Akim Demaille.
24124
24125         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24126         (jm_PREREQ_TEMPNAME): New function.
24127
24128 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24129
24130         * lib/tempname.c (uint64_t): Define to uintmax_t if
24131         not defined, and if UINT64_MAX is not defined.
24132         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24133         Reported by John David Anglin.
24134
24135 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24136
24137         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24138         resolve alias if codeset is empty.
24139         * lib/config.charset (BeOS): Use wildcard syntax.
24140
24141 2001-03-13  Jim Meyering  <meyering@lucent.com>
24142
24143         * lib/path-concat.c (path_concat)
24144         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24145         concatenating e.g., `C:' and `foo'.
24146         From Bruno Haible.
24147
24148 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24149
24150         * lib/localcharset.c (locale_charset): Don't use
24151         setlocale(LC_CTYPE,NULL). Don't return NULL.
24152         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24153
24154 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24155
24156         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24157         support for DOS/DJGPP.
24158
24159 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24160
24161         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24162         lacks mkstemp.  Compile our own tempname.c if we compile our own
24163         mkstemp.c, as mkstemp relies on tempname.
24164
24165 2001-03-01  Jim Meyering  <meyering@lucent.com>
24166
24167         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24168         AH_VERBATIM really does output its argument verbatim.
24169
24170 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24171
24172         * lib/Makefile.am (libfetish_a_SOURCES):
24173         Add dup-safer.c, fopen-safer.c.
24174         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24175
24176         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24177         * lib/unistd-safer.h: New files.
24178
24179 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24180
24181         The mkstemp replacement is taken from glibc 2.2.2, with some
24182         portability fixes for use outside glibc, as follows:
24183
24184         * lib/tempname.c (struct_stat64): New macro.
24185         (direxists, __gen_tempname): Use it.
24186         This avoids a portability problem with Solaris 8.
24187
24188         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24189         (<stddef.h>, <stdint.h>, <string.h>):
24190         Include only if STDC_HEADERS || _LIBC.
24191         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24192         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24193         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24194         (__set_errno): Define this macro if <errno.h> doesn't.
24195         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24196         Define these macros if <stdio.h> doesn't.
24197         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24198         Define these macros if <sys/stat.h>
24199         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24200         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24201         __xstat64): Define if not _LIBC.
24202         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24203         (__gen_tempname): Invoke gettimeofday only if
24204         HAVE_GETTIMEOFDAY || _LIBC;
24205         otherwise, fall back on plain "time".
24206         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24207
24208         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24209
24210         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24211
24212 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24213
24214         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24215
24216 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24217
24218         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24219         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24220         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24221         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24222
24223 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24224
24225         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24226         Remove workaround macros for hosts that have mbrtowc but not
24227         mbstate_t, as we now insist on proper declarations for both
24228         before using mbrtowc.
24229
24230 2001-02-17  Jim Meyering  <meyering@lucent.com>
24231
24232         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24233         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24234         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24235         UnixWare 7.1.1.
24236
24237         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24238         rather than AC_CACHE_VAL.
24239
24240 2001-02-17  Jim Meyering  <meyering@lucent.com>
24241
24242         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24243         around included file name.
24244
24245         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24246
24247         * lib/strftime.c: Update from GNU libc (the only changes were to
24248         comments).
24249
24250 2001-02-17  Jim Meyering  <meyering@lucent.com>
24251
24252         * lib/regex.c: Update from libc.
24253
24254 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24255
24256         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24257         clash.
24258
24259 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24260
24261         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24262         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24263         Reported by Mark Hounschell via Paul Eggert.
24264
24265 2001-02-07  Jim Meyering  <meyering@lucent.com>
24266
24267         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24268
24269 2001-02-05  Jim Meyering  <meyering@lucent.com>
24270
24271         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24272         it includes the patch required for `large file' support with at least
24273         HP-UX's 10.20 /bin/cc.
24274
24275 2001-02-03  Jim Meyering  <meyering@lucent.com>
24276
24277         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24278         AS_IF, now that it works once again (mysteriously).
24279         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24280
24281 2001-01-30  Jim Meyering  <meyering@lucent.com>
24282
24283         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24284         * m4/chown.m4: Rename conftestchown to conftest.chown.
24285         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24286         s/conftestdir2/conftest.d2/.
24287         * m4/utimes.m4: s/conftestdata/conftest.data/
24288         Inspired by Pavel Roskin's change in autoconf.
24289
24290 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24291
24292         * lib/config.charset: Update for FreeBSD 4.2.
24293
24294 2001-01-27  Jim Meyering  <meyering@lucent.com>
24295
24296         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24297         a use of AS_IF.
24298         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24299
24300 2001-01-26  Jim Meyering  <meyering@lucent.com>
24301
24302         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24303         quotearg.c includes it.
24304
24305 2001-01-26  Jim Meyering  <meyering@lucent.com>
24306
24307         * lib/quotearg.c: Include stddef.h.
24308         * lib/quote.c: Include stddef.h.
24309         Reported by Axel Kittenberger.
24310
24311         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24312         line in double quotes so that it evokes a better diagnostic.
24313         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24314         Reported by Axel Kittenberger.
24315
24316 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24317
24318         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24319         as if it was a `charset'.
24320
24321 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24322
24323         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24324         has const.
24325
24326 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24327
24328         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24329         to avoid a warning.  Add back 'const' to inptr.
24330
24331 2001-01-20  Jim Meyering  <meyering@lucent.com>
24332
24333         Be sure that headers are checked before used in code compiled
24334         for the type checks.
24335         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24336         In place of that, invoke jm_CHECK_ALL_TYPES.
24337         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24338         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24339         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24340         The check for ssize_t was mistakenly run before the test for unistd.h.
24341
24342         The configure-time check for stdbool.h was missing.
24343         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24344         (jm_PREREQ_HASH): New function.
24345
24346 2001-01-17  Jim Meyering  <meyering@lucent.com>
24347
24348         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24349         for autoconf-2.49c.
24350         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24351
24352 2001-01-16  Jim Meyering  <meyering@lucent.com>
24353
24354         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24355         From Bruno Haible.
24356
24357 2001-01-14  Jim Meyering  <meyering@lucent.com>
24358
24359         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24360         foo and bar.  Create conftestdir/ in the script, not in the C code.
24361         Remove directories in the script, not in the C code.
24362         Remove conftestdir{,2} before trying to create the directory.
24363         Make the entire configure script fail if the mkdir fails.
24364
24365 2001-01-14  Jim Meyering  <meyering@lucent.com>
24366
24367         * lib/rename.c: New file.  From Volker Borchert.
24368         Include stdlib.h, string.h or strings.h, and xalloc.h.
24369         Use strip_trailing_slashes rather than open-coding it.
24370
24371 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24372
24373         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24374
24375 2001-01-03  Jim Meyering  <meyering@lucent.com>
24376
24377         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24378         of local `inptr' to avoid warning with some system declarations of
24379         iconv.
24380
24381 2001-01-02  Volker Borchert  <bt@teknon.de>
24382
24383         * m4/rename.m4: New file.
24384         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24385
24386 2001-01-01  Jim Meyering  <meyering@lucent.com>
24387
24388         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24389         even on systems with utmpx.h.  It's necessary for the declaration of
24390         utmp's ut_user member.  Reported by Andreas Jaeger.
24391
24392         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24393         available. They are required for the declarations of getgrgid and
24394         getpwuid resp.
24395         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24396         Reported by Andreas Jaeger.
24397
24398 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24399
24400         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24401         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24402         so `make install' also works in VPATH builds.
24403
24404 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24405
24406         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24407         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24408         can be used in subdirectories.
24409
24410 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24411
24412         * lib/modechange.c: Do not assume that mode_t uses the
24413         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24414         the other-execute bit of FOO even if S_IXOTH != 1.
24415
24416         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24417         WOTH, XOTH, ALLM): New macros.
24418         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24419          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24420         Use them.
24421         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24422         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24423         (mode_compile):
24424         No need to use uintmax_t; unsigned long is long enough.
24425         Don't bother to get suffix since we don't use it.
24426
24427 2000-12-26  Jim Meyering  <meyering@lucent.com>
24428
24429         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24430         better with autoheader.
24431
24432 2000-12-24  Jim Meyering  <meyering@lucent.com>
24433
24434         * lib/hash.c (is_prime): Return explicit boolean values.
24435         (hash_get_first): Return NULL to appease Irix5.6's 89.
24436         Reported by Nelson Beebe.
24437
24438 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24439
24440         * lib/localcharset.c (locale_charset): Add support for Win32.
24441
24442 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24443
24444         * lib/physmem.h, lib/physmem.c: New files.
24445
24446         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24447         (noinst_HEADERS): Add physmem.h.
24448
24449         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24450         't' for compatibility with Solaris 8 sort.
24451
24452 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24453
24454         * lib/config.charset: Add support for BeOS.
24455
24456 2000-12-17  Jim Meyering  <meyering@lucent.com>
24457
24458         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24459         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24460
24461 2000-12-16  Jim Meyering  <meyering@lucent.com>
24462
24463         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24464         N and M) would have treated it like `chown N:N FILE'.
24465
24466         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24467
24468 2000-12-16  Jim Meyering  <meyering@lucent.com>
24469
24470         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24471         SHELLS_FILE to a file name that's useful on djgpp systems.
24472         Include stdlib.h.
24473         (ADDITIONAL_DEFAULT_SHELLS): Define.
24474         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24475         Based mostly on a patch from Prashant TR.
24476
24477 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24478
24479         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24480         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24481         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24482
24483 2000-12-08  Andreas Schwab  <schwab@suse.de>
24484
24485         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24486         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24487
24488 2000-12-07  Jim Meyering  <meyering@lucent.com>
24489
24490         * lib/stripslash.c (ISSLASH): Define.
24491         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24492         `/'.
24493         From Prashant TR.
24494
24495         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24496         (dir_name_r): Declare this function as static.
24497         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24498         manifest itself on a name containing a mix of slashes and
24499         backslashes.
24500         Make this function work with names starting with a DOS-style
24501         drive letter and colon prefix.
24502         (dir_name): Append `.' if necessary.
24503         Based mostly on patches from Prashant TR and Eli Zaretskii.
24504
24505         * lib/dirname.h (dir_name_r): Remove prototype.
24506
24507 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24508
24509         * m4/off_t-format.m4: Remove this file.
24510         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24511
24512 2000-12-06  Jim Meyering  <meyering@lucent.com>
24513
24514         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24515         replacement strtoull, we may well need the replacement strtoul, too.
24516         Check for declarations of strtoul and strtoull.
24517         Check for strtol.  Mainly as a cue to cause automake to include
24518         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24519         Check for limits.h -- strtol.c needs it.
24520
24521 2000-12-05  Jim Meyering  <meyering@lucent.com>
24522
24523         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24524
24525 2000-12-04  Jim Meyering  <meyering@lucent.com>
24526
24527         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24528         Also include memory.h, stdlib.h, unistd.h if appropriate.
24529         Reported by Andreas Jaeger (conflicting declaration of malloc).
24530
24531 2000-12-02  Jim Meyering  <meyering@lucent.com>
24532
24533         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24534         * m4/jm-macros.m4 (jm_MACROS): require it.
24535
24536 2000-12-02  Jim Meyering  <meyering@lucent.com>
24537
24538         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24539
24540 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24541
24542         * lib/memrchr.c: Include <config.h> before any system include file.
24543
24544 2000-11-30  Jim Meyering  <meyering@lucent.com>
24545
24546         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24547
24548 2000-11-30  Jim Meyering  <meyering@lucent.com>
24549
24550         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24551
24552 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24553
24554         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24555
24556 2000-11-26  Jim Meyering  <meyering@lucent.com>
24557
24558         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24559
24560 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24561
24562         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24563         size of (size_t) -1; it's not portable.
24564
24565 2000-11-17  Jim Meyering  <meyering@lucent.com>
24566
24567         * lib/strstr.c: Update from GNU libc.
24568
24569 2000-11-17  Akim Demaille  <akim@epita.fr>
24570
24571         * lib/obstack.h: Formatting changes.
24572         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24573         prevent type checking.
24574         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24575         cast the value to (void *): assigning a `foo *' to a `void *'
24576         variable is valid.
24577         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24578
24579 2000-11-16  Jim Meyering  <meyering@lucent.com>
24580
24581         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24582
24583 2000-11-11  Jim Meyering  <meyering@lucent.com>
24584
24585         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24586
24587 2000-11-10  Jim Meyering  <meyering@lucent.com>
24588
24589         * lib/obstack.h: Update from GNU libc.
24590         * lib/obstack.c: Likewise.
24591
24592 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24593
24594         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24595
24596 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24597
24598         * lib/getusershell.c (setusershell): Use rewind rather than
24599         fseek/fseeko, to avoid configuration hassles with fseeko.
24600         Don't bother opening SHELLS_FILE if shellstream is NULL;
24601         it's not necessary.
24602
24603 2000-11-05  Jim Meyering  <meyering@lucent.com>
24604
24605         * lib/makepath.h (make_dir): Declare.
24606         * lib/makepath.c (make_dir): Remove `static' attribute.
24607         Tweak a comment.
24608
24609 2000-11-04  Jim Meyering  <meyering@lucent.com>
24610
24611         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24612
24613 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24614
24615         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24616         last one in a bucket, advance to the next bucket.
24617
24618 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24619
24620         * lib/fnmatch.c: Do not comment out all the code if we are using
24621         the GNU C library, because in some cases we are replacing buggy
24622         code in the GNU C library itself.
24623
24624 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24625
24626         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24627         (regex_compile): Catch bogus \(\1\).
24628
24629 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24630
24631         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24632         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24633         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24634
24635 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24636
24637         * lib/error.h, getline.h, modechange.h:
24638         Remove "2000" from Copyright line, as the file hasn't been
24639         changed this year other than in the copyright notice.
24640
24641         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24642         was changed this year.
24643
24644 2000-10-29  Jim Meyering  <meyering@lucent.com>
24645
24646         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24647         renaming.
24648         * m4/ls-mntd-fs.m4: Likewise
24649
24650 2000-10-29  Jim Meyering  <meyering@lucent.com>
24651
24652         * lib/xstat.in: Fix grammar in comment.
24653
24654 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24655
24656         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24657         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24658         doesn't define __restrict_arr.
24659
24660 2000-10-28  Jim Meyering  <meyering@lucent.com>
24661
24662         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24663         (jm_PREREQ_MEMCHR): New function.
24664
24665 2000-10-28  Jim Meyering  <meyering@lucent.com>
24666
24667         * lib/memchr.c: Update from libc.
24668         Adjust for portability:
24669         [HAVE_STDLIB_H]: Include stdlib.h.
24670         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24671         Undef __memchr, too.
24672         [!weak_alias]: Define __memchr to memchr.
24673
24674         * lib/regex.c: Update from libc.
24675         * lib/regex.h: Likewise.
24676         * lib/getopt1.c: Likewise.
24677         * lib/memcmp.c: Likewise.
24678
24679         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24680         Avoid using fseek, when possible -- it's broken by design.
24681         Patch by Ulrich Drepper.
24682
24683 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24684
24685         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24686         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24687         Giving in to popular pressure to shut up the compiler with casts.
24688
24689 2000-10-26  Jim Meyering  <meyering@lucent.com>
24690
24691         * lib/strftime.c: Update from libc.
24692
24693 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24694
24695         * regex.c: More `unsigned char' -> `re_char' changes.
24696         Also change several `int' into `re_wchar_t'.
24697         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24698         (PUSH_FAILURE_POINTER): Don't cast any more.
24699         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24700         We want GCC to complain, since this piece of code makes
24701         re_match non-reentrant, which *should* be fixed.
24702         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24703         (EXTEND_BUFFER): Use RETALLOC.
24704         (SET_LIST_BIT): Don't cast.
24705         (re_wchar_t): New type.
24706         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24707         that those two functions will always properly return.
24708         (IMMEDIATE_QUIT_CHECK): Cast to void.
24709         (analyse_first): Use recursion rather than an explicit stack.
24710         (re_compile_fastmap): Can't fail anymore.
24711         (re_search_2): Don't check re_compile_fastmap for failure.
24712         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24713         Now also sets the new value (passed in a new argument).
24714         (re_match_2_internal): Use it.
24715         Also, use a new var `reg' of type size_t when looping through regs
24716         rather than reuse the inappropriate `mcnt'.
24717
24718 2000-10-25  Jim Meyering  <meyering@lucent.com>
24719
24720         * lib/obstack.c: Update from libc.
24721
24722 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24723
24724         * regex.c (regex_compile): Change the way of handling a range from
24725         a char less than 256 to a char not less than 256.
24726
24727 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24728
24729         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24730         NT-Emacs only.
24731         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24732         so that re_search functions only quit when callers expect them to.
24733
24734 2000-10-23  Jim Meyering  <meyering@lucent.com>
24735
24736         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24737         wrong.  That set_locale call must not have any side effects.
24738         From Paul Eggert.
24739
24740 2000-10-22  Jim Meyering  <meyering@lucent.com>
24741
24742         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24743         [CYCLIC]: Remove now-unused definition.
24744
24745         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24746         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24747         Suggestion from Ulrich Drepper.
24748
24749 2000-10-21  Jim Meyering  <meyering@lucent.com>
24750
24751         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24752         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24753         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24754
24755 2000-10-21  Jim Meyering  <meyering@lucent.com>
24756
24757         * lib/dirname.c (memrchr): Declare if necessary.
24758         (dir_name): Remove the restriction that there be no
24759         trailing slashes.  Now, this code skips past them, effectively
24760         ignoring them.
24761         [TEST_DIRNAME] (main): New unit tests.
24762
24763         * lib/memrchr.c: New file from GNU libc.
24764         Undef __memrchr, too.
24765         [!weak_alias]: Define __memrchr to memrchr.
24766         Guard weak_alias use with `#ifdef weak_alias'.
24767
24768 2000-10-21  Jim Meyering  <meyering@lucent.com>
24769
24770         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24771         (dir_name): Use dir_name_r.
24772         * lib/dirname.h (dir_name_r): Declare it.
24773
24774 2000-10-17  Jim Meyering  <meyering@lucent.com>
24775
24776         * lib/quote.h (PARAMS): Define and use.
24777         Reported by Akim Demaille.
24778
24779         * lib/getopt.c: Update from libc.
24780
24781 2000-10-16  Jim Meyering  <meyering@lucent.com>
24782
24783         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24784         setlocale.
24785         From Jan Fedak.
24786
24787 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24788
24789         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24790
24791 2000-09-25  Jim Meyering  <meyering@lucent.com>
24792
24793         * lib/md5.h (rol): Define (from GnuPG).
24794
24795         * lib/sha.c: Give credit (GnuPG) where due.
24796         (M): Use rol rather than open-coding it.
24797         Add a FIXME comment.
24798
24799 2000-09-21  Jim Meyering  <meyering@lucent.com>
24800
24801         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24802         Reported by Michael Stone.
24803
24804 2000-09-20  Jim Meyering  <meyering@lucent.com>
24805
24806         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24807         (noinst_HEADERS): Add sha.h.
24808         Based on code from Scott G. Miller and from GnuPG.
24809
24810 2000-09-18  Jim Meyering  <meyering@lucent.com>
24811
24812         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24813         LIBS. Otherwise, everyone ends up linking with -lelf for some
24814         configurations.
24815         Reported by Mike Stone.
24816
24817 2000-09-15  Jim Meyering  <meyering@lucent.com>
24818
24819         * lib/regex.c: Update from libc.
24820
24821 2000-09-10  Jim Meyering  <meyering@lucent.com>
24822
24823         * lib/getopt.c (_getopt_internal): Update from glibc.
24824
24825 2000-09-09  Jim Meyering  <meyering@lucent.com>
24826
24827         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24828         think it should be used as a general replacement for isascii.
24829         * lib/fnmatch.c: Likewise.
24830         * lib/mbswidth.c: Likewise
24831         * lib/regex.c: Likewise.
24832
24833         Don't use atoi.
24834         * lib/userspec.c: Include sys/param.h and limits.h.
24835         Include xstrtol.h.
24836         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24837         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24838         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24839         UID, GID.  Check range.
24840
24841 2000-09-06  Jim Meyering  <meyering@lucent.com>
24842
24843         * lib/getopt.c (_getopt_internal): Update from glibc.
24844
24845 2000-08-30  Jim Meyering  <meyering@lucent.com>
24846
24847         * lib/strftime.c: Merge in changes from GNU libc.
24848
24849 2000-08-26  Jim Meyering  <meyering@lucent.com>
24850
24851         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24852         * m4/fpending.m4: New file.
24853
24854 2000-08-26  Jim Meyering  <meyering@lucent.com>
24855
24856         * lib/closeout.c: Include "__fpending.h".
24857         (close_stdout_status): Return right away if there's nothing to flush.
24858
24859         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24860         * lib/__fpending.c: New file.
24861         * lib/__fpending.h: New file.
24862
24863 2000-08-20  Jim Meyering  <meyering@lucent.com>
24864
24865         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24866         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24867         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24868
24869 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24870
24871         Improve fileutils installation on systems where running
24872         programs (like install) can't be unlinked.
24873         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24874         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24875
24876 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24877
24878         Standardize on "memory exhausted" instead of "Memory exhausted"
24879         or "virtual memory exhausted".
24880         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24881         "virtual memory exhausted".
24882         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24883         our own message.
24884         * lib/userspec.c (parse_user_spec): Likewise.
24885         * lib/bumpalloc.h: comment fix
24886         * lib/same.c, userspec.c: Include xalloc.h.
24887
24888         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24889         not char *const and pointing to a constant array.
24890         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24891         (xrealloc): Comment fix.
24892
24893         * lib/userspec.c (parse_user_spec):
24894         Don't translate a message until just before returning,
24895         to avoid unnecessary translation.
24896
24897 2000-08-07  Jim Meyering  <meyering@lucent.com>
24898
24899         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24900         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24901         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24902         getgroups.c, gethostname.c, getopt.h, group-member.c,
24903         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24904         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24905         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24906         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24907         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24908         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24909         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24910         yesno.c: Back out Copyright date changes for each file with no change
24911         this year.  This eases coordination with other programs using the same
24912         source code modules.  From Paul Eggert.
24913
24914 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24915
24916         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24917         not char, for compatibility with glibc 2.1.3 strftime.c.
24918
24919 2000-08-03  Greg McGary  <greg@mcgary.org>
24920
24921         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24922         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24923         (EXTEND_BUFFER): Use them.
24924
24925 2000-08-01  Jim Meyering  <meyering@lucent.com>
24926
24927         * lib/dirname.c (ISSLASH): Define.
24928         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24929         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24930         both `\' and `/' may be use as path separators.
24931         Based on a patch from Prashant TR.
24932
24933 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24934
24935         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24936         slot vector a constant, since it might get modified.
24937
24938 2000-07-31  Jim Meyering  <meyering@lucent.com>
24939
24940         * lib/xmalloc.c: Use `virtual memory exhausted', not
24941         `Memory exhausted'.
24942         * lib/obstack.c (print_and_abort): Likewise.
24943
24944 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24945
24946         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24947         buffer, so that the caller can always quote one small
24948         component of a "memory exhausted" message in slot 0.
24949         From a suggestion by Jim Meyering.
24950
24951 2000-07-30  Jim Meyering  <meyering@lucent.com>
24952
24953         * lib/makepath.c (make_path): Quote the other instance, too.
24954
24955         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24956         (STATIC_BUF_SIZE): Define.
24957         (quotearg_n_options): Use only statically allocated storage when
24958         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24959         than STATIC_BUF_SIZE.
24960
24961 2000-07-29  Jim Meyering  <meyering@lucent.com>
24962
24963         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24964         * lib/dirname.c (dir_name): Likewise.
24965
24966         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24967         `/'.
24968
24969         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24970         (dir_name): Assert that there are no trailing slashes.
24971
24972 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24973
24974         * lib/mbswidth.h (mbswidth): Add a flags argument.
24975         (mbswidth): New declaration.
24976         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24977         * lib/mbswidth.c (mbswidth): Add a flags argument.
24978         (mbsnwidth): New function.
24979
24980 2000-07-24  Jim Meyering  <meyering@lucent.com>
24981
24982         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24983
24984 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24985
24986         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24987
24988 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24989
24990         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24991         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24992         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24993         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24994         invoke multibyte primitives.
24995
24996 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24997
24998         * lib/quotearg.c:
24999         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25000         so that mbstate_t is always defined.
25001
25002         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25003         be 1 in at least one GCC installation, and this configuration
25004         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25005         performance on hosts that have mbrtowc but have only unibyte
25006         locales, but I assume these hosts are rare.
25007
25008 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25009
25010         * lib/mbswidth.c (_XOPEN_SOURCE):
25011         Don't define; this causes problems on Solaris 7.
25012         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25013
25014 2000-07-23  Jim Meyering  <meyering@lucent.com>
25015
25016         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25017         too: getgrgid, getpwuid, getuid.
25018
25019 2000-07-23  Jim Meyering  <meyering@lucent.com>
25020
25021         * lib/basename.c (base_name): Add an assertion.
25022
25023 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25024
25025         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25026         shadow its mbsinit function.
25027
25028 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25029
25030         * lib/mbswidth.h: New file.
25031         * lib/mbswidth.c: New file.
25032         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25033         (noinst_HEADERS): Add mbswidth.h.
25034
25035 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25036
25037         * lib/config.charset: Add support for FreeBSD. Improve support for
25038         HP-UX and IRIX 6.
25039
25040 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25041
25042         * m4/mbswidth.m4: New file.
25043         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25044
25045 2000-07-15  Jim Meyering  <meyering@lucent.com>
25046
25047         * lib/makepath.c: Include quote.h.
25048         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25049         corresponding argument in a `quote (...)' call.
25050         Give better diagnostics.
25051
25052         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25053         (noinst_HEADERS): Add quote.h.
25054
25055         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25056         from tar's src/misc.c.
25057         * lib/quote.h: New file.  Prototypes for same.
25058
25059 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25060
25061         From a suggestion by Bruno Haible.
25062         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25063         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25064         to decide whether to define the BeOS workaround macro;
25065         this adjusts to the change to AC_MBSTATE_T.
25066
25067 2000-07-14  Jim Meyering  <meyering@lucent.com>
25068
25069         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25070         jm_AC_TYPE_UINTMAX_T.
25071
25072 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25073
25074         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25075
25076         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25077         quotearg_buffer_restyled): Add support for
25078         clocale_quoting_style.  Undo previous change to
25079         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25080         and "{RIGHT QUOTATION MARK}" msgids.
25081
25082 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25083
25084         From a suggestion by Bruno Haible.
25085         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25086         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25087         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25088         and mbstate_t, to a single-part test that simply defines mbstate_t.
25089         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25090         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25091
25092 2000-07-10  Jim Meyering  <meyering@lucent.com>
25093
25094         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25095
25096         * m4/gnu-source.m4: Output to confdefs.h directly.
25097         Suggestion from Akim Demaille.
25098
25099 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25100
25101         The old behavior of quoting `like this' doesn't look good with
25102         newer, ISO-style fonts.  See:
25103         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25104
25105         Instead, quote "like this" by default.  Let the translator
25106         tailor the locale-specific quoting behavior by providing
25107         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25108
25109         * lib/quotearg.c (N_): New macro.
25110         (gettext_default): New function.
25111         (quotearg_buffer_restyled): Use
25112         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25113         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25114
25115 2000-07-09  Jim Meyering  <meyering@lucent.com>
25116
25117         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25118         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25119
25120         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25121         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25122
25123 2000-07-09  Jim Meyering  <meyering@lucent.com>
25124
25125         * lib/Most files: Update copyright dates to include 2000.
25126
25127 2000-07-08  Jim Meyering  <meyering@lucent.com>
25128
25129         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25130         if not defined.
25131         (xgethostname): Remove now-unnecessary #ifdef.
25132         Move declaration of `err' into loop where it's used.
25133
25134 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25135         and Bruno Haible  <haible@clisp.cons.org>
25136
25137         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25138         only if the test for an object-type mbstate_t fails.  This
25139         prevents us from mistakenly reporting that mbstate_t is a
25140         system object type after we "#define mbstate_t int" to work
25141         around its lack.
25142
25143 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25144         and Bruno Haible  <haible@clisp.cons.org>
25145
25146         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25147
25148 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25149
25150         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25151         to strerror_r.
25152         Include <ctype.h> for use of isalpha.
25153
25154 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25155
25156         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25157         by allocating a larger buffer. Test the gethostname return value for
25158         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25159         returns an error and ENAMETOOLONG isn't defined.
25160
25161 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25162
25163         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25164         dimension.
25165
25166 2000-07-04  Jim Meyering  <meyering@lucent.com>
25167
25168         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25169         of the deprecated AC_CHECKING.
25170
25171 2000-07-04  Jim Meyering  <meyering@lucent.com>
25172
25173         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25174         Reported by Bruno Haible.
25175
25176 2000-07-04  Jim Meyering  <meyering@lucent.com>
25177
25178         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25179         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25180         lacks mbrtowc.
25181
25182 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25183
25184         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25185         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25186
25187 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25188         and Bruno Haible  <haible@clisp.cons.org>
25189
25190         * lib/quotearg.c (mbrtowc):
25191         Assign to *pwc, and return 1 only if result is nonzero.
25192         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25193
25194 2000-07-03  Jim Meyering  <meyering@lucent.com>
25195
25196         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25197
25198 2000-07-03  Jim Meyering  <meyering@lucent.com>
25199
25200         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25201         This is necessary to get a definition of e.g., UTMP_FILE on
25202         HP-UX 10.20.
25203         From Bob Proulx.
25204
25205 2000-07-02  Jim Meyering  <meyering@lucent.com>
25206
25207         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25208
25209         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25210         AC_LIBOBJ(function_name).
25211         * m4/chown.m4: Likewise.
25212         * m4/fnmatch.m4: Likewise.
25213         * m4/ftruncate.m4: Likewise.
25214         * m4/getgroups.m4: Likewise.
25215         * m4/getline.m4: Likewise.
25216         * m4/group-member.m4: Likewise.
25217         * m4/jm-macros.m4: Likewise.
25218         * m4/lstat.m4: Likewise.
25219         * m4/malloc.m4: Likewise.
25220         * m4/memcmp.m4: Likewise.
25221         * m4/nanosleep.m4: Likewise.
25222         * m4/putenv.m4: Likewise.
25223         * m4/realloc.m4: Likewise.
25224         * m4/regex.m4: Likewise.
25225         * m4/stat.m4: Likewise.
25226         * m4/strftime.m4: Likewise.
25227
25228 2000-07-02  Jim Meyering  <meyering@lucent.com>
25229
25230         * lib/quotearg.c (mbstate_t): Don't define here.
25231
25232 2000-07-02  Jim Meyering  <meyering@lucent.com>
25233
25234         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25235
25236 2000-07-01  Jim Meyering  <meyering@lucent.com>
25237
25238         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25239
25240 2000-07-01  Jim Meyering  <meyering@lucent.com>
25241
25242         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25243         problem.
25244
25245 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25246
25247         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25248         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25249
25250 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25251
25252         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25253         per change in ../m4/ls-mntd-fs.m4.
25254         (read_filesystem_list): Ignore symbolic links.
25255
25256 2000-06-29  Jim Meyering  <meyering@lucent.com>
25257
25258         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25259         for declaration of strcmp.
25260
25261         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25262
25263         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25264         Avoid warning by casting result to `char *' to remove `const'.
25265
25266 2000-06-28  Jim Meyering  <meyering@lucent.com>
25267
25268         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25269         included by quotearg.c, for which we perform this test.  From
25270         Bruno Haible.
25271
25272 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25273
25274         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25275         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25276         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25277
25278 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25279
25280         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25281
25282 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25283
25284         savedir now sets errno on failure and invokes xmalloc to get memory.
25285         Fix a couple of other minor bugs while we're at it.
25286
25287         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25288         (NAMLEN): Remove macro.
25289         (malloc, realloc): Remove decls.
25290         (stpcpy): Likewise.
25291         ("xalloc.h"): Include.
25292         (NAME_SIZE_DEFAULT): New macro.
25293         (savedir): Use xmalloc / xrealloc to allocate memory.
25294         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25295         Skip "" directory entries.
25296         Use strlen to calculate directory entry length, since the old method
25297         is rarely used these days and isn't worth supporting.
25298         Don't use a pointer after freeing it.
25299         Check for integer overflow when calculating allocation size.
25300         Use memcpy to copy entries, instead of stpcpy.
25301         Set errno properly when returning NULL.
25302         Check for readdir error.
25303
25304 2000-06-26  Jim Meyering  <meyering@lucent.com>
25305
25306         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25307
25308 2000-06-25  Jim Meyering  <meyering@lucent.com>
25309
25310         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25311         Linux header bug when _XOPEN_SOURCE is defined to 500.
25312
25313 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25314
25315         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25316         deficiency.
25317
25318 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25319
25320         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25321         Include xalloc.h.
25322         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25323
25324 2000-06-24  Jim Meyering  <meyering@lucent.com>
25325
25326         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25327         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25328         for which strerror does return char*, but which lacks a conveniently
25329         accessible declaration of the function.  If the compile-test says
25330         strerror_r doesn't work, then resort to a `run'-test that works on
25331         BeOS and segfaults on DEC Unix.
25332
25333 2000-06-24  Jim Meyering  <meyering@lucent.com>
25334
25335         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25336
25337 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25338
25339         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25340         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25341
25342 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25343
25344         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25345         (mbrtowc, mbstate_t): Define substitutes if
25346         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25347         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25348         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25349
25350 2000-06-23  Jim Meyering  <meyering@lucent.com>
25351
25352         * m4/afs.m4: Add missing AC_MSG_RESULT.
25353         Reported by Bruno Haible.
25354
25355         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25356         Suggestion from Bruno Haible.
25357
25358 2000-06-23  Jim Meyering  <meyering@lucent.com>
25359
25360         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25361
25362 2000-06-21  Jim Meyering  <meyering@lucent.com>
25363
25364         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25365
25366 2000-06-21  Jim Meyering  <meyering@lucent.com>
25367
25368         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25369         (noinst_HEADERS): Add getstr.h.
25370
25371         * lib/getline.c (getstr): Move into a separate file.
25372         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25373         the following changes: new parameter, delim2; both delim[12]
25374         parameters have type `int', not `char'.  The latter would lose
25375         with 8-bit delimiters.
25376         * lib/getstr.h: New file.
25377
25378 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25379
25380         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25381         than 1024, return a memory chunk of least possible size, instead
25382         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25383         Use free/xmalloc instead of xrealloc to avoid copying for very long
25384         paths.
25385
25386 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25387
25388         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25389         the empty string.
25390
25391 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25392
25393         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25394         address, not strdup.  Include <stdlib.h> and don't declare free().
25395
25396 2000-06-19  Jim Meyering  <meyering@lucent.com>
25397
25398         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25399
25400 2000-06-18  Jim Meyering  <meyering@lucent.com>
25401
25402         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25403
25404         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25405         `checking whether...' message to be consistent with that of the
25406         lstat test.
25407
25408 2000-06-18  Jim Meyering  <meyering@lucent.com>
25409
25410         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25411         Besides, these days every porting target provides a mkdir function.
25412
25413         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25414         needed. (this snippet comes from src/system.h).
25415
25416 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25417
25418         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25419
25420 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25421
25422         * lib/human.c (adjust_value): New function.
25423         (human_readable_inexact): Apply rounding style even when
25424         printing approximate values.
25425
25426 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25427
25428         * lib/human.c (human_readable_inexact): Allow an input block
25429         size that is not a multiple of the output block size, and vice versa.
25430         Reported by Piergiorgio Sartor.
25431
25432 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25433
25434         * lib/getdate.y (get_date): Apply relative times after time
25435         zone indicator, not before.  Reported by Todd A. Jacobs.
25436
25437 2000-06-13  Jim Meyering  <meyering@lucent.com>
25438
25439         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25440
25441         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25442
25443 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25444
25445         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25446
25447 2000-06-12  Jim Meyering  <meyering@lucent.com>
25448
25449         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25450         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25451         optional argument.
25452         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25453         the optional argument, `lib'.
25454
25455 2000-06-08  Jim Meyering  <meyering@lucent.com>
25456
25457         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25458
25459 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25460
25461         Rewrite largefile configuration so that we don't need to run
25462         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
25463         AC_CANONICAL_HOST in configure.in -- jmm]
25464
25465         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
25466         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
25467         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
25468         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
25469         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
25470         All uses changed.
25471         Instead of inspecting the output of getconf, try to compile the
25472         test program without and with the macro definition.
25473         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
25474         for getconf.  Instead, check for the needed flags by compiling
25475         test programs.
25476
25477 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25478
25479         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
25480
25481 2000-06-04  Jim Meyering  <meyering@lucent.com>
25482
25483         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
25484         SunOS 4.1.4 for which gid_t is an unsigned type.
25485
25486 2000-06-03  Jim Meyering  <meyering@lucent.com>
25487
25488         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
25489         now that autoconf requires that.
25490
25491         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
25492         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
25493         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
25494
25495 2000-06-03  Jim Meyering  <meyering@lucent.com>
25496
25497         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
25498
25499 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25500
25501         * m4/glibc21.m4: New file.
25502         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
25503
25504 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25505
25506         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
25507         newer, don't install charset.alias.
25508         * lib/config.charset: Change the Linux/glibc rules so they become empty
25509         on glibc-2.1 or newer.
25510
25511 2000-06-02  Jim Meyering  <meyering@lucent.com>
25512
25513         * lib/mountlist.c: Back out last change.  Instead, do this...
25514         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
25515         me_dummy member using the same `ignore'-testing code.
25516         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
25517         fs_type strings.
25518         From Mark D. Roth.
25519
25520 2000-05-29  Jim Meyering  <meyering@lucent.com>
25521
25522         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
25523         mounts with the `ignore' attribute.  Based on a patch from
25524         Mark D. Roth.
25525
25526 2000-05-28  Jim Meyering  <meyering@lucent.com>
25527
25528         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
25529         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25530         * m4/stat.m4: Likewise.
25531         * m4/lstat.m4: Likewise.
25532         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
25533
25534         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
25535         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
25536
25537 2000-05-26  Jim Meyering  <meyering@lucent.com>
25538
25539         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
25540
25541 2000-05-24  Jim Meyering  <meyering@lucent.com>
25542
25543         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
25544         autoconf requires that.
25545         * m4/lib-check.m4: Likewise.
25546         * m4/jm-macros.m4: Likewise.
25547         * m4/strftime.m4: Likewise.
25548
25549         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
25550         AC_CHECK_DECLS, now that autoconf requires that.
25551
25552 2000-05-22  Jim Meyering  <meyering@lucent.com>
25553
25554         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25555         * m4/lstat.m4: Likewise.
25556
25557 2000-05-22  Jim Meyering  <meyering@lucent.com>
25558
25559         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
25560
25561 2000-05-20  Jim Meyering  <meyering@lucent.com>
25562
25563         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
25564         (jm_PREREQ): Use it.
25565
25566 2000-05-18  Jim Meyering  <meyering@lucent.com>
25567
25568         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
25569         back, too, since it may have been modified by allocate_entry.
25570         (hash_delete): Rewrite to use neither the assignment operator
25571         nor the comma operator in an if-expression.
25572
25573 2000-05-15  Paul Eggert  <eggert@twinsun.com>
25574
25575         * lib/closeout.c:
25576         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
25577         Remove; no longer needed.
25578         "quotearg.h": Add include.
25579         (file_name): Do not bother to explicitly initialize to NULL; it's less
25580         efficient on some hosts.
25581         (close_stdout_status): Remove test as to whether stdout was already
25582         closed; it breaks for the case "echo x | sort >&-".
25583         Quote file name colons.
25584         Do not assume that _("write error") lacks format strings.
25585
25586 2000-05-15  Jim Meyering  <meyering@lucent.com>
25587
25588         * lib/version-etc.c (version_etc_copyright): Update the copyright
25589         string used in all --version output.
25590
25591 2000-05-14  Jim Meyering  <meyering@lucent.com>
25592
25593         * lib/closeout.c (close_stdout_set_file_name): New function.
25594         (close_stdout_status): Use new file-scoped global.
25595         Return right away if fstat says the stdout file descriptor is invalid.
25596         * lib/closeout.h (close_stdout_set_file_name): Declare.
25597
25598 2000-05-10  Jim Meyering  <meyering@lucent.com>
25599
25600         * lib/closeout.c [default_exit_status]: New file-scoped variable.
25601         (close_stdout_set_status): New function.
25602         * lib/closeout.h (close_stdout_set_status): Declare.
25603
25604 2000-05-09  Jim Meyering  <meyering@lucent.com>
25605
25606         * m4/gettext.m4: Rename this...
25607         * m4/libintl.m4: ...to this.
25608
25609 2000-05-08  Jim Meyering  <meyering@lucent.com>
25610
25611         * lib/long-options.c: Don't include closeout.h.
25612         (parse_long_options): Don't call close_stdout for --version.
25613
25614 2000-05-06  Paul Eggert  <eggert@twinsun.com>
25615
25616         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
25617         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
25618         2.1.3 bug.  This avoids a clash when files like regex.c define
25619         _GNU_SOURCE.
25620
25621 2000-05-06  Jim Meyering  <meyering@lucent.com>
25622
25623         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
25624         (AC_REPLACE_FUNCS): Add strnlen.
25625
25626         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
25627         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
25628
25629         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
25630         AC_SEARCH_LIBS call for nanosleep.
25631         (LIB_NANOSLEEP): Set and AC_SUBST.
25632
25633 2000-05-06  Jim Meyering  <meyering@lucent.com>
25634
25635         * lib/strnlen.c: Undefine __strnlen and strnlen.
25636         [!weak_alias]: Define __strnlen to strnlen.
25637
25638         * lib/atexit.c: New file, from libiberty.
25639
25640 2000-05-06  Jim Meyering  <meyering@lucent.com>
25641
25642         * lib/closeout.c (close_stdout_status): Also check for errors on the
25643         stderr stream.
25644
25645 2000-05-05  Jim Meyering  <meyering@lucent.com>
25646
25647         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
25648         AC_SEARCH_LIBS call for clock_gettime.
25649         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
25650
25651         * m4/search-libs.m4: Update from autoconf.
25652
25653         su doesn't work on Solaris 2.6.
25654         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
25655         <shadow.h>.  Reported by Dragos Harabor.
25656
25657 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
25658
25659         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
25660         memcpy instead of xmalloc, xrealloc, path_concat.
25661         (locale_charset): Treat empty environment variables as absent.
25662         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
25663
25664 2000-05-04  Jim Meyering  <meyering@lucent.com>
25665
25666         * lib/getopt.c: Update from glibc.
25667         * lib/obstack.c: Likewise.
25668         * lib/obstack.h: Likewise.
25669         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
25670         file
25671
25672         * lib/regex.h: Likewise.
25673         * lib/strndup.c: Likewise.
25674         * lib/strnlen.c: New file, from glibc.
25675
25676 2000-05-03  Jim Meyering  <meyering@lucent.com>
25677
25678         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
25679
25680 2000-05-02  Paul Eggert  <eggert@twinsun.com>
25681
25682         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
25683         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
25684         compile-time test, rather than inspecting host and OS, to
25685         decide whether to define _LARGEFILE_SOURCE.
25686
25687 2000-05-01  Jim Meyering  <meyering@lucent.com>
25688
25689         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
25690
25691         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
25692         Based on a patch from Bruno Haible.
25693
25694 2000-05-01  Jim Meyering  <meyering@lucent.com>
25695
25696         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
25697
25698 2000-04-29  Jim Meyering  <meyering@lucent.com>
25699
25700         * lib/path-concat.c: Declare strdup only if it's not defined.
25701         * lib/canon-host.c: Likewise.
25702
25703 2000-04-28  Jim Meyering  <meyering@lucent.com>
25704
25705         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
25706         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
25707         is included first, then limits.h is included by locale.h by libintl.h.
25708         From John David Anglin.
25709
25710 2000-04-25  Jim Meyering  <meyering@lucent.com>
25711
25712         * lib/makepath.c (S_IRWXUGO): Define.
25713         (make_path): Always perform explicit chmod if MODE specifies any
25714         of the `special' permission bits.  Prompted by a bug report against
25715         install from Mate Wierdl and Joost van Baal.
25716
25717 2000-04-18  Jim Meyering  <meyering@lucent.com>
25718
25719         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25720         (jm_PREREQ): Use it.
25721
25722 2000-04-18  Jim Meyering  <meyering@lucent.com>
25723
25724         * lib/README: New file.
25725
25726         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25727         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25728
25729 2000-04-17  Jim Meyering  <meyering@lucent.com>
25730
25731         Get it right :-)
25732         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25733         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25734         Suggestion from Akim Demaille.
25735
25736 2000-04-17  Jim Meyering  <meyering@lucent.com>
25737
25738         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25739         the definition of it to rpl_strftime also defined-away the system's
25740         declaration.
25741
25742 2000-04-15  Jim Meyering  <meyering@lucent.com>
25743
25744         Use `C' to denote so-called `contiguous' files, the same way
25745         that tar does.
25746         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25747         (ftypelet): Use S_ISCTG.
25748         From Michael Deutschmann.
25749
25750 2000-04-14  Jim Meyering  <meyering@lucent.com>
25751
25752         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25753         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25754         clobbered.
25755
25756 2000-04-14  Jim Meyering  <meyering@lucent.com>
25757
25758         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25759
25760 2000-04-13  Jim Meyering  <meyering@lucent.com>
25761
25762         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25763         AH_VERBATIM to insert required #ifndef into config.h.in.
25764         Suggestion from Akim Demaille.
25765
25766 2000-04-12  Jim Meyering  <meyering@lucent.com>
25767
25768         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25769         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25770         Christian Krackowizer.
25771
25772         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25773         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25774         (AC_SYS_LARGEFILE): Require.
25775         (AM_C_PROTOTYPES): Require.
25776
25777 2000-04-08  Jim Meyering  <meyering@lucent.com>
25778
25779         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25780         names don't conflict.  Reported by Eli Zaretskii.
25781
25782 2000-04-07  Jim Meyering  <meyering@lucent.com>
25783
25784         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25785         sys/types.h, to work around system header problems on AIX 3.2.5.
25786         From Bruno Haible.
25787
25788 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25789
25790         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25791         bug.  Deal with the different error behavior of Irix iconv.
25792
25793 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25794
25795         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25796         IRIX if the installer said otherwise.
25797
25798 2000-04-05  Jim Meyering  <meyering@lucent.com>
25799
25800         Portability tweaks required for ultrix4.3.
25801         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25802         (jm_CHECK_DECLS): Add getutent to the list of functions.
25803         (_jm_DECL_HEADERS): Add utmpx.h.
25804         From John David Anglin.
25805
25806         * m4/strftime.m4: Back out the 2000-04-02 change.
25807         Instead of that change, simply undefine putenv in the test program.
25808
25809 2000-04-05  Jim Meyering  <meyering@lucent.com>
25810
25811         Portability tweaks required for ultrix4.3.
25812         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25813         getutent.
25814         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25815         * lib/canon-host.c: Declare strdup.
25816         * lib/path-concat.c: Likewise.
25817         From John David Anglin.
25818
25819 2000-04-04  Jim Meyering  <meyering@lucent.com>
25820
25821         Be more DOS 8.3-friendly.
25822         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25823         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25824         * lib/Makefile.am: Reflect renaming.
25825         Reported by Eli Zaretskii.
25826
25827         Use a temporary file name that won't clash with `charset.alias'
25828         in the DOS 8.3 name space.
25829         * lib/Makefile.am (charset_tmp): Define.
25830         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25831         (uninstall-local): Likewise.
25832         Reported by Eli Zaretskii.
25833
25834 2000-04-03  Jim Meyering  <meyering@lucent.com>
25835
25836         * m4/gettext.m4: Fix typo in comment.
25837
25838         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25839         textutils/configure.in).  Suggestion from Paul Eggert.
25840         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25841
25842 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25843
25844         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25845         variable in the shell rather than using putenv, which isn't
25846         portable.  This avoids the configure-time inter-test dependency
25847         on the potentially-renamed putenv function.
25848
25849 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25850
25851         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25852         before checking struct stat.st_blksize, so that
25853         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25854
25855 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25856
25857         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25858         since strftime.c uses HAVE_STRFTIME to decide whether to use
25859         the underlying strftime.
25860
25861 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25862
25863         * lib/time/strftime.c (my_strftime): Make sure we call the system
25864         strftime, not ourselves, when invoking the underlying strftime.
25865
25866 2000-03-24  Jim Meyering  <meyering@lucent.com>
25867
25868         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25869         (charset_alias): Define.
25870         (install-exec-local): Factor out common code.
25871         (uninstall-local): Split lines longer than 80.
25872         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25873         (SUFFIXES): Define.
25874         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25875         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25876
25877 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25878
25879         * lib/config.charset: Output a line containing "Packages using this
25880         file".
25881         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25882         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25883         ref-del.sed): New rules.
25884
25885 2000-03-17  Jim Meyering  <meyering@lucent.com>
25886
25887         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25888         Otherwise, include <strings.h>
25889
25890 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25891
25892         * lib/unicodeio.c (utf8_wctomb): New function.
25893         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25894         format instead of in UCS-4 with platform dependent endianness.
25895
25896 2000-03-10  Jim Meyering  <meyering@lucent.com>
25897
25898         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25899         From Marco Franzen.
25900
25901 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25902
25903         * lib/savedir.c (savedir): Work even if directory size is
25904         negative; this can happen with some screwy NFS configurations.
25905
25906 2000-03-06  Jim Meyering  <meyering@lucent.com>
25907
25908         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25909         if it's NULL (because we ran out of memory).  From Bruno Haible.
25910
25911 2000-03-05  Jim Meyering  <meyering@lucent.com>
25912
25913         * lib/localcharset.c ("path-concat.h"): Include.
25914         (get_charset_aliases): Use path_concat instead of ANSI string
25915         concatenation.
25916
25917         * lib/unicodeio.h (PARAMS): Define.
25918         Use it to guard prototype.
25919
25920 2000-03-04  Jim Meyering  <meyering@lucent.com>
25921
25922         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25923         for lib/localcharset.c.
25924
25925 2000-03-04  Jim Meyering  <meyering@lucent.com>
25926
25927         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25928         installing into it.
25929         (uninstall-local): Uncomment this rule so `make distcheck' works
25930         once again.
25931
25932         * lib/unicodeio.c (<errno.h>): Include it.
25933         (errno): Declare if not defined.
25934
25935         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25936
25937         * lib/config.charset: New version, incorporating remarks from a linux
25938         i18n mailing list.  From Bruno Haible.
25939
25940 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25941
25942         * m4/codeset.m4: New file.
25943         * m4/iconv.m4: New file.
25944         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25945
25946 2000-03-03  Jim Meyering  <meyering@lucent.com>
25947
25948         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25949
25950 2000-03-02  Jim Meyering  <meyering@lucent.com>
25951
25952         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25953         the messages come out on separate lines.
25954
25955         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25956         rather than jm_CHECK_DECLARATIONS.
25957         * m4/decl.m4: Remove now-unused file.
25958
25959         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25960         geteuid.
25961
25962 2000-03-02  Jim Meyering  <meyering@lucent.com>
25963
25964         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25965
25966 2000-03-01  Jim Meyering  <meyering@lucent.com>
25967
25968         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25969         * lib/unicodeio.c: Likewise.
25970
25971 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25972
25973         * lib/config.charset: New file.
25974         * lib/localcharset.c: New file.
25975         * lib/unicodeio.h, lib/unicodeio.c: New files.
25976         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25977         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25978         (noinst_HEADERS): Add unicodeio.h.
25979         (all-local, install-exec-local, charset.alias): New targets.
25980
25981 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25982
25983         * lib/quotearg.c (ALERT_CHAR): New macro.
25984         (quotearg_buffer_restyled): Use it.
25985
25986 2000-02-27  Jim Meyering  <meyering@lucent.com>
25987
25988         * m4/check-decl.m4: Add getenv to the list.
25989
25990 2000-02-27  Jim Meyering  <meyering@lucent.com>
25991
25992         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25993         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25994
25995         * lib/backupfile.c: Guard inclusion of stdlib.h with
25996         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25997         Declare malloc if needed.
25998
25999         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
26000         `#ifndef HAVE_DECL..'
26001         now that autoconf always defines the HAVE_DECL_ symbols.
26002         * lib/human.c: Likewise.
26003         * lib/same.c: Likewise.
26004         * lib/strtoumax.c: Likewise.
26005
26006         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
26007         declaration check was not run.
26008         * lib/hash.c: Likewise.
26009         * lib/human.c: Likewise.
26010         * lib/same.c: Likewise.
26011         * lib/strtoumax.c: Likewise.
26012
26013         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
26014         `.', then first look up the entire `.'-containing string as a login
26015         name.
26016
26017 2000-02-23  Jim Meyering  <meyering@lucent.com>
26018
26019         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
26020         in place of my hack.
26021
26022 2000-02-18  Paul Eggert  <eggert@twinsun.com>
26023
26024         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
26025         (textint): New typedef.
26026         (parser_control): Member year changed from int to textint.
26027         All uses changed.
26028         (YYSTYPE): Removed; replaced by %union with int and textint members.
26029         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
26030         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
26031         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
26032         (tSNUMBER, tUNUMBER): Now of type <textintval>.
26033         (date, number, to_year): Use width of number in digits, not its value,
26034         to determine whether it's a 2-digit year, or a 2-digit time.
26035         (yylex): Store number of digits of numeric tokens.
26036         Reported by John Kendall.
26037
26038         (parser_control): Changed from struct parser_control to typedef (for
26039         consistency).  All uses changed.
26040
26041         (tID): Removed; not used.
26042         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
26043
26044 2000-02-14  Paul Eggert  <eggert@twinsun.com>
26045
26046         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
26047         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
26048
26049 2000-02-12  Jim Meyering  <meyering@lucent.com>
26050
26051         * lib/userspec.c (ISDIGIT): Define it.
26052         (isdigit): Remove definition.
26053         (is_number): Use ISDIGIT, not isdigit.
26054         <libintl.h>: Include.
26055         (_ and N_): Define.
26056         (parse_user_spec): Mark translatable strings.
26057
26058 2000-02-10  Jim Meyering  <meyering@lucent.com>
26059
26060         With these changes, nanosleep.[ch] are finally enough like the other
26061         lib/* replacement files to compile on a few more losing systems.
26062
26063         * lib/nanosleep.h: Don't include config.h.
26064         Remove prototype from declaration of nanosleep.
26065         (PARAMS): Remove now-unneeded definition.
26066         * lib/nanosleep.c: #undef nanosleep.
26067         (rpl_nanosleep): Rename from nanosleep.
26068
26069 2000-02-10  Jim Meyering  <meyering@lucent.com>
26070
26071         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
26072         gnu_nanosleep to rpl_nanosleep.
26073
26074 2000-02-09  Jim Meyering  <meyering@lucent.com>
26075
26076         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
26077         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
26078
26079 2000-02-08  Akim Demaille  <akim@epita.fr>
26080
26081         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
26082         `[' and `]' and remove uses of `changequote'.
26083         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
26084         (AC_SYS_LARGEFILE): Likewise.
26085         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
26086         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
26087         of changequote.
26088         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
26089         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
26090         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
26091         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
26092
26093 2000-02-05  Jim Meyering  <meyering@lucent.com>
26094
26095         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
26096         Remove explicit use of AC_HEADER_TIME.  It is required by
26097         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
26098         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
26099         in autoconf whereby the expansion of the latter ended up preceding
26100         the expansion of its prerequisite, AC_HEADER_TIME.
26101         Reported by Volker Borchert.
26102
26103 2000-02-03  Jim Meyering  <meyering@lucent.com>
26104
26105         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
26106
26107 2000-02-03  Jim Meyering  <meyering@lucent.com>
26108
26109         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
26110         rather than with `#if HAVE_UTMPNAME'.
26111
26112 2000-02-02  Jim Meyering  <meyering@lucent.com>
26113
26114         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
26115         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
26116         Reported by Eli Zaretskii.
26117
26118 2000-02-01  Jim Meyering  <meyering@lucent.com>
26119
26120         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
26121
26122 2000-01-31  Jim Meyering  <meyering@lucent.com>
26123
26124         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
26125         functions.  Add the time.h and sys/time.h headers along with the
26126         AC_REQUIRE'ment of AC_HEADER_TIME.
26127
26128 2000-01-31  Jim Meyering  <meyering@lucent.com>
26129
26130         * lib/nanosleep.h (nanosleep): Guard declaration with
26131         `#if ! HAVE_DECL_NANOSLEEP'.
26132         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
26133         the declaration in that vendor's sys/timers.h.
26134         Reported by Christian Krackowizer.
26135
26136         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
26137         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
26138         (ISPRINT): Likewise.
26139         Reported by Tom Tromey.
26140
26141 2000-01-30  Jim Meyering  <meyering@lucent.com>
26142
26143         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
26144
26145         * m4/prereq.m4 (utmp_includes): Define.
26146         Check for ut_user and ut_name members in both struct utmpx
26147         and struct utmp.
26148
26149 2000-01-30  Jim Meyering  <meyering@lucent.com>
26150
26151         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
26152         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
26153         header files where only utmpx.ut_user is declared.
26154
26155         * lib/readutmp.h (UT_USER): Define.
26156
26157 2000-01-29  Jim Meyering  <meyering@lucent.com>
26158
26159         * m4/lib-check.m4: New file containing library-related checks from
26160         fileutils and sh-utils (textutils had none).
26161
26162 2000-01-28  Jim Meyering  <meyering@lucent.com>
26163
26164         * m4/perl.m4: Change format of warning message to look more like that
26165         from the missing script.  Suggestion from François Pinard.
26166
26167 2000-01-25  Jim Meyering  <meyering@lucent.com>
26168
26169         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
26170         well as time.h in the compile check.
26171         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
26172         Fix typo in cross-compiling case: s/yes/no/.
26173
26174 2000-01-23  Jim Meyering  <meyering@lucent.com>
26175
26176         * m4/jm-macros.m4: Move df-related tests here from
26177         fileutils/configure.in
26178
26179         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
26180         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
26181
26182         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
26183         s/space/ac_fsusage_space/.
26184         (jm_FILE_SYSTEM_USAGE): Take two parameters.
26185
26186         * m4/ftruncate.m4: New file (derived from part of
26187         fileutils/configure.in).
26188         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
26189         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
26190
26191         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
26192         AC_SUBST these here, rather than just in sh-util/configure.in, so
26193         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
26194         all the same.
26195         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
26196         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
26197         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
26198         (AC_SUBST(POW_LIBM)): Likewise.
26199         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
26200
26201 2000-01-23  Jim Meyering  <meyering@lucent.com>
26202
26203         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
26204         obstack.c.
26205
26206 2000-01-22  Jim Meyering  <meyering@lucent.com>
26207
26208         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
26209
26210         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
26211
26212         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
26213         configure.in
26214         (AC_CHECK_HEADERS): Likewise for sh-utils.
26215         (AC_CHECK_HEADERS): Likewise for textutils.
26216         Merge the three lists of headers.
26217
26218         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
26219         from fileutils' configure.in.
26220
26221         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
26222         code. Moved tests into their own function (_jm_DECL_HEADERS) in
26223         check-decl.m4.
26224
26225         * m4/check-decl.m4: Use #if rather than #ifdef.
26226         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
26227         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
26228         (_jm_DECL_HEADERS): Define new function.
26229         (jm_CHECK_DECLARATIONS): Require it.
26230
26231 2000-01-22  Jim Meyering  <meyering@lucent.com>
26232
26233         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
26234         [! HAVE_DECL_STRTOULL]: Declare strtoull.
26235         Required for some AIX systems.  Reported by Christian Krackowizer.
26236         [TESTING] (main): New function.
26237
26238         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
26239         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
26240         letters.
26241
26242         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
26243         iswprint.
26244
26245         * lib/strverscmp.c (ISDIGIT): Define.
26246         (strverscmp): Use ISDIGIT, not isdigit.
26247
26248 2000-01-19  Jim Meyering  <meyering@lucent.com>
26249
26250         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
26251         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
26252         defines `struct timespec' in <sys/time.h>
26253
26254         * m4/c-bs-a.m4: Remove uses of changequote altogether.
26255         Thanks to Akim for explaining.
26256
26257 2000-01-17  Paul Eggert  <eggert@twinsun.com>
26258
26259         * lib/nanosleep.c (nanosleep):
26260         Don't use SA_INTERRUPT to decide whether to call sigaction, as
26261         POSIX.1 doesn't require SA_INTERRUPT and some systems
26262         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
26263         it's been part of POSIX.1 since day 1 (in 1988).
26264
26265 2000-01-17  Jim Meyering  <meyering@lucent.com>
26266
26267         * lib/interlock: Remove unused file.  Reported by François Pinard.
26268
26269 2000-01-16  Paul Eggert  <eggert@twinsun.com>
26270
26271         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
26272         alert, backslash, formfeed, and vertical tab unnecessarily in
26273         shell quoting style.
26274
26275 2000-01-16  Jim Meyering  <meyering@lucent.com>
26276
26277         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
26278         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
26279         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
26280         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
26281
26282 2000-01-16  Jim Meyering  <meyering@lucent.com>
26283
26284         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
26285         because the latter didn't work.
26286
26287 2000-01-15  Jim Meyering  <meyering@lucent.com>
26288
26289         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
26290         (AC_REPLACE_FUNCS): Add memcpy and memset.
26291         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
26292         Add strpbrk.
26293         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
26294
26295 2000-01-12  Jim Meyering  <meyering@lucent.com>
26296
26297         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
26298         (jm_PREREQ): Use it.
26299         (jm_PREREQ_READUTMP): New macro.
26300         (jm_PREREQ): Use it.
26301
26302 2000-01-11  Paul Eggert  <eggert@twinsun.com>
26303
26304         Quote multibyte characters correctly.
26305         * m4/c-bs-a.m4: New file.
26306         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
26307         (jm_PREREQ): Use it.
26308
26309 2000-01-11  Paul Eggert  <eggert@twinsun.com>
26310
26311         * m4/uintmax_t.m4: Port to autoconf 2.13.
26312
26313 2000-01-08  Jim Meyering  <meyering@ascend.com>
26314
26315         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
26316         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
26317
26318 2000-01-04  Jim Meyering  <meyering@ascend.com>
26319
26320         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
26321         jm_STRUCT_DIRENT_D_TYPE.
26322         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
26323         jm_STRUCT_DIRENT_D_INO.
26324         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
26325         jm_STRUCT_UTIMBUF.
26326         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
26327         renamings.
26328         * m4/utime.m4: Likewise.
26329
26330         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
26331         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
26332
26333 2000-01-03  Paul Eggert  <eggert@twinsun.com>
26334
26335         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
26336         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
26337
26338 2000-01-02  Jim Meyering  <meyering@ascend.com>
26339
26340         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
26341         remember if this is necessary.
26342
26343 1999-12-26  Jim Meyering  <meyering@ascend.com>
26344
26345         * m4/jm-macros.m4: Use it here.
26346         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
26347
26348 1999-12-23  Jim Meyering  <meyering@ascend.com>
26349
26350         * m4/jm-macros.m4: Check for clock_gettime (moved from
26351         fileutils/configure.in)
26352         Check for gettimeofday.
26353
26354 1999-12-20  Jim Meyering  <meyering@ascend.com>
26355
26356         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
26357         autoconf-2.14a-1999-12-20.
26358
26359 1999-12-19  Jim Meyering  <meyering@ascend.com>
26360
26361         * m4/lstat-slash.m4: New file.
26362         * m4/jm-macros.m4: Use the new macro:
26363         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
26364
26365 1999-12-07  Jim Meyering  <meyering@ascend.com>
26366
26367         * m4/perl.m4: Require that File::Compare be available, too.
26368         Too many systems seem to lack it.
26369
26370         * m4/strftime.m4: Add checks for most of the cpp macros tested in
26371         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
26372
26373 1999-11-18  Paul Eggert  <eggert@twinsun.com>
26374
26375         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
26376         problem with the QNX 4.25 shell, which doesn't propagate exit
26377         status of failed commands inside shell assignments.
26378
26379 1999-11-17  Jim Meyering  <meyering@ascend.com>
26380
26381         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
26382
26383 1999-11-07  Jim Meyering  <meyering@ascend.com>
26384
26385         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
26386
26387 1999-11-06  Jim Meyering  <meyering@ascend.com>
26388
26389         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
26390         * m4/jm-macros.m4 (jm_MACROS): Use it here.
26391
26392 1999-11-05  Jim Meyering  <meyering@ascend.com>
26393
26394         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
26395         configure.in of textutils, fileutils, and sh-utils into this one
26396         (shared between those packages) file.
26397         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
26398         AC_STRUCT_ST_BLKSIZE.
26399
26400 1999-11-03  Jim Meyering  <meyering@ascend.com>
26401
26402         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
26403         of AC_CHECK_TYPE checks includes unistd.h.
26404         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
26405         Suggestion from Akim Demaille.
26406
26407 1999-10-30  Jim Meyering  <meyering@ascend.com>
26408
26409         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
26410         m4-quoted string.
26411         * m4/ls-mntd-fs.m4: Likewise.
26412         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
26413         * m4/jm-winsz1.m4: Likewise.
26414
26415         * m4/const.m4: Remove file, since the fix made it into the experimental
26416         version of autoconf.
26417         * m4/mktime.m4: Likewise.
26418
26419         * m4/check-type.m4: Remove file, now that the latest version of
26420         AC_CHECK_TYPE takes a third arg to specify additional #includes.
26421
26422         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
26423         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
26424         AC_CHECK_TYPE.
26425
26426 1999-10-04  Jim Meyering  <meyering@ascend.com>
26427
26428         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
26429
26430 1999-09-22  Paul Eggert  <eggert@twinsun.com>
26431
26432         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
26433         2.95.1 bug with HP-UX 10.20.
26434
26435 1999-09-17  Jim Meyering  <meyering@ascend.com>
26436
26437         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
26438         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
26439         due to missing strdup (against sh-utils-2.0).
26440
26441 1999-08-29  Jim Meyering  <meyering@ascend.com>
26442
26443         * m4/jm-macros.m4: Require jm_BISON.
26444         * m4/bison.m4: New file.
26445
26446 1999-08-17  Paul Eggert  <eggert@twinsun.com>
26447
26448         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
26449         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
26450
26451 1999-08-05  Jim Meyering  <meyering@ascend.com>
26452
26453         * m4/getline.m4: Rename test file from conftestdata to conftest.data
26454         to avoid conflicts with `conftest' on 8+3 filesystems.
26455         Suggestion from Eli Zaretskii.
26456
26457 1999-08-04  Jim Meyering  <meyering@ascend.com>
26458
26459         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
26460         fileutils and sh-utils (textutils's getline test was inadequate).
26461         (AM_FUNC_GETLINE): Run this test.
26462         (AC_CHECK_FUNCS): Check for getdelim.
26463         Reported by Bob Proulx.
26464
26465 1999-08-02  Jim Meyering  <meyering@ascend.com>
26466
26467         * m4/jm-macros.m4: Add a comment.
26468
26469 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26470
26471         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
26472         <inttypes.h> defines strtoumax as a macro (and not as a
26473         function).
26474
26475 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26476
26477         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
26478         that we can shift, multiply and divide unsigned long long
26479         values; Ultrix cc can't do it.
26480
26481 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26482
26483         * m4/mktime.m4: New file, which is a preview of what should appear
26484         in the next public autoconf release.
26485
26486 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26487
26488         * m4/lfs.m4: Remove this file.
26489         * m4/largefile.m4: New file.  It contains the old contents of
26490         lfs.m4, except that all names with prefix AC_LFS have been
26491         changed to use the prefix AC_SYS_LARGEFILE instead, to be
26492         compatible with future autoconf versions.  Also, some minor m4
26493         quoting problems have been fixed.
26494
26495 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26496
26497         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
26498         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
26499         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
26500         and simplify the shell code.
26501
26502 1999-08-01  Jim Meyering  <meyering@ascend.com>
26503
26504         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
26505         m4.
26506
26507 1999-07-20  Jim Meyering  <meyering@ascend.com>
26508
26509         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
26510
26511 1999-07-15  Jim Meyering  <meyering@ascend.com>
26512
26513         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
26514
26515 1999-05-22  Jim Meyering  <meyering@ascend.com>
26516
26517         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
26518
26519 1999-05-20  Jim Meyering  <meyering@ascend.com>
26520
26521         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
26522         Add a colon after each `then' in case $4 is empty.
26523
26524 1999-05-16  Jim Meyering  <meyering@ascend.com>
26525
26526         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
26527
26528 1999-05-10  Jim Meyering  <meyering@ascend.com>
26529
26530         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
26531
26532         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
26533         AC_FUNC_MKTIME.
26534
26535 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
26536
26537         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
26538
26539 1999-05-04  Paul Eggert  <eggert@twinsun.com>
26540
26541         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
26542         not CPPFLAGS, so that linking works correctly in IRIX.
26543
26544 1999-04-30  Paul Eggert  <eggert@twinsun.com>
26545
26546         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
26547
26548 1999-04-20  Paul Eggert  <eggert@twinsun.com>
26549
26550         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
26551         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
26552         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
26553         jm_AC_TYPE_UNSIGNED_LONG_LONG.
26554         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
26555
26556         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
26557
26558 1999-04-20  Jim Meyering  <meyering@ascend.com>
26559
26560         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
26561         AC_REPLACE xstroull if necessary.  From Paul Eggert.
26562         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
26563
26564 1999-04-18  Jim Meyering  <meyering@ascend.com>
26565
26566         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
26567         * m4/jm-macros.m4: Use it.
26568
26569 1999-04-06  Jim Meyering  <meyering@ascend.com>
26570
26571         * m4/strftime.m4: Remove test for %f.
26572
26573 1999-03-29  Jim Meyering  <meyering@ascend.com>
26574
26575         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
26576         superset of the AC_TYPE_* checks in the textutils, fileutils,
26577         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
26578         AC_TYPE_PID_T.
26579
26580 1999-03-28  Jim Meyering  <meyering@ascend.com>
26581
26582         * m4/jm-macros.m4: Define GNU_PACKAGE here.
26583         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
26584         replaced e.g., in the *.sh files of the sh-utils.
26585
26586 1999-03-20  Jim Meyering  <meyering@ascend.com>
26587
26588         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
26589         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
26590         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
26591
26592 1999-03-19  Jim Meyering  <meyering@ascend.com>
26593
26594         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
26595
26596 1999-03-12  Jim Meyering  <meyering@ascend.com>
26597
26598         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
26599
26600 1999-03-07  Jim Meyering  <meyering@ascend.com>
26601
26602         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
26603         declared.
26604
26605 1999-02-17  Jim Meyering  <meyering@ascend.com>
26606
26607         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
26608         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
26609
26610 1999-02-07  Jim Meyering  <meyering@ascend.com>
26611
26612         * m4/group-member.m4: New file -- extracted from sh-utils'
26613         configure.in.
26614
26615         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
26616         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
26617
26618 1999-02-06  Jim Meyering  <meyering@ascend.com>
26619
26620         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
26621         * m4/fnmatch.m4: Likewise.
26622         * m4/getgroups.m4: Likewise.
26623         * m4/lstat.m4: Likewise.
26624         * m4/malloc.m4: Likewise.
26625         * m4/putenv.m4: Likewise.
26626         * m4/realloc.m4: Likewise.
26627         * m4/regex.m4: Likewise.
26628         * m4/stat.m4: Likewise.
26629         * m4/strftime.m4: Likewise.
26630         Suggestion from Alain Magloire.
26631
26632         * m4/chown.m4: Use `.$ac_objext', not `.o'.
26633         * m4/fnmatch.m4: Likewise.
26634         * m4/getgroups.m4: Likewise.
26635         * m4/getline.m4: Likewise.
26636         * m4/lstat.m4: Likewise.
26637         * m4/malloc.m4: Likewise.
26638         * m4/memcmp.m4: Likewise.
26639         * m4/putenv.m4: Likewise.
26640         * m4/realloc.m4: Likewise.
26641         * m4/regex.m4: Likewise.
26642         * m4/stat.m4: Likewise.
26643         * m4/strftime.m4: Likewise.
26644         Suggestion from Alain Magloire.
26645
26646         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
26647         an argument.
26648
26649         * m4/regex.m4: Add a run-time Test for proper operation of
26650         re_compile_pattern.
26651
26652 1999-01-31  Jim Meyering  <meyering@ascend.com>
26653
26654         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
26655
26656 1999-01-30  Jim Meyering  <meyering@ascend.com>
26657
26658         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
26659
26660         * m4/jm-mktime.m4: Make this a wrapper around the official
26661         AM_FUNC_MKTIME rather than my private copy, now that the official one
26662         is up to date.
26663         * m4/mktime.m4: Remove file.
26664
26665         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
26666         * m4/uptime.m4: Likewise.
26667         * m4/uintmax_t.m4: Likewise.
26668
26669 1999-01-28  Jim Meyering  <meyering@ascend.com>
26670
26671         * m4/jm-macros.m4: Use jm_AFS.
26672         * m4/afs.m4: New file (from fileutils' configure.in).
26673
26674         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
26675         * m4/chown.m4: Likewise.
26676         * m4/d-ino.m4: Likewise.
26677         * m4/d-type.m4: Likewise.
26678         * m4/fnmatch.m4: Likewise.
26679         * m4/getgroups.m4: Likewise.
26680         * m4/gettext.m4: Likewise.
26681         * m4/jm-mktime.m4: Likewise.
26682         * m4/jm-winsz2.m4: Likewise.
26683         * m4/lcmessage.m4: Likewise.
26684         * m4/ls-mntd-fs.m4: Likewise.
26685         * m4/malloc.m4: Likewise.
26686         * m4/memcmp.m4: Likewise.
26687         * m4/putenv.m4: Likewise.
26688         * m4/realloc.m4: Likewise.
26689         * m4/st_mtim.m4: Likewise.
26690         * m4/strftime.m4: Likewise.
26691
26692 1999-01-16  Jim Meyering  <meyering@ascend.com>
26693
26694         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
26695         (ARGMATCH_DIE_DECL): Define.
26696
26697 1999-01-12  Jim Meyering  <meyering@ascend.com>
26698
26699         * m4/Makefile.am.in: Rewrite to avoid using fmt.
26700         Reported by Lars Hecking.
26701
26702 1999-01-10  Jim Meyering  <meyering@ascend.com>
26703
26704         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
26705         gross kludge.
26706         * m4/inttypes_h.m4: Likewise.
26707         * m4/lstat.m4: Likewise.
26708         * m4/malloc.m4: Likewise.
26709         * m4/readdir.m4: Likewise.
26710         * m4/realloc.m4: Likewise.
26711         * m4/st_dm_mode.m4: Likewise.
26712         * m4/stat.m4: Likewise.
26713         * m4/utimbuf.m4: Likewise.
26714         * m4/utimes.m4: Likewise.
26715
26716         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26717         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26718         comments in config.h.in are meaningful.
26719
26720         * m4/jm-macros.m4: Require autoconf-2.13 here.
26721
26722         * m4/regex.m4: By default, don't use the included regex.c on systems
26723         with glibc 2.  Suggestion from Uli Drepper.
26724
26725 1999-01-02  Jim Meyering  <meyering@ascend.com>
26726
26727         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26728
26729 1998-12-18  Jim Meyering  <meyering@ascend.com>
26730
26731         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26732         Based on a suggestion from Lars Hecking.
26733
26734 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26735
26736         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26737
26738 1998-11-16  Jim Meyering  <meyering@ascend.com>
26739
26740         * m4/lfs.m4: Double-quote the `uname...` expression.
26741
26742 1998-11-14  Jim Meyering  <meyering@ascend.com>
26743
26744         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26745         * m4/stat.m4: Likewise.
26746
26747 1998-11-03  Jim Meyering  <meyering@ascend.com>
26748
26749         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26750         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26751
26752 1998-10-18  Jim Meyering  <meyering@ascend.com>
26753
26754         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26755
26756 1998-10-17  Jim Meyering  <meyering@ascend.com>
26757
26758         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26759         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26760         calls for those previously hard-coded headers.  Instead, take a new
26761         parameter.
26762         (jm_CHECK_DECLARATIONS): Reflect interface change.
26763         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26764         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26765
26766         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26767
26768 1998-10-14  Jim Meyering  <meyering@ascend.com>
26769
26770         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26771         instead of "TZ=America/Vancouver".  From Paul Eggert.
26772
26773 1998-10-11  Jim Meyering  <meyering@ascend.com>
26774
26775         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26776         This adds a test for a recently added compatibility fix for mktime.c.
26777         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26778
26779 1998-09-27  Jim Meyering  <meyering@ascend.com>
26780
26781         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26782
26783         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26784         ../configure.in, including a change from Gordon Matzigkeit to allow
26785         cross-compiling for the Hurd.
26786
26787         * m4/glibc.m4: New file/macro to test for the GNU C Library
26788         versions 1 and 2.  From Gordon Matzigkeit.
26789         Indent.
26790
26791 1998-09-21  Jim Meyering  <meyering@ascend.com>
26792
26793         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26794
26795 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26796
26797         Port nanosecond-resolution times to UnixWare 2.1.2 and
26798         pedantic Solaris 2.6.
26799
26800         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26801         AC_STRUCT_ST_MTIM.
26802         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26803         Generate name of ns member, instead of just 1 or undef.
26804         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26805
26806 1998-08-15  Jim Meyering  <meyering@ascend.com>
26807
26808         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26809         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26810         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26811         instead of jm_TYPE_SSIZE_T.
26812
26813 1998-08-12  Jim Meyering  <meyering@ascend.com>
26814
26815         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26816
26817 1998-08-02  Jim Meyering  <meyering@ascend.com>
26818
26819         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26820         in acconfig.h manually.
26821
26822 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26823
26824         * m4/st_mtim.m4: New file.
26825
26826 1998-07-28  Jim Meyering  <meyering@ascend.com>
26827
26828         * m4/utimes.m4: Undef stat.
26829
26830 1998-07-25  Jim Meyering  <meyering@ascend.com>
26831
26832         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26833         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26834
26835 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26836
26837         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26838         uid and gid actually remain unchanged.
26839
26840 1998-07-07  Jim Meyering  <meyering@ascend.com>
26841
26842         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26843
26844 1998-07-04  Jim Meyering  <meyering@ascend.com>
26845
26846         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26847         to prove that this macro can be used in packages without regex.c.
26848
26849 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26850
26851         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26852         is to be used.
26853
26854 1998-07-03  Jim Meyering  <meyering@ascend.com>
26855
26856         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26857
26858         * m4/gettext.m4: New file -- from gettext-0.10.35.
26859         * m4/lcmessage.m4: Likewise.
26860         * m4/progtest.m4: Likewise.
26861
26862         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26863         * m4/jm-macros.m4: Require the new macro.
26864
26865 1998-06-29  Jim Meyering  <meyering@ascend.com>
26866
26867         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26868         for the definition of NGROUPS (used in a system header included
26869         by sys/mount.h).
26870
26871 1998-06-28  Jim Meyering  <meyering@ascend.com>
26872
26873         * m4/ls-mntd-fs.m4: New file.
26874         * m4/fstypename.m4: New file.
26875
26876         * m4/jm-macros.m4: Require the new macro.
26877         * m4/jm-glibc-io.m4: New file.
26878
26879 1998-05-19  Jim Meyering  <meyering@ascend.com>
26880
26881         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26882         * m4/lchown.m4: New file.
26883
26884         * m4/Makefile.am.in: New file.
26885         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26886
26887 1998-05-14  Jim Meyering  <meyering@ascend.com>
26888
26889         * m4/Makefile.am (EXTRA_DIST): Add them.
26890         * m4/jm-macros.m4: New file.
26891         * m4/utimbuf.m4: New file.
26892
26893 1998-05-12  Jim Meyering  <meyering@ascend.com>
26894
26895         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26896
26897 1998-05-11  Jim Meyering  <meyering@ascend.com>
26898
26899         * m4/isc-posix.m4: New file.
26900
26901 1998-05-10  Jim Meyering  <meyering@ascend.com>
26902
26903         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26904
26905 1998-05-09  Jim Meyering  <meyering@ascend.com>
26906
26907         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26908         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26909         with automake.
26910
26911         * m4/ssize_t.m4: New file.
26912         * m4/mktime.m4: Remove file -- the new automake has this now.
26913
26914 1998-04-26  Jim Meyering  <meyering@ascend.com>
26915
26916         * m4/assert.m4: New file.
26917         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26918
26919 1998-04-05  Jim Meyering  <meyering@ascend.com>
26920
26921         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26922         (jm_PREREQ): Use it here.
26923
26924 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26925
26926         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26927         in acconfig.h.
26928
26929 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26930
26931         * m4/prereq.m4: New file.
26932         * m4/error.m4: New file.
26933         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26934
26935 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26936
26937         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26938         cache-check for the same variable -- that defeated the purpose of
26939         the test; the test program was never run.  This was a problem only
26940         on systems with losing getline functions -- HP-UX 10.20 is one.
26941         Reported by Bjorn Helgaas.
26942
26943 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26944
26945         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26946
26947 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26948
26949         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26950
26951         * m4/const.m4: New file.  Use an initializer in this declaration
26952         typedef int charset[2]; const charset x;
26953         Reported by Bob Glickstein.
26954
26955 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26956
26957         * m4/chown.m4: Fix reversed types on -1 args to chown.
26958         From Kaveh Ghazi.
26959
26960 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26961
26962         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26963         Add lseek and memchr.
26964
26965         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26966         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26967         have a 20-character limit on names.
26968
26969 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26970
26971         * m4/inttypes_h.m4: New file.
26972         * m4/uintmax_t.m4: New file.
26973         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26974
26975 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26976   Free Software Foundation, Inc.
26977 Copying and distribution of this file, with or without modification,
26978 are permitted provided the copyright notice and this notice are preserved.