exit.h is replaced with stdlib.h.
[pspp] / ChangeLog
1 2007-02-18  Bruno Haible  <bruno@clisp.org>
2
3         * lib/stdlib_.h: Handle glibc's special invocation convention
4         specially.
5
6 2007-02-18  Bruno Haible  <bruno@clisp.org>
7
8         * modules/stdlib-tests: New file.
9         * tests/test-stdlib.c: New file.
10
11         * modules/mkstemp (Files): Remove lib/mkstemp.h.
12         (Depends-on): Add stdlib.
13         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
14         (Includes): Use <stdlib.h> instead of mkstemp.h.
15         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
16         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
17         * lib/mkstemp.c: Don't include mkstemp.h.
18         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
19         * lib/stdlib--.h: Don't include mkstemp.h.
20
21         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
22         (Depends-on): Add stdlib.
23         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
24         (Includes): Use <stdlib.h> instead of mkdtemp.h.
25         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
26         HAVE_MKDTEMP.
27         * lib/mkdtemp.c: Don't include mkdtemp.h.
28         * lib/clean-temp.c: Don't include mkdtemp.h.
29
30         * modules/exit (Files): Remove lib/exit.h.
31         (Depends-on): Add stdlib.
32         (Makefile.am): Remove lib_SOURCES.
33         (Include): Use <stdlib.h> instead of exit.h.
34         * lib/argmatch.c: Don't include exit.h.
35         * lib/execute.c: Likewise.
36         * lib/pagealign_alloc.c: Likewise.
37         * lib/pipe.c: Likewise.
38         * lib/wait-process.c: Likewise.
39         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
40         * lib/exitfail.c: Likewise.
41         * lib/savewd.c: Likewise.
42         * lib/xsetenv.c: Likewise.
43
44
45         * modules/stdlib: New file.
46         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
47         and extra comments about mkstemp().
48         * lib/exit.h: Remove file.
49         * lib/mkdtemp.h: Remove file.
50         * lib/mkstemp.h: Remove file.
51         * m4/stdlib_h.m4: New file.
52         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
53
54 2007-02-18  Bruno Haible  <bruno@clisp.org>
55
56         * modules/math-tests: New file.
57         * tests/test-math.c: New file.
58
59         * modules/math: New file.
60         * modules/mathl (Files): Remove lib/mathl.h.
61         (Depends-on): Add math.
62         (Makefile.am): Don't mention mathl.h.
63         (Include): Use <math.h> instead of mathl.h.
64         * lib/math_.h: New file.
65         * lib/mathl.h: Remove file.
66         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
67         mathl.h.
68         * lib/asinl.c: Likewise.
69         * lib/atanl.c: Likewise.
70         * lib/ceill.c: Likewise.
71         * lib/cosl.c: Likewise.
72         * lib/expl.c: Likewise.
73         * lib/floorl.c: Likewise.
74         * lib/frexpl.c: Likewise.
75         * lib/ldexpl.c: Likewise.
76         * lib/logl.c: Likewise.
77         * lib/sincosl.c: Likewise.
78         * lib/sinl.c: Likewise.
79         * lib/sqrtl.c: Likewise.
80         * lib/tanl.c: Likewise.
81         * lib/trigl.c: Likewise.
82         * m4/math_h.m4: New file.
83         * MODULES.html.sh (Mathematics): Add math.
84
85 2007-02-17  Bruno Haible  <bruno@clisp.org>
86
87         * modules/wctype-tests: New file.
88         * tests/test-wctype.c: New file.
89
90         * modules/wchar-tests: New file.
91         * tests/test-wchar.c: New file.
92
93         * modules/unistd-tests: New file.
94         * tests/test-unistd.c: New file.
95
96         * modules/time-tests: New file.
97         * tests/test-time.c: New file.
98
99         * modules/sysexits-tests: New file.
100         * tests/test-sysexits.c: New file.
101
102         * modules/sys_time-tests: New file.
103         * tests/test-sys_time.c: New file.
104
105         * modules/sys_stat-tests: New file.
106         * tests/test-sys_stat.c: New file.
107
108         * modules/sys_socket-tests: New file.
109         * tests/test-sys_socket.c: New file.
110
111         * modules/sys_select-tests: New file.
112         * tests/test-sys_select.c: New file.
113
114         * modules/string-tests: New file.
115         * tests/test-string.c: New file.
116
117         * modules/stdbool-tests: New file.
118         * tests/test-stdbool.c: New file.
119
120         * modules/netinet_in-tests: New file.
121         * tests/test-netinet_in.c: New file.
122
123         * modules/inttypes-tests: New file.
124         * tests/test-inttypes.c: New file.
125
126         * modules/fcntl-tests: New file.
127         * tests/test-fcntl.c: New file.
128
129         * modules/byteswap-tests: New file.
130         * tests/test-byteswap.c: New file.
131
132         * modules/arpa_inet-tests: New file.
133         * tests/test-arpa_inet.c: New file.
134
135 2007-02-17  Bruno Haible  <bruno@clisp.org>
136
137         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
138         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
139         if the corresponding module is not enabled. Emit link warnings if
140         the function is used nevertheless.
141         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
142         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
143         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
144         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
145         * modules/inttypes (Depends-on): Add link-warning.
146         (Makefile.am): Copy the contents of build-aux/link-warning.h into
147         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
148         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
149         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
150         * modules/imaxdiv (configure.ac): Likewise.
151         * modules/strtoimax (configure.ac): Likewise.
152         * modules/strtoumax (configure.ac): Likewise.
153         
154 2007-02-17  Bruno Haible  <bruno@clisp.org>
155
156         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
157         gl_STRING_MODULE_INDICATOR_DEFAULTS.
158         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
159         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
160
161 2007-02-17  Bruno Haible  <bruno@clisp.org>
162
163         * modules/link-warning: New file.
164         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
165         * lib/string_.h (GL_LINK_WARNING): Remove definition.
166         * modules/string (Depends-on): Add link-warning.
167         (Makefile.am): Copy the contents of build-aux/link-warning.h into
168         string.h.
169         * MODULES.html.sh (Support for building libraries and executables): Add
170         link-warning.
171
172 2007-02-17  Bruno Haible  <bruno@clisp.org>
173
174         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
175         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
176         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
177         long lines.
178
179 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
180             Bruno Haible  <bruno@clisp.org>
181
182         * modules/tmpfile: New file.
183         * lib/tmpfile.c: New file.
184         * m4/tmpfile.m4: New file.
185         * MODULES.html.sh (func_all_modules): New section "Input/output".
186
187 2007-02-15  Bruno Haible  <bruno@clisp.org>
188
189         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
190         (supports_delete_on_close): New function.
191         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
192
193 2007-02-14  Bruno Haible  <bruno@clisp.org>
194
195         * modules/mbspcasecmp-tests: New file.
196         * tests/test-mbspcasecmp.sh: New file.
197         * tests/test-mbspcasecmp.c: New file.
198
199         New module mbspcasecmp.
200         * modules/mbspcasecmp: New file.
201         * lib/mbspcasecmp.c: New file.
202         * lib/string_.h (strncasecmp): Change warning message.
203         (mbspcasecmp): New declaration.
204         * m4/mbspcasecmp.m4: New file.
205         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
206         GNULIB_MBSPCASECMP.
207         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
208         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
209
210 2007-02-14  Bruno Haible  <bruno@clisp.org>
211
212         * modules/mbsncasecmp-tests: New file.
213         * tests/test-mbsncasecmp.sh: New file.
214         * tests/test-mbsncasecmp.c: New file.
215
216         New module mbsncasecmp.
217         * modules/mbsncasecmp: New file.
218         * lib/mbsncasecmp.c: New file.
219         * lib/string_.h (mbsncasecmp): New declaration.
220         * m4/mbsncasecmp.m4: New file.
221         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
222         GNULIB_MBSNCASECMP.
223         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
224         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
225
226 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
227
228         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
229         Verify that it doesn't overlap with our flags.
230         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
231         do not have the desired effect in multibyte locales; instead, use
232         mbscasecmp.
233         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
234         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
235         we don't require GNU fnmatch ourselves (if our users require it, they
236         should do so explicitly).
237
238         Fix regex code so it doesn't rely on strcasecmp.
239         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
240         Otherwise, include gnulib's langinfo.h.
241         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
242         undesirable behavior in non-C locales.  Instead, rely on localecharset.
243         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
244         * modules/regex (FILES): Remove m4/codeset.m4.
245         (Depends-on): Add localcharset.  Remove strcase.
246
247 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
248
249         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
250         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
251
252 2007-02-13  Bruno Haible  <bruno@clisp.org>
253
254         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
255         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
256
257 2007-02-12  Bruno Haible  <bruno@clisp.org>
258
259         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
260         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
261         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
262         time warning rather than a link error.
263
264 2007-02-12  Bruno Haible  <bruno@clisp.org>
265
266         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
267         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
268         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
269
270 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
271
272         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
273         args, not 2.
274
275 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
276
277         New module 'time', so that apps can include <time.h> as per
278         POSIX and GNU instead of separate include files like time_r.h
279         and timegm.h.  This implementation tries out a simpler approach
280         for replacing decls in standard include files (as compared to
281         the string module), somewhat as an experiment.
282
283         * config/srclist.txt: Comment out mktime.c for now.
284         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
285         since it doesn't apply any more.  Use generic wording instead.
286         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
287         'time'.
288         * lib/time_.h, m4/time_h.m4, modules/time: New files.
289         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
290         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
291         Don't include <sys/types.h>; no longer needed since we assume C89.
292         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
293         * lib/strftime.c: Likewise.
294         * lib/time_r.c: Likewise.
295         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
296         * lib/nanosleep.c: Include <time.h> first, to check interface.
297         * lib/strptime.c: Likewise.
298         * lib/time_r.c: Likewise.
299         * lib/timegm.c: Likewise.
300         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
301         needed.
302         * lib/timegm.c: Don't include timegm.h; no longer needed.
303         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
304         time.h now handles any problems in that area.
305         (struct timespec, nanosleep): Remove; time.h now arranges for these.
306         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
307         that time.h defines struct timespec.
308         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
309         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
310         handles that.
311         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
312         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
313         needed.  Set REPLACE_LOCALTIME.
314         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
315         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
316         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
317         nanosleep; time_h.m4 now does that.  Don't require
318         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
319         module handles this now.
320         * modules/getdate (Depends-on): Remove timespec.  Add time.
321         * modules/nanosleep (Depends-on): Likewise.
322         * modules/stat-time (Depends-on): Likewise.
323         * modules/nanosleep (Include): Include time.h, not timespec.h.
324         * modules/strptime (Files): Remove lib/strptime.h.
325         (Depends-on): Add extensions, time.
326         (Include): Include time.h, not strptime.h.
327         * modules/time_r (Files): Remove lib/time_r.h.
328         (Depends-on): Add time.
329         (Include): Include time.h, not time_r.h.
330         * modules/timegm: Likewise.
331         * modules/timespec (Description): Now does timespec-related decls
332         of our own, instead of struct timespec itself.
333         (Depends-on): Add time; remove extensions.
334         (Maintainer): Add self.
335         * modules/utimecmp (Depends-on): Add time; remove timespec.
336         * modules/utimens (Depends-on): Likewise.
337         * modules/xnanosleep (Depends-on): Likewise.
338
339 2007-02-11  Bruno Haible  <bruno@clisp.org>
340
341         * lib/c-strstr.c: Include allocsa.h.
342         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
343         * lib/c-strcasestr.c: Include allocsa.h.
344         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
345         * lib/strcasestr.c: Include allocsa.h.
346         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
347         * lib/mbsstr.c: Include allocsa.h.
348         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
349         allocsa/freesa instead of malloc/free.
350         * lib/mbscasestr.c: Include allocsa.h.
351         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
352         allocsa/freesa instead of malloc/free.
353         * modules/c-strstr (Depends-on): Add allocsa.
354         * modules/c-strcasestr (Depends-on): Likewise.
355         * modules/strcasestr (Depends-on): Likewise.
356         * modules/mbsstr (Depends-on): Likewise.
357         * modules/mbscasestr (Depends-on): Likewise.
358
359 2007-02-11  Bruno Haible  <bruno@clisp.org>
360
361         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
362
363         * modules/mbsspn-tests: New file.
364         * tests/test-mbsspn.sh: New file.
365         * tests/test-mbsspn.c: New file.
366
367 2007-02-11  Bruno Haible  <bruno@clisp.org>
368
369         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
370
371         * modules/mbspbrk-tests: New file.
372         * tests/test-mbspbrk.sh: New file.
373         * tests/test-mbspbrk.c: New file.
374
375 2007-02-11  Bruno Haible  <bruno@clisp.org>
376
377         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
378         unneeded cast.
379
380         * modules/mbscspn-tests: New file.
381         * tests/test-mbscspn.sh: New file.
382         * tests/test-mbscspn.c: New file.
383
384 2007-02-11  Bruno Haible  <bruno@clisp.org>
385
386         * modules/mbscasecmp-tests: New file.
387         * tests/test-mbscasecmp.sh: New file.
388         * tests/test-mbscasecmp.c: New file.
389
390 2007-02-11  Bruno Haible  <bruno@clisp.org>
391
392         Ensure O(n) worst-case complexity of mbscasestr.
393         * lib/mbscasestr.c: Include stdbool.h.
394         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
395         functions.
396         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
397         the bookkeeping indicates that it's worth it.
398         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
399
400         * modules/mbscasestr-tests: New file.
401         * tests/test-mbscasestr1.c: New file.
402         * tests/test-mbscasestr2.sh: New file.
403         * tests/test-mbscasestr2.c: New file.
404         * tests/test-mbscasestr3.sh: New file.
405         * tests/test-mbscasestr3.c: New file.
406         * tests/test-mbscasestr4.sh: New file.
407         * tests/test-mbscasestr4.c: New file.
408         * m4/locale-tr.m4: New file.
409
410 2007-02-11  Bruno Haible  <bruno@clisp.org>
411
412         Ensure O(n) worst-case complexity of mbsstr.
413         * lib/mbsstr.c: Include stdbool.h.
414         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
415         functions.
416         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
417         bookkeeping indicates that it's worth it.
418         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
419
420         * modules/mbsstr-tests: New file.
421         * tests/test-mbsstr1.c: New file.
422         * tests/test-mbsstr2.sh: New file.
423         * tests/test-mbsstr2.c: New file.
424         * tests/test-mbsstr3.sh: New file.
425         * tests/test-mbsstr3.c: New file.
426         * m4/locale-fr.m4: New file.
427
428 2007-02-11  Bruno Haible  <bruno@clisp.org>
429
430         * lib/mbsrchr.c (mbsrchr): Fix bug.
431
432         * modules/mbsrchr-tests: New file.
433         * tests/test-mbsrchr.sh: New file.
434         * tests/test-mbsrchr.c: New file.
435
436 2007-02-11  Bruno Haible  <bruno@clisp.org>
437
438         * lib/mbschr.c (mbschr): Fix bug.
439
440         * modules/mbschr-tests: New file.
441         * tests/test-mbschr.sh: New file.
442         * tests/test-mbschr.c: New file.
443         * m4/locale-zh.m4: New file.
444
445 2007-02-11  Bruno Haible  <bruno@clisp.org>
446
447         Support for copying multibyte string iterators.
448         * lib/mbiter.h: Include <string.h>.
449         (mbiter_multi_copy): New function.
450         (mbi_copy): New macro.
451         * lib/mbuiter.h: Include <string.h>.
452         (mbuiter_multi_copy): New function.
453         (mbui_copy): New macro.
454
455 2007-02-11  Bruno Haible  <bruno@clisp.org>
456
457         New module mbslen.
458         * modules/mbslen: New file.
459         * lib/mbslen.c: New file.
460         * lib/string_.h (mbslen): New declaration.
461         * m4/mbslen.m4: New file.
462         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
463         GNULIB_MBSLEN.
464         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
465         * MODULES.html.sh (Internationalization functions): Add mbslen.
466
467 2007-02-11  Bruno Haible  <bruno@clisp.org>
468
469         Ensure O(n) worst-case complexity of strcasestr substitute.
470         * lib/strcasestr.c: Include stdbool.h.
471         (knuth_morris_pratt): New function.
472         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
473         bookkeeping indicates that it's worth it.
474         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
475
476         * modules/strcasestr-tests: New file.
477         * tests/test-strcasestr.c: New file.
478
479 2007-02-11  Bruno Haible  <bruno@clisp.org>
480
481         Ensure O(n) worst-case complexity of c_strcasestr.
482         * lib/c-strcasestr.c: Include stdbool.h, string.h.
483         (knuth_morris_pratt): New function.
484         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
485         the bookkeeping indicates that it's worth it.
486         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
487
488         * modules/c-strcasestr-tests: New file.
489         * tests/test-c-strcasestr.c: New file.
490
491 2007-02-11  Bruno Haible  <bruno@clisp.org>
492
493         Ensure O(n) worst-case complexity of c_strstr.
494         * lib/c-strstr.c: Include stdbool.h, string.h.
495         (knuth_morris_pratt): New function.
496         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
497         bookkeeping indicates that it's worth it.
498         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
499
500         * lib/c-strstr.c: Complete rewrite for maintainability.
501
502         * modules/c-strstr-tests: New file.
503         * tests/test-c-strstr.c: New file.
504
505 2007-02-11  Bruno Haible  <bruno@clisp.org>
506
507         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
508         5.2.1 and earlier, whereby \055 was treated just like the range
509         delimiter '-'.  Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
510
511 2007-02-08  Bruno Haible  <bruno@clisp.org>
512
513         * modules/regex (Depends-on): Add stdbool.
514         Reported by Dalibor Topic <robilad@kaffe.org>.
515
516 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
517
518         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
519         Prefer returning from main to exiting from it.
520         Remove unnecessary parens after sizeof.
521
522 2007-02-05  Bruno Haible  <bruno@clisp.org>
523
524         New module mbssep.
525         * modules/mbssep: New file.
526         * lib/mbssep.c: New file.
527         * lib/string_.h (strsep): Add a conditional link warning.
528         (mbssep): New declaration.
529         * m4/mbssep.m4: New file.
530         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
531         GNULIB_MBSSEP.
532         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
533         * MODULES.html.sh (Internationalization functions): Add mbssep.
534
535 2007-02-05  Bruno Haible  <bruno@clisp.org>
536
537         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
538         Optimize search in case of 1 delimiter.
539
540 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
541
542         * lib/acl.h: Include sys/types.h before sys/acl.h.
543
544 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
545
546         Merge upstream fix for glibc bugzilla #3957:
547
548         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
549
550         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
551         bit for RE_HAT_LISTS_NOT_NEWLINE.
552         (build_charclass_op): Remove bogus comment.
553
554 2007-02-05  Simon Josefsson  <simon@josefsson.org>
555
556         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
557
558 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
559
560         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
561         * lib/memmem.c [!defined _LIBC]: Include config.h.
562
563 2007-02-04  Bruno Haible  <bruno@clisp.org>
564
565         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
566         warning message.
567
568 2007-02-04  Bruno Haible  <bruno@clisp.org>
569
570         New module mbstok_r.
571         * modules/mbstok_r: New file.
572         * lib/mbstok_r.c: New file.
573         * lib/string_.h (strtok_r): Change argument names to match the
574         comments. Add a conditional link warning.
575         (mbstok_r): New declaration.
576         * m4/mbstok_r.m4: New file.
577         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
578         GNULIB_MBSTOK_R.
579         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
580         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
581
582 2007-02-04  Bruno Haible  <bruno@clisp.org>
583
584         New module mbsspn.
585         * modules/mbsspn: New file.
586         * lib/mbsspn.c: New file.
587         * lib/string_.h (strspn): Add a conditional link warning.
588         (mbsspn): New declaration.
589         * m4/mbsspn.m4: New file.
590         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
591         GNULIB_MBSSPN.
592         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
593         * MODULES.html.sh (Internationalization functions): Add mbsspn.
594
595 2007-02-04  Bruno Haible  <bruno@clisp.org>
596
597         New module mbspbrk.
598         * modules/mbspbrk: New file.
599         * lib/mbspbrk.c: New file.
600         * lib/string_.h (strpbrk): Add a conditional link warning.
601         (mbspbrk): New declaration.
602         * m4/mbspbrk.m4: New file.
603         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
604         GNULIB_MBSPBRK.
605         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
606         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
607
608 2007-02-04  Bruno Haible  <bruno@clisp.org>
609
610         New module mbscspn.
611         * modules/mbscspn: New file.
612         * lib/mbscspn.c: New file.
613         * lib/string_.h (strcspn): Add a conditional link warning.
614         (mbscspn): New declaration.
615         * m4/mbscspn.m4: New file.
616         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
617         GNULIB_MBSCSPN.
618         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
619         * MODULES.html.sh (Internationalization functions): Add mbscspn.
620
621 2007-02-04  Bruno Haible  <bruno@clisp.org>
622
623         New module mbscasestr, reduced goal of strcasestr.
624         * modules/mbscasestr: New file.
625         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
626         (mbscasestr): Renamed from strcasestr.
627         * lib/strcasestr.c: Don't include mbuiter.h.
628         (strcasestr): Remove support for multibyte locales.
629         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
630         Change the conditional link warning.
631         (mbscasestr): New declaration.
632         * m4/mbscasestr.m4: New file.
633         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
634         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
635         REPLACE_STRCASESTR.
636         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
637         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
638         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
639         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
640         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
641         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
642         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
643         (Depends-on): Remove mbuiter.
644         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
645
646 2007-02-04  Bruno Haible  <bruno@clisp.org>
647
648         Simplify handling of strncasecmp.
649         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
650         the conditional link warning.
651         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
652         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
653         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
654         * modules/strcase (configure.ac): Don't invoke
655         gl_STRING_MODULE_INDICATOR.
656         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
657
658 2007-02-04  Bruno Haible  <bruno@clisp.org>
659
660         New module mbscasecmp, reduced goal of strcasecmp.
661         * modules/mbscasecmp: New file.
662         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
663         (mbscasecmp): Renamed from strcasecmp.
664         * lib/strcasecmp.c: Don't include mbuiter.h.
665         (strcasecmp): Remove support for multibyte locales.
666         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
667         Change the conditional link warning.
668         (mbscasecmp): New declaration.
669         * m4/mbscasecmp.m4: New file.
670         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
671         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
672         REPLACE_STRCASECMP.
673         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
674         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
675         GNULIB_MBSCASECMP.
676         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
677         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
678         * modules/strcase (Files): Remove m4/mbrtowc.m4.
679         (Depends-on): Remove mbuiter.
680         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
681
682 2007-02-04  Bruno Haible  <bruno@clisp.org>
683
684         New module mbsstr. Remove module strstr.
685         * modules/mbsstr: New file.
686         * modules/strstr: Remove file.
687         * lib/mbsstr.c: Renamed from lib/strstr.c.
688         (mbsstr): Renamed from strstr.
689         * lib/string_.h (strstr): Remove declaration. Change the conditional
690         link warning.
691         (mbsstr): New declaration.
692         * m4/mbsstr.m4: New file.
693         * m4/strstr.m4: Remove file.
694         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
695         REPLACE_STRSTR.
696         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
697         Don't initialize GNULIB_STRSTR.
698         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
699         substitute GNULIB_STRSTR and REPLACE_STRSTR.
700         * MODULES.html.sh (Internationalization functions): Add mbsstr.
701         (Support for systems lacking ANSI C 89): Remove strstr.
702
703 2007-02-04  Bruno Haible  <bruno@clisp.org>
704
705         New module mbsrchr.
706         * modules/mbsrchr: New file.
707         * lib/mbsrchr.c: New file.
708         * lib/string_.h (strrchr): Add a conditional link warning.
709         (mbsrchr): New declaration.
710         * m4/mbsrchr.m4: New file.
711         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
712         GNULIB_MBSRCHR.
713         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
714         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
715
716 2007-02-04  Bruno Haible  <bruno@clisp.org>
717
718         New module mbschr.
719         * modules/mbschr: New file.
720         * lib/mbschr.c: New file.
721         * lib/string_.h (strchr): Add a conditional link warning.
722         (mbschr): New declaration.
723         * m4/mbschr.m4: New file.
724         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
725         GNULIB_MBSCHR.
726         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
727         * MODULES.html.sh (Internationalization functions): Add mbschr.
728
729 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
730
731         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
732
733         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
734
735 2007-02-04  Bruno Haible  <bruno@clisp.org>
736
737         New module description section 'configure.ac-early'.
738         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
739         (func_get_autoconf_early_snippet): New function.
740         (func_import, func_create_testdir): Use it. Remove special cases for
741         modules 'extensions' and 'lock'.
742         * modules/extensions (configure.ac-early): Require
743         gl_USE_SYSTEM_EXTENSIONS.
744         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
745
746 2007-02-04  Bruno Haible  <bruno@clisp.org>
747
748         Make use of gcj-4.3's -fsource and -ftarget option.
749         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
750         and if so try the options -fsource and -ftarget.
751         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
752         source_version, ftarget_option, target_version arguments.
753         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
754         (is_envjavac_oldgcj_14_14_usable): Renamed from
755         is_envjavac_gcj_14_14_usable.
756         (is_envjavac_oldgcj_14_13_usable): Renamed from
757         is_envjavac_gcj_14_13_usable.
758         (is_gcj_present): Update.
759         (is_gcj_43, is_gcj43_usable): New functions.
760         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
761         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
762         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
763         try the options -fsource and -ftarget.
764
765 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
766
767         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
768         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
769         larger value.
770
771 2007-02-03  Jim Meyering  <jim@meyering.net>
772
773         Give tools a better chance to allocate space for very large buffers.
774         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
775
776         Make pwd and readlink work also when run with an unreadable parent dir
777         on systems with openat support.
778         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
779         provided getcwd function, even when we have openat support.
780         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
781
782 2007-02-02  Bruno Haible  <bruno@clisp.org>
783
784         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
785         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
786         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
787         portability problems if one of these functions is only used on specific
788         platforms.
789         Reported by Paul Eggert.
790
791 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
792
793         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
794         is causing more trouble than it's curing.
795         * lib/regex_internal.h (__mempcpy): Remove.
796         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
797         (and make the code a tad smaller to boot).
798         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
799
800 2007-02-02  Jim Meyering  <jim@meyering.net>
801
802         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
803         section, not in the Makefile.am: one.
804
805 2007-02-02  Eric Blake  <ebb9@byu.net>
806
807         * lib/strchrnul.c: Always include config.h first.
808
809         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
810         gnulib strstr is not necessary here.
811
812 2007-02-02  Simon Josefsson  <simon@josefsson.org>
813
814         * m4/socklen.m4: Fix typo.
815
816 2007-02-02  Eric Blake  <ebb9@byu.net>
817
818         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
819         * modules/netinet_in (Makefile.am): Likewise.
820
821 2007-02-01  Bruno Haible  <bruno@clisp.org>
822
823         * lib/string_.h (GL_LINK_WARNING): New macro.
824         (strcasecmp, strstr, strcasestr): If provided by the system,
825         conditionally define as a macro that leads to a warning instead of to
826         an error.
827         (strncasecmp): Conditionally define as a macro that leads to a warning.
828
829 2007-02-01  Jim Meyering  <jim@meyering.net>
830
831         Give tools a better chance to allocate space for very large buffers.
832         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
833
834 2007-02-01  Karl Berry  <karl@gnu.org>
835
836         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
837
838 2007-02-01  Bruno Haible  <bruno@clisp.org>
839
840         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
841         renamings.
842
843 2007-02-01  Eric Blake  <ebb9@byu.net>
844
845         * modules/regex (Depends-on): Revert dependence on mempcpy.
846         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
847         module's definition of mempcpy.
848         Reported by Paul Eggert.
849
850 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
851
852         * lib/string_.h: If the gnulib module XYZ is not present, undefine
853         the symbol XYZ before redefining it.  This fixes a problem with
854         programs that don't use XYZ, when compiled on systems that define
855         XYZ to something else.
856
857 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
858
859         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
860         occurs when "mkdir -m foo" creates a setgid directory that is (1)
861         writeable to group or other and (2) is intended to have a special
862         mode bit that is set or cleared.  In such a case, the directory
863         should be neither group- nor other-writeable until the special
864         mode bits are right.
865
866 2007-01-31  Eric Blake  <ebb9@byu.net>
867
868         * modules/mountlist (Depends-on): Add strstr.
869
870         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
871         bug.
872         * modules/string (Makefile.am): Remove redundant replacement.
873         * modules/regex (Depends-on): Add mempcpy.
874
875 2007-01-31  Bruno Haible  <bruno@clisp.org>
876
877         New module description field 'Link'.
878         * gnulib-tool (func_usage): Document --extract-link-directive.
879         (sed_extract_prog): Recognize 'Link' directive.
880         (func_get_link_directive): New function.
881         (func_import): Show summary of link directives.
882         Handle --extract-link-directive option.
883         * modules/acl (Link): New section.
884         * modules/clock-time (Link): New section.
885         * modules/euidaccess (Link): New section.
886         * modules/gettext (Link): New section.
887         * modules/iconv (Link): New section.
888         * modules/lock (Link): New section.
889         * modules/nanosleep (Link): New section.
890         * modules/readline (Link): New section.
891
892 2007-01-27  Bruno Haible  <bruno@clisp.org>
893
894         Enforce the use of gnulib modules for unportable <string.h> functions.
895         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
896         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
897         (gl_HEADER_STRING_H_BODY): Require it.
898         * lib/string_.h: If the gnulib module XYZ is not present, redefine
899         the symbol XYZ to one that gives a link error.
900         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
901         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
902         * modules/mempcpy (configure.ac): Likewise.
903         * modules/memrchr (configure.ac): Likewise.
904         * modules/stpcpy (configure.ac): Likewise.
905         * modules/stpncpy (configure.ac): Likewise.
906         * modules/strcase (configure.ac): Likewise.
907         * modules/strcasestr (configure.ac): Likewise.
908         * modules/strchrnul (configure.ac): Likewise.
909         * modules/strdup (configure.ac): Likewise.
910         * modules/strndup (configure.ac): Likewise.
911         * modules/strnlen (configure.ac): Likewise.
912         * modules/strpbrk (configure.ac): Likewise.
913         * modules/strsep (configure.ac): Likewise.
914         * modules/strstr (configure.ac): Likewise.
915         * modules/strtok_r (configure.ac): Likewise.
916
917 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
918
919         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
920
921 2007-01-30  Jim Meyering  <jim@meyering.net>
922
923         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
924
925 2007-01-29  Bruno Haible  <bruno@clisp.org>
926
927         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
928         * lib/execute.c: Likewise.
929         * lib/pipe.c: Likewise.
930         * lib/printf-args.h: Likewise.
931         * lib/printf-args.c: Likewise.
932         * lib/printf-parse.c: Likewise.
933         * lib/vasnprintf.c: Likewise.
934
935 2007-01-29  Eric Blake  <ebb9@byu.net>
936
937         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
938         declaration.
939
940 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
941
942         * lib/strptime.h (strptime): Use 'restrict' for args where
943         POSIX requires this.
944         * lib/strptime.c (strptime): Likewise.
945         Change license notice from LGPL to GPL, since gnulib-tool will
946         change this as needed.
947         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
948         defined.
949         Include "strptime.h" first, to check interface.
950         Do not #undef _LIBC and _NL_CURRENT.
951         Do not include <stdlib.h>; no longer needed.
952         Include "time_r.h" and declare ptime_locale_status
953         only if _LIBC is not defined.
954         (__P): Remove unused macro.
955         (match_string): Bring back glibc version, but use it only if _LIBC
956         is defined.
957         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
958         Remove unnecessary assertion and abort() call.
959         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
960         * m4/strptime.m4: Fix serial number comment.
961         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
962         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
963         (Depends-on): Add time_r.
964
965 2007-01-29  Bruno Haible  <bruno@clisp.org>
966
967         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
968         strptime.
969         * modules/strptime (Depends-on): Add stdbool.
970         * lib/strptime.h: Include <time.h> always. Add comments.
971
972 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
973
974         * modules/strptime: New file.
975         * lib/strptime.h: New file.
976         * lib/strptime.c: New file.
977         * m4/strptime.m4: New file.
978
979 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
980
981         * MODULES.html.sh: New module mpsort.
982         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
983
984         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
985         a circularity problem with HP-UX ia64 reported by Bob Proulx in
986         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
987         All uses changed.
988         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
989         All uses changed.
990         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
991         to _Restrict_.
992         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
993         the parameter matches the prototype.
994
995 2007-01-28  Jim Meyering  <jim@meyering.net>
996
997         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
998         sys/time.h here, reverting that part of the previous patch:
999         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1000
1001 2007-01-28  Bruno Haible  <bruno@clisp.org>
1002
1003         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1004         value of $(SYS_TIME_H).
1005         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1006         remove it conditionally, too. [added by Jim Meyering]
1007         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1008         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1009         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1010         GETTIMEOFDAY_REPLACEMENT to 1.
1011
1012 2007-01-28  Bruno Haible  <bruno@clisp.org>
1013
1014         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1015         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1016         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1017         Set UNISTD_H instead of UNISTD_H2.
1018         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1019
1020 2007-01-28  Bruno Haible  <bruno@clisp.org>
1021
1022         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1023         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1024
1025 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1026
1027         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1028         (func_create_testdir): Ensure C locale for `grep' and `tr'
1029         character ranges.
1030         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1031         ACLOCAL_AMFLAGS parsing state machine.
1032
1033 2007-01-27  Bruno Haible  <bruno@clisp.org>
1034
1035         * modules/unistr/base: Update.
1036
1037 2007-01-27  Bruno Haible  <bruno@clisp.org>
1038
1039         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1040         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1041         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1042         modules/unistr/u32-mbtouc.
1043         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1044         * lib/unistr.h: Update.
1045         * lib/linebreak.c: Update.
1046         * modules/unistr/u32-mbtouc: Renamed from
1047         modules/unistr/u32-mbtouc-safe.
1048         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1049         * lib/unistr.h: Update.
1050         * lib/unistr/u32-to-u8.c: Update.
1051         * lib/unistr/u32-to-u16.c: Update.
1052
1053 2007-01-27  Bruno Haible  <bruno@clisp.org>
1054
1055         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1056         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1057         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1058         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1059         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1060         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1061         modules/unistr/u16-mbtouc.
1062         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1063         * lib/unistr.h: Update.
1064         * lib/linebreak.c: Update.
1065         * modules/linebreak: Update.
1066         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1067         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1068         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1069         * modules/unistr/u16-mbtouc: Renamed from
1070         modules/unistr/u16-mbtouc-safe.
1071         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1072         * lib/unistr.h: Update.
1073         * lib/unistr/u16-to-u8.c: Update.
1074         * modules/unistr/u16-to-u8: Update.
1075         * lib/unistr/u16-to-u32.c: Update.
1076         * modules/unistr/u16-to-u32: Update.
1077
1078 2007-01-27  Bruno Haible  <bruno@clisp.org>
1079
1080         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1081         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1082         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1083         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1084         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1085         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1086         modules/unistr/u8-mbtouc.
1087         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1088         * lib/unistr.h: Update.
1089         * lib/striconveh.c: Update.
1090         * modules/striconveh: Update.
1091         * lib/linebreak.c: Update.
1092         * modules/linebreak: Update.
1093         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1094         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1095         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1096         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1097         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1098         * lib/unistr.h: Update.
1099         * lib/striconveh.c: Update.
1100         * modules/striconveh: Update.
1101         * lib/unistr/u8-to-u16.c: Update.
1102         * modules/unistr/u8-to-u16: Update.
1103         * lib/unistr/u8-to-u32.c: Update.
1104         * modules/unistr/u8-to-u32: Update.
1105
1106 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1107
1108         Sync from Libtool.
1109         * lib/argz.c: Do not include strings.h nor memory.h, include
1110         string.h unconditionally.  Patch by Simon Josefsson.
1111
1112 2007-01-27  Bruno Haible  <bruno@clisp.org>
1113
1114         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1115         from gl_HEADER_STRING_H_BODY.
1116         (gl_HEADER_STRING_H_BODY): Require it.
1117         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1118         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1119         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1120         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1121         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1122         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1123         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1124         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1125         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1126         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1127         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1128         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1129         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1130         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1131         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1132
1133 2007-01-27  Bruno Haible  <bruno@clisp.org>
1134
1135         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1136         check_PROGRAMS into noinst_PROGRAMS.
1137         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1138         check_PROGRAMS in this case.
1139         (func_import): Set for_test to false.
1140         (func_create_testdir): Set for_test to true.
1141
1142 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1143             Bruno Haible  <bruno@clisp.org>
1144
1145         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1146         (Depends-on): Add string.
1147         (Includes): Use <string.h> instead of strcasestr.h.
1148         * modules/string (Makefile.am): Also substitute the value of
1149         REPLACE_STRCASESTR.
1150         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1151         assume strcasestr is declared in <string.h> not <strings.h>. Also
1152         set REPLACE_STRCASESTR.
1153         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1154         REPLACE_STRCASESTR.
1155         * lib/strcasestr.h: Remove file.
1156         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1157         * lib/string_.h (strcasestr): New declaration.
1158
1159 2007-01-27  Bruno Haible  <bruno@clisp.org>
1160
1161         * lib/string_.h: Use 'extern'.
1162
1163 2007-01-27  Jim Meyering  <jim@meyering.net>
1164
1165         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1166         of set-but-not-used local, "q".
1167
1168         * lib/mempcpy.c: Include <config.h> before <string.h>.
1169         This fixes a compilation error on HP-UX, due to the system's
1170         "restrict"-using mempcpy prototype.
1171
1172 2007-01-26  Bruno Haible  <bruno@clisp.org>
1173
1174         Small optimization.
1175         * lib/javacomp.c: Include c-strstr.h.
1176          (is_envjavac_gcj): Use c_strstr instead of strstr.
1177         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1178
1179 2007-01-26  Bruno Haible  <bruno@clisp.org>
1180
1181         * MODULES.html.sh (Unicode string functions): Add the new modules.
1182
1183         * modules/uniconv/u32-strconv-to-locale: New file.
1184         * lib/uniconv/u32-strconv-to-locale.c: New file.
1185
1186         * modules/uniconv/u16-strconv-to-locale: New file.
1187         * lib/uniconv/u16-strconv-to-locale.c: New file.
1188
1189         * modules/uniconv/u8-strconv-to-locale: New file.
1190         * lib/uniconv/u8-strconv-to-locale.c: New file.
1191
1192         * modules/uniconv/u32-strconv-from-locale: New file.
1193         * lib/uniconv/u32-strconv-from-locale.c: New file.
1194
1195         * modules/uniconv/u16-strconv-from-locale: New file.
1196         * lib/uniconv/u16-strconv-from-locale.c: New file.
1197
1198         * modules/uniconv/u8-strconv-from-locale: New file.
1199         * lib/uniconv/u8-strconv-from-locale.c: New file.
1200
1201         * modules/uniconv/u32-strconv-to-enc: New file.
1202         * lib/uniconv/u32-strconv-to-enc.c: New file.
1203         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1204         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1205
1206         * modules/uniconv/u16-strconv-to-enc: New file.
1207         * lib/uniconv/u16-strconv-to-enc.c: New file.
1208         * lib/uniconv/u-strconv-to-enc.h: New file.
1209         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1210         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1211
1212         * modules/uniconv/u8-strconv-to-enc: New file.
1213         * lib/uniconv/u8-strconv-to-enc.c: New file.
1214         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1215         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1216
1217         * modules/uniconv/u32-strconv-from-enc: New file.
1218         * lib/uniconv/u32-strconv-from-enc.c: New file.
1219         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1220         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1221
1222         * modules/uniconv/u16-strconv-from-enc: New file.
1223         * lib/uniconv/u16-strconv-from-enc.c: New file.
1224         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1225         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1226
1227         * modules/uniconv/u8-strconv-from-enc: New file.
1228         * lib/uniconv/u8-strconv-from-enc.c: New file.
1229         * lib/uniconv/u-strconv-from-enc.h: New file.
1230         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1231         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1232
1233         * modules/uniconv/u32-conv-from-enc: New file.
1234         * lib/uniconv/u32-conv-from-enc.c: New file.
1235         * modules/uniconv/u32-conv-from-enc-tests: New file.
1236         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1237
1238         * modules/uniconv/u16-conv-from-enc: New file.
1239         * lib/uniconv/u16-conv-from-enc.c: New file.
1240         * lib/uniconv/u-conv-from-enc.h: New file.
1241         * modules/uniconv/u16-conv-from-enc-tests: New file.
1242         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1243
1244         * modules/uniconv/u8-conv-from-enc: New file.
1245         * lib/uniconv/u8-conv-from-enc.c: New file.
1246         * modules/uniconv/u8-conv-from-enc-tests: New file.
1247         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1248
1249         * modules/uniconv/base: New file.
1250         * lib/uniconv.h: New file.
1251
1252 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1253
1254         * doc/gnulib-tool.texi (Initial import): Update to match current
1255         behavior with strdup module.
1256         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1257         * lib/memmem.h: Remove; all uses removed.  This is now done
1258         by <string.h>.
1259         * lib/mempcpy.h: Likewise.
1260         * lib/memrchr.h: Likewise.
1261         * lib/stpcpy.h: Likewise.
1262         * lib/stpncpy.h: Likewise.
1263         * lib/strcase.h: Likewise.
1264         * lib/strchrnul.h: Likewise.
1265         * lib/strdup.h: Likewise.
1266         * lib/strndup.h: Likewise.
1267         * lib/strnlen.h: Likewise.
1268         * lib/strpbrk.h: Likewise.
1269         * lib/strsep.h: Likewise.
1270         * lib/strstr.h: Likewise.
1271         * lib/strtok_r.h: Likewise.
1272         * lib/string_.h: New file.
1273         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1274         Rely on <string.h> instead.
1275         * lib/canon-host.c: Likewise.
1276         * lib/chdir-long.c: Likewise.
1277         * lib/concatpath.c: Likewise.
1278         * lib/exclude.c: Likewise.
1279         * lib/fchdir.c: Likewise.
1280         * lib/getaddrinfo.c: Likewise.
1281         * lib/getcwd.c: Likewise.
1282         * lib/getsubopt.c: Likewise.
1283         * lib/glob.c: Likewise.
1284         * lib/hard-locale.c: Likewise.
1285         * lib/iconvme.c: Likewise.
1286         * lib/javacomp.c: Likewise.
1287         * lib/mempcpy.c: Likewise.
1288         * lib/memrchr.c: Likewise.
1289         * lib/regex_internal.h: Likewise.
1290         * lib/stpncpy.c: Likewise.
1291         * lib/strcasecmp.c: Likewise.
1292         * lib/strchrnul.c: Likewise.
1293         * lib/strdup.c: Likewise.
1294         * lib/striconv.c: Likewise.
1295         * lib/striconveh.c: Likewise.
1296         * lib/striconveha.c: Likewise.
1297         * lib/strncasecmp.c: Likewise.
1298         * lib/strndup.c: Likewise.
1299         * lib/strnlen.c: Likewise.
1300         * lib/strsep.c: Likewise.
1301         * lib/strstr.c: Likewise.
1302         * lib/strtok_r.c: Likewise.
1303         * lib/userspec.c: Likewise.
1304         * lib/w32spawn.h: Likewise.
1305         * lib/xstrndup.c: Likewise.
1306         * lib/mountlist.c (strstr): Remove decl.
1307         * m4/string_h.m4: New file.
1308         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1309         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1310         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1311         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1312         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1313         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1314         Set REPLACE_STRCASECMP if necessary.
1315         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1316         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1317         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1318         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1319         HAVE_DECL_STRDUP if necessary.
1320         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1321         since gl_FUNC_STRNDUP does that now.
1322         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1323         Check for decl here...
1324         (gl_PREREQ_STRNLEN): ... not here.
1325         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1326         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1327         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1328         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1329         necessary.
1330         * modules/string: New file.
1331         * modules/memmem (Files): Remove special-purpose include file.
1332         (Depends-on): Add string.
1333         (Include): Include <string.h>, not the removed file.
1334         * modules/mempcpy: Likewise.
1335         * modules/memrchr: Likewise.
1336         * modules/stpcpy: Likewise.
1337         * modules/stpncpy: Likewise.
1338         * modules/strcase: Likewise.
1339         * modules/strchrnul: Likewise.
1340         * modules/strdup: Likewise.
1341         * modules/strndup: Likewise.
1342         * modules/strnlen: Likewise.
1343         * modules/strpbrk: Likewise.
1344         * modules/strsep: Likewise.
1345         * modules/strstr: Likewise.
1346         * modules/strtok_r: Likewise.
1347         * tests/test-dirname.c: Don't include "strdup.h", since
1348         <string.h> now suffices.
1349         * tests/test-memmem.c: Don't include "memmem.h", since
1350         <string.h> now suffices.
1351
1352 2007-01-25  Bruno Haible  <bruno@clisp.org>
1353
1354         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1355         *resultp is 0.
1356
1357         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1358         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1359         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1360         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1361
1362         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1363         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1364         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1365         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1366         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1367         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1368
1369 2007-01-24  Bruno Haible  <bruno@clisp.org>
1370
1371         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1372         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1373         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1374         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1375         gl_FUNC_FTS_CORE.
1376         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1377         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1378         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1379         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1380         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1381         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1382         gl_FUNC_FCHOWNAT.
1383         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1384         gl_FUNC_STRFTIME.
1385         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1386         Reported by Ralf Wildenhues.
1387
1388 2007-01-24  Bruno Haible  <bruno@clisp.org>
1389
1390         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1391         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1392         gl_GETADDRINFO.
1393         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1394         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1395         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1396
1397 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1398
1399         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1400         Don't use 'exit'; just return from 'main'.
1401         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1402
1403         * lib/fnmatch_.h: Readjust white space and comments to match
1404         glibc, to avoid spurious diffs.
1405
1406 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1407
1408         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1409         2004-12-01 change by Jakub Jelinek, since this code won't compile
1410         if !LIBC.  Problem reported by Bob Proulx.
1411
1412 2007-01-23  Bruno Haible  <bruno@clisp.org>
1413
1414         * lib/striconveh.c: Include c-strcaseeq.h.
1415         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1416         * modules/striconveh (Depends-on): Add c-strcaseeq.
1417
1418 2007-01-23  Bruno Haible  <bruno@clisp.org>
1419
1420         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1421
1422         * modules/c-strcaseeq: New file.
1423         * lib/c-strcaseeq.h: New file.
1424
1425         * modules/streq: New file.
1426         * lib/streq.h: New file.
1427
1428 2007-01-23  Bruno Haible  <bruno@clisp.org>
1429
1430         * modules/striconveha-tests: New file.
1431         * tests/test-striconveha.c: New file.
1432
1433         * lib/striconveha.h: Include <stdbool.h>.
1434         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1435         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1436         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1437         (mem_iconveha): New function.
1438         (str_iconveha_notranslit): Renamed from str_iconveha.
1439         (str_iconveha): New function.
1440         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1441         c-strcase.
1442
1443 2007-01-23  Bruno Haible  <bruno@clisp.org>
1444
1445         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1446         encodings without forgiving before trying any encoding with handler.
1447         (str_iconveha): Try all encodings without forgiving before trying any
1448         encoding with handler.
1449
1450 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1451
1452         Import the following changes from libc.
1453
1454         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1455
1456         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1457
1458         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1459
1460         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1461         normal_bracket label.
1462
1463         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1464
1465         [BZ #361]
1466         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1467         to normal_bracket after fetching the next character.
1468
1469 2007-01-22  Bruno Haible  <bruno@clisp.org>
1470
1471         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1472         argument.
1473         * lib/striconveh.c (iconv_carefully_1): New function.
1474         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1475         argument.
1476         (str_cd_iconveh): Update.
1477         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1478         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1479         * tests/test-striconveh.c (MAGIC): New macro.
1480         (new_offsets): New function.
1481         (main): Test call with and without offsets.
1482
1483 2007-01-22  Bruno Haible  <bruno@clisp.org>
1484
1485         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1486         * modules/sys_select (Makefile.am): Likewise.
1487         * modules/sys_socket (Makefile.am): Likewise.
1488         * modules/sys_time (Makefile.am): Likewise.
1489
1490 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1491
1492         * modules/gettimeofday (License): Change from GPL to LGPL, since
1493         gettimeofday is a library function.
1494
1495 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1496
1497         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1498
1499 2007-01-21  Bruno Haible  <bruno@clisp.org>
1500
1501         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1502
1503 2007-01-21  Bruno Haible  <bruno@clisp.org>
1504
1505         * modules/striconveha: New file.
1506         * lib/striconveha.h: New file.
1507         * lib/striconveha.c: New file.
1508         * MODULES.html.sh (Internationalization functions): Add striconveha.
1509         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1510         string.
1511         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1512
1513 2007-01-21  Bruno Haible  <bruno@clisp.org>
1514
1515         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1516         * lib/striconveh.c (str_iconveh): Likewise.
1517
1518 2007-01-21  Bruno Haible  <bruno@clisp.org>
1519
1520         * lib/striconveh.h (mem_iconveh): New declaration.
1521         * lib/striconveh.c (mem_iconveh): New function.
1522         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1523
1524 2007-01-21  Bruno Haible  <bruno@clisp.org>
1525
1526         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1527
1528         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1529         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1530         original result buffer.
1531         (str_cd_iconveh): Update.
1532         * tests/test-striconveh.c (main): Update.
1533
1534         * lib/striconv.h (mem_cd_iconv): Change specification.
1535         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1536         result buffer.
1537         (str_cd_iconv): Update.
1538         * tests/test-striconv.c (main): Update.
1539
1540 2007-01-21  Bruno Haible  <bruno@clisp.org>
1541
1542         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1543
1544 2007-01-20  Jim Meyering  <jim@meyering.net>
1545
1546         * lib/userspec.c (parse_with_separator): If a user or group string
1547         starts with "+", skip the corresponding name-to-ID look-up, since
1548         such a look-up must fail: user and group names may not include "+".
1549
1550 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1551
1552         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1553         since we now assume the sys_time module.
1554         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1555         check for sys/time.h; no longer needed.
1556         * modules/poll (Depends-on): Depend on sys_time.
1557
1558 2007-01-18  Bruno Haible  <bruno@clisp.org>
1559
1560         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1561         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1562
1563         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1564         gettimeofday.
1565
1566         * tests/test-gettimeofday.c: Include <time.h>.
1567         (dummy): Remove variable.
1568
1569         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1570         gl_HEADER_SYS_TIME_H.
1571         (gl_HEADER_SYS_TIME_H): New macro.
1572
1573         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1574         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1575         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1576         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1577         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1578         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1579         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1580         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1581         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1582         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1583         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1584
1585         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1586         last change; it caused a compilation error when cross-compiling to
1587         Cygwin.
1588
1589 2007-01-18  Jim Meyering  <jim@meyering.net>
1590
1591         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1592         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1593         than the race-prone "test -d sys || mkdir sys".
1594         (configure.ac): Use AC_PROG_MKDIR_P.
1595         * modules/sys_select: Likewise.
1596         * modules/sys_socket: Likewise.
1597         * modules/sys_time: Likewise.
1598
1599 2007-01-18  Eric Blake  <ebb9@byu.net>
1600
1601         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1602         replace gettimeofday.
1603         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1604         name, to avoid infinite recursion.
1605
1606 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1607
1608         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1609         module sys_time.
1610         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1611         assume timespec.h defines struct timeval.
1612         * lib/settime.c: Likewise.
1613         * lib/utimens.c: Likewise.
1614         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1615         since we now assume the gettimeofday module.
1616         * lib/tempname.c (__gen_tempname): Likewise.
1617         * lib/gettimeofday.h: Remove.
1618         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1619         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1620         Include <time.h>, for 'time()'.
1621         (localtime_buffer_addr): Also use this workaround if
1622         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1623         to simplify the uses.  All uses changed.
1624         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1625         that #undef is inside {}, and 'const' follows type name consistently.
1626         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1627         (gettimeofday): Do not use the maximum possible value for
1628         tv->tv_usec, since that might break usages other than ls.c.
1629         Instead, we'll leave ls.c alone.  This undoes today's patch
1630         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1631         we've never observed the problem but might as well keep the
1632         canary.
1633         * lib/nanosleep.c: Include timespec.h first, for interface check.
1634         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1635         now assume the sys_time module.
1636         * lib/tempname.c: Likewise.
1637         * lib/timespec.h: Likewise.
1638         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1639         needed.
1640         * lib/strftime.c: Likewise.
1641         * lib/timespec.h: Likewise.
1642         * lib/posixtm.c: Include posixtm.h first, for interface check.
1643         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1644         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1645         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1646         * lib/sys_time_.h: New file.
1647         * lib/timespec.h (struct timespec): Use long int, not long.
1648         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1649         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1650         Remove obsolescent call to AC_HEADER_TIME.
1651         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1652         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1653         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1654         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1655         Likewise.
1656         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1657         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1658         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1659         into the sys_time module.  Check for gettimeofday just once.
1660         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1661         for gettimeofday signature to just check the signature.  Merely
1662         compile it, since linking doesn't test signature.  Improve test for
1663         whether gettimeofday.o is actually needed.
1664         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1665         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1666         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1667         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1668         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1669         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1670         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1671         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1672         than worrying about sys/time.h.
1673         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1674         Don't bother worrying about TIME_WITH_SYS_TIME.
1675         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1676         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1677         * m4/sys_time_h.m4: New file.
1678         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1679         Don't include sys/time.h.  Return from main rather than exiting.
1680         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1681         all uses changed.
1682         * modules/gethrxtime (Depends-on): Add sys_time.
1683         * modules/gettime (Depends-on): Likewise.
1684         * modules/gettimeofday (Depends-on): Likewise.
1685         * modules/nanosleep (Depends-on): Likewise.
1686         * modules/settime (Depends-on): Likewise.
1687         * modules/tempname (Depends-on): Likewise.
1688         * modules/utimens (Depends-on): Likewise.
1689         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1690         (Include:) Change back to <sys/time.h>.
1691         (Maintainer:) Add self.
1692         * modules/sys_time: New file.
1693         * modules/tempname (Depends-on): Add gettimeofday.
1694         * tests/test-gettimeofday.c: Include <sys/time.h>
1695         rather than gettimeofday.h.
1696
1697 2007-01-17  Bruno Haible  <bruno@clisp.org>
1698
1699         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1700         the license default to GPL.
1701         (func_create_testdir): Don't complain if a module is LGPL and its
1702         tests module depends on GPLed modules.
1703
1704 2007-01-17  Bruno Haible  <bruno@clisp.org>
1705
1706         * lib/gettimeofday.c (gettimeofday): Add code for the case
1707         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1708         maximum possible value for tv->tv_usec, rather than the minimum one.
1709
1710 2005-10-08  Martin Lambers  <marlam@marlam.de>
1711 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1712 2007-01-16  Bruno Haible  <bruno@clisp.org>
1713
1714         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1715         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1716         gl_FUNC_GETTIMEOFDAY.
1717         (Include): Add gettimeofday.h.
1718         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1719         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1720         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1721         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1722         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1723         * lib/gettimeofday.h: New file.
1724         * lib/gettimeofday.c: Include <sys/timeb.h>.
1725         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1726         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1727         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1728         fall back on time().
1729
1730         * tests/test-gettimeofday.c: New file.
1731         * modules/gettimeofday-tests: New file.
1732
1733 2007-01-16  Eric Blake  <ebb9@byu.net>
1734
1735         * modules/fnmatch (Depends-on): Depend on wchar.
1736         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1737         * m4/fnmatch.m4: Likewise.
1738         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1739         * m4/mbchar.m4: Likewise.
1740         * modules/mbswidth (Depends-on): Depend on wchar.
1741         * lib/mbswidth.c: Assume <wchar.h>.
1742         * m4/mbswidth.m4: Likewise.
1743         * modules/quotearg (Depends-on): Depend on wchar.
1744         * lib/quotearg.c: Assume <wchar.h>.
1745         * m4/quotearg.m4: Likewise.
1746         * modules/regex (Depends-on): Depend on wchar.
1747         * lib/regex_internal.h: Assume <wchar.h>.
1748         * m4/regex.m4: Likewise.
1749         * modules/stdint (Depends-on): Depend on wchar.
1750         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1751         * m4/stdint.m4: Likewise.
1752         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1753         * modules/strftime (Depends-on): Depend on wchar.
1754         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1755         * modules/strtol (Depends-on): Depend on wchar.
1756         * lib/strtol.c: Assume <wchar.h>.
1757         * modules/wcwidth (Depends-on): Depend on wchar.
1758         * lib/wcwidth.h: Assume <wchar.h>.
1759         * m4/wcwidth.m4: Likewise.
1760
1761 2007-01-16  Bruno Haible  <bruno@clisp.org>
1762
1763         * modules/csharpexec-script: New, created from...
1764         * modules/csharpexec: ... this.
1765
1766 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1767
1768         * modules/javaexec-script: New, created from...
1769         * modules/javaexec: ... this.
1770
1771 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1772
1773         * modules/poll (Dependencies): Add sys_select.
1774
1775 2007-01-15  Jim Meyering  <jim@meyering.net>
1776
1777         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1778         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1779         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1780         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1781
1782 2007-01-15  Bruno Haible  <bruno@clisp.org>
1783
1784         * modules/striconveh: New file.
1785         * lib/striconveh.h: New file.
1786         * lib/striconveh.c: New file.
1787         * MODULES.html.sh (Internationalization functions): Add striconveh.
1788
1789         * modules/striconveh-tests: New file.
1790         * tests/test-striconveh.c: New file.
1791
1792 2007-01-15  Bruno Haible  <bruno@clisp.org>
1793
1794         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1795         not from GNU libiconv or GNU libc.
1796
1797 2007-01-15  Bruno Haible  <bruno@clisp.org>
1798
1799         * doc/gnulib-intro.texi (Copyright): Explain the different license
1800         terms for module descriptions, autoconf macros, tests, documentation.
1801
1802 2007-01-14  Bruno Haible  <bruno@clisp.org>
1803
1804         * modules/striconv-tests: New file.
1805         * tests/test-striconv.c: New file.
1806
1807 2007-01-14  Bruno Haible  <bruno@clisp.org>
1808
1809         * modules/iconv-tests: New file.
1810         * tests/test-iconv.c: New file.
1811
1812 2007-01-14  Bruno Haible  <bruno@clisp.org>
1813
1814         * gnulib-tool (func_get_license): For test modules, use the license of
1815         the main module.
1816
1817 2007-01-14  Bruno Haible  <bruno@clisp.org>
1818
1819         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1820         if iconv is found to exist.
1821
1822 2007-01-14  Bruno Haible  <bruno@clisp.org>
1823
1824         * modules/c-ctype-tests: New file.
1825         * tests/test-c-ctype.c: New file.
1826
1827 2007-01-14  Bruno Haible  <bruno@clisp.org>
1828
1829         * modules/binary-io-tests: New file.
1830         * tests/test-binary-io.sh: New file.
1831         * tests/test-binary-io.c: New file.
1832
1833 2007-01-14  Bruno Haible  <bruno@clisp.org>
1834
1835         * modules/array-oset-tests: New file.
1836         * tests/test-array_oset.c: New file.
1837
1838 2007-01-14  Bruno Haible  <bruno@clisp.org>
1839
1840         * modules/array-list-tests: New file.
1841         * tests/test-array_list.c: New file.
1842
1843 2007-01-14  Bruno Haible  <bruno@clisp.org>
1844
1845         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1846         and make.
1847         Reported by Simon Josefsson in
1848         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1849
1850 2007-01-14  Bruno Haible  <bruno@clisp.org>
1851
1852         * modules/allocsa-tests: New file.
1853         * tests/test-allocsa.c: New file.
1854
1855 2007-01-14  Bruno Haible  <bruno@clisp.org>
1856
1857         * modules/fchdir (Depends-on): Add absolute-header.
1858         * modules/unistd (Depends-on): Likewise.
1859
1860 2006-12-30  Bruno Haible  <bruno@clisp.org>
1861
1862         * modules/fchdir: New file.
1863         * modules/unistd (Files): Add lib/unistd_.h.
1864         (Makefile.am): Generate unistd.h from unistd_.h.
1865         * lib/fchdir.c: New file.
1866         * lib/dirent_.h: New file.
1867         * lib/unistd_.h: New file.
1868         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1869         * m4/fchdir.m4: New file.
1870         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1871         (gl_HEADER_UNISTD): Invoke it.
1872         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1873         function.
1874         * lib/backupfile.c (opendir, closedir): Undefine.
1875         * lib/chown.c (open, close): Undefine.
1876         * lib/clean-temp.c (open, close): Undefine.
1877         * lib/copy-file.c (open, close): Undefine.
1878         * lib/execute.c (open, close): Undefine.
1879         * lib/fsusage.c (open, close): Undefine.
1880         * lib/gc-gnulib.c (open, close): Undefine.
1881         * lib/getcwd.c (opendir, closedir): Undefine.
1882         * lib/glob.c (opendir, closedir): Undefine.
1883         * lib/javacomp.c (open, close): Undefine.
1884         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1885         * lib/openat-proc.c (open, close): Undefine.
1886         * lib/pagealign_alloc.c (open, close): Undefine.
1887         * lib/pipe.c (open, close): Undefine.
1888         * lib/progreloc.c (open, close): Undefine.
1889         * lib/savedir.c (opendir, closedir): Undefine.
1890         * lib/utime.c (open, close): Undefine.
1891         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1892
1893 2007-01-10  Bruno Haible  <bruno@clisp.org>
1894
1895         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1896
1897 2007-01-12  Eric Blake  <ebb9@byu.net>
1898
1899         Provide a robust <wchar.h>.  Further simplifications are now
1900         possible in other modules, but not included here.
1901         * modules/wchar: New module.
1902         * m4/wchar.m4: New file.
1903         * lib/wchar_.h: Likewise.
1904         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1905         of the new module.
1906         * MODULES.html.sh (Extended multibyte and wide character utilities):
1907         New section.
1908
1909 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1910
1911         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1912         to a reasonable default for memory allocation.
1913         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1914         file system that reports garbage st_size values for symlinks.
1915         Problem reported by Liyang Hu.
1916
1917 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1918
1919         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1920         Emacs .#* auto-save files).
1921
1922 2007-01-11  Bruno Haible  <bruno@clisp.org>
1923
1924         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1925         directory.
1926
1927 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1928
1929         Use @...@ consistently in lib/wctype_.h.
1930         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1931         on it being set to 1 or 0.
1932         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1933         go back to AC_SUBSTing it.
1934         * modules/wctype (Makefile.am): Undo previous change.
1935
1936 2007-01-10  Eric Blake  <ebb9@byu.net>
1937
1938         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1939         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1940         * modules/wctype (Makefile.am): Likewise.
1941         Reported by Chris McGuire.
1942
1943 2007-01-10  Jim Meyering  <jim@meyering.net>
1944
1945         fts.c: a small readability/maintainability improvement
1946         * lib/fts.c (fts_read): Make this code slightly more readable and
1947         maintainable by hoisting the "sp->fts_cur = p" assignments to
1948         immediately follow the statements that set P.  Derived from
1949         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1950
1951 2007-01-10  Eric Blake  <ebb9@byu.net>
1952
1953         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1954         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1955         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1956         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1957         Reported by Chris McGuire.
1958
1959 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1960
1961         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1962         in sed script.
1963
1964 2007-01-09  Bruno Haible  <bruno@clisp.org>
1965
1966         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1967         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1968         variables.
1969         (func_module): Use them.
1970
1971 2007-01-09  Bruno Haible  <bruno@clisp.org>
1972
1973         * modules/unistr/base: New file.
1974         * lib/unistr.h: New file.
1975
1976         * modules/unistr/u8-to-u16: New file.
1977         * lib/unistr/u8-to-u16.c: New file.
1978
1979         * modules/unistr/u8-to-u32: New file.
1980         * lib/unistr/u8-to-u32.c: New file.
1981
1982         * modules/unistr/u16-to-u8: New file.
1983         * lib/unistr/u16-to-u8.c: New file.
1984
1985         * modules/unistr/u16-to-u32: New file.
1986         * lib/unistr/u16-to-u32.c: New file.
1987
1988         * modules/unistr/u32-to-u8: New file.
1989         * lib/unistr/u32-to-u8.c: New file.
1990
1991         * modules/unistr/u32-to-u16: New file.
1992         * lib/unistr/u32-to-u16.c: New file.
1993
1994         * modules/unistr/u8-check: New file.
1995         * modules/unistr/u16-check: New file.
1996         * modules/unistr/u32-check: New file.
1997         * lib/unistr/u8-check.c: New file.
1998         * lib/unistr/u16-check.c: New file.
1999         * lib/unistr/u32-check.c: New file.
2000
2001         * modules/unistr/u8-chr: New file.
2002         * modules/unistr/u16-chr: New file.
2003         * modules/unistr/u32-chr: New file.
2004         * lib/unistr/u8-chr.c: New file.
2005         * lib/unistr/u16-chr.c: New file.
2006         * lib/unistr/u32-chr.c: New file.
2007
2008         * modules/unistr/u8-cmp: New file.
2009         * modules/unistr/u16-cmp: New file.
2010         * modules/unistr/u32-cmp: New file.
2011         * lib/unistr/u8-cmp.c: New file.
2012         * lib/unistr/u16-cmp.c: New file.
2013         * lib/unistr/u32-cmp.c: New file.
2014
2015         * modules/unistr/u8-cpy: New file.
2016         * modules/unistr/u16-cpy: New file.
2017         * modules/unistr/u32-cpy: New file.
2018         * lib/unistr/u8-cpy.c: New file.
2019         * lib/unistr/u16-cpy.c: New file.
2020         * lib/unistr/u32-cpy.c: New file.
2021         * lib/unistr/u-cpy.h: New file.
2022
2023         * modules/unistr/u8-cpy-alloc: New file.
2024         * modules/unistr/u16-cpy-alloc: New file.
2025         * modules/unistr/u32-cpy-alloc: New file.
2026         * lib/unistr/u8-cpy-alloc.c: New file.
2027         * lib/unistr/u16-cpy-alloc.c: New file.
2028         * lib/unistr/u32-cpy-alloc.c: New file.
2029         * lib/unistr/u-cpy-alloc.h: New file.
2030
2031         * modules/unistr/u8-endswith: New file.
2032         * modules/unistr/u16-endswith: New file.
2033         * modules/unistr/u32-endswith: New file.
2034         * lib/unistr/u8-endswith.c: New file.
2035         * lib/unistr/u16-endswith.c: New file.
2036         * lib/unistr/u32-endswith.c: New file.
2037         * lib/unistr/u-endswith.h: New file.
2038
2039         * modules/unistr/u8-mblen: New file.
2040         * modules/unistr/u16-mblen: New file.
2041         * modules/unistr/u32-mblen: New file.
2042         * lib/unistr/u8-mblen.c: New file.
2043         * lib/unistr/u16-mblen.c: New file.
2044         * lib/unistr/u32-mblen.c: New file.
2045
2046         * modules/unistr/u8-mbtouc: New file.
2047         * modules/unistr/u16-mbtouc: New file.
2048         * modules/unistr/u32-mbtouc: New file.
2049         * lib/unistr/u8-mbtouc.c: New file.
2050         * lib/unistr/u16-mbtouc.c: New file.
2051         * lib/unistr/u32-mbtouc.c: New file.
2052
2053         * modules/unistr/u8-mbtouc-safe: New file.
2054         * modules/unistr/u16-mbtouc-safe: New file.
2055         * modules/unistr/u32-mbtouc-safe: New file.
2056         * lib/unistr/u8-mbtouc-safe.c: New file.
2057         * lib/unistr/u16-mbtouc-safe.c: New file.
2058         * lib/unistr/u32-mbtouc-safe.c: New file.
2059
2060         * modules/unistr/u8-move: New file.
2061         * modules/unistr/u16-move: New file.
2062         * modules/unistr/u32-move: New file.
2063         * lib/unistr/u8-move.c: New file.
2064         * lib/unistr/u16-move.c: New file.
2065         * lib/unistr/u32-move.c: New file.
2066         * lib/unistr/u-move.h: New file.
2067
2068         * modules/unistr/u8-next: New file.
2069         * modules/unistr/u16-next: New file.
2070         * modules/unistr/u32-next: New file.
2071         * lib/unistr/u8-next.c: New file.
2072         * lib/unistr/u16-next.c: New file.
2073         * lib/unistr/u32-next.c: New file.
2074
2075         * modules/unistr/u8-prev: New file.
2076         * modules/unistr/u16-prev: New file.
2077         * modules/unistr/u32-prev: New file.
2078         * lib/unistr/u8-prev.c: New file.
2079         * lib/unistr/u16-prev.c: New file.
2080         * lib/unistr/u32-prev.c: New file.
2081
2082         * modules/unistr/u8-set: New file.
2083         * modules/unistr/u16-set: New file.
2084         * modules/unistr/u32-set: New file.
2085         * lib/unistr/u8-set.c: New file.
2086         * lib/unistr/u16-set.c: New file.
2087         * lib/unistr/u32-set.c: New file.
2088         * lib/unistr/u-set.h: New file.
2089
2090         * modules/unistr/u8-startswith: New file.
2091         * modules/unistr/u16-startswith: New file.
2092         * modules/unistr/u32-startswith: New file.
2093         * lib/unistr/u8-startswith.c: New file.
2094         * lib/unistr/u16-startswith.c: New file.
2095         * lib/unistr/u32-startswith.c: New file.
2096         * lib/unistr/u-startswith.h: New file.
2097
2098         * modules/unistr/u8-stpcpy: New file.
2099         * modules/unistr/u16-stpcpy: New file.
2100         * modules/unistr/u32-stpcpy: New file.
2101         * lib/unistr/u8-stpcpy.c: New file.
2102         * lib/unistr/u16-stpcpy.c: New file.
2103         * lib/unistr/u32-stpcpy.c: New file.
2104         * lib/unistr/u-stpcpy.h: New file.
2105
2106         * modules/unistr/u8-stpncpy: New file.
2107         * modules/unistr/u16-stpncpy: New file.
2108         * modules/unistr/u32-stpncpy: New file.
2109         * lib/unistr/u8-stpncpy.c: New file.
2110         * lib/unistr/u16-stpncpy.c: New file.
2111         * lib/unistr/u32-stpncpy.c: New file.
2112         * lib/unistr/u-stpncpy.h: New file.
2113
2114         * modules/unistr/u8-strcat: New file.
2115         * modules/unistr/u16-strcat: New file.
2116         * modules/unistr/u32-strcat: New file.
2117         * lib/unistr/u8-strcat.c: New file.
2118         * lib/unistr/u16-strcat.c: New file.
2119         * lib/unistr/u32-strcat.c: New file.
2120         * lib/unistr/u-strcat.h: New file.
2121
2122         * modules/unistr/u8-strchr: New file.
2123         * modules/unistr/u16-strchr: New file.
2124         * modules/unistr/u32-strchr: New file.
2125         * lib/unistr/u8-strchr.c: New file.
2126         * lib/unistr/u16-strchr.c: New file.
2127         * lib/unistr/u32-strchr.c: New file.
2128
2129         * modules/unistr/u8-strcmp: New file.
2130         * modules/unistr/u16-strcmp: New file.
2131         * modules/unistr/u32-strcmp: New file.
2132         * lib/unistr/u8-strcmp.c: New file.
2133         * lib/unistr/u16-strcmp.c: New file.
2134         * lib/unistr/u32-strcmp.c: New file.
2135
2136         * modules/unistr/u8-strcpy: New file.
2137         * modules/unistr/u16-strcpy: New file.
2138         * modules/unistr/u32-strcpy: New file.
2139         * lib/unistr/u8-strcpy.c: New file.
2140         * lib/unistr/u16-strcpy.c: New file.
2141         * lib/unistr/u32-strcpy.c: New file.
2142         * lib/unistr/u-strcpy.h: New file.
2143
2144         * modules/unistr/u8-strcspn: New file.
2145         * modules/unistr/u16-strcspn: New file.
2146         * modules/unistr/u32-strcspn: New file.
2147         * lib/unistr/u8-strcspn.c: New file.
2148         * lib/unistr/u16-strcspn.c: New file.
2149         * lib/unistr/u32-strcspn.c: New file.
2150         * lib/unistr/u-strcspn.h: New file.
2151
2152         * modules/unistr/u8-strdup: New file.
2153         * modules/unistr/u16-strdup: New file.
2154         * modules/unistr/u32-strdup: New file.
2155         * lib/unistr/u8-strdup.c: New file.
2156         * lib/unistr/u16-strdup.c: New file.
2157         * lib/unistr/u32-strdup.c: New file.
2158         * lib/unistr/u-strdup.h: New file.
2159
2160         * modules/unistr/u8-strlen: New file.
2161         * modules/unistr/u16-strlen: New file.
2162         * modules/unistr/u32-strlen: New file.
2163         * lib/unistr/u8-strlen.c: New file.
2164         * lib/unistr/u16-strlen.c: New file.
2165         * lib/unistr/u32-strlen.c: New file.
2166         * lib/unistr/u-strlen.h: New file.
2167
2168         * modules/unistr/u8-strmblen: New file.
2169         * modules/unistr/u16-strmblen: New file.
2170         * modules/unistr/u32-strmblen: New file.
2171         * lib/unistr/u8-strmblen.c: New file.
2172         * lib/unistr/u16-strmblen.c: New file.
2173         * lib/unistr/u32-strmblen.c: New file.
2174
2175         * modules/unistr/u8-strmbtouc: New file.
2176         * modules/unistr/u16-strmbtouc: New file.
2177         * modules/unistr/u32-strmbtouc: New file.
2178         * lib/unistr/u8-strmbtouc.c: New file.
2179         * lib/unistr/u16-strmbtouc.c: New file.
2180         * lib/unistr/u32-strmbtouc.c: New file.
2181
2182         * modules/unistr/u8-strncat: New file.
2183         * modules/unistr/u16-strncat: New file.
2184         * modules/unistr/u32-strncat: New file.
2185         * lib/unistr/u8-strncat.c: New file.
2186         * lib/unistr/u16-strncat.c: New file.
2187         * lib/unistr/u32-strncat.c: New file.
2188         * lib/unistr/u-strncat.h: New file.
2189
2190         * modules/unistr/u8-strncmp: New file.
2191         * modules/unistr/u16-strncmp: New file.
2192         * modules/unistr/u32-strncmp: New file.
2193         * lib/unistr/u8-strncmp.c: New file.
2194         * lib/unistr/u16-strncmp.c: New file.
2195         * lib/unistr/u32-strncmp.c: New file.
2196
2197         * modules/unistr/u8-strncpy: New file.
2198         * modules/unistr/u16-strncpy: New file.
2199         * modules/unistr/u32-strncpy: New file.
2200         * lib/unistr/u8-strncpy.c: New file.
2201         * lib/unistr/u16-strncpy.c: New file.
2202         * lib/unistr/u32-strncpy.c: New file.
2203         * lib/unistr/u-strncpy.h: New file.
2204
2205         * modules/unistr/u8-strnlen: New file.
2206         * modules/unistr/u16-strnlen: New file.
2207         * modules/unistr/u32-strnlen: New file.
2208         * lib/unistr/u8-strnlen.c: New file.
2209         * lib/unistr/u16-strnlen.c: New file.
2210         * lib/unistr/u32-strnlen.c: New file.
2211         * lib/unistr/u-strnlen.h: New file.
2212
2213         * modules/unistr/u8-strpbrk: New file.
2214         * modules/unistr/u16-strpbrk: New file.
2215         * modules/unistr/u32-strpbrk: New file.
2216         * lib/unistr/u8-strpbrk.c: New file.
2217         * lib/unistr/u16-strpbrk.c: New file.
2218         * lib/unistr/u32-strpbrk.c: New file.
2219         * lib/unistr/u-strpbrk.h: New file.
2220
2221         * modules/unistr/u8-strrchr: New file.
2222         * modules/unistr/u16-strrchr: New file.
2223         * modules/unistr/u32-strrchr: New file.
2224         * lib/unistr/u8-strrchr.c: New file.
2225         * lib/unistr/u16-strrchr.c: New file.
2226         * lib/unistr/u32-strrchr.c: New file.
2227
2228         * modules/unistr/u8-strspn: New file.
2229         * modules/unistr/u16-strspn: New file.
2230         * modules/unistr/u32-strspn: New file.
2231         * lib/unistr/u8-strspn.c: New file.
2232         * lib/unistr/u16-strspn.c: New file.
2233         * lib/unistr/u32-strspn.c: New file.
2234         * lib/unistr/u-strspn.h: New file.
2235
2236         * modules/unistr/u8-strstr: New file.
2237         * modules/unistr/u16-strstr: New file.
2238         * modules/unistr/u32-strstr: New file.
2239         * lib/unistr/u8-strstr.c: New file.
2240         * lib/unistr/u16-strstr.c: New file.
2241         * lib/unistr/u32-strstr.c: New file.
2242         * lib/unistr/u-strstr.h: New file.
2243
2244         * modules/unistr/u8-strtok: New file.
2245         * modules/unistr/u16-strtok: New file.
2246         * modules/unistr/u32-strtok: New file.
2247         * lib/unistr/u8-strtok.c: New file.
2248         * lib/unistr/u16-strtok.c: New file.
2249         * lib/unistr/u32-strtok.c: New file.
2250         * lib/unistr/u-strtok.h: New file.
2251
2252         * modules/unistr/u8-uctomb: New file.
2253         * modules/unistr/u16-uctomb: New file.
2254         * modules/unistr/u32-uctomb: New file.
2255         * lib/unistr/u8-uctomb.c: New file.
2256         * lib/unistr/u16-uctomb.c: New file.
2257         * lib/unistr/u32-uctomb.c: New file.
2258
2259         * MODULES.html.sh (Unicode string functions): Add the new modules.
2260
2261 2007-01-08  Bruno Haible  <bruno@clisp.org>
2262
2263         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2264         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2265         subdirectories.
2266
2267 2007-01-08  Karl Berry  <karl@gnu.org>
2268
2269         * doc/error.texi: mention that main() fns must set program_name
2270         when progname is used.
2271
2272 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2273
2274         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2275         WCTYPE_H is empty, for the benefit of builds from non-distclean
2276         directories.  Problem reported by Eric Blake in
2277         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2278
2279 2007-01-08  Bruno Haible  <bruno@clisp.org>
2280
2281         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2282         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2283         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2284         PROVIDE_CANONICALIZE_FILENAME_MODE.
2285         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2286
2287 2007-01-08  Bruno Haible  <bruno@clisp.org>
2288
2289         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2290         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2291         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2292         * lib/fts.c: Likewise.
2293         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2294
2295 2006-12-25  Bruno Haible  <bruno@clisp.org>
2296
2297         * modules/utf8-ucs4-safe: New file.
2298         * lib/utf8-ucs4-safe.h: New file.
2299         * lib/unistr/utf8-ucs4-safe.c: New file.
2300
2301         * modules/utf16-ucs4-safe: New file.
2302         * lib/utf16-ucs4-safe.h: New file.
2303         * lib/unistr/utf16-ucs4-safe.c: New file.
2304
2305         * MODULES.html.sh (Unicode string functions): Add the new modules.
2306
2307 2007-01-08  Bruno Haible  <bruno@clisp.org>
2308
2309         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2310         (Depends-on): Add unitypes.
2311         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2312         (u8_mbtouc_aux): Move out to separate file.
2313         (u8_mbtouc): Use ucs4_t, uint8_t types.
2314         * lib/unistr/utf8-ucs4.c: New file.
2315
2316         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2317         (Depends-on): Add unitypes.
2318         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2319         (u16_mbtouc_aux): Move out to separate file.
2320         (u16_mbtouc): Use ucs4_t, uint16_t types.
2321         * lib/unistr/utf16-ucs4.c: New file.
2322
2323         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2324         (Depends-on): Add unitypes.
2325         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2326         (u8_uctomb_aux): Move out to separate file.
2327         (u8_uctomb): Use ucs4_t, uint8_t types.
2328         * lib/unistr/ucs4-utf8.c: New file.
2329
2330         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2331         (Depends-on): Add unitypes.
2332         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2333         (u16_uctomb_aux): Move out to separate file.
2334         (u16_uctomb): Use ucs4_t, uint16_t types.
2335         * lib/unistr/ucs4-utf16.c: New file.
2336
2337 2006-12-25  Bruno Haible  <bruno@clisp.org>
2338
2339         * modules/unitypes: New file.
2340         * lib/unitypes.h: New file.
2341         * MODULES.html.sh (func_all_modules): New section "Unicode string
2342         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2343         this section. Add unitypes.
2344
2345 2007-01-08  Bruno Haible  <bruno@clisp.org>
2346
2347         Avoid variable names that conflict with those from libtool.
2348         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2349         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2350         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2351         library_names_spec to acl_library_names_spec, hardcode_* to
2352         acl_hardcode_*.
2353         Reported by Ralf Wildenhues.
2354
2355 2007-01-08  Bruno Haible  <bruno@clisp.org>
2356
2357         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2358         definition.
2359         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2360         definition.
2361         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2362         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2363         definition.
2364         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2365         definition.
2366         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2367         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2368         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2369         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2370         definition.
2371         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2372         definition.
2373         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2374         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2375         GC_USE_<algorithm>.
2376         * lib/gc-libgcrypt.c: Likewise.
2377         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2378         * modules/gc-arctwo (configure.ac): Likewise.
2379         * modules/gc-des (configure.ac): Likewise.
2380         * modules/gc-hmac-md5 (configure.ac): Likewise.
2381         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2382         * modules/gc-md2 (configure.ac): Likewise.
2383         * modules/gc-md4 (configure.ac): Likewise.
2384         * modules/gc-md5 (configure.ac): Likewise.
2385         * modules/gc-random (configure.ac): Likewise.
2386         * modules/gc-rijndael (configure.ac): Likewise.
2387         * modules/gc-sha1 (configure.ac): Likewise.
2388
2389 2007-01-08  Bruno Haible  <bruno@clisp.org>
2390
2391         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2392         macro definition.
2393         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2394         definition.
2395         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2396         definition.
2397         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2398         * modules/fcntl-safer (configure.ac): Likewise.
2399         * modules/fopen-safer (configure.ac): Likewise.
2400         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2401         GNULIB_FWRITEERROR macro definition.
2402
2403 2007-01-08  Bruno Haible  <bruno@clisp.org>
2404
2405         * m4/gnulib-common.m4: New file.
2406         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2407         (func_get_filelist): Add m4/gnulib-common.m4.
2408
2409 2007-01-08  Bruno Haible  <bruno@clisp.org>
2410
2411         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2412         command.
2413
2414 2007-01-08  Jim Meyering  <jim@meyering.net>
2415
2416         Use a more robust test for a "can't happen" condition.
2417         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2418         narrowed the st_size value.  Presuming the "can't happen" condition
2419         is true, that narrowing could conceivably convert an invalid st_size
2420         value into a valid one.  Instead, use a change based on Matthew
2421         Woehlke's original patch.
2422
2423         Slight readability improvement: use an assert-like macro
2424         in place of literal "abort ()" uses.
2425         * lib/fts.c (fts_assert): Define.
2426         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2427         Use this macro instead of a bare 'abort'.
2428
2429 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2430
2431         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2432         simply work around them.
2433         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2434         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2435         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2436         Don't bother to define as macros, since the standard doesn't require it.
2437         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2438         longer worry about IRIX 5.3.
2439         (HAVE_WCTYPE_CTMP_BUG): Remove.
2440
2441 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2442
2443         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2444         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2445         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2446         Problems reported by Georg Schwarz for IRIX 5.3.
2447
2448         * gnulib-tool (autoconf_minversion): Take the maximum version number
2449         found, not the minimum.  Problem reported by James Youngman.
2450
2451 2007-01-03  Karl Berry  <karl@gnu.org>
2452
2453         * doc/error.texi: new file, explaining interaction with progname.
2454         * doc/gnulib.texi: include it.  Update copyright.
2455
2456 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2457
2458         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2459         AC_CANONICAL_HOST, to improve autobuild outputs.
2460
2461 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2462             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2463
2464         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2465         sockets, server sockets, and other file descriptors.  Count errors
2466         to compute the return value.  Reorder the code a bit to be easier
2467         to follow.  Don't set event bits that were not requested (except
2468         POLLERR and POLLHUP).
2469
2470 2007-01-01  Bruno Haible  <bruno@clisp.org>
2471
2472         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2473
2474 2007-01-03  Jim Meyering  <jim@meyering.net>
2475
2476         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2477
2478 2007-01-02  Bruno Haible  <bruno@clisp.org>
2479
2480         * modules/settime (Include): Require timespec.h.
2481         * modules/nanosleep (Include): Likewise.
2482
2483 2007-01-01  Bruno Haible  <bruno@clisp.org>
2484
2485         * gnulib-tool (func_emit_copyright_notice): Bump year.
2486         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2487
2488 2007-01-01  Bruno Haible  <bruno@clisp.org>
2489
2490         Improve support for OpenBSD.
2491         * build-aux/config.rpath (libname_spec): Export.
2492         (library_names_spec): New variable. Export.
2493         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2494         library_names_spec from the config.rpath output. Locate shared library
2495         through the name pattern in library_names_spec.
2496
2497 2007-01-01  Eric Blake  <ebb9@byu.net>
2498
2499         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2500
2501 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2502
2503         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2504         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2505         assume the C locale, and avoid an "eval" that could cause trouble.
2506         Problem with SORT reported by Bob Proulx.
2507
2508         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2509         Define.  Trivial patch from Henning Nielsen Lund, originally
2510         sent to bug-grep@gnu.org today.
2511
2512 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2513
2514         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2515         struct stat.  Problem reported by Henning Nielsen Lund.
2516         * lib/acl.c: Include acl.h first, to check interface.  Don't
2517         bother to include sys/types.h and sys/stat.h again.
2518
2519 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2520
2521         Import the following change from libc; problem reported by
2522         Sven Verdoolaege.
2523
2524         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2525
2526         [BZ #1373]
2527         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2528
2529 2006-12-28  Jim Meyering  <jim@meyering.net>
2530
2531         * build-aux/announce-gen: Do not assume that the package
2532         builds any of tar.gz, tar.bz2, and .xdelta files.
2533         Suggestion from Simon Josefsson.
2534
2535 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2536
2537         * modules/announce-gen: New file.
2538
2539 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2540
2541         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2542         handles its gotchas now.
2543         * lib/mbswidth.c: Likewise.
2544         * lib/wcwidth.h: Likewise.
2545         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2546         and iswcntrl; the wctype module does this stuff now.
2547         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2548         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2549         * modules/mbchar (Depends-on): Add wctype.
2550         * modules/mbswidth (Depends-on): Likewise.
2551         * modules/wcwidth (Depends-on): Likewise.
2552
2553 2006-12-27  Eric Blake  <ebb9@byu.net>
2554
2555         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2556         module uses more than what <wctype.h> is required to provide.
2557
2558 2006-12-26  Eric Blake  <ebb9@byu.net>
2559
2560         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2561
2562 2006-12-26  Eric Blake  <ebb9@byu.net>
2563
2564         * modules/absolute-header: New module.
2565         * modules/fcntl (Depends-on): Depend on it.
2566         * modules/inttypes (Depends-on): Likewise.
2567         * modules/stdint (Depends-on): Likewise.
2568         * modules/sys_stat (Depends-on): Likewise.
2569         * modules/wctype (Depends-on): Likewise.
2570         * MODULES.html.sh (Support for building libraries and
2571         executables): Document it.
2572
2573 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2574
2575         * gnulib-tool (SED): Remove, undoing previous change.
2576         The problem was that it broke coreutils on Solaris, because
2577         "sed --posix" leaked into a makefile.
2578         (sed): New alias, if 'alias' and GNU sed.
2579
2580 2006-12-24  Jim Meyering  <jim@meyering.net>
2581
2582         Work around an fchownat bug in glibc-2.4:
2583         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2584         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2585         in spite of the -P option.
2586         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2587         New macros.
2588         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2589         * modules/openat (Files): Add lib/fchownat.c.
2590         * lib/openat.c (fchownat): Don't define here.  Move to...
2591         * lib/fchownat.c: ...this new file.
2592
2593 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2594
2595         Fix bug reported by Bruno Haible in
2596         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2597         where quotearg.c didn't compile on Mac OS X 10.2 because it
2598         lacks <wchar.h> and wint_t.
2599         * lib/wctype_.h (__wctype_wint_t): New type.
2600         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2601         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2602         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2603         Arg is now of type __wctype_wint_t, not wint_t.
2604         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2605         substitute HAVE_WINT_T.
2606         * modules/wctype (Files): Add m4/wint_t.m4.
2607         (wctype.h): Substitute HAVE_WINT_T.
2608
2609 2006-12-23  Bruno Haible  <bruno@clisp.org>
2610
2611         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2612
2613 2006-12-23  Bruno Haible  <bruno@clisp.org>
2614
2615         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2616         S_ISLNK.
2617         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2618         mingw.
2619
2620 2006-12-22  Bruno Haible  <bruno@clisp.org>
2621
2622         * lib/copy-file.c: Include acl.h.
2623         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2624         Close the file descriptors only after being done with copy_acl.
2625         * modules/copy-file (Depends-on): Add acl.
2626
2627 2006-12-22  Bruno Haible  <bruno@clisp.org>
2628
2629         * gnulib-tool (SED): New variable.
2630         Use $SED instead of sed everywhere.
2631
2632 2006-12-22  Bruno Haible  <bruno@clisp.org>
2633
2634         * modules/no-c++: New file.
2635         * m4/no-c++.m4: New file.
2636         * MODULES.html.sh (Support for building libraries and executables):
2637         Add no-c++.
2638
2639 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2640
2641         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2642         Include <limits.h>, and use its INT_MAX to rewrite the
2643         j loop so that it does not overflow 'int'.  Problem reported by
2644         Ralf Wildenhues in
2645         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2646         Play it safe by shifting left by 1 rather than multiplying by 2,
2647         as GCC is less likely to optimize this away when the value
2648         is signed (when it assumes overflow leads to undefined behavior).
2649         Also, don't assume time_t uses two's complement.
2650
2651 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2652
2653         * MODULES.html.sh: New module wctype.
2654         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2655         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2656         <wctype.h>, since the new wctype module should fix this.
2657         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2658         the wctype module should arrange for it.
2659         * lib/regex_internal.h: Likewise.
2660         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2661         since the wctype module should handle this now.
2662         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2663         * modules/fnmatch (Depends-on): Add wctype.
2664         * modules/quotearg (Depends-on): Likewise.
2665         * modules/regex (Depends-on): Likewise.
2666
2667 2006-12-19  Bruno Haible  <bruno@clisp.org>
2668
2669         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2670         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2671
2672 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2673
2674         * modules/savewd (Depends-on): Fix dependency on fcntl.
2675
2676 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2677
2678         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2679         conforms to C99, rather than relying on the user's environment
2680         setting of STDINT_H.
2681
2682 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2683         and Eric Blake  <ebb9@byu.net>
2684
2685         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2686         This is more consistent with the other defines here.
2687         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2688         Port to z/OS.  Problem reported by Paul Gilmartin.
2689         Change local vars to use gl_ prefix rather than ac_.
2690         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2691         with other defines.
2692         * modules/double-slash-root: New module.
2693         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2694         (Depends-on): Add double-slash-root.
2695         * MODULES.html.sh (File system functions): Mention new module.
2696
2697 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2698
2699         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2700         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2701         This is for the benefit of gzip, which doesn't do i18n.
2702
2703 2006-12-12  Jim Meyering  <jim@meyering.net>
2704
2705         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2706         Reported by Andreas Schwab <schwab@suse.de>.
2707
2708 2006-12-12  Bruno Haible  <bruno@clisp.org>
2709
2710         Merge these changes.
2711         2006-09-05  Bruno Haible  <bruno@clisp.org>
2712         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2713         iconv_alloc succeeded.
2714         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2715         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2716         test for " && dest " at the end - dest is always != NULL there. Call
2717         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2718         with 2xNULL arguments, also to flush the state storage. Handle the
2719         IRIX iconv behaviour. Realloc the final result, to throw away unused
2720         memory.
2721
2722 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2723
2724         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2725         and fchmodat unconditionally, since glibc 2.4 has them.
2726         Problem reported by Arkadiusz Miskiewicz.
2727
2728 2006-12-10  Bruno Haible  <bruno@clisp.org>
2729
2730         * gnulib-tool (func_import): Show the include files only for those
2731         modules that are copied and specified.
2732         Reported by Karl Berry.
2733
2734 2006-12-08  Jim Meyering  <jim@meyering.net>
2735
2736         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2737         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2738
2739         * build-aux/announce-gen: Add two new options, both optional:
2740         --bootstrap-tools=TOOL_LIST
2741               a comma-separated list of tools, e.g.,
2742               autoconf,automake,bison,gnulib
2743         --gnulib-snapshot-date=DATE
2744               if gnulib is in the bootstrap tool list,
2745               then report this as the snapshot date.
2746               If not specified, use the current date/time.
2747               If you specify a date here, be sure it's UTC.
2748
2749 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2750
2751         * tests/test-argp-2.sh: Fix test to match actual output.
2752         (func_compare): Fix sed script to be portable.
2753
2754 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2755
2756         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2757         workaround for this case.  It is not autoconfigured now; offhand
2758         it's hard to see how to autoconfigure it.
2759
2760 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2761
2762         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2763         a directory that is about to be chowned.  Such a directory's
2764         initial file permissions should permit the owner only and this
2765         should not be changed until after the chown, since the group and
2766         other bits would be incorrect if they granted permission before
2767         the chown.
2768
2769         Fix porting problem for iswctype reported by Georg Schwarz in:
2770         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2771         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2772         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2773         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2774         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2775
2776 2006-12-03  Jim Meyering  <jim@meyering.net>
2777
2778         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2779         p->fts_statp may not yet be defined.
2780         (fts_read): Instead, set it in the caller, once p->fts_statp is
2781         sure to be defined, and corresponds to a top-level directory.
2782         This bug made du -x fail.  Here's the coreutils test case:
2783         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2784         Reported by Mike Frysinger.
2785
2786 2006-12-01  Jim Meyering  <jim@meyering.net>
2787
2788         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2789         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2790         Reported by Simon Josefsson.
2791
2792 2006-11-30  Jim Meyering  <jim@meyering.net>
2793
2794         * m4/warning.m4: Use the all-permissive copyright notice
2795         recommended by RMS (rather than LGPL).
2796         * m4/vararrays.m4: Likewise.
2797         * m4/flexmember.m4: Likewise.
2798
2799 2006-11-29  Bruno Haible  <bruno@clisp.org>
2800
2801         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2802         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2803         using +=.
2804         Reported by Simon Josefsson <simon@josefsson.org>.
2805
2806 2006-11-28  James Youngman <jay@gnu.org>
2807
2808         * README: Advise users that they might find the bug-gnulib@gnu.org
2809         and autotools-announce@gnu.org mailing lists useful.
2810
2811 2006-11-28  Bruno Haible  <bruno@clisp.org>
2812
2813         * m4/ptrdiff_max.m4: Remove file.
2814
2815 2006-11-21  Bruno Haible  <bruno@clisp.org>
2816
2817         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2818         _AC_COMPUTE_INT.
2819         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2820         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2821         _AC_COMPUTE_INT.
2822         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2823         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2824         _AC_COMPUTE_INT.
2825         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2826
2827 2006-11-28  Jim Meyering  <jim@meyering.net>
2828
2829         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2830         warning from "gcc -Wshadow" about shadowing the builtin.
2831
2832 2006-11-27  Bruno Haible  <bruno@clisp.org>
2833
2834         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2835         _AC_COMPUTE_INT.
2836         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2837
2838 2006-11-27  Bruno Haible  <bruno@clisp.org>
2839             Paul Eggert  <eggert@cs.ucla.edu>
2840
2841         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2842
2843 2006-11-26  Bruno Haible  <bruno@clisp.org>
2844
2845         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2846         noinst_LTLIBRARIES.
2847
2848 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2849             Bruno Haible  <bruno@clisp.org>
2850
2851         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2852         if compiling with "gcc -ansi".
2853
2854 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2855
2856         Fix some incompatibilities with gcc -ansi -pedantic.
2857         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2858         if compiling pedantically with GCC, unless it's C99 or later.
2859         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2860         it mishandles gcc -ansi -pedantic as well.
2861         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2862         if gcc -pedantic.
2863         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2864         initializers for struct if -pedantic, unless it's C99 or later.
2865
2866 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2867
2868         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2869         Don't close an fd more than once. Identical atimes indicate
2870         success, not failure.
2871
2872 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2873
2874         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2875
2876 2006-11-23  Jim Meyering  <jim@meyering.net>
2877
2878         * build-aux/announce-gen: New file.  From coreutils.
2879
2880 2006-11-22  Jim Meyering  <jim@meyering.net>
2881
2882         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2883         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2884         (fts_read): Use a temporary to narrow the overused st_size member
2885         before using it in a switch statement.  Reported by Matthew Woehlke.
2886
2887         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2888         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2889
2890 2006-11-20  Bruno Haible  <bruno@clisp.org>
2891
2892         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2893         changequote instead of pairs of brackets.
2894         Reported by Andreas Schwab <schwab@suse.de>.
2895
2896 2006-11-21  Jim Meyering  <jim@meyering.net>
2897
2898         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2899         so as to remain compatible with older compilers.
2900         Patch from Michael Deutschmann.
2901
2902 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2903
2904         * MODULES.html.sh (File system functions): Add openat.
2905
2906         * lib/openat.h (rpl_fstatat): New macro, if
2907         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2908         (fstatat): Define to rpl_fstatat under the same conditions,
2909         unless COMPILING_FSTATAT.
2910         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2911         seems to have the bug.
2912         * lib/fstatat.c: New file.
2913         * modules/openat (Files): Add it.
2914
2915 2006-11-20  Bruno Haible  <bruno@clisp.org>
2916
2917         * Makefile: New file.
2918
2919 2006-11-20  Jim Meyering  <jim@meyering.net>
2920
2921         The beginnings of syntax-related checks for gnulib.
2922         * lib/Makefile: New file.
2923         * lib/t-idcache: New script.  Ensure that the two halves of
2924         idcache.c stay in sync.
2925
2926         * lib/idcache.c: Adjust comments in user- and group- portions to
2927         be more accurate, and to be consistent with one another.
2928
2929 2006-11-20  Jim Meyering  <jim@meyering.net>
2930
2931         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2932         continue using the flexible array member (thus, this module performs
2933         half as many malloc calls), with the addition that...
2934         (getgroup, getuser): Consistently record a non-match via an empty
2935         "name" string, and map an empty string match to a NULL return value.
2936         * modules/idcache (Depends-on): Re-add flexmember.
2937
2938         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2939         (getuidbyname, getgroup, getgidbyname): Likewise.
2940
2941         Use cleaner syntax: NULL rather than 0.
2942         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2943
2944 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2945
2946         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2947         It mishandled the case where the group was missing.
2948         Problem reported by Greg Schafer.
2949         * modules/idcache: Likewise.
2950
2951 2006-11-18  Jim Meyering  <jim@meyering.net>
2952
2953         * check-module (%exempt_header): Add exception for some
2954         conditionally-included headers.
2955
2956         * modules/i-ring (Depends-on): Add verify.
2957         (License): Change to LGPL.
2958
2959 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2960
2961         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2962         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2963         and inttostr.h.  Use snprintf rather than uinttostr, so that
2964         LGPLed code doesn't depend on GPLed.
2965
2966 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2967
2968         * modules/inline (License): Change from GPL to LGPL.
2969
2970 2006-11-17  Jim Meyering  <jim@meyering.net>
2971
2972         * modules/d-type (License): Switch to LGPL.
2973
2974 2006-11-15  Bruno Haible  <bruno@clisp.org>
2975
2976         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2977
2978 2006-11-15  Eric Blake  <ebb9@byu.net>
2979
2980         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2981         the module dependency.
2982
2983 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2984             Bruno Haible  <bruno@clisp.org>
2985
2986         * gnulib-tool (func_create_testdir): Add license consistency check.
2987
2988 2006-11-15  Eric Blake  <ebb9@byu.net>
2989
2990         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2991         random "(cached)" in configure output.
2992
2993 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2994
2995         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2996         test for conforming inttypes.h is both announced and cached.
2997
2998         * MODULES.html.sh (seen_modules, seen_files): New variables.
2999         (func_module): Rewrite to use a few less gnulib-tool and sed
3000         invocations.  Avoid a couple of quadratic algorithms for ...
3001         (missed_modules, missed_files): ... these, with ...
3002         (func_append, func_tmpdir): ... these new functions, from
3003         gnulib-tool.  Analogously, install traps for cleanup.
3004
3005         * tests/test-gc.c (main): Remove unused variables.
3006         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3007
3008 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3009
3010         * modules/inttostr (License): Change to LGPL.
3011
3012 2006-11-14  Eric Blake  <ebb9@byu.net>
3013
3014         * modules/tempname (License): Change to LGPL.
3015
3016 2006-11-14  Eric Blake  <ebb9@byu.net>
3017
3018         * doc/functions.texi (Function Portability): *printf functions on
3019         Cygwin now understand all POSIX size specifiers.
3020
3021 2006-11-14  Bruno Haible  <bruno@clisp.org>
3022
3023         * modules/c-ctype (License): Change to LGPL.
3024
3025 2006-11-12  Bruno Haible  <bruno@clisp.org>
3026
3027         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3028         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3029         for GNOME libraries, for which the include files are installed in
3030         subdirectories of $prefix/include.
3031
3032 2006-11-12  Bruno Haible  <bruno@clisp.org>
3033
3034         * m4/lib-link.m4: Require at least autoconf-2.54.
3035         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3036         name to underscores for the --with option.
3037
3038 2006-11-13  Bruno Haible  <bruno@clisp.org>
3039
3040         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3041         the tests directory.
3042         Reported by Ralf Wildenhues.
3043
3044 2006-11-13  Bruno Haible  <bruno@clisp.org>
3045
3046         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3047         (func_emit_initmacro_end): Undo the override here.
3048         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3049         Works around the famous automake error in coreutils.
3050
3051 2006-11-13  Eric Blake  <ebb9@byu.net>
3052
3053         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3054         element, not its node.
3055
3056 2006-11-12  Bruno Haible  <bruno@clisp.org>
3057
3058         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3059         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3060
3061 2006-11-12  Bruno Haible  <bruno@clisp.org>
3062
3063         * gnulib-tool: New option --local-symlink.
3064         (func_usage): Document it.
3065         (lsymbolic): New variable.
3066         (func_import, func_create_testdir): If --symlink was not specified,
3067         test whether --local-symlink was specified and the file comes from
3068         the local_gnulib_dir.
3069
3070 2006-11-12  Bruno Haible  <bruno@clisp.org>
3071
3072         * gnulib-tool (func_ln): New function.
3073         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3074
3075 2006-11-12  Bruno Haible  <bruno@clisp.org>
3076
3077         Finish support for source files in subdirectories.
3078         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3079         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3080         AUTOMAKE_OPTIONS.
3081         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3082
3083 2006-11-12  Bruno Haible  <bruno@clisp.org>
3084
3085         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3086         EXTRA_lib_SOURCES augmentation.
3087         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3088
3089 2006-11-12  Jim Meyering  <jim@meyering.net>
3090
3091         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3092         file descriptors.  This also averts a failure on systems with
3093         native openat support when a traversed directory lacks "x" access.
3094         * lib/fts_.h: Include "i-ring.h"
3095         (struct FTS) [fts_fd_ring]: New member.
3096         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3097         (FCHDIR): Add parentheses.
3098         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3099         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3100         When descending, rather than simply closing the previous
3101         fts_cwd_fd value, push that file descriptor onto the ring.
3102         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3103         (fts_open): Initialize the new fd_ring member.
3104         (fts_close): Clear the ring.
3105         (fts_safe_changedir): When possible, use our new fd_ring to skip
3106         the diropen and fstat and dev/ino comparison that would normally
3107         accompany a virtual `chdir ("..")'.
3108
3109         * modules/fts (Depends-on): Add i-ring.
3110         * modules/i-ring: New module.
3111         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3112         * m4/i-ring.m4: New file.
3113
3114 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3115
3116         * gnulib-tool (func_create_testdir): Fix replacement of
3117         `build-aux' in configure.ac.  Run autotools in gltests
3118         subdirectory.
3119         (func_create_testdir, func_create_megatestdir, test): There is
3120         no need for '--force' in most autotool invocations in a new
3121         tree.  Actually fail the whole test if any of the tools, or the
3122         configure or make stages fail.
3123
3124         Sync from Automake.
3125         * build-aux/gnupload: Revert last change.  Add pointer to upload
3126         instructions of the GNU Maintenance Instructions.
3127         Suggestion by Karl Berry.
3128
3129 2006-11-10  Jim Meyering  <jim@meyering.net>
3130
3131         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3132
3133 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3134
3135         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3136         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3137         (bind_textdomain_codeset) [! ENABLE_NLS]:
3138         Evaluate all the arguments.  That way, callers get compatible behavior
3139         if the arguments have side effects.  Also, it avoids some GCC
3140         diagnostics in some cases; Joel E. Denny reported problems when Bison
3141         was configured with --enable-gcc-warnigs.
3142
3143 2006-11-10  Jim Meyering  <jim@meyering.net>
3144
3145         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3146         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3147         account.
3148
3149 2006-11-10  Jim Meyering  <jim@meyering.net>
3150
3151         * modules/inline: New file/module.
3152         * modules/xalloc (Files): Remove m4/inline.m4.
3153         (Depends-on): Add inline, instead.
3154         * modules/oset: Likewise.
3155         * modules/list: Likewise.
3156
3157 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3158
3159         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3160         Problem reported by Matthew Woehlke.
3161
3162 2006-11-09  Bruno Haible  <bruno@clisp.org>
3163
3164         * lib/tempname.c (gen_tempname): Remove variant that invokes
3165         __gen_tempname.
3166         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3167         __gen_tempname.
3168
3169 2006-11-08  Bruno Haible  <bruno@clisp.org>
3170
3171         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3172         to 'yes' instead of 'cross-compiling'.
3173
3174 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3175
3176         * lib/quotearg.h (quotearg_free): New decl.
3177         * lib/quotearg.c (quotearg_free): New function.
3178         (slot0, nslots, slotvec0, slotvec):
3179         Now file-scope so that quotearg_free can get at them.
3180
3181 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3182
3183         Sync from Automake.
3184         * build-aux/gnupload: Add missing 'gnu' to example URL.
3185         Report by Karl Berry.
3186
3187 2006-11-08  Bruno Haible  <bruno@clisp.org>
3188
3189         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3190         Suggested by Paul Eggert.
3191
3192 2006-11-08  Jim Meyering  <jim@meyering.net>
3193
3194         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3195         It's already included if !_LIBC.
3196         (fts_safe_changedir): Add a comment.
3197
3198 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3199
3200         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3201         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3202         Matthew Woehlke.
3203
3204         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3205         definitions up, to avoid colliding with change below.
3206         (static_inline) [HAVE_INLINE]: New macro.
3207         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3208         Provide extern decls when !HAVE_INLINE.  Do not define unless
3209         static_inline is defined, either by us or by xmalloc.c.  Use
3210         static_inline rather than static inline.
3211         (XCALLOC): Optimize sizeof(T) = 1 case.
3212         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3213
3214 2006-11-07  Bruno Haible  <bruno@clisp.org>
3215
3216         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3217         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3218         AC_C_INLINE.
3219         * modules/xalloc (Files): Add m4/inline.m4.
3220
3221 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3222
3223         * README: Fix typo.
3224         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3225         (Miscellanous Notes): ...from this.
3226
3227 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3228
3229         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3230         Mention that offsetof should be used instead of sizeof.
3231         From Bruno Haible.
3232
3233 2006-11-07  Bruno Haible  <bruno@clisp.org>
3234
3235         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3236
3237 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3238
3239         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3240         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3241         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3242         (gl_tree_add_before, gl_tree_add_after):
3243         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3244         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3245         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3246         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3247         (gl_linked_add_after, gl_linked_add_at): Likewise.
3248         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3249         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3250         (gl_tree_add_before, gl_tree_add_after): Likewise.
3251         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3252         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3253         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3254
3255 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3256
3257         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3258
3259 2006-11-06  Bruno Haible  <bruno@clisp.org>
3260
3261         * m4/inline.m4: New file.
3262         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3263         * modules/list (Files): Add m4/inline.m4.
3264         * modules/oset (Files): Likewise.
3265
3266 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3267
3268         * lib/idcache.c: Include <stddef.h>, for offsetof.
3269         (struct userid.name): Change from char * to a flexible array member.
3270         All uses changed.
3271         * modules/idcache (Depends-on): Add flexmember.
3272
3273         * MODULES.html.sh (Core language properties): New module flexmember.
3274         * modules/flexmember, m4/flexmember.m4: New files.
3275
3276         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3277         inline functions that are identical with the old xnmalloc_inline,
3278         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3279         that we can avoid some unnecessary integer multiplications and
3280         divisions in the common case where the element size is known at
3281         compile time.
3282         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3283         needed.
3284         (xnboundedmalloc): Remove.
3285         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3286         arguments, for consistency with rest of this header.
3287         (xcharalloc): Rewrite using XNMALLOC.
3288         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3289         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3290         versions have been moved to lib/xalloc.h and renamed to be the
3291         non-*_inline versions.
3292         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3293         and xnrealloc functions, since those functions are now inline and
3294         now call us.
3295         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3296         renaming described above.
3297         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3298         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3299         captures the dependency in AC_C_INLINE.
3300
3301         New module canonicalize-lgpl, proposed by Charles Wilson in
3302         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3303         with a few small changes afterwards.
3304         * MODULES.html.sh (File system functions): New module
3305         canonicalize-lgpl.
3306         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3307         and canonicalize_file_name.
3308         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3309         * modules/canonicalize-lgpl: New files.
3310
3311 2006-11-05  Bruno Haible  <bruno@clisp.org>
3312
3313         * gnulib-tool (func_import, func_create_testdir): Create directories
3314         also for files in subdirectories of lib/.
3315
3316 2006-11-05  Bruno Haible  <bruno@clisp.org>
3317
3318         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3319         ANSI C compliant.
3320
3321 2006-11-03  Bruno Haible  <bruno@clisp.org>
3322
3323         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3324         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3325         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3326         (xnboundedmalloc): New inline function.
3327         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3328         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3329         xmalloc.
3330         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3331         xmalloc.
3332         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3333         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3334         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3335         xmalloc.
3336         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3337         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3338         xmalloc.
3339         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3340         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3341         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3342         xmalloc.
3343         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3344         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3345         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3346         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3347         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3348         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3349         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3350
3351 2006-11-03  Bruno Haible  <bruno@clisp.org>
3352
3353         * lib/c-ctype.h [C++]: Define functions without name mangling.
3354         * lib/fwriteerror.h [C++]: Likewise.
3355         * lib/gcd.h [C++]: Likewise.
3356         * lib/linebreak.h [C++]: Likewise.
3357
3358 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3359
3360         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3361         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3362         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3363         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3364         Check for functions and headers just once.
3365         Check for declaration of canonicalize_file_name.
3366         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3367
3368 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3369
3370         * gnulib-tool (func_import): Fix typo in actioncmd.
3371
3372 2006-11-02  Bruno Haible  <bruno@clisp.org>
3373
3374         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3375         newline sequence in the Makefile.am snippet as a space, like "make"
3376         does.
3377         Reported by Roger Persson <perrog@gmail.com>.
3378
3379 2006-11-01  Bruno Haible  <bruno@clisp.org>
3380
3381         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3382         already declared in <string.h>.
3383         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3384
3385 2006-11-01  Bruno Haible  <bruno@clisp.org>
3386
3387         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3388         * lib/strcase.h: Include <string.h>.
3389         (strcasecmp): Define to rpl_strcasecmp here.
3390
3391 2006-11-01  Bruno Haible  <bruno@clisp.org>
3392
3393         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3394
3395 2006-11-01  Eric Blake  <ebb9@byu.net>
3396
3397         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3398
3399         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3400
3401 2006-10-29  Bruno Haible  <bruno@clisp.org>
3402
3403         Make it compile in C++ mode.
3404         * lib/full-write.c (full_rw): Add a cast.
3405
3406 2006-11-01  Bruno Haible  <bruno@clisp.org>
3407
3408         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3409         be POSIX compliant.
3410         Reported by Roger Persson <perrog@gmail.com>.
3411
3412 2006-11-01  Eric Blake  <ebb9@byu.net>
3413
3414         * lib/getopt_.h: Fix comments.
3415
3416 2006-10-31  Eric Blake  <ebb9@byu.net>
3417
3418         * modules/tmpdir (Depends-on): Add sys_stat.
3419         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3420         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3421         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3422         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3423         tempname.
3424
3425 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3426
3427         Avoid some C++ diagnostics reported by Bruno Haible.
3428         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3429         xmalloc.
3430         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3431         (struct slotvec): Move to top level.
3432         (quotearg_n_options): Rewrite to avoid xmalloc.
3433         * lib/xalloc.h (xcharalloc): New function.
3434         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3435         [defined __cplusplus]: Add function template that provides result
3436         type propagation.  This part of the change is from Bruno Haible.
3437
3438 2006-10-29  Bruno Haible  <bruno@clisp.org>
3439
3440         Make it compile in C++ mode.
3441         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3442         * lib/strnlen1.c (strnlen1): Cast memchr result.
3443         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3444         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3445         (create_temp_dir): Rename local variable 'template'.
3446         (compile_csharp_using_sscli): Add cast.
3447         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3448         * lib/findprog.c (find_in_path): Likewise.
3449         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3450         * lib/wait-process.c (register_slave_subprocess): Likewise.
3451
3452 2006-10-22  Bruno Haible  <bruno@clisp.org>
3453
3454         * modules/tsearch: New file.
3455         * lib/tsearch.h: New file.
3456         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3457         * m4/tsearch.m4: New file.
3458         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3459
3460 2006-10-29  Eric Blake  <ebb9@byu.net>
3461
3462         * lib/arcfour.c: Assume config.h.
3463         * lib/arctwo.c: Likewise.
3464         * lib/base64.c: Likewise.
3465         * lib/check-version.c: Likewise.
3466         * lib/crc.c: Likewise.
3467         * lib/des.c: Likewise.
3468         * lib/gc-gnulib.c: Likewise.
3469         * lib/gc-libgcrypt.c: Likewise.
3470         * lib/gc-pbkdf2-sha1.c: Likewise.
3471         * lib/getaddrinfo.c: Likewise.
3472         * lib/getdelim.c: Likewise.
3473         * lib/getline.c: Likewise.
3474         * lib/hmac-md5.c: Likewise.
3475         * lib/hmac-sha1.c: Likewise.
3476         * lib/iconvme.c: Likewise.
3477         * lib/md2.c: Likewise.
3478         * lib/md4.c: Likewise.
3479         * lib/memxor.c: Likewise.
3480         * lib/read-file.c: Likewise.
3481         * lib/readline.c: Likewise.
3482         * lib/rijndael-alg-fst.c: Likewise.
3483         * lib/rijndael-api-fst.c: Likewise.
3484         * lib/xgetdomainname.c: Likewise.
3485
3486 2006-10-28  Eric Blake  <ebb9@byu.net>
3487
3488         * lib/xstrndup.c: Assume config.h.
3489
3490 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3491
3492         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3493         stat-macros.h is now for our own macros, whereas stat_h is for
3494         macros in the <sys/stat.h> name space.
3495         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3496         (STAT_MACROS_H): Remove.
3497         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3498         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3499         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3500         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3501         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3502         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3503         Move these macros to ...
3504         * lib/stat_.h: here.  Don't include stat-macros.h.
3505         * lib/canonicalize.c: Don't include stat-macros.h.
3506         * lib/chown.c: Likewise.
3507         * lib/euidaccess.c: Likewise.
3508         * lib/file-type.c: Likewise.
3509         * lib/filemode.c: Likewise.
3510         * lib/glob.c: Likewise.
3511         * lib/isapipe.c: Likewise.
3512         * lib/lchown.c: Likewise.
3513         * lib/lstat.c: Likewise.
3514         * lib/mkdir-p.c: Likewise.
3515         * lib/rmdir.c: Likewise.
3516         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3517         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3518         unless mkdir isn't declared, to speed up 'configure'.
3519         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3520         would define all the S_* symbols.
3521         * modules/canonicalize (Depends-on):
3522         Depend on sys_stat, not stat-macros.
3523         * modules/chown: Likewise.
3524         * modules/euidaccess: Likewise.
3525         * modules/filemode: Likewise.
3526         * modules/file-type: Likewise.
3527         * modules/glob: Likewise.
3528         * modules/isapipe: Likewise.
3529         * modules/lchown: Likewise.
3530         * modules/lstat: Likewise.
3531         * modules/mkancesdirs: Likewise.
3532         * modules/rmdir: Likewise.
3533         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3534         * modules/modechange: Likewise.
3535         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3536         (configure.ac): Remove gl_STAT_MACROS.
3537         * modules/sys_stat (Depends-on): Remove stat-macros.
3538
3539 2006-10-27  Bruno Haible  <bruno@clisp.org>
3540
3541         * m4/signed.m4: Remove file.
3542         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3543         invocation.
3544         * modules/vasnprintf (Files): Remove m4/signed.m4.
3545
3546 2006-10-27  Bruno Haible  <bruno@clisp.org>
3547
3548         Update to GNU gettext 0.16.
3549         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3550         m4/inttypes-h.m4, m4/signed.m4.
3551         * m4/gettext.m4: Update to GNU gettext 0.16.
3552         * m4/intl.m4: New file, from GNU gettext.
3553         * m4/intldir.m4: New file, from GNU gettext.
3554         * config/srclist.txt: Update
3555
3556 2006-10-27  Eric Blake  <ebb9@byu.net>
3557
3558         * MODULES.html.sh: Document tempname.
3559         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3560         dependencies.
3561         (Files): Move lib/tempname.c...
3562         * modules/tempname: ...to this new module.
3563         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3564         (gl_PREREQ_TEMPNAME): Move...
3565         * m4/tempname.m4: ...to this new file.
3566         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3567         * modules/sys_stat (Depends-on): Add stat-macros.
3568         * lib/stat_.h (includes): Pick up stat macros.
3569         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3570         if stat macros are broken.
3571         * lib/tempname.c (includes): No need to include "stat-macros.h".
3572         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3573         (direxists, __path_search) [!_LIBC]: Don't compile these in
3574         gnulib; the tmpdir module covers that.
3575         * lib/tempname.h: New file.
3576
3577 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3578
3579         * COPYING: Explain how gnulib-tool converts licence headers.
3580         Almost all wording by Eric Blake.
3581
3582 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3583
3584         * lib/mbchar.h (is_basic_table): Make read-only.
3585         * lib/mbchar.c (is_basic_table): Likewise.
3586         Reported by John Darrington.
3587
3588 2006-10-25  Bruno Haible  <bruno@clisp.org>
3589
3590         * lib/progname.h (set_program_name): Undefine before defining.
3591
3592 2006-10-25  Bruno Haible  <bruno@clisp.org>
3593
3594         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3595         false for non-gcc C++ compilers.
3596         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3597
3598 2006-10-24  Bruno Haible  <bruno@clisp.org>
3599
3600         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3601         iconv implementations like Irix iconv.
3602
3603 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3604
3605         * modules/vararrays: New file.
3606         * m4/vararrays.m4: New file, taken from diffutils.
3607         * MODULES.html.sh: New module vararrays.
3608
3609 2006-10-24  Karl Berry  <karl@gnu.org>
3610
3611         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3612         Don't call GNU Unix.
3613
3614 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3615
3616         * users.txt: Add Libtool.
3617
3618         Sync from Libtool:
3619
3620         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3621
3622         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3623         to gnulib's policy of including config.h unconditionally.
3624
3625 2006-10-24  Bruno Haible  <bruno@clisp.org>
3626
3627         * modules/wcwidth (Files): Add m4/wint_t.m4.
3628         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3629         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3630
3631 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3632
3633         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3634         to pacify GCC with some -W flags enabled.  Problem reported by
3635         Bruno Haible.
3636
3637 2006-10-24  Jim Meyering  <jim@meyering.net>
3638
3639         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3640         Reported by Karl Berry.
3641
3642 2006-10-23  Bruno Haible  <bruno@clisp.org>
3643
3644         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3645
3646 2006-10-24  Bruno Haible  <bruno@clisp.org>
3647
3648         * lib/gl_list.h: Use C comment style, not C++ comment style.
3649
3650 2006-10-23  Eric Blake  <ebb9@byu.net>
3651
3652         * lib/getaddrinfo.c (includes): Add missing include.
3653
3654 2006-10-23  Bruno Haible  <bruno@clisp.org>
3655             Paul Eggert  <eggert@cs.ucla.edu>
3656
3657         Ability to rename obstack_free.
3658         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3659         obstack_free.
3660         (obstack_free): Invoke the __obstack_free macro.
3661         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3662
3663 2006-10-23  Bruno Haible  <bruno@clisp.org>
3664             Paul Eggert  <eggert@cs.ucla.edu>
3665
3666         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3667         __argc, __argv from the declaration. (They are defined as macros on
3668         mingw.)
3669
3670 2006-10-22  Bruno Haible  <bruno@clisp.org>
3671
3672         * doc/gnulib-intro.texi: New file.
3673         * doc/gnulib.texi: Include it.
3674
3675 2006-10-21  Bruno Haible  <bruno@clisp.org>
3676
3677         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3678         "Introduction", "Miscellanous Notes", "Particular Modules".
3679
3680 2006-10-21  Bruno Haible  <bruno@clisp.org>
3681
3682         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3683         Change mostlyclean-local rule to avoid sh syntax error from bash
3684         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3685
3686 2006-10-23  Jim Meyering  <jim@meyering.net>
3687
3688         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3689         in place of snprintf.
3690
3691         * modules/inttostr (Files): Add lib/uinttostr.c.
3692         * lib/uinttostr.c (inttostr): New file/function.
3693         * lib/inttostr.h (uinttostr): Declare.
3694         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3695         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3696         Add uinttostr.
3697         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3698
3699 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3700
3701         * lib/canonicalize.c (ELOOP): Define if not already defined.
3702         Problem reported by Bruno Haible in
3703         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3704
3705 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3706
3707         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3708         Problem reported by Perry Smith and Ville Laurikari.
3709
3710         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3711         uses.
3712
3713 2006-10-19  Bruno Haible  <bruno@clisp.org>
3714
3715         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3716         for mingw.
3717
3718 2006-10-19  Bruno Haible  <bruno@clisp.org>
3719
3720         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3721         Needed for mingw.
3722
3723 2006-10-19  Bruno Haible  <bruno@clisp.org>
3724
3725         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3726
3727 2006-10-19  Bruno Haible  <bruno@clisp.org>
3728
3729         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3730         it.
3731
3732 2006-10-19  Bruno Haible  <bruno@clisp.org>
3733
3734         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3735         invocation.
3736
3737 2006-10-19  Bruno Haible  <bruno@clisp.org>
3738
3739         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3740         mountlist by default.
3741
3742 2006-10-16  Bruno Haible  <bruno@clisp.org>
3743
3744         * lib/c-strstr.c: Include c-strstr.h.
3745
3746 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3747
3748         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3749         in a slash.
3750
3751 2006-10-18  Bruno Haible  <bruno@clisp.org>
3752
3753         * lib/lock.h [C++]: Wrap definitions in extern "C".
3754
3755 2006-10-18  Bruno Haible  <bruno@clisp.org>
3756
3757         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3758         gl_LIBOBJS list.
3759
3760 2006-10-18  Bruno Haible  <bruno@clisp.org>
3761
3762         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3763
3764 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3765
3766         * lib/xstrtol.h: Include gettext.h.
3767         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3768         Problem reported by Eric Blake.
3769         * modules/xstrtol (Depends-on): Add gettext-h.
3770
3771 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3772
3773         * lib/strftime.c (advance): New macro.
3774         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3775         incomplete type, so you can't add 0 to it.  Problem and patch
3776         reported by Eelco Dolstra for dietlibc.
3777
3778 2006-10-18  Jim Meyering  <jim@meyering.net>
3779
3780         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3781         type for a local, and rename it: s/up/user_proc/.
3782
3783 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3784
3785         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3786         READ_UTMP_USER_PROCESS.
3787         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3788
3789 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3790
3791         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3792         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3793
3794 2006-10-17  Eric Blake  <ebb9@byu.net>
3795
3796         * lib/sigprocmask.c (sigprocmask): Fix typo.
3797
3798         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3799
3800         * modules/clean-temp (Makefile.am): Don't add to make output...
3801         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3802         config.h.
3803
3804 2006-10-17  Bruno Haible  <bruno@clisp.org>
3805
3806         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3807         differently if DEFAULT_TEXT_DOMAIN is set.
3808
3809 2006-10-16  Bruno Haible  <bruno@clisp.org>
3810
3811         * lib/clean-temp.c: Include fwriteerror.h.
3812
3813 2006-10-16  Bruno Haible  <bruno@clisp.org>
3814
3815         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3816
3817 2006-10-16  Bruno Haible  <bruno@clisp.org>
3818
3819         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3820         * lib/sigprocmask.h: Include <sys/types.h>.
3821         (sigset_t): Use the system's definition if present.
3822
3823 2006-10-17  Eric Blake  <ebb9@byu.net>
3824
3825         * lib/xvasprintf.c (includes): Assume config.h.
3826         * lib/xasprintf.c (includes): Likewise.
3827
3828 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3829
3830         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3831         at least as wide as intmax_t.
3832
3833 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3834
3835         (Imported from Automake.)
3836         * build-aux/gnupload: Update to version 1.1 of directive file.
3837
3838 2006-10-16  Eric Blake  <ebb9@byu.net>
3839
3840         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3841         match Automake 1.10a.
3842
3843 2006-10-14  Bruno Haible  <bruno@clisp.org>
3844
3845         * modules/sigprocmask: New file.
3846         * lib/sigprocmask.h: New file.
3847         * lib/sigprocmask.c: New file.
3848         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3849         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3850         request sigprocmask.o.
3851         (gl_PREREQ_SIGPROCMASK): New macro.
3852         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3853         (Depends-on): Add sigprocmask.
3854         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3855         gt_SIGNALBLOCKING. Test for 'raise' only once.
3856         * lib/fatal-signal.c: Include sigprocmask.h.
3857         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3858         unblock_fatal_signals): Define always.
3859         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3860         sigprocmask.
3861
3862 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3863
3864         Sync from Automake.
3865         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3866         which incorrectly sets the mode of an existing destination
3867         directory.  In some cases the unpatched install-sh could do the
3868         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3869         system.  We hope this is rare in practice, but it's clearly worth
3870         fixing.  Problem reported by Alex Unleashed in
3871         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3872         Also, don't bother to check for -m bugs unless we're using -m;
3873         suggested by Stepan Kasal.
3874
3875 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3876
3877         Sync from Automake.
3878         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3879         `-c' flag, so they appear at the same position as in %FASTDEP%
3880         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3881         which ignores unknown options only after the first non-option.
3882         Bug report against M4 by Nelson H. F. Beebe.
3883
3884 2006-10-13  Jim Meyering  <jim@meyering.net>
3885
3886         Fix a bug in yesterday's change.
3887         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3888         p->fts_statp->st_dev would be used uninitialized.
3889         Ensures that we always call fts_stat on the very first entry.
3890         Miklos Szeredi reported that find -xdev stopped working.
3891
3892 2006-10-12  Bruno Haible  <bruno@clisp.org>
3893
3894         * gnulib-tool (func_get_automake_snippet): Append an automatically
3895         computed EXTRA_DIST augmentation.
3896         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3897         * modules/alloca-opt (Makefile.am): Likewise.
3898         * modules/allocsa (Makefile.am): Likewise.
3899         * modules/arcfour (Makefile.am): Likewise.
3900         * modules/arctwo (Makefile.am): Likewise.
3901         * modules/argmatch (Makefile.am): Likewise.
3902         * modules/argz (Makefile.am): Likewise.
3903         * modules/atexit (Makefile.am): Likewise.
3904         * modules/backupfile (Makefile.am): Likewise.
3905         * modules/byteswap (Makefile.am): Likewise.
3906         * modules/c-strtod (Makefile.am): Likewise.
3907         * modules/c-strtold (Makefile.am): Likewise.
3908         * modules/calloc (Makefile.am): Likewise.
3909         * modules/canon-host (Makefile.am): Likewise.
3910         * modules/canonicalize (Makefile.am): Likewise.
3911         * modules/chdir-long (Makefile.am): Likewise.
3912         * modules/chdir-safer (Makefile.am): Likewise.
3913         * modules/check-version (Makefile.am): Likewise.
3914         * modules/chown (Makefile.am): Likewise.
3915         * modules/cloexec (Makefile.am): Likewise.
3916         * modules/close-stream (Makefile.am): Likewise.
3917         * modules/closeout (Makefile.am): Likewise.
3918         * modules/crc (Makefile.am): Likewise.
3919         * modules/csharpexec (Makefile.am): Likewise.
3920         * modules/cycle-check (Makefile.am): Likewise.
3921         * modules/des (Makefile.am): Likewise.
3922         * modules/dev-ino (Makefile.am): Likewise.
3923         * modules/dirfd (Makefile.am): Likewise.
3924         * modules/dirname (Makefile.am): Likewise.
3925         * modules/dup2 (Makefile.am): Likewise.
3926         * modules/eealloc (Makefile.am): Likewise.
3927         * modules/error (Makefile.am): Likewise.
3928         * modules/euidaccess (Makefile.am): Likewise.
3929         * modules/exclude (Makefile.am): Likewise.
3930         * modules/exitfail (Makefile.am): Likewise.
3931         * modules/fcntl-safer (Makefile.am): Likewise.
3932         * modules/fcntl (Makefile.am): Likewise.
3933         * modules/file-type (Makefile.am): Likewise.
3934         * modules/fileblocks (Makefile.am): Likewise.
3935         * modules/filemode (Makefile.am): Likewise.
3936         * modules/filenamecat (Makefile.am): Likewise.
3937         * modules/fnmatch (Makefile.am): Likewise.
3938         * modules/fopen-safer (Makefile.am): Likewise.
3939         * modules/fpending (Makefile.am): Likewise.
3940         * modules/fprintftime (Makefile.am): Likewise.
3941         * modules/free (Makefile.am): Likewise.
3942         * modules/fsusage (Makefile.am): Likewise.
3943         * modules/ftruncate (Makefile.am): Likewise.
3944         * modules/fts (Makefile.am): Likewise.
3945         * modules/gc-arcfour (Makefile.am): Likewise.
3946         * modules/gc-des (Makefile.am): Likewise.
3947         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3948         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3949         * modules/gc-md4 (Makefile.am): Likewise.
3950         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3951         * modules/gc-sha1 (Makefile.am): Likewise.
3952         * modules/gc (Makefile.am): Likewise.
3953         * modules/getaddrinfo (Makefile.am): Likewise.
3954         * modules/getcwd (Makefile.am): Likewise.
3955         * modules/getdelim (Makefile.am): Likewise.
3956         * modules/getdomainname (Makefile.am): Likewise.
3957         * modules/getgroups (Makefile.am): Likewise.
3958         * modules/gethostname (Makefile.am): Likewise.
3959         * modules/gethrxtime (Makefile.am): Likewise.
3960         * modules/getline (Makefile.am): Likewise.
3961         * modules/getloadavg (Makefile.am): Likewise.
3962         * modules/getlogin_r (Makefile.am): Likewise.
3963         * modules/getndelim2 (Makefile.am): Likewise.
3964         * modules/getopt (Makefile.am): Likewise.
3965         * modules/getpagesize (Makefile.am): Likewise.
3966         * modules/getpass-gnu (Makefile.am): Likewise.
3967         * modules/getpass (Makefile.am): Likewise.
3968         * modules/getsubopt (Makefile.am): Likewise.
3969         * modules/gettime (Makefile.am): Likewise.
3970         * modules/gettimeofday (Makefile.am): Likewise.
3971         * modules/getugroups (Makefile.am): Likewise.
3972         * modules/getusershell (Makefile.am): Likewise.
3973         * modules/glob (Makefile.am): Likewise.
3974         * modules/group-member (Makefile.am): Likewise.
3975         * modules/hard-locale (Makefile.am): Likewise.
3976         * modules/hash (Makefile.am): Likewise.
3977         * modules/hmac-md5 (Makefile.am): Likewise.
3978         * modules/hmac-sha1 (Makefile.am): Likewise.
3979         * modules/human (Makefile.am): Likewise.
3980         * modules/idcache (Makefile.am): Likewise.
3981         * modules/imaxabs (Makefile.am): Likewise.
3982         * modules/imaxdiv (Makefile.am): Likewise.
3983         * modules/inet_ntop (Makefile.am): Likewise.
3984         * modules/inet_pton (Makefile.am): Likewise.
3985         * modules/intprops (Makefile.am): Likewise.
3986         * modules/inttostr (Makefile.am): Likewise.
3987         * modules/inttypes (Makefile.am): Likewise.
3988         * modules/isapipe (Makefile.am): Likewise.
3989         * modules/javaversion (Makefile.am): Likewise.
3990         * modules/lchmod (Makefile.am): Likewise.
3991         * modules/lchown (Makefile.am): Likewise.
3992         * modules/localcharset (Makefile.am): Likewise.
3993         * modules/long-options (Makefile.am): Likewise.
3994         * modules/lstat (Makefile.am): Likewise.
3995         * modules/malloc (Makefile.am): Likewise.
3996         * modules/mathl (Makefile.am): Likewise.
3997         * modules/mbchar (Makefile.am): Likewise.
3998         * modules/md2 (Makefile.am): Likewise.
3999         * modules/md4 (Makefile.am): Likewise.
4000         * modules/md5 (Makefile.am): Likewise.
4001         * modules/memcasecmp (Makefile.am): Likewise.
4002         * modules/memchr (Makefile.am): Likewise.
4003         * modules/memcmp (Makefile.am): Likewise.
4004         * modules/memcoll (Makefile.am): Likewise.
4005         * modules/memcpy (Makefile.am): Likewise.
4006         * modules/memmem (Makefile.am): Likewise.
4007         * modules/memmove (Makefile.am): Likewise.
4008         * modules/mempcpy (Makefile.am): Likewise.
4009         * modules/memrchr (Makefile.am): Likewise.
4010         * modules/memset (Makefile.am): Likewise.
4011         * modules/memxor (Makefile.am): Likewise.
4012         * modules/mkancesdirs (Makefile.am): Likewise.
4013         * modules/mkdir-p (Makefile.am): Likewise.
4014         * modules/mkdir (Makefile.am): Likewise.
4015         * modules/mkdtemp (Makefile.am): Likewise.
4016         * modules/mkstemp (Makefile.am): Likewise.
4017         * modules/mktime (Makefile.am): Likewise.
4018         * modules/modechange (Makefile.am): Likewise.
4019         * modules/mountlist (Makefile.am): Likewise.
4020         * modules/nanosleep (Makefile.am): Likewise.
4021         * modules/obstack (Makefile.am): Likewise.
4022         * modules/openat (Makefile.am): Likewise.
4023         * modules/pagealign_alloc (Makefile.am): Likewise.
4024         * modules/pathmax (Makefile.am): Likewise.
4025         * modules/physmem (Makefile.am): Likewise.
4026         * modules/poll (Makefile.am): Likewise.
4027         * modules/posixtm (Makefile.am): Likewise.
4028         * modules/posixver (Makefile.am): Likewise.
4029         * modules/putenv (Makefile.am): Likewise.
4030         * modules/quote (Makefile.am): Likewise.
4031         * modules/quotearg (Makefile.am): Likewise.
4032         * modules/raise (Makefile.am): Likewise.
4033         * modules/read-file (Makefile.am): Likewise.
4034         * modules/readline (Makefile.am): Likewise.
4035         * modules/readlink (Makefile.am): Likewise.
4036         * modules/readtokens (Makefile.am): Likewise.
4037         * modules/readutmp (Makefile.am): Likewise.
4038         * modules/realloc (Makefile.am): Likewise.
4039         * modules/regex (Makefile.am): Likewise.
4040         * modules/rename-dest-slash (Makefile.am): Likewise.
4041         * modules/rename (Makefile.am): Likewise.
4042         * modules/rijndael (Makefile.am): Likewise.
4043         * modules/rmdir (Makefile.am): Likewise.
4044         * modules/rpmatch (Makefile.am): Likewise.
4045         * modules/safe-read (Makefile.am): Likewise.
4046         * modules/safe-write (Makefile.am): Likewise.
4047         * modules/same-inode (Makefile.am): Likewise.
4048         * modules/same (Makefile.am): Likewise.
4049         * modules/save-cwd (Makefile.am): Likewise.
4050         * modules/savedir (Makefile.am): Likewise.
4051         * modules/setenv (Makefile.am): Likewise.
4052         * modules/settime (Makefile.am): Likewise.
4053         * modules/sha1 (Makefile.am): Likewise.
4054         * modules/sig2str (Makefile.am): Likewise.
4055         * modules/snprintf (Makefile.am): Likewise.
4056         * modules/stat-macros (Makefile.am): Likewise.
4057         * modules/stat-time (Makefile.am): Likewise.
4058         * modules/stdbool (Makefile.am): Likewise.
4059         * modules/stdint (Makefile.am): Likewise.
4060         * modules/stdlib-safer (Makefile.am): Likewise.
4061         * modules/stpcpy (Makefile.am): Likewise.
4062         * modules/stpncpy (Makefile.am): Likewise.
4063         * modules/strcase (Makefile.am): Likewise.
4064         * modules/strcasestr (Makefile.am): Likewise.
4065         * modules/strchrnul (Makefile.am): Likewise.
4066         * modules/strcspn (Makefile.am): Likewise.
4067         * modules/strdup (Makefile.am): Likewise.
4068         * modules/strerror (Makefile.am): Likewise.
4069         * modules/strftime (Makefile.am): Likewise.
4070         * modules/strndup (Makefile.am): Likewise.
4071         * modules/strnlen (Makefile.am): Likewise.
4072         * modules/strpbrk (Makefile.am): Likewise.
4073         * modules/strsep (Makefile.am): Likewise.
4074         * modules/strstr (Makefile.am): Likewise.
4075         * modules/strtod (Makefile.am): Likewise.
4076         * modules/strtoimax (Makefile.am): Likewise.
4077         * modules/strtok_r (Makefile.am): Likewise.
4078         * modules/strtol (Makefile.am): Likewise.
4079         * modules/strtoll (Makefile.am): Likewise.
4080         * modules/strtoul (Makefile.am): Likewise.
4081         * modules/strtoull (Makefile.am): Likewise.
4082         * modules/strtoumax (Makefile.am): Likewise.
4083         * modules/strverscmp (Makefile.am): Likewise.
4084         * modules/sys_socket (Makefile.am): Likewise.
4085         * modules/sys_stat (Makefile.am): Likewise.
4086         * modules/sysexits (Makefile.am): Likewise.
4087         * modules/time_r (Makefile.am): Likewise.
4088         * modules/timegm (Makefile.am): Likewise.
4089         * modules/timespec (Makefile.am): Likewise.
4090         * modules/tmpfile-safer (Makefile.am): Likewise.
4091         * modules/trim (Makefile.am): Likewise.
4092         * modules/unistd-safer (Makefile.am): Likewise.
4093         * modules/unlinkdir (Makefile.am): Likewise.
4094         * modules/unlocked-io (Makefile.am): Likewise.
4095         * modules/userspec (Makefile.am): Likewise.
4096         * modules/utime (Makefile.am): Likewise.
4097         * modules/utimecmp (Makefile.am): Likewise.
4098         * modules/utimens (Makefile.am): Likewise.
4099         * modules/vasnprintf (Makefile.am): Likewise.
4100         * modules/vasprintf (Makefile.am): Likewise.
4101         * modules/vsnprintf (Makefile.am): Likewise.
4102         * modules/xalloc (Makefile.am): Likewise.
4103         * modules/xgetcwd (Makefile.am): Likewise.
4104         * modules/xnanosleep (Makefile.am): Likewise.
4105         * modules/xreadlink (Makefile.am): Likewise.
4106         * modules/xstrtod (Makefile.am): Likewise.
4107         * modules/xstrtol (Makefile.am): Likewise.
4108         * modules/xstrtold (Makefile.am): Likewise.
4109         * modules/yesno (Makefile.am): Likewise.
4110         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4111
4112 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4113
4114         * modules/error (Makefile.am): Distribute files through
4115         EXTRA_DIST, not lib_SOURCES.
4116
4117 2006-10-12  Eric Blake  <ebb9@byu.net>
4118
4119         * modules/error (Makefile.am): Distribute files in /lib.
4120         * modules/obstack (Makefile.am): Likewise.
4121
4122 2006-10-12  Bruno Haible  <bruno@clisp.org>
4123
4124         * modules/acl (Makefile.am): Distribute all files in lib/ through
4125         EXTRA_DIST.
4126         * modules/arcfour (Makefile.am): Likewise.
4127         * modules/arctwo (Makefile.am): Likewise.
4128         * modules/argmatch (Makefile.am): Likewise.
4129         * modules/argz (Makefile.am): Likewise.
4130         * modules/atexit (Makefile.am): Likewise.
4131         * modules/backupfile (Makefile.am): Likewise.
4132         * modules/c-strtod (Makefile.am): Likewise.
4133         * modules/c-strtold (Makefile.am): Likewise.
4134         * modules/calloc (Makefile.am): Likewise.
4135         * modules/canon-host (Makefile.am): Likewise.
4136         * modules/canonicalize (Makefile.am): Likewise.
4137         * modules/chdir-long (Makefile.am): Likewise.
4138         * modules/chdir-safer (Makefile.am): Likewise.
4139         * modules/check-version (Makefile.am): Likewise.
4140         * modules/chown (Makefile.am): Likewise.
4141         * modules/cloexec (Makefile.am): Likewise.
4142         * modules/close-stream (Makefile.am): Likewise.
4143         * modules/closeout (Makefile.am): Likewise.
4144         * modules/crc (Makefile.am): Likewise.
4145         * modules/cycle-check (Makefile.am): Likewise.
4146         * modules/des (Makefile.am): Likewise.
4147         * modules/dirfd (Makefile.am): Likewise.
4148         * modules/dirname (Makefile.am): Likewise.
4149         * modules/dup2 (Makefile.am): Likewise.
4150         * modules/euidaccess (Makefile.am): Likewise.
4151         * modules/exclude (Makefile.am): Likewise.
4152         * modules/exitfail (Makefile.am): Likewise.
4153         * modules/fcntl-safer (Makefile.am): Likewise.
4154         * modules/file-type (Makefile.am): Likewise.
4155         * modules/fileblocks (Makefile.am): Likewise.
4156         * modules/filemode (Makefile.am): Likewise.
4157         * modules/filenamecat (Makefile.am): Likewise.
4158         * modules/fnmatch (Makefile.am): Likewise.
4159         * modules/fopen-safer (Makefile.am): Likewise.
4160         * modules/fpending (Makefile.am): Likewise.
4161         * modules/fprintftime (Makefile.am): Likewise.
4162         * modules/free (Makefile.am): Likewise.
4163         * modules/fsusage (Makefile.am): Likewise.
4164         * modules/ftruncate (Makefile.am): Likewise.
4165         * modules/fts (Makefile.am): Likewise.
4166         * modules/gc (Makefile.am): Likewise.
4167         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4168         * modules/getaddrinfo (Makefile.am): Likewise.
4169         * modules/getcwd (Makefile.am): Likewise.
4170         * modules/getdelim (Makefile.am): Likewise.
4171         * modules/getdomainname (Makefile.am): Likewise.
4172         * modules/getgroups (Makefile.am): Likewise.
4173         * modules/gethostname (Makefile.am): Likewise.
4174         * modules/gethrxtime (Makefile.am): Likewise.
4175         * modules/getline (Makefile.am): Likewise.
4176         * modules/getloadavg (Makefile.am): Likewise.
4177         * modules/getlogin_r (Makefile.am): Likewise.
4178         * modules/getopt (Makefile.am): Likewise.
4179         * modules/getpass (Makefile.am): Likewise.
4180         * modules/getpass-gnu (Makefile.am): Likewise.
4181         * modules/getsubopt (Makefile.am): Likewise.
4182         * modules/gettime (Makefile.am): Likewise.
4183         * modules/gettimeofday (Makefile.am): Likewise.
4184         * modules/getugroups (Makefile.am): Likewise.
4185         * modules/getusershell (Makefile.am): Likewise.
4186         * modules/glob (Makefile.am): Likewise.
4187         * modules/group-member (Makefile.am): Likewise.
4188         * modules/hard-locale (Makefile.am): Likewise.
4189         * modules/hash (Makefile.am): Likewise.
4190         * modules/hmac-md5 (Makefile.am): Likewise.
4191         * modules/hmac-sha1 (Makefile.am): Likewise.
4192         * modules/human (Makefile.am): Likewise.
4193         * modules/idcache (Makefile.am): Likewise.
4194         * modules/imaxabs (Makefile.am): Likewise.
4195         * modules/imaxdiv (Makefile.am): Likewise.
4196         * modules/inet_ntop (Makefile.am): Likewise.
4197         * modules/inet_pton (Makefile.am): Likewise.
4198         * modules/inttostr (Makefile.am): Likewise.
4199         * modules/isapipe (Makefile.am): Likewise.
4200         * modules/lchown (Makefile.am): Likewise.
4201         * modules/long-options (Makefile.am): Likewise.
4202         * modules/lstat (Makefile.am): Likewise.
4203         * modules/malloc (Makefile.am): Likewise.
4204         * modules/mathl (Makefile.am): Likewise.
4205         * modules/mbchar (Makefile.am): Likewise.
4206         * modules/md2 (Makefile.am): Likewise.
4207         * modules/md4 (Makefile.am): Likewise.
4208         * modules/md5 (Makefile.am): Likewise.
4209         * modules/memcasecmp (Makefile.am): Likewise.
4210         * modules/memchr (Makefile.am): Likewise.
4211         * modules/memcmp (Makefile.am): Likewise.
4212         * modules/memcoll (Makefile.am): Likewise.
4213         * modules/memcpy (Makefile.am): Likewise.
4214         * modules/memmem (Makefile.am): Likewise.
4215         * modules/memmove (Makefile.am): Likewise.
4216         * modules/mempcpy (Makefile.am): Likewise.
4217         * modules/memrchr (Makefile.am): Likewise.
4218         * modules/memset (Makefile.am): Likewise.
4219         * modules/memxor (Makefile.am): Likewise.
4220         * modules/mkancesdirs (Makefile.am): Likewise.
4221         * modules/mkdir (Makefile.am): Likewise.
4222         * modules/mkdir-p (Makefile.am): Likewise.
4223         * modules/mkdtemp (Makefile.am): Likewise.
4224         * modules/mkstemp (Makefile.am): Likewise.
4225         * modules/mktime (Makefile.am): Likewise.
4226         * modules/modechange (Makefile.am): Likewise.
4227         * modules/mountlist (Makefile.am): Likewise.
4228         * modules/nanosleep (Makefile.am): Likewise.
4229         * modules/openat (Makefile.am): Likewise.
4230         * modules/pagealign_alloc (Makefile.am): Likewise.
4231         * modules/physmem (Makefile.am): Likewise.
4232         * modules/poll (Makefile.am): Likewise.
4233         * modules/posixtm (Makefile.am): Likewise.
4234         * modules/posixver (Makefile.am): Likewise.
4235         * modules/putenv (Makefile.am): Likewise.
4236         * modules/quote (Makefile.am): Likewise.
4237         * modules/quotearg (Makefile.am): Likewise.
4238         * modules/raise (Makefile.am): Likewise.
4239         * modules/read-file (Makefile.am): Likewise.
4240         * modules/readline (Makefile.am): Likewise.
4241         * modules/readlink (Makefile.am): Likewise.
4242         * modules/readtokens (Makefile.am): Likewise.
4243         * modules/readutmp (Makefile.am): Likewise.
4244         * modules/realloc (Makefile.am): Likewise.
4245         * modules/regex (Makefile.am): Likewise.
4246         * modules/rename (Makefile.am): Likewise.
4247         * modules/rename-dest-slash (Makefile.am): Likewise.
4248         * modules/rijndael (Makefile.am): Likewise.
4249         * modules/rmdir (Makefile.am): Likewise.
4250         * modules/rpmatch (Makefile.am): Likewise.
4251         * modules/safe-read (Makefile.am): Likewise.
4252         * modules/safe-write (Makefile.am): Likewise.
4253         * modules/same (Makefile.am): Likewise.
4254         * modules/save-cwd (Makefile.am): Likewise.
4255         * modules/savedir (Makefile.am): Likewise.
4256         * modules/setenv (Makefile.am): Likewise.
4257         * modules/settime (Makefile.am): Likewise.
4258         * modules/sha1 (Makefile.am): Likewise.
4259         * modules/sig2str (Makefile.am): Likewise.
4260         * modules/snprintf (Makefile.am): Likewise.
4261         * modules/stdlib-safer (Makefile.am): Likewise.
4262         * modules/stpcpy (Makefile.am): Likewise.
4263         * modules/stpncpy (Makefile.am): Likewise.
4264         * modules/strcase (Makefile.am): Likewise.
4265         * modules/strcasestr (Makefile.am): Likewise.
4266         * modules/strchrnul (Makefile.am): Likewise.
4267         * modules/strcspn (Makefile.am): Likewise.
4268         * modules/strdup (Makefile.am): Likewise.
4269         * modules/strerror (Makefile.am): Likewise.
4270         * modules/strftime (Makefile.am): Likewise.
4271         * modules/strndup (Makefile.am): Likewise.
4272         * modules/strnlen (Makefile.am): Likewise.
4273         * modules/strpbrk (Makefile.am): Likewise.
4274         * modules/strsep (Makefile.am): Likewise.
4275         * modules/strstr (Makefile.am): Likewise.
4276         * modules/strtod (Makefile.am): Likewise.
4277         * modules/strtoimax (Makefile.am): Likewise.
4278         * modules/strtok_r (Makefile.am): Likewise.
4279         * modules/strtol (Makefile.am): Likewise.
4280         * modules/strtoll (Makefile.am): Likewise.
4281         * modules/strtoul (Makefile.am): Likewise.
4282         * modules/strtoull (Makefile.am): Likewise.
4283         * modules/strtoumax (Makefile.am): Likewise.
4284         * modules/strverscmp (Makefile.am): Likewise.
4285         * modules/time_r (Makefile.am): Likewise.
4286         * modules/timegm (Makefile.am): Likewise.
4287         * modules/tmpfile-safer (Makefile.am): Likewise.
4288         * modules/unistd-safer (Makefile.am): Likewise.
4289         * modules/unlinkdir (Makefile.am): Likewise.
4290         * modules/userspec (Makefile.am): Likewise.
4291         * modules/utime (Makefile.am): Likewise.
4292         * modules/utimecmp (Makefile.am): Likewise.
4293         * modules/utimens (Makefile.am): Likewise.
4294         * modules/vasnprintf (Makefile.am): Likewise.
4295         * modules/vasprintf (Makefile.am): Likewise.
4296         * modules/vsnprintf (Makefile.am): Likewise.
4297         * modules/xalloc (Makefile.am): Likewise.
4298         * modules/xgetcwd (Makefile.am): Likewise.
4299         * modules/xnanosleep (Makefile.am): Likewise.
4300         * modules/xreadlink (Makefile.am): Likewise.
4301         * modules/xstrtod (Makefile.am): Likewise.
4302         * modules/xstrtol (Makefile.am): Likewise.
4303         * modules/xstrtold (Makefile.am): Likewise.
4304         * modules/yesno (Makefile.am): Likewise.
4305
4306 2006-10-12  Jim Meyering  <jim@meyering.net>
4307
4308         * m4/getloadavg.m4: Revert the change below.
4309
4310         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4311         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4312         fail with a symlink, which is what coreutils' ./bootstrap now
4313         creates by default.
4314
4315 2006-10-12  Bruno Haible  <bruno@clisp.org>
4316
4317         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4318         mingw.
4319         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4320         MSVC and mingw explicitly.
4321
4322 2006-10-11  Simon Josefsson  <jas@extundo.com>
4323             Bruno Haible  <bruno@clisp.org>
4324
4325         Add support for multiple gnulib-tool invocations in the scope of a
4326         single configure.ac file.
4327         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4328         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4329         with the same contents as the _LIBADD variable.
4330         (func_emit_initmacro_start, func_emit_initmacro_end,
4331         func_emit_initmacro_done): New functions.
4332         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4333         gl_LIBOBJS and gl_LTLIBOBJS.
4334
4335 2006-10-11  Bruno Haible  <bruno@clisp.org>
4336
4337         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4338         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4339         autoreconf. Instead, invoke autopoint explicitly but move back the
4340         *.m4 files from gnulib.
4341
4342 2006-10-11  Bruno Haible  <bruno@clisp.org>
4343
4344         * gnulib-tool (func_usage): Make module names after --create-testdir
4345         optional.
4346         (func_create_testdir): If no module was specified, use nearly all
4347         modules.
4348
4349 2006-10-12  Jim Meyering  <jim@meyering.net>
4350
4351         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4352         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4353         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4354         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4355         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4356         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4357         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4358         (fts_set_stat_required): New function.
4359         (fts_open): Defer the calls to fts_stat, if possible or requested.
4360         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4361         into fts_stat itself.
4362         (fts_read): Perform any required (deferred) fts_stat call.
4363         (fts_build): Likewise, for the directory we're about to open and read.
4364         In the readdir loop, carefully decide whether each entry will require
4365         an eventual call to fts_stat, using dirent.d_type info if available.
4366         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4367         a command line argument into this function.  Update all callers.
4368         Map a return value of FTS_DOT to FTS_D for a command line argument.
4369         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4370         Thanks to Miklos Szeredi for his tenacity and for the initial
4371         bug report about "find" failing on a FUSE-based file system.
4372
4373         * lib/fts.c (fts_open): Use consistent indentation.
4374
4375 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4376
4377         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4378         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4379         reported by Jim Meyering.  All uses of cache variables renamed
4380         to match Autoconf's.
4381         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4382         the other one.
4383
4384         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4385         Fix misspelling in diagnostic.
4386
4387 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4388
4389         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4390         defined.  Problem reported by Matthew Woehlke.
4391
4392         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4393         Add support for Tandem NonStop R series.
4394         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4395         Use new macro.
4396
4397         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4398         (has_trailing_slash): Omit size arg; all callers changed.
4399         Omit 'inline', since it doesn't help performance and we'd
4400         need to configure it.
4401         Don't count //, ///, etc. as having a trailing slash.
4402         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4403         (rpl_rename_dest_slash): On failure, use rename's errno rather
4404         than (in some cases) an incorrect or junk errno.
4405         Simplify code by removing need to compute length; this does
4406         cause it to make two passes instead of one over the file name,
4407         but it's worth it.
4408
4409         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4410         change, since Autoconf's version may no longer be appropriate now
4411         that we are using CVS Autoconf's version.  Add support for Tandem.
4412
4413 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4414             Bruno Haible  <bruno@clisp.org>
4415
4416         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4417         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4418         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4419         gl_AC_TYPE_LONG_LONG.
4420
4421         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4422         instead of HAVE_LONG_LONG.
4423         * lib/printf-args.c (printf_fetchargs): Likewise.
4424         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4425         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4426         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4427         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4428         gl_AC_TYPE_LONG_LONG.
4429
4430 2006-10-11  Bruno Haible  <bruno@clisp.org>
4431
4432         * m4/longlong.m4: Add comments.
4433         * m4/ulonglong.m4: Likewise.
4434
4435 2006-10-10  Bruno Haible  <bruno@clisp.org>
4436
4437         Make it possible to #define stpcpy, strdup to aliases.
4438         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4439         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4440
4441 2006-10-10  Bruno Haible  <bruno@clisp.org>
4442
4443         Make it possible to #define gcd to an alias.
4444         * lib/gcd.c: Include config.h.
4445
4446 2006-10-10  Bruno Haible  <bruno@clisp.org>
4447
4448         Make it possible to #define c_isascii to an alias.
4449         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4450         defined. Undefine the macros before defining them, to avoid gcc
4451         warnings.
4452         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4453         define NO_C_CTYPE_MACROS early.
4454
4455 2006-10-10  Bruno Haible  <bruno@clisp.org>
4456
4457         Make it possible to #define set_program_name to an alias.
4458         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4459         ENABLE_RELOCATABLE early.
4460
4461 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4462
4463         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4464         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4465         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4466         More generally, don't assume that 64-bit signed int is available
4467         if unsigned int is, and vice versa.
4468         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4469         unsigned symbols, not on their signed counterparts.
4470         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4471         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4472         (UINT64_C, UINTMAX_C):
4473         Likewise.
4474         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4475         unsigned counterparts.
4476         (Have_long_long, Unsigned): New macros.
4477         (Int): Renamed from INT.
4478         (strtoimax): Use the new macros.
4479         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4480         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4481         * modules/inttypes (inttypes.h): Substitute
4482         HAVE_UNSIGNED_LONG_LONG_INT.
4483         * modules/stdint (stdint.h): Likewise.
4484         (Files): Add m4/ulonglong.m4.
4485
4486 2006-10-10  Bruno Haible  <bruno@clisp.org>
4487
4488         Fix a gcc -Wshadow warning.
4489         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4490         to 'bucket'.
4491         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4492         gl_linked_indexof_from_to): Likewise.
4493         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4494         Likewise.
4495         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4496         Likewise.
4497         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4498         Reported by Eric Blake.
4499
4500 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4501
4502         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4503         for NetBSD.  Problem reported by Bruno Haible.
4504
4505 2006-10-09  Jim Meyering  <jim@meyering.net>
4506
4507         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4508         Patch from Bruno Haible.
4509
4510 2006-10-09  Jim Meyering  <jim@meyering.net>
4511
4512         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4513         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4514         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4515
4516 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4517
4518         Don't include <config.h> twice; this doesn't work in some cases,
4519         e.g., when config.h has "#define intmax_t long long int" and
4520         we include <config.h>, <inttypes.h>, <config.h> in that order.
4521         Problem reported by Matthew Woehlke in:
4522         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4523         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4524         * lib/fts-cycle.c: Don't include config.h.
4525         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4526         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4527         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4528         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4529         inttypes.h.
4530         * lib/xstrtoumax.c: Likewise.
4531         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4532         __strtol and the like, so that this module is more like its siblings.
4533         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4534         Remove; no longer needed now that we assume gnulib inttypes.h.
4535
4536 2006-10-08  Bruno Haible  <bruno@clisp.org>
4537
4538         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4539         option.
4540
4541 2006-10-07  Jim Meyering  <jim@meyering.net>
4542
4543         * modules/inttypes (inttypes.h): Revert what seems to have been
4544         an inadvertent part of today's change: use "|", not "/" in the
4545         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4546
4547 2006-10-07  Bruno Haible  <bruno@clisp.org>
4548
4549         * modules/sublist: New file.
4550
4551 2006-10-07  Bruno Haible  <bruno@clisp.org>
4552
4553         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4554         * modules/argz (argz.h): Likewise.
4555         * modules/arpa_inet (arpa/inet.h): Likewise.
4556         * modules/byteswap (byteswap.h): Likewise.
4557         * modules/configmake (configmake.h): Likewise.
4558         * modules/fcntl (fcntl.h): Likewise.
4559         * modules/fnmatch (fnmatch.h): Likewise.
4560         * modules/getopt (getopt.h): Likewise.
4561         * modules/glob (glob.h): Likewise.
4562         * modules/inttypes (inttypes.h): Likewise.
4563         * modules/netinet_in (netinet/in.h): Likewise.
4564         * modules/poll (poll.h): Likewise.
4565         * modules/stdbool (stdbool.h): Likewise.
4566         * modules/stdint (stdint.h): Likewise.
4567         * modules/sys_select (sys/select.h): Likewise.
4568         * modules/sys_socket (sys/socket.h): Likewise.
4569         * modules/sys_stat (sys/stat.h): Likewise.
4570         * modules/sysexits (sysexits.h): Likewise.
4571         * modules/unistd (unistd.h): Likewise.
4572         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4573         Add a "DO NOT EDIT" comment to the generated file.
4574         (func_import): Likewise for gnulib-comp.m4.
4575
4576 2006-10-07  Bruno Haible  <bruno@clisp.org>
4577
4578         * lib/gl_sublist.h: New file.
4579         * lib/gl_sublist.c: New file.
4580
4581 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4582
4583         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4584         name (relative to the original working directory) and the file
4585         name component (relative to the temporary working directory).  All
4586         callers changed.
4587         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4588         * lib/mkdir-p.c (make_dir_parents): Likewise.
4589         * lib/mkdir-p.h (make_dir_parents): Likewise.
4590
4591 2006-10-06  Eric Blake  <ebb9@byu.net>
4592
4593         Define several macros for use by the clean-temp module.
4594         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4595         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4596         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4597
4598         * lib/clean-temp.h (close_stream_temp): New declaration.
4599         * lib/clean-temp.c (includes): Pull in headers according to what
4600         other modules are in use.
4601         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4602
4603 2006-10-06  Bruno Haible  <bruno@clisp.org>
4604
4605         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4606         instead of fopen, fwriteerror.
4607
4608 2006-10-06  Bruno Haible  <bruno@clisp.org>
4609
4610         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4611         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4612         int.
4613         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4614         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4615         Return an error indicator.
4616         Suggested by Eric Blake.
4617
4618 2006-10-06  Bruno Haible  <bruno@clisp.org>
4619
4620         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4621         Reported by Eric Blake.
4622
4623 2006-10-06  Bruno Haible  <bruno@clisp.org>
4624
4625         * modules/closeout (Description): Mention stderr too.
4626
4627 2006-10-06  Bruno Haible  <bruno@clisp.org>
4628         and Paul Eggert  <eggert@cs.ucla.edu>
4629
4630         * lib/closeout.c (close_stdout): Also close stderr.
4631         * lib/closeout.h: Update comment.
4632
4633 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4634
4635         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4636         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4637         * lib/dirchownmod.c: Include lchown.h.
4638         * lib/lchown.c: Don't include files that lchown.h now includes.
4639         Don't declare chown, since lchown.h now does that.
4640         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4641         (lchown): Define to rpl_chown if lchown is declared but
4642         does not exist.  Declare using a prototype if lchown is not
4643         declared.  Add a copyright notice.
4644         * lib/mkstemp.h: Include <unistd.h>.
4645         * lib/openat.c: Include lchown.h.
4646
4647         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4648         we now test for that separately.
4649         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4650         rather than O_NOFOLLOW, when testing whether it's possible to
4651         avoid a race condition reliably.
4652         * lib/savewd.c (savewd_chdir): Likewise.
4653
4654         Remove macros that are no longer needed now that stdint.h is
4655         reliable.
4656         * lib/fsusage.c (UINTMAX_MAX): Remove.
4657         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4658         * lib/utimecmp.c (SIZE_MAX): Remove.
4659
4660         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4661
4662         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4663         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4664         O_NOATIME works.
4665
4666 2006-10-05  Bruno Haible  <bruno@clisp.org>
4667
4668         * lib/gl_list.h (gl_sortedlist_search_from_to,
4669         gl_sortedlist_indexof_from_to): New declarations.
4670         (gl_list_implementation): New fields sortedlist_search_from_to,
4671         sortedlist_indexof_from_to.
4672         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4673         inline functions.
4674         * lib/gl_list.c (gl_sortedlist_search_from_to,
4675         gl_sortedlist_indexof_from_to): New functions.
4676         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4677         function.
4678         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4679         (gl_array_sortedlist_search_from_to): New function.
4680         (gl_array_list_implementation): Update.
4681         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4682         function.
4683         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4684         (gl_carray_sortedlist_search_from_to): New function.
4685         (gl_carray_list_implementation): Update.
4686         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4687         gl_linked_sortedlist_indexof_from_to): New functions.
4688         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4689         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4690         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4691         gl_tree_sortedlist_indexof_from_to): New functions.
4692         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4693         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4694         Update.
4695         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4696         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4697         Update.
4698
4699 2006-10-05  Bruno Haible  <bruno@clisp.org>
4700
4701         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4702         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4703         (struct gl_list_implementation): Add fields search_from_to,
4704         indexof_from_to. Remove fields search, indexof.
4705         (gl_list_search): Use the search_from_to method.
4706         (gl_list_search_from, gl_list_search_from_to): New functions.
4707         (gl_list_indexof): Use the indexof_from_to method.
4708         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4709         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4710         (gl_list_search_from, gl_list_search_from_to): New functions.
4711         (gl_list_indexof): Use the indexof_from_to method.
4712         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4713         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4714         gl_array_indexof. Add start_index, end_index arguments.
4715         (gl_array_search_from_to): Renamed from gl_array_search. Add
4716         start_index, end_index arguments.
4717         (gl_array_remove, gl_array_list_implementation): Update.
4718         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4719         gl_carray_indexof. Add start_index, end_index arguments.
4720         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4721         start_index, end_index arguments.
4722         (gl_carray_remove, gl_carray_list_implementation): Update.
4723         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4724         gl_linked_search. Add start_index, end_index arguments.
4725         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4726         start_index, end_index arguments.
4727         (gl_linked_remove): Update.
4728         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4729         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4730         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4731         field to 'size_t'.
4732         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4733         gl_tree_search. Add start_index, end_index arguments.
4734         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4735         start_index, end_index arguments.
4736         (gl_tree_remove): Update.
4737         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4738         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4739         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4740         function.
4741         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4742         gl_tree_search. Add start_index, end_index arguments.
4743         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4744         start_index, end_index arguments.
4745         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4746         Update.
4747         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4748
4749 2006-10-05  Bruno Haible  <bruno@clisp.org>
4750
4751         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4752
4753         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4754         fwriteerror_temp): New declarations.
4755         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4756         (descriptors): New variable.
4757         (cleanup): First, close the descriptors.
4758         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4759         fclose_temp, fwriteerror_temp): New functions.
4760
4761 2006-10-04  Jim Meyering  <jim@meyering.net>
4762
4763         * lib/fts.c (fts_open): Tiny comment change.
4764
4765 2006-10-04  Bruno Haible  <bruno@clisp.org>
4766
4767         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4768         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4769         gl_LOCK_BODY.
4770         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4771         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4772         gl_LOCK_EARLY_BODY.
4773         (gl_LOCK): Require gl_LOCK_BODY.
4774
4775 2006-10-04  Bruno Haible  <bruno@clisp.org>
4776
4777         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4778         (gl_oset_search_atleast): New declaration.
4779         (struct gl_oset_implementation): Add field 'search_atleast'.
4780         (gl_oset_search_atleast): New inline function.
4781         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4782         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4783         (gl_array_oset_implementation): Update.
4784         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4785         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4786         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4787
4788 2006-10-04  Bruno Haible  <bruno@clisp.org>
4789
4790         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4791
4792 2006-10-03  Bruno Haible  <bruno@clisp.org>
4793
4794         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4795         from gl_avltreehash_list_implementation.
4796
4797 2006-10-03  Bruno Haible  <bruno@clisp.org>
4798
4799         * lib/gl_oset.c (gl_oset_add): Fix return type.
4800
4801 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4802
4803         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4804
4805 2006-10-02  Eric Blake  <ebb9@byu.net>
4806
4807         * modules/strnlen (Depends-on): Add extensions.
4808
4809 2006-10-02  Eric Blake  <ebb9@byu.net>
4810
4811         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4812         definition in 2.60+.
4813
4814 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4815
4816         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4817         checks.
4818
4819 2006-10-02  Bruno Haible  <bruno@clisp.org>
4820
4821         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4822         to the AUTOMAKE_OPTIONS.
4823         Reported by Jim Meyering.
4824
4825 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4826
4827         Work around bug in Solaris 10 /proc file system:
4828         /proc/self/fd/NNN/.. isn't the parent directory of
4829         the directory whose file descriptor is NNN.  This needs to
4830         be worked around at run time, not compile time, since a
4831         program might be built on Solaris 8, where things work, and
4832         run on Solaris 10.
4833         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4834         to use the following interface instead:
4835         (OPENAT_BUFFER_SIZE): New macro.
4836         (openat_proc_name): New function.
4837         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4838         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4839         Likewise.
4840         * lib/openat-proc.c: New file.
4841         * modules/openat (Files): Add lib/openat-proc.c.
4842         (Depends-on): Add same-inode, stdbool.
4843         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4844
4845 2006-09-29  Bruno Haible  <bruno@clisp.org>
4846
4847         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4848         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4849         argument. Set stdout_closed before testing for ferror, not after.
4850         (fwriteerror, fwriteerror_no_ebadf): New functions.
4851
4852 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4853
4854         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4855
4856 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4857
4858         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4859         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4860
4861 2006-09-28  Jim Meyering  <jim@meyering.net>
4862
4863         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4864         Include <unistd.h>.
4865
4866 2006-09-28  Bruno Haible  <bruno@clisp.org>
4867
4868         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4869         * modules/linkedhash-list (Depends-on): Likewise.
4870         * modules/rbtreehash-list (Depends-on): Likewise.
4871
4872 2006-09-28  Bruno Haible  <bruno@clisp.org>
4873
4874         * lib/strndup.h: Simplify the redefinition of strndup.
4875         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4876         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4877
4878 2006-09-28  Bruno Haible  <bruno@clisp.org>
4879
4880         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4881         * lib/gl_linkedhash_list.c: Likewise.
4882         * lib/gl_rbtreehash_list.c: Likewise.
4883
4884 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4885
4886         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4887         getaddrinfo.
4888
4889         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4890         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4891         it causes <stdio_ext.h> to cause a compile-time error.
4892         Problem reported by Nelson H. F. Beebe.
4893         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4894         of HAVE_DECL___PENDING.
4895
4896         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4897         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4898         declaration.
4899
4900 2006-09-27  Jim Meyering  <jim@meyering.net>
4901
4902         This file could end up with a definition for a function
4903         named __strndup, rather than rpl_strndup on a system with
4904         incomplete weak_alias support.
4905         * lib/strndup.c (strndup): Rename from __strndup.
4906         Remove #defines that used to map __strndup to strndup.
4907         Don't use K&R prototypes.
4908         Remove LIBC-related code, since this file is not sync'd with glibc.
4909         * lib/strndup.h: Revamp, accordingly.
4910         * m4/strndup.m4: Modernize.
4911
4912 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4913
4914         * modules/savewd (Depends-on): Add 'raise'.
4915         * lib/savewd.c: Include <signal.h>, for 'raise'.
4916
4917 2006-09-26  Jim Meyering  <jim@meyering.net>
4918
4919         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4920         when we detect Darwin 8.7.0's acl_get_file bug.
4921         Rearrange to perform the new (below) run-test while $LIBS
4922         contains any acl-related library.  Set USE_ACL at the end.
4923         (gl_ACL_GET_FILE): New function.
4924
4925 2006-09-26  Eric Blake  <ebb9@byu.net>
4926
4927         * lib/verror.c: Include <config.h> unconditionally.
4928
4929 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4930
4931         * modules/clock-time (Maintainer): Add self.
4932         * modules/getlogin_r (Depends-on): Add extensions.
4933
4934 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4935
4936         * modules/clock-time: New module.
4937         * modules/nanosleep (Depends-on): Add clock-time.
4938         * modules/gethrxtime (Depends-on): Likewise.
4939         * modules/gettime (Depends-on): Likewise.
4940         * modules/settime (Depends-on): Likewise.
4941
4942         * modules/fts-lgpl: Depend on openat.
4943         * modules/mkancesdirs: Depend on savewd.
4944         * modules/mkdir-p: Likewise.
4945
4946 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4947
4948         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4949
4950         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4951         `gl_have_arbitrary_file_name_length_limit' to
4952         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4953         actually works between configure runs.
4954
4955 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4956             Bruno Haible  <bruno@clisp.org>
4957
4958         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4959
4960 2006-09-25  Jim Meyering  <jim@meyering.net>
4961
4962         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4963         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4964
4965 2006-09-25  Eric Blake  <ebb9@byu.net>
4966
4967         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4968         exec's in 2006-09-18 patch when shuffling fds.
4969
4970 2006-09-25  Bruno Haible  <bruno@clisp.org>
4971
4972         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4973         Reported by Jim Meyering.
4974
4975 2006-09-24  Jim Meyering  <jim@meyering.net>
4976
4977         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4978         compare a pointer against a literal "0".  That caused failures with
4979         at least HP-UX's hpcc.
4980
4981 2006-09-22  Simon Josefsson  <jas@extundo.com>
4982
4983         * modules/gc-sha1:
4984         * modules/gc-md4:
4985         * modules/gc-hmac-sha1:
4986         * modules/gc-hmac-md5:
4987         * modules/gc-des:
4988         * modules/gc-arcfour: Distribute more files.
4989
4990 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4991
4992         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4993         (gl_linked_iterator_from_to): Initialize struct completely.
4994         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4995         (gl_tree_iterator_from_to): Likewise
4996         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4997         * lib/gl_array_list.c [lint] (gl_array_iterator)
4998         (gl_array_iterator_from_to): Likewise.
4999         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5000         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5001         (gl_carray_iterator_from_to): Likewise.
5002
5003         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5004         * lib/md4.c (md4_process_block): Remove unused variable.
5005         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5006         parentheses for clarity.
5007
5008 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5009
5010         * modules/bison-i18n (Depends-on): Add gettext.
5011
5012 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5013
5014         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5015         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5016         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5017         also add missing comma that caused broken test.
5018         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5019         stdlib.h, for `abort'.
5020         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5021         variables.
5022         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5023         include unistd.h if present, for `rmdir'.
5024         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5025         variables.
5026         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5027         in the process include standard headers for prototypes.
5028         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5029         gets declared on GNU/Linux.
5030         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5031         unistd.h, for `rmdir'.
5032         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5033
5034         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5035         always true.
5036         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5037
5038         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5039
5040 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5041
5042         * gnulib-tool (func_version): Create output all at once.  This
5043         may help avoid triggering unnecessary SIGPIPEs, and at any
5044         rate it doesn't hurt.
5045
5046 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5047             Bruno Haible  <bruno@clisp.org>
5048
5049         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5050         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5051         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5052
5053         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5054         (gl_FUNC_VASPRINTF): Invoke it.
5055
5056 2006-09-22  Bruno Haible  <bruno@clisp.org>
5057
5058         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5059         getloadavg.c as first argument.
5060
5061 2006-09-22  Bruno Haible  <bruno@clisp.org>
5062
5063         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5064         at the beginning of the gl_INIT macro.
5065         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5066         gl_GETLOADAVG.
5067
5068 2006-09-22  Bruno Haible  <bruno@clisp.org>
5069
5070         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5071         module.
5072         Suggested by Ralf Wildenhues.
5073
5074 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5075
5076         Import this patch from libc:
5077
5078         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5079
5080         * lib/regex_internal.c (re_string_reconstruct): Handle
5081         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5082         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5083         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5084         re_string_context_at.
5085
5086         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5087         now requires it.
5088         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5089         gl_REGEX now does it for us.
5090         (gl_REGEX): Add test taken from
5091         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5092
5093         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5094         Check that large offsets work.  Modernize Autoconf usages.
5095         Prefer "yes" to mean a good thing rather than a bad.
5096         Don't put "#define mkstemp" in config.h, as this might interfere
5097         with standard system headers that "#define mkstemp mkstemp64".
5098
5099         * modules/mkstemp (Depends-on): Add extensions, so that
5100         mkstemp is visible on some platforms.
5101         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5102         (Include): Change to "mkstemp.h" from <stdlib.h>.
5103         (Files): Add mkstemp.h.
5104
5105         * lib/mkstemp.h: New file, since some standard headers
5106         #define mkstemp.
5107         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5108         Include "mkstemp.h".
5109         Make the _LIBC code resemble glibc original more,
5110         e.g., use K&R style.
5111         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5112         (mkstemp): Remove, since mkstemp.h does this for us.
5113         * lib/stdlib--.h: Include mkstemp.h.
5114
5115         Import this patch from libc:
5116
5117         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5118
5119         * lib/tempname.c (__gen_tempname): Change attempts_min
5120         into a macro.  Use preprocessor to decide how to initialize
5121         attempts [Coverity CID 67].
5122
5123 2006-09-20  Bruno Haible  <bruno@clisp.org>
5124
5125         * lib/mkdtemp.c: Import from libc.
5126         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5127                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5128                 attempts_min into a macro.  Use preprocessor to decide how to
5129                 initialize attempts [Coverity CID 67].
5130         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5131                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5132                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5133
5134 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5135
5136         * gnulib-tool (func_exit): New function, to allow to pass the
5137         exit status portably through the trap.  Use everywhere.
5138         (--help, --version): Signal a write error.
5139         (trap): catch SIGPIPE, for write errors.
5140         Exit at the end of the trap, with the correct exit status.
5141
5142 2006-09-19  Karl Berry  <karl@gnu.org>
5143
5144         * doc/gnulib.texi: note about the license texinfo files.
5145
5146 2006-09-19  Eric Blake  <ebb9@byu.net>
5147
5148         * gnulib-tool: Avoid space-tab.
5149
5150 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5151
5152         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5153         that prevented coreutils 6.1 from building.  Problem reported
5154         by Petter Reinholdtsen.
5155
5156 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5157
5158         * gnulib-tool (avoidlist): Fix typo that broke options like
5159         --avoid=lock that are used by coreutils bootstrap.
5160
5161 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5162
5163         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5164         more systematically.
5165
5166 2006-09-18  Jim Meyering  <jim@meyering.net>
5167
5168         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5169
5170 2006-09-18  Bruno Haible  <bruno@clisp.org>
5171
5172         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5173
5174 2006-09-18  Bruno Haible  <bruno@clisp.org>
5175
5176         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5177         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5178         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5179         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5180         * m4/gettext.m4: Require autoconf >= 2.52.
5181         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5182         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5183         of gl_cv_header_inttypes_h.
5184
5185 2006-09-18  Bruno Haible  <bruno@clisp.org>
5186
5187         * lib/javaversion.c: Include configmake.h.
5188
5189 2006-09-18  Bruno Haible  <bruno@clisp.org>
5190
5191         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5192         avoid that the while loops be executed in a subshell.
5193
5194 2006-09-18  Bruno Haible  <bruno@clisp.org>
5195
5196         * MODULES.html.sh (func_module): Break long lines.
5197         Suggested by Bruce Korb <bkorb@gnu.org>.
5198
5199 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5200
5201         Speed up by a factor of 1.12.
5202         * gnulib-tool (nl): New variable.
5203         (func_import): Rewrite include directive extraction to only read each
5204         directive once.
5205
5206 2006-09-17  Bruno Haible  <bruno@clisp.org>
5207
5208         * modules/javaversion (Makefile.am): Remove DEFS setting.
5209         (Depends-on): Add configmake, for PKGDATADIR definition.
5210
5211 2006-09-17  Bruno Haible  <bruno@clisp.org>
5212
5213         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5214
5215 2006-09-17  Bruno Haible  <bruno@clisp.org>
5216
5217         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5218         (func_modules_transitive_closure, func_modules_add_dummy,
5219         func_modules_to_filelist, func_import, func_create_testdir,
5220         func_create_megatestdir, ...): Use it wherever possible.
5221         Suggested by Ralf Wildenhues.
5222
5223 2006-09-16  Karl Berry  <karl@gnu.org>
5224
5225         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5226         to avoid sectioning errors.
5227         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5228         [ifinfo]: blank line after @center-ed titles.
5229         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5230         Spell FSF address consistently with others.
5231         (These changes approved by rms.)
5232
5233 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5234
5235         Speed up by a factor of 1.61.
5236         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5237         already checked module names again.
5238
5239 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5240
5241         Speed up by a factor of 1.13.
5242         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5243         for new_files, and the input to func_add_or_update.
5244
5245 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5246
5247         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5248         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5249
5250 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5251
5252         * modules/mkancesdirs (Depends-on): Add fcntl.
5253         * modules/savewd: New file.
5254         * MODULES.html.sh (File system functions): Add savewd.
5255
5256         * modules/configmake (Makefile.am): Add support for the
5257         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5258
5259 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5260
5261         * m4/savewd.m4: New file.
5262
5263 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5264
5265         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5266         (dirchownmod): New arg FD.  All callers changed.
5267         Use FD rather than opening the directory ourself, as opening is
5268         now the caller's responsibility.
5269         * lib/dirchownmod.h: Likewise.
5270         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5271         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5272         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5273         (test_dir): Remove.
5274         (mkancesdirs): Return length of prefix of FILE that has already
5275         been made, or -2 if there is a child doing the work.  Redo
5276         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5277         ".", and treat ".." specially since it might stray back into
5278         already-created areas.  Use a subprocess if necessary.  New arg
5279         WD; all users changed.  MAKE_DIR function should now return 1
5280         if it creates a directory that is not readable.  Return -2 if
5281         a child process is spun off.
5282         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5283         Adjust signature to match code.
5284         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5285         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5286         all users changed.
5287         * lib/savewd.c, lib/savewd.h: New files.
5288
5289 2006-09-15  Jim Meyering  <jim@meyering.net>
5290
5291         * modules/rename-dest-slash: New module.
5292         * MODULES.html.sh (posix_compat): Add it here.
5293
5294         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5295
5296 2006-09-15  Jim Meyering  <jim@meyering.net>
5297
5298         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5299         file.
5300
5301         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5302
5303 2006-09-15  Jim Meyering  <jim@meyering.net>
5304
5305         * lib/rename-dest-slash.c (has_trailing_slash): Use
5306         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5307         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5308         test before testing whether SRC is a directory.
5309         Suggestions from Bruno Haible.
5310
5311         Avoid a warning about an unused variable.
5312         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5313         into the #ifdef block where it's used.
5314
5315         * lib/rename-dest-slash.c: New file.
5316
5317 2006-09-14  Bruno Haible  <bruno@clisp.org>
5318
5319         * lib/allocsa.c: Include <config.h> unconditionally.
5320         * lib/asnprintf.c: Likewise.
5321         * lib/asprintf.c: Likewise.
5322         * lib/c-strcasecmp.c: Likewise.
5323         * lib/c-strcasestr.c: Likewise.
5324         * lib/c-strncasecmp.c: Likewise.
5325         * lib/c-strstr.c: Likewise.
5326         * lib/classpath.c: Likewise.
5327         * lib/clean-temp.c: Likewise.
5328         * lib/concatpath.c: Likewise.
5329         * lib/copy-file.c: Likewise.
5330         * lib/csharpcomp.c: Likewise.
5331         * lib/csharpexec.c: Likewise.
5332         * lib/execute.c: Likewise.
5333         * lib/fatal-signal.c: Likewise.
5334         * lib/findprog.c: Likewise.
5335         * lib/fwriteerror.c: Likewise.
5336         * lib/gl_array_list.c: Likewise.
5337         * lib/gl_array_oset.c: Likewise.
5338         * lib/gl_avltree_list.c: Likewise.
5339         * lib/gl_avltree_oset.c: Likewise.
5340         * lib/gl_avltreehash_list.c: Likewise.
5341         * lib/gl_carray_list.c: Likewise.
5342         * lib/gl_linked_list.c: Likewise.
5343         * lib/gl_linkedhash_list.c: Likewise.
5344         * lib/gl_list.c: Likewise.
5345         * lib/gl_oset.c: Likewise.
5346         * lib/gl_rbtree_list.c: Likewise.
5347         * lib/gl_rbtree_oset.c: Likewise.
5348         * lib/gl_rbtreehash_list.c: Likewise.
5349         * lib/imaxabs.c: Likewise.
5350         * lib/imaxdiv.c: Likewise.
5351         * lib/javacomp.c: Likewise.
5352         * lib/javaexec.c: Likewise.
5353         * lib/javaversion.c: Likewise.
5354         * lib/linebreak.c: Likewise.
5355         * lib/localcharset.c: Likewise.
5356         * lib/lock.c: Likewise.
5357         * lib/mbchar.c: Likewise.
5358         * lib/mbswidth.c: Likewise.
5359         * lib/mkdtemp.c: Likewise.
5360         * lib/pipe.c: Likewise.
5361         * lib/printf-args.c: Likewise.
5362         * lib/printf-parse.c: Likewise.
5363         * lib/progname.c: Likewise.
5364         * lib/progreloc.c: Likewise.
5365         * lib/readlink.c: Likewise.
5366         * lib/sh-quote.c: Likewise.
5367         * lib/stpcpy.c: Likewise.
5368         * lib/stpncpy.c: Likewise.
5369         * lib/strcasecmp.c: Likewise.
5370         * lib/strcasestr.c: Likewise.
5371         * lib/strcspn.c: Likewise.
5372         * lib/striconv.c: Likewise.
5373         * lib/strncasecmp.c: Likewise.
5374         * lib/strnlen1.c: Likewise.
5375         * lib/strstr.c: Likewise.
5376         * lib/strtok_r.c: Likewise.
5377         * lib/tls.c: Likewise.
5378         * lib/tmpdir.c: Likewise.
5379         * lib/unicodeio.c: Likewise.
5380         * lib/unsetenv.c: Likewise.
5381         * lib/vasnprintf.c: Likewise.
5382         * lib/vasprintf.c: Likewise.
5383         * lib/wait-process.c: Likewise.
5384         * lib/xallocsa.c: Likewise.
5385         * lib/xsetenv.c: Likewise.
5386         * lib/xstriconv.c: Likewise.
5387
5388 2006-09-13  Simon Josefsson  <jas@extundo.com>
5389
5390         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5391         that internally, suggested by Ralf Wildenhues
5392         <Ralf.Wildenhues@gmx.de>.
5393
5394 2006-09-13  Simon Josefsson  <jas@extundo.com>
5395
5396         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5397         @LIBOBJS@.
5398         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5399
5400 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5401
5402         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5403         longer worry about uses that don't define HAVE_CONFIG_H.
5404         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5405         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5406         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5407         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5408         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5409         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5410         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5411         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5412         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5413         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5414         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5415         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5416         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5417         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5418         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5419         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5420         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5421         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5422         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5423         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5424         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5425         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5426         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5427         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5428         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5429         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5430         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5431         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5432         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5433         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5434         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5435         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5436         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5437         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5438         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5439         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5440         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5441         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5442         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5443         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5444         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5445         Likewise.
5446
5447 2006-09-13  Eric Blake  <ebb9@byu.net>
5448
5449         * lib/getopt.c: Fix typo in last commit.
5450
5451 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5452
5453         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5454         dgettext.
5455
5456 2006-09-12  Jim Meyering  <jim@meyering.net>
5457
5458         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5459         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5460         Reported by Nelson H. F. Beebe.
5461
5462 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5463
5464         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5465         program_invocation_name and program_invocation_short_name are
5466         initialized.
5467         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5468         and program_invocation_short_name to argp.h, so they are visible
5469         to user programs.
5470         * lib/argp.h: Likewise
5471
5472 2006-09-10  Bruno Haible  <bruno@clisp.org>
5473
5474         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5475         m4/inttypes_h.m4, m4/uintmax_t.m4.
5476
5477 2006-09-10  Bruno Haible  <bruno@clisp.org>
5478
5479         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5480         gl_AC_TYPE_UINTMAX_T.
5481
5482 2006-09-10  Bruno Haible  <bruno@clisp.org>
5483
5484         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5485
5486 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5487
5488         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5489         convention.  Text proposed by Bruno Haible.
5490         (struct argp_option): Document the use of N_() wrappers.
5491
5492         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5493         '\v', and translate the two parts separately, instead of feeding
5494         the whole string to gettext.  This allows to exclude
5495         '\v' from the strings visible to the translator by writing doc
5496         strings as N_("..") "\v" N_("..").
5497
5498 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5499
5500         * config/srclist.txt: Undo latest change; the bug was fixed.
5501
5502 2006-09-09  Bruno Haible  <bruno@clisp.org>
5503
5504         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5505         assignments if building a library without libtool.
5506         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5507         in func_emit_lib_Makefile_am.
5508         (func_import): When building a static library libfoo.a, arrange to
5509         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5510         (func_create_testdir): Likewise.
5511         * modules/gc (configure.ac, Makefile.am): If building statically,
5512         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5513         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5514         * modules/striconv (configure.ac, Makefile.am): Likewise.
5515         Based on a suggestion by Ralf Wildenhues.
5516
5517 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5518
5519         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5520         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5521         Also:
5522
5523         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5524         Add year_2050_test to catch glibc bug 2821
5525         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5526
5527         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5528         Prefer #ifdef to #if.
5529
5530         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5531         Return from 'main' instead of calling 'exit'.
5532
5533 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5534
5535         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5536         returned the maximum time_t value rather than (time_t) -1.
5537         Problem originally reported by William Bardwell
5538         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5539
5540         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5541         Moved to here ...
5542         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5543         ... from here.
5544
5545 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5546
5547         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5548         2821 is fixed.
5549
5550 2006-09-08  Jim Meyering  <jim@meyering.net>
5551
5552         Don't make generated files read-only.  That would bother too many
5553         people.  However, do retain the ability to work when targets are
5554         read-only: remove the destination and temporary files before writing
5555         them (when generated via sed or echo), or by using the -f option for
5556         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5557         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5558         * modules/byteswap, modules/configmake, modules/fcntl:
5559         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5560         * modules/localcharset, modules/netinet_in, modules/poll:
5561         * modules/stdbool, modules/stdint, modules/sys_select:
5562         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5563
5564 2006-09-08  Jim Meyering  <jim@meyering.net>
5565
5566         Avoid new build failure on FreeBSD 6.0.
5567         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5568         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5569         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5570
5571 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5572
5573         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5574
5575 2006-09-07  Jim Meyering  <jim@meyering.net>
5576
5577         Fix global typo in last change: use chmod u-w, not chmod u-x.
5578         Spotted by Paul Eggert and Bruce Korb.
5579         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5580         * modules/byteswap, modules/configmake, modules/fcntl:
5581         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5582         * modules/localcharset, modules/netinet_in, modules/poll:
5583         * modules/stdbool, modules/stdint, modules/sys_select:
5584         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5585
5586 2006-09-06  Jim Meyering  <jim@meyering.net>
5587
5588         Make generated files be read-only.
5589         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5590         Ensure that each generated file is now read-only.
5591         * modules/argz: Likewise.
5592         * modules/arpa_inet: Likewise.
5593         * modules/byteswap: Likewise.
5594         * modules/configmake: Likewise.
5595         * modules/fcntl: Likewise.
5596         * modules/fnmatch: Likewise.
5597         * modules/getopt: Likewise.
5598         * modules/glob: Likewise.
5599         * modules/inttypes: Likewise.
5600         * modules/netinet_in: Likewise.
5601         * modules/poll: Likewise.
5602         * modules/stdbool: Likewise.
5603         * modules/stdint: Likewise.
5604         * modules/sys_select: Likewise.
5605         * modules/sys_socket: Likewise.
5606         * modules/sys_stat: Likewise.
5607         * modules/sysexits: Likewise.
5608         * modules/localcharset: Same as above, but continue using temporary
5609         file named "t-$@" (why different?) rather than the "$@-t" used
5610         everywhere else.
5611
5612         * modules/sysexits (Makefile.am): Replace literal occurrences
5613         of "sysexit.h" more readable, and more consistent, "$@".
5614
5615 2006-09-06  Bruno Haible  <bruno@clisp.org>
5616
5617         * modules/striconv: New file.
5618         * modules/xstriconv: New file.
5619         * MODULES.html.sh (Internationalization functions): Add striconv,
5620         xstriconv.
5621
5622 2006-09-06  Bruno Haible  <bruno@clisp.org>
5623
5624         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5625         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5626         not using libtool correctly.
5627
5628 2006-09-06  Bruno Haible  <bruno@clisp.org>
5629
5630         * lib/striconv.h: New file.
5631         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5632         iconvstring.c.
5633         * lib/xstriconv.h: New file.
5634         * lib/xstriconv.c: New file.
5635
5636 2006-09-06  Bruno Haible  <bruno@clisp.org>
5637
5638         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5639         lib_..._LDFLAGS.
5640
5641 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5642
5643         * lib/argz_.h: Sync from Libtool.
5644
5645         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5646                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5647
5648         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5649
5650 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5651
5652         * modules/trim: New file.
5653
5654 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5655
5656         * lib/trim.h: New file.
5657         * lib/trim.c: New file.
5658
5659 2006-09-05  Bruno Haible  <bruno@clisp.org>
5660
5661         * MODULES.html.sh (String handling): Add trim.
5662
5663 2006-09-04  Karl Berry  <karl@gnu.org>
5664
5665         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5666         until next release.
5667
5668 2006-09-03  Bruno Haible  <bruno@clisp.org>
5669
5670         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5671         correctly.
5672
5673 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5674
5675         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5676         not gl_GETLOADAVG.  Omit unneeded semicolons.
5677         Problems reported by Ralf Wildenhues in
5678         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5679         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5680         at the end, which is the usual gnulib style.
5681
5682         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5683         of doing all the work ourselves.
5684         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5685         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5686
5687 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5688
5689         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5690         Problem reported by Ralf Wildenhues in
5691         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5692
5693         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5694         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5695
5696 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5697
5698         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5699         yesterday's patch by changing test -n to test -z.
5700
5701 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5702
5703         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5704         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5705         the former is now obsolescent.
5706
5707         * modules/chdir-long (Depends-on): Add fcntl.
5708
5709 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5710
5711         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5712         obsolescent, and programs should use gnulib instead.
5713         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5714         but with prefixes changed.
5715
5716 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5717
5718         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5719         or stdbool.h, because they might not exist while configuring.
5720
5721         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5722         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5723         does that for us.
5724         (O_DIRECTORY): Remove.
5725
5726 2006-08-31  Eric Blake  <ebb9@byu.net>
5727
5728         * gnulib-tool: Don't let emacs change spaces to TAB.
5729
5730 2006-08-31  Bruno Haible  <bruno@clisp.org>
5731
5732         * gnulib-tool: When calling func_import more than once, do it in a
5733         subshell.
5734         Reported by Eric Blake <ebb9@byu.net>.
5735
5736 2006-08-31  Bruno Haible  <bruno@clisp.org>
5737
5738         * gnulib-tool (nl): Remove variable.
5739         (sed_transform_lib_file): Use more robust test for config-h module.
5740         (func_import): Fix typo in 2006-08-25 patch.
5741
5742 2006-08-31  Bruno Haible  <bruno@clisp.org>
5743
5744         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5745         specified, augment Makefile.am variables instead of assigning them.
5746
5747 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5748
5749         Work around a bug in both the Linux and SunOS 64-bit kernels:
5750         nanosleep mishandles sleeps for longer than 2**31 seconds.
5751         Problem reported by Frank v Waveren in
5752         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5753         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5754         Check for nanosleep bug.
5755         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5756
5757 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5758
5759         Work around a bug in both the Linux and SunOS 64-bit kernels:
5760         nanosleep mishandles sleeps for longer than 2**31 seconds.
5761         Problem reported by Frank v Waveren in
5762         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5763         * lib/nanosleep.c (BILLION): New constant.
5764         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5765         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5766         implementation.
5767
5768 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5769
5770         * modules/nanosleep (Depends-on): Add gettime.
5771
5772 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5773         and Simon Josefsson  <jas@extundo.com>
5774         and Oskar Liljeblad  <oskar@osk.mine.nu>
5775
5776         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5777         * gnulib-tool (func_import): New license type 'unmodifiable license
5778         text'.
5779         * modules/fdl: Use it.  Longer description.
5780         * module/gpl, module/lgpl: New files.
5781
5782 2006-08-30  Jim Meyering  <jim@meyering.net>
5783
5784         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5785         shadowing the parameter.
5786
5787 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5788
5789         Sync from Libtool:
5790
5791         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5792
5793         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5794         sharing with gnulib.  Report by Eric Blake.
5795
5796 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5797
5798         * modules/isapipe: New file.
5799         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5800
5801 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5802
5803         * modules/configmake (Makefile.am): Add a comment, and omit
5804         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5805         by Bruno Haible.
5806
5807 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5808
5809         * m4/isapipe.m4: New file.
5810
5811 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5812
5813         * lib/isapipe.c, lib/isapipe.h: New files.
5814
5815 2006-08-29  Jim Meyering  <jim@meyering.net>
5816
5817         * modules/configmake (Makefile.am): Make configmake.h depend on
5818         Makefile.  Otherwise, a stale configmake.h could hang around.
5819
5820 2006-08-29  Eric Blake  <ebb9@byu.net>
5821
5822         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5823         resolution of upstream bug 3044.
5824
5825 2006-08-29  Bruno Haible  <bruno@clisp.org>
5826
5827         * modules/localcharset (Depends-on): Add configmake.
5828         (Makefile.am): Remove setting of LIBDIR through DEFS.
5829
5830 2006-08-29  Bruno Haible  <bruno@clisp.org>
5831
5832         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5833         defined.
5834
5835 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5836
5837         * modules/fcntl: New file.
5838         * modules/chdir-safer (Depends-on): Add fcntl.
5839         * modules/fts: Likewise.
5840         * modules/mkdir-p: Likewise.
5841
5842         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5843         This undoes the most recent change, since we're now addressing the
5844         problem in a different way.
5845
5846         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5847         into output, since the output might be called Makefile.am even
5848         if $makefile_name is something different.
5849         (func_import): Use $makefile_am rather than
5850         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5851         empty.
5852
5853         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5854
5855 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5856
5857         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5858         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5859         recent change to stdint.m4, since we're now addressing the problem in a
5860         different way.
5861
5862 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5863
5864         * m4/fcntl_h.m4: New file.
5865
5866 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5867
5868         * lib/fcntl_.h: New file.
5869         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5870         the fcntl module.
5871         * lib/dirchownmod.c: Likewise.
5872         * lib/fts.c: Likewise.
5873
5874         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5875         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5876         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5877         just before including <inttypes.h>, to avoid circular inclusion.
5878
5879 2006-08-28  Jim Meyering  <jim@meyering.net>
5880
5881         * doc/visibility.texi: Actually read and correct the grammar of the
5882         sentence affected by yesterday's change.
5883
5884 2006-08-28  Eric Blake  <ebb9@byu.net>
5885
5886         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5887         needs wrapper.
5888
5889 2006-08-28  Eric Blake  <ebb9@byu.net>
5890
5891         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5892
5893 2006-08-28  Eric Blake  <ebb9@byu.net>
5894
5895         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5896
5897 2006-08-28  Bruno Haible  <bruno@clisp.org>
5898
5899         * modules/c-strstr: New file, from GNU gettext.
5900         * MODULES.html.sh (String handling): Add c-strstr.
5901
5902 2006-08-28  Bruno Haible  <bruno@clisp.org>
5903
5904         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5905         macros.
5906         Reported by Eric Blake.
5907
5908 2006-08-28  Bruno Haible  <bruno@clisp.org>
5909
5910         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5911         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5912         * lib/vasprintf.c: Include errno.h, limits.h.
5913         (EOVERFLOW): New fallback definition.
5914         (vasprintf): Test here whether the string length is > INT_MAX.
5915         * lib/vsnprintf.c: Include errno.h, limits.h.
5916         (EOVERFLOW): New fallback definition.
5917         (vsnprintf): Fix bug when generated string was too long for the buffer.
5918         Test here whether the string length is > INT_MAX.
5919
5920 2006-08-28  Bruno Haible  <bruno@clisp.org>
5921
5922         * lib/inttypes_.h (SCNX*): Remove definitions.
5923         Reported by Eric Blake.
5924
5925 2006-08-28  Bruno Haible  <bruno@clisp.org>
5926
5927         * lib/c-strstr.h: New file, from GNU gettext.
5928         * lib/c-strstr.c: New file, from GNU gettext.
5929
5930 2006-08-28  Bruno Haible  <bruno@clisp.org>
5931
5932         * gnulib-tool: Reorder some statements.
5933
5934 2006-08-28  Bruno Haible  <bruno@clisp.org>
5935
5936         * gnulib-tool: New option --makefile-name.
5937         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5938         $makefile_name.
5939         (func_import): Write $makefile_name to the cache file, and read it from
5940         there unless explicitly specified. Use $makefile_name as file name
5941         instead of Makefile.am. Adjust the recommendations accordingly.
5942
5943 2006-08-28  Bruno Haible  <bruno@clisp.org>
5944
5945         * gnulib-tool (func_verify_module): Check against misapplying patch.
5946
5947 2006-08-28  Bruno Haible  <bruno@clisp.org>
5948
5949         * gnulib-tool (func_relativize, func_relconcat): New functions.
5950         Give an error if --local-dir is given with --update.
5951         Remove trailing slashes from $local_gnulib_dir.
5952         (func_import): Store the relativized $local_gnulib_dir in
5953         gnulib-cache.m4, and read it from there if not specified explicitly.
5954
5955 2006-08-28  Bruno Haible  <bruno@clisp.org>
5956
5957         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5958         is the current directory. Respect also $local_gnulib_dir.
5959
5960 2006-08-28  Bruno Haible  <bruno@clisp.org>
5961             Simon Josefsson  <jas@extundo.com>
5962
5963         BeOS portability.
5964         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5965
5966 2006-08-27  Jim Meyering  <jim@meyering.net>
5967
5968         * doc/visibility.texi: Remove duplicate word: "pointer".
5969
5970 2006-08-26  Bruno Haible  <bruno@clisp.org>
5971
5972         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5973         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5974         (Makefile.am): Create inttypes.h from inttypes_.h.
5975         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5976
5977         * modules/imaxabs: New file.
5978
5979         * modules/imaxdiv: New file.
5980
5981 2006-08-26  Bruno Haible  <bruno@clisp.org>
5982
5983         * m4/inttypes.m4: New file.
5984         * m4/_inttypes_h.m4: Remove file.
5985         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5986         PRI_MACROS_BROKEN.
5987         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5988
5989         * m4/imaxabs.m4: New file.
5990
5991         * m4/imaxdiv.m4: New file.
5992
5993 2006-08-26  Bruno Haible  <bruno@clisp.org>
5994
5995         * lib/inttypes_.h: New file.
5996         * lib/inttypes.h: Remove file.
5997         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5998
5999         * lib/imaxabs.c: New file.
6000
6001         * lib/imaxdiv.c: New file.
6002
6003 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6004
6005         New config-h module, so that "make" output needn't be cluttered
6006         by -DHAVE_CONFIG_H.
6007         * MODULES.html.sh (Support for building libraries and executables):
6008         Add config-h.
6009         * modules/config-h: New file.
6010         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6011         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6012         the config-h module is used.
6013
6014         New configmake module, so that "make" output needn't be cluttered
6015         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6016         * MODULES.html.sh (Support for building libraries and executables):
6017         Add configmake.
6018         * modules/configmake: New file.
6019
6020 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6021
6022         * m4/config-h.m4: New file.
6023
6024 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6025
6026         * config/srclist.txt: Add elisp-comp.
6027
6028 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6029
6030         * MODULES.html.sh (Support for building libraries and executables):
6031         Add elisp-comp.
6032         * build-aux/elisp-comp: New file.
6033         * modules/elisp-comp: New file.
6034
6035 2006-08-24  Bruno Haible  <bruno@clisp.org>
6036
6037         * gnulib-tool (func_create_testdir): Use non-default values of
6038         sourcebase and m4base.
6039
6040 2006-08-24  Bruno Haible  <bruno@clisp.org>
6041
6042         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6043         HTML structure.
6044
6045 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6046
6047         * modules/openat (Depends-on): Add lchown.
6048
6049 2006-08-23  Bruno Haible  <bruno@clisp.org>
6050
6051         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6052         of gl_LOCK_EARLY instead of gl_LOCK.
6053
6054 2006-08-23  Bruno Haible  <bruno@clisp.org>
6055
6056         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6057         on OSF/1 to no.
6058         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6059
6060 2006-08-23  Bruno Haible  <bruno@clisp.org>
6061
6062         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6063         as unusable.
6064
6065         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6066         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6067         (gl_LOCK): New macro.
6068
6069 2006-08-22  Simon Josefsson  <jas@extundo.com>
6070
6071         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6072         to md5 module.
6073
6074 2006-08-22  Simon Josefsson  <jas@extundo.com>
6075
6076         * MODULES.html.sh: Add "Support for maintaining and release
6077         projects".
6078
6079         * build-aux/gnupload: New file, from coreutils.
6080
6081 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6082
6083         Avoid the need for AC_LIBSOURCES in m4 macros.
6084         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6085         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6086         * modules/check-version (EXTRA_DIST): Add check-version.h.
6087         * modules/crc (EXTRA_DIST): Add crc.h.
6088         * modules/des (EXTRA_DIST): Add des.h.
6089         * modules/gc (EXTRA_DIST): Add gc.h.
6090         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6091         * modules/getline (EXTRA_DIST): Add getline.h.
6092         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6093         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6094         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6095         * modules/md2 (EXTRA_DIST): Add md2.h.
6096         * modules/md4 (EXTRA_DIST): Add md4.h.
6097         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6098         * modules/read-file (EXTRA_DIST): Add read-file.h.
6099         * modules/readline (EXTRA_DIST): Add readline.h.
6100         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6101         rijndael-api-fst.h.
6102
6103 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6104
6105         * m4/rijndael.m4 (gl_ARCFOUR):
6106         * m4/arctwo.m4 (gl_ARCTWO):
6107         * m4/check-version.m4 (gl_CHECK_VERSION):
6108         * m4/crc.m4 (gl_CRC):
6109         * m4/des.m4 (gl_DES):
6110         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6111         * m4/gc.m4 (gl_GC):
6112         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6113         * m4/getline.m4 (gl_FUNC_GETLINE):
6114         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6115         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6116         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6117         * m4/md2.m4 (gl_MD2):
6118         * m4/md4.m4 (gl_MD4):
6119         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6120         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6121         * m4/readline.m4 (gl_FUNC_READLINE):
6122         * m4/rijndael.m4 (gl_RIJNDAEL):
6123         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6124         to get the necessary .h files and whatnot.
6125
6126 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6127
6128         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6129         gnulib rather than the other way around.
6130         * config/srclistvars.sh (COREUTILS): Remove.
6131
6132 2006-08-22  Jim Meyering  <jim@meyering.net>
6133
6134         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6135
6136         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6137
6138 2006-08-22  Eric Blake  <ebb9@byu.net>
6139
6140         * modules/regexprops-generic: New file.
6141         * MODULES.html.sh (Support for building documentation): List it.
6142
6143 2006-08-22  Eric Blake  <ebb9@byu.net>
6144
6145         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6146         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6147         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6148         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6149
6150 2006-08-22  Bruno Haible  <bruno@clisp.org>
6151
6152         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6153         and lib_LTLIBRARIES like the other lib_* variables.
6154
6155 2006-08-22  Bruno Haible  <bruno@clisp.org>
6156
6157         * build-aux/x-to-1.in: New file, from GNU gettext.
6158
6159 2006-08-22  Bruno Haible  <bruno@clisp.org>
6160
6161         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6162         <utmpx.h> exists.
6163
6164 2006-08-22  Bruno Haible  <bruno@clisp.org>
6165
6166         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6167         <utmpx.h> exists.
6168
6169 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6170
6171         BeOS portability.
6172         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6173         exist.
6174         Problem reported by Bruno Haible.
6175
6176 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6177
6178         Avoid the need for AC_LIBSOURCES in m4 macros.
6179         * modules/acl (EXTRA_DIST): Add acl.h.
6180         * modules/argmatch (Files): Add m4/argmatch.m4.
6181         (configure.ac): Add gl_ARGMATCH.
6182         (EXTRA_DIST): Renamed from lib_SOURCES, for
6183         consistency with the other modules.  Remove argmatch.c.
6184         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6185         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6186         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6187         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6188         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6189         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6190         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6191         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6192         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6193         * modules/closeout (EXTRA_DIST): Add closeout.h.
6194         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6195         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6196         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6197         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6198         dirname.h; remove basename.c and stripslash.c.
6199         * modules/exclude (EXTRA_DIST): Add exclude.h.
6200         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6201         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6202         * modules/file-type (EXTRA_DIST): Add file-type.h.
6203         * modules/filemode (EXTRA_DIST): Add filemode.h.
6204         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6205         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6206         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6207         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6208         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6209         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6210         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6211         * modules/getdate (EXTRA_DIST): Add getdate.c.
6212         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6213         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6214         * modules/getpass (EXTRA_DIST): Add getpass.h.
6215         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6216         * modules/group-member (EXTRA_DIST): Add group-member.h.
6217         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6218         * modules/hash (EXTRA_DIST): Add hash.h.
6219         * modules/human (EXTRA_DIST): Add human.h.
6220         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6221         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6222         * modules/lchown (EXTRA_DIST): Add lchown.h.
6223         * modules/long-options (EXTRA_DIST): Add long-options.h.
6224         * modules/lstat (EXTRA_DIST): Add lstat.h.
6225         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6226         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6227         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6228         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6229         * modules/memxor (EXTRA_DIST): Add memxor.h.
6230         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6231         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6232         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6233         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6234         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6235         * modules/physmem (EXTRA_DIST): Add physmem.h.
6236         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6237         * modules/posixver (EXTRA_DIST): Add posixver.h.
6238         * modules/quote (EXTRA_DIST): Add quote.h.
6239         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6240         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6241         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6242         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6243         regex_internal.h regexec.c.
6244         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6245         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6246         * modules/same (EXTRA_DIST): Add same.h.
6247         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6248         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6249         * modules/savedir (EXTRA_DIST): Add savedir.h.
6250         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6251         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6252         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6253         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6254         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6255         * modules/strdup (EXTRA_DIST): Add strdup.h.
6256         * modules/strftime (EXTRA_DIST): Add strftime.h.
6257         * modules/strndup (EXTRA_DIST): Add strndup.h.
6258         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6259         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6260         * modules/time_r (EXTRA_DIST): Add time_r.h.
6261         * modules/timespec (EXTRA_DIST): Add timespec.h.
6262         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6263         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6264         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6265         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6266         * modules/userspec (EXTRA_DIST): Add userspec.h.
6267         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6268         * modules/utimens (EXTRA_DIST): Add utimens.h.
6269         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6270         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6271         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6272         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6273         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6274         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6275         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6276         * modules/yesno (EXTRA_DIST): Add yesno.h.
6277
6278 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6279
6280         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6281
6282         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6283         * m4/dev-ino.m4, same-inode.m4: Remove.
6284
6285         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6286         * m4/acl.m4 (AC_FUNC_ACL):
6287         * m4/backupfile.m4 (gl_BACKUPFILE):
6288         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6289         * m4/canon-host.m4 (gl_CANON_HOST):
6290         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6291         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6292         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6293         * m4/cloexec.m4 (gl_CLOEXEC):
6294         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6295         * m4/closeout.m4 (gl_CLOSEOUT):
6296         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6297         * m4/dirname.m4 (gl_DIRNAME):
6298         * m4/exclude.m4 (gl_EXCLUDE):
6299         * m4/exitfail.m4 (gl_EXITFAIL):
6300         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6301         * m4/file-type.m4 (gl_FILE_TYPE):
6302         * m4/filemode.m4 (gl_FILEMODE):
6303         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6304         * m4/fpending.m4 (gl_FUNC_FPENDING):
6305         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6306         * m4/fts.m4 (gl_FUNC_FTS):
6307         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6308         * m4/getdate.m4 (gl_GETDATE):
6309         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6310         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6311         * m4/getpass.m4 (gl_FUNC_GETPASS):
6312         * m4/gettime.m4 (gl_GETTIME):
6313         * m4/getugroups.m4 (gl_GETUGROUPS):
6314         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6315         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6316         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6317         * m4/hash.m4 (gl_HASH):
6318         * m4/idcache.m4 (gl_IDCACHE):
6319         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6320         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6321         * m4/long-options.m4 (gl_LONG_OPTIONS):
6322         * m4/lstat.m4 (gl_FUNC_LSTAT):
6323         * m4/md5.m4 (gl_MD5):
6324         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6325         * m4/memcoll.m4 (gl_MEMCOLL):
6326         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6327         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6328         * m4/memxor.m4 (gl_MEMXOR):
6329         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6330         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6331         * m4/modechange.m4 (gl_MODECHANGE):
6332         * m4/mountlist.m4 (gl_MOUNTLIST):
6333         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6334         * m4/openat.m4 (gl_FUNC_OPENAT):
6335         * m4/pathmax.m4 (gl_PATHMAX):
6336         * m4/physmem.m4 (gl_PHYSMEM):
6337         * m4/posixtm.m4 (gl_POSIXTM):
6338         * m4/posixver.m4 (gl_POSIXVER):
6339         * m4/quote.m4 (gl_QUOTE):
6340         * m4/quotearg.m4 (gl_QUOTEARG):
6341         * m4/readtokens.m4 (gl_READTOKENS):
6342         * m4/readutmp.m4 (gl_READUTMP):
6343         * m4/regex.m4 (gl_REGEX):
6344         * m4/safe-read.m4 (gl_SAFE_READ):
6345         * m4/safe-write.m4 (gl_SAFE_WRITE):
6346         * m4/same.m4 (gl_SAME):
6347         * m4/save-cwd.m4 (gl_SAVE_CWD):
6348         * m4/savedir.m4 (gl_SAVEDIR):
6349         * m4/settime.m4 (gl_SETTIME):
6350         * m4/sha1.m4 (gl_SHA1):
6351         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6352         * m4/stat-macros.m4 (gl_STAT_MACROS):
6353         * m4/stat-time.m4 (gl_STAT_TIME):
6354         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6355         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6356         * m4/strdup.m4 (gl_FUNC_STRDUP):
6357         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6358         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6359         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6360         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6361         * m4/time_r.m4 (gl_TIME_R):
6362         * m4/timespec.m4 (gl_TIMESPEC):
6363         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6364         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6365         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6366         * m4/userspec.m4 (gl_USERSPEC):
6367         * m4/utimecmp.m4 (gl_UTIMECMP):
6368         * m4/utimens.m4 (gl_UTIMENS):
6369         * m4/xalloc.m4 (gl_XALLOC):
6370         * m4/xgetcwd.m4 (gl_XGETCWD):
6371         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6372         * m4/xreadlink.m4 (gl_XREADLINK):
6373         * m4/xstrtod.m4 (gl_XSTRTOD):
6374         * m4/yesno.m4 (gl_YESNO):
6375         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6376         to get the necessary .h files and whatnot.
6377
6378 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6379             Bruno Haible  <bruno@clisp.org>
6380
6381         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6382         /bin/sh understanding of '!' conditional negation.
6383
6384 2006-08-21  Jim Meyering  <jim@meyering.net>
6385
6386         * modules/openat (Depends-on): Really alphabetize.
6387
6388         * modules/acl (Depends-on): Add error and quote.
6389
6390         * check-module (find_included_lib_files): Add at-func.c to the
6391         ok-to-include-more-than-once white list.
6392
6393         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6394
6395 2006-08-21  Bruno Haible  <bruno@clisp.org>
6396
6397         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6398         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6399         Reported by Martin Lambers <marlam@marlam.de>.
6400
6401 2006-08-21  Bruno Haible  <bruno@clisp.org>
6402
6403         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6404         specify an installation location, don't emit a noinst_LIBRARIES or
6405         noinst_LTLIBRARIES assignment.
6406
6407 2006-08-21  Bruno Haible  <bruno@clisp.org>
6408
6409         BeOS portability.
6410         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6411         BeOS has mbrtowc() but no <wctype.h>.
6412
6413 2006-08-21  Bruno Haible  <bruno@clisp.org>
6414
6415         BeOS portability.
6416         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6417         exist.
6418
6419 2006-08-21  Bruno Haible  <bruno@clisp.org>
6420
6421         BeOS portability.
6422         * lib/mbchar.h: Include <wctype.h> only if it exists.
6423
6424 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6425
6426         Remove files that are no longer needed by their respective modules.
6427         * m4/obstack.m4: Remove.
6428         * m4/strerror_r.m4: Remove.
6429         * m4/uint32_t.m4: Remove.
6430         * m4/uintptr_t.m4: Remove.
6431         * m4/ullong_max.m4: Remove.
6432         * m4/xstrtoimax.m4: Remove.
6433         * m4/xstrtoumax.m4: Remove.
6434
6435         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6436         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6437         dependencies now capture this.
6438
6439         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6440         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6441         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6442         * m4/human.m4 (gl_HUMAN): Likewise.
6443         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6444         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6445
6446         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6447
6448         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6449         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6450         stdint.
6451         * m4/human.m4 (gl_HUMAN): Likewise.
6452         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6453         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6454         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6455         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6456         * m4/xstrtol (gl_XSTRTOL): Likewise.
6457
6458         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6459         AC_TYPE_LONG_LONG_INT.
6460         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6461         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6462         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6463         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6464
6465         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6466         on stdbool.
6467
6468         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6469         (gl_PREREQ_XSTRTOUL): Remove.
6470
6471         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6472
6473         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6474         mode.
6475
6476 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6477
6478         Add and change modules to make it easier for coreutils to use
6479         gnulib-tool.
6480         * modules/backupfile (Files): Remove m4/d-ino.m4.
6481         (Depends-on): Add d-ino.
6482         * modules/cycle-check (Depends-on): Add stdint.
6483         (lib_SOURCES): Add cycle-check.h.
6484         * modules/d-ino: New module.
6485         * modules/d-type: New module.
6486         * modules/error (Files): Remove m4/strerror_r.m4.
6487         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6488         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6489         m4/inttypes_h.m4, m4/uintmax_t.m4.
6490         (Depends-on): Add stdint.
6491         (lib_SOURCES): Add fsusage.h.
6492         * modules/getcwd (Files): Remove d-ino.m4.
6493         (Depends-on): Add d-ino.
6494         * modules/getndelim2 (Depends-on): Add stdint.
6495         * modules/glob (Files): Remove m4/d-type.m4.
6496         (Depends-on): Add d-type.
6497         * modules/host-os: New module.
6498         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6499         m4/inttypes_h.m4, m4/uintmax_t.m4.
6500         * Depends-on: Add stdint.
6501         (lib_SOURCES): Add human.h.
6502         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6503         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6504         m4/uintmax_t.m4, m4/ulonglong.m4.
6505         (Depends-on): Add stdint.
6506         (EXTRA_DIST): Add inttostr.h.
6507         * modules/lchmod: New module.
6508         * modules/link-follow: New module.
6509         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6510         (Depends-on): Add lchmod.
6511         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6512         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6513         (Depends-on): Add stdint.
6514         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6515         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6516         (Depends-on): Add stdint.
6517         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6518         * modules/perl: New module.
6519         * modules/regex (Depends-on): Add stdint.
6520         * modules/rmdir-errno: New module.
6521         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6522         m4/intmax_t.m4.
6523         (Depends-on): Add stdint.
6524         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6525         m4/uintmax_t.m4.
6526         (Depends-on): Add stdint.
6527         * modules/unlink-busy: New module.
6528         * modules/utimecmp (Depends-on): Add stdint.
6529         * modules/uptime: New module.
6530         * modules/winsz-ioctl: New module.
6531         * modules/winsz-termios: New module.
6532         * modules/xnanosleep (Depends-on): Add nanosleep.
6533         * modules/ullong_max: Remove.
6534         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6535         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6536         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6537         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6538         (Depends-on): Add inttypes.
6539         (lib_SOURCES): Add xstrtol.h.
6540         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6541         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6542         * MODULES.html.sh: Move 'assert' into the assert section.
6543         Move 'dummy' into the linking section.
6544         Remove ullong_max.
6545         Add section for compatibility checks for POSIX:2001 functions,
6546         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6547         winsz-ioctl, and winsz-termios into it.
6548         Add lchmod.
6549         Add top-level Misc section and put host-os, perl, and uptime
6550         into it.
6551
6552 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6553
6554         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6555         now assume the stdint module.  Do not include inttypes.h.
6556         * lib/fsusage.h: Likewise.
6557         * lib/getndelim2.c: Likewise.
6558         * lib/human.h: Likewise.
6559         * lib/inttostr.h: Likewise.
6560         * lib/obstack.c: Likewise.
6561         * lib/regex_internal.h: Likewise.
6562         * lib/tempname.c: Likewise.
6563         * lib/utimecmp.c: Likewise.
6564         * lib/xstrtol.h: Likewise.
6565
6566         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6567
6568         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6569         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6570         * lib/xtime.h: Likewise.
6571
6572 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6573
6574         * modules/openat (Files): Add lib/fchmodat.c.
6575         Fixes problem reported by Jay Youngman.
6576
6577 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6578
6579         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6580         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6581
6582 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6583             Bruno Haible  <bruno@clisp.org>
6584
6585         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6586         and is a script that invokes bison. Tighten the code. Add comments.
6587
6588 2006-08-18  Jim Meyering  <jim@meyering.net>
6589
6590         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6591         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6592         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6593         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6594
6595 2006-08-18  Bruno Haible  <bruno@clisp.org>
6596
6597         * modules/bison-i18n: New file.
6598         * MODULES.html.sh (Internationalization functions): Add it.
6599
6600 2006-08-18  Bruno Haible  <bruno@clisp.org>
6601
6602         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6603         sys/statvfs.h. When getmntinfo was found, check its declaration and
6604         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6605
6606 2006-08-18  Bruno Haible  <bruno@clisp.org>
6607
6608         * m4/bison-i18n.m4: New file, from bison.
6609
6610 2006-08-18  Bruno Haible  <bruno@clisp.org>
6611
6612         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6613         (ME_DUMMY): Treat "kernfs" as a dummy.
6614         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6615
6616 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6617
6618         Update from coreutils.
6619
6620         2006-08-15  Jim Meyering  <jim@meyering.net>
6621
6622         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6623
6624         2006-01-17  Jim Meyering  <jim@meyering.net>
6625
6626         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6627
6628         2006-01-11  Jim Meyering  <jim@meyering.net>
6629
6630         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6631         Check for the lchmod function.
6632
6633 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6634
6635         Update from coreutils.
6636
6637         * lib/__fpending.h: Add copyright notice.
6638         * lib/fprintftime.h: Likewise.
6639         * lib/savedir.c: Use (C) in copyright notice.
6640         * lib/savedir.h: Likewise.
6641
6642         2006-08-15  Jim Meyering  <jim@meyering.net>
6643
6644         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6645         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6646         in support of the EXPECTED_ERRNO macro.
6647         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6648         definitions.  Instead, define the appropriate symbols and include
6649         "at-func.c".
6650         * lib/mkdirat.c (mkdirat): Likewise.
6651         * lib/fchmodat.c (fchmodat): Likewise.
6652         (ENOSYS): Remove definition.
6653         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6654         it.  Don't include "unistd--.h" -- it wasn't ever used.
6655
6656         2006-01-17  Jim Meyering  <jim@meyering.net>
6657
6658         Rewrite fts.c not to change the current working directory,
6659         by using openat, fstatat, fdopendir, etc..
6660
6661         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6662         (HAVE_OPENAT_SUPPORT): Define.
6663         [_LIBC] (fchdir): Don't undef or define; no longer used.
6664         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6665         Now, this `function' always succeeds, and consumes its file descriptor
6666         parameter -- so callers must not close such FDs.  Update callers.
6667         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6668         (diropen): Add parameter, SP.  Adjust all callers.
6669         Implement using diropen_fd, rather than open.
6670         (fts_open): Initialize new member, fts_cwd_fd.
6671         Remove fts_rft-setting code.
6672         (fts_close): Close fts_cwd_fd, if necessary.
6673         (__opendir2): Define in terms of opendir or opendirat,
6674         depending on whether the FST_NOCHDIR flag is set.
6675         (fts_build): Since fts_safe_changedir consumes its FD, and since
6676         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6677         and close the dup'd file descriptor upon failure.
6678         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6679         (fts_safe_changedir): Tweak semantics to reflect that this function
6680         now calls cwd_advance_fd and hence consumes its FD argument.
6681         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6682         [struct FTS] (fts_rft): Remove now-unused member.
6683         [struct FTS] (fts_cycle.state): Improve comment.
6684
6685         * lib/openat.c (openat_needs_fchdir): New function.
6686         * lib/openat.h (openat_needs_fchdir): Declare it.
6687
6688 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6689
6690         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6691         Problem and fix reported by Pádraig Brady in
6692         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6693
6694 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6695
6696         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6697
6698 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6699
6700         * lib/memcoll.c (memcoll): Optimize for the common case where the
6701         arguments are bytewise equal.
6702
6703 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6704
6705         * doc/regexprops-generic.texi: Add a copyright notice.
6706
6707 2006-08-15  Bruno Haible  <bruno@clisp.org>
6708
6709         * modules/tmpdir (License): Change to LGPL.
6710
6711 2006-08-15  Bruno Haible  <bruno@clisp.org>
6712
6713         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6714         module.
6715
6716 2006-08-14  Simon Josefsson  <jas@extundo.com>
6717
6718         * config/srclist.txt: Add gnupload.
6719
6720 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6721
6722         Change copyright notice from LGPL 2 to GPL 2, since that's the
6723         standard form used in the gnulib repository.
6724         * tests/test-lock.c: Likewise.
6725         * tests/test-stdint.c: Likewise.
6726         * tests/test-tls.c: Likewise.
6727
6728         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6729         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6730         Add copyright notice.
6731
6732         * check-module: Add copyright notice.  Output a copyright
6733         notice if "--version" is specified.
6734         * modules/COPYING: New file.
6735         * tests/test-getaddrinfo.c: Add copyright notice.
6736         * tests/test-verify.c: Likewise.
6737
6738 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6739
6740         Change copyright notice from LGPL 2 to GPL 2, since that's the
6741         standard form used in the gnulib repository.
6742         * lib/lock.c: LGPL -> GPL.
6743         * lib/lock.h: Likewise.
6744         * lib/strnlen1.c: Likewise.
6745         * lib/strnlen1.h: Likewise.
6746         * lib/tls.c: Likewise.
6747         * lib/tls.h: Likewise.
6748         * lib/tmpdir.c: Likewise.
6749
6750         * lib/TODO: Remove; this belongs only in coreutils.
6751
6752 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6753
6754         Add copyright notices to long-enough files that lack them, since
6755         otherwise the files aren't clearly free.  Use the same notice that
6756         getdate.texi already uses.
6757         * doc/alloca-opt.texi: Add copyright notice.
6758         * doc/alloca.texi: Likewise.
6759         * doc/ctime.texi: Likewise.
6760         * doc/functions.texi: Likewise.
6761         * doc/gcd.texi: Likewise.
6762         * doc/gnulib-tool.texi: Likewise.
6763         * doc/inet_ntoa.texi: Likewise.
6764         * doc/visibility.texi: Likewise.
6765
6766         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6767         * doc/quote.texi: Add copyright notice.
6768
6769         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6770         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6771         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6772         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6773         is now obsolete, and give a pointer to the Sun list.
6774         Add copyright notice.
6775
6776 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6777
6778         * config/srclistvars.sh: Add copyright notice.
6779
6780 2006-08-14  Eric Blake  <ebb9@byu.net>
6781
6782         Import the following change from libc:
6783
6784         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6785
6786         Upstream bug 2997.
6787         * lib/misc/error.c: Add space between program name and message if file
6788         name is missing.
6789
6790 2006-08-12  Karl Berry  <karl@gnu.org>
6791
6792         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6793         remove, these originate in gnulib now.
6794
6795 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6796
6797         * doc/Makefile (standards.info standards.html standards.dvi):
6798         Also depend on make-stds.texi.
6799
6800 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6801
6802         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6803         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6804
6805         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6806         in wchar_t.  Problem reported by Eric Blake.
6807
6808         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6809         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6810         Also, help the compiler to keep LEN in a register.
6811
6812 2006-08-11  Eric Blake  <ebb9@byu.net>
6813
6814         * users.txt: Sort.  Add tar.
6815
6816 2006-08-11  Bruno Haible  <bruno@clisp.org>
6817
6818         * users.txt: New file.
6819
6820 2006-08-11  Bruno Haible  <bruno@clisp.org>
6821
6822         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6823         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6824
6825 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6826
6827         * modules/snprintf (Depends-on): Remove minmax.
6828         (Maintainer): Add self and Bruno.
6829
6830 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6831
6832         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6833         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6834         (EOVERFLOW): Define if the system does not.
6835         Do not include "minmax.h"; it wasn't used.
6836         (snprintf): Don't assume size_t promotes to an unsigned type.
6837         Fix bug when generated string was too long for the buffer: the
6838         buffer's contents are supposed to be the initial prefix of the
6839         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6840         exceeds INT_MAX; do the check ourselves.
6841
6842         Import the following changes from libc:
6843
6844         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6845
6846         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6847         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6848         set wc to the byte which couldn't be converted.
6849         (re_string_reconstruct): Don't clear valid_raw_len before calling
6850         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6851         tip_context using re_string_context_at.
6852
6853         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6854
6855         * lib/posix/regex.h: g++ still cannot handled [restrict].
6856
6857         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6858
6859         * lib/posix/regex.h: Remove special handling for VMS.
6860
6861 2006-08-10  Jim Meyering  <jim@meyering.net>
6862
6863         * modules/same-inode: New module.
6864         * modules/dev-ino: New module.
6865         * modules/cycle-check: Depend on these modules, rather than simply
6866         including their .h files.
6867         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6868         required via m4/cycle-check.m4.
6869         * modules/same: Depend on new same-inode module, rather than
6870         including same-inode.h.
6871         * modules/chdir-safer: New file.
6872
6873         * modules/chown (Depends-on): Add stat-macros.
6874
6875 2006-08-10  Jim Meyering  <jim@meyering.net>
6876
6877         * m4/cycle-check.m4: New file.
6878         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6879         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6880
6881 2006-08-10  Eric Blake  <ebb9@byu.net>
6882
6883         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6884         in from original proposal.
6885
6886 2006-08-10  Eric Blake  <ebb9@byu.net>
6887         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6888
6889         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6890         namespace.
6891
6892 2006-08-10  Bruno Haible  <bruno@clisp.org>
6893
6894         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6895         as well.
6896
6897 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6898
6899         Sync from coreutils.
6900
6901         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6902
6903         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6904         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6905
6906 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6907
6908         * modules/restrict: Remove; no longer needed now that we assume
6909         Autoconf 2.59 or later.
6910         * MODULES.html.sh: Remove 'restrict'.
6911         * modules/argp (Depends-on): Remove 'restrict'.
6912         * modules/base64 (Depends-on): Likewise.
6913         * modules/gc (Depends-on): Likewise.
6914         * modules/getaddrinfo (Depends-on): Likewise.
6915         * modules/glob (Depends-on): Likewise.
6916         * modules/inet_ntop (Depends-on): Likewise.
6917         * modules/inet_pton (Depends-on): Likewise.
6918         * modules/memxor (Depends-on): Likewise.
6919         * modules/regex (Depends-on): Likewise.
6920         * modules/strtok_r (Depends-on): Likewise.
6921         * modules/time_r (Depends-on): Likewise.
6922
6923 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6924
6925         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6926         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6927         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6928         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6929         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6930         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6931         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6932         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6933
6934         Merge from coreutils.
6935         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6936         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6937         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6938         * m4/time_r.m4 (gl_TIME_R): Likewise.
6939
6940 2006-08-09  Karl Berry  <karl@gnu.org>
6941
6942         * config/srclist.txt: no more gettext-tools, per Bruno.
6943
6944 2006-08-08  Eric Blake  <ebb9@byu.net>
6945
6946         * modules/verror: New module.
6947         * MODULES.html.sh: Document it.
6948
6949 2006-08-08  Eric Blake  <ebb9@byu.net>
6950
6951         * lib/verror.h, lib/verror.c: New files.
6952
6953 2006-08-08  Eric Blake  <ebb9@byu.net>
6954
6955         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6956         verror_at_line output complies with GNU Coding Standards even when
6957         file is NULL.
6958
6959 2006-08-07  Bruno Haible  <bruno@clisp.org>
6960
6961         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6962         versions of AIX.
6963         Reported by Ralf Wildenhues.
6964
6965 2006-08-07  Bruno Haible  <bruno@clisp.org>
6966
6967         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6968         in an AC_DEFUN. Needed so that the autoconf snippets can use
6969         AC_REQUIRE.
6970
6971 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6972
6973         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6974         Initialize pkgdata_DATA.
6975         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6976         overriding it.
6977
6978 2006-08-06  Eric Blake  <ebb9@byu.net>
6979
6980         * lib/error.h: Fold in some upstream changes from glibc.
6981         * lib/error.c: Likewise.
6982
6983 2006-08-04  Bruno Haible  <bruno@clisp.org>
6984
6985         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6986         Make the mostlyclean-local rule depend on mostlyclean-generic.
6987         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6988
6989 2006-07-31  Bruno Haible  <bruno@clisp.org>
6990
6991         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6992         <stdlib.h>, <string.h>.
6993
6994 2006-07-30  Bruno Haible  <bruno@clisp.org>
6995
6996         * modules/readlink (License): Change to LGPL.
6997
6998 2006-07-30  Bruno Haible  <bruno@clisp.org>
6999
7000         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7001         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7002         set PKGDATADIR to point to it.
7003
7004 2006-07-30  Bruno Haible  <bruno@clisp.org>
7005
7006         * modules/csharpexec (configure.ac): Comment out macro invocation.
7007         * modules/javaexec (configure.ac): Likewise.
7008         * modules/javacomp-script (configure.ac): Likewise.
7009
7010         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7011
7012 2006-07-30  Bruno Haible  <bruno@clisp.org>
7013
7014         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7015         linked-list.
7016
7017 2006-07-30  Bruno Haible  <bruno@clisp.org>
7018
7019         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7020
7021 2006-07-30  Bruno Haible  <bruno@clisp.org>
7022
7023         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7024         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7025         get removed.
7026
7027 2006-07-29  Bruno Haible  <bruno@clisp.org>
7028
7029         Make it possible for gnulib-tool to work with locally modified or
7030         augmented gnulib repositories.
7031         * gnulib-tool (func_usage): Document --local-dir option.
7032         (local_gnulib_dir): New variable.
7033         Handle --local-dir option.
7034         (func_lookup_file): New function.
7035         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7036         (func_get_description, func_get_filelist, func_get_description,
7037         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7038         func_get_automake_snippet, func_get_include_directive,
7039         func_get_license, func_get_maintainer): Use func_lookup_file.
7040         (func_import, func_create_testdir): Use func_lookup_file.
7041
7042 2006-07-29  Bruno Haible  <bruno@clisp.org>
7043
7044         * modules/setenv (Depends-on): Add unistd.
7045
7046 2006-07-29  Bruno Haible  <bruno@clisp.org>
7047
7048         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7049
7050 2006-07-29  Bruno Haible  <bruno@clisp.org>
7051
7052         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7053
7054 2006-07-29  Bruno Haible  <bruno@clisp.org>
7055
7056         * gnulib-tool (import, update): If there is no Makefile.am, look at
7057         aclocal.m4, instead of bailing out.
7058
7059 2006-07-29  Bruno Haible  <bruno@clisp.org>
7060
7061         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7062         Categorize the options by when they are useful.
7063
7064 2006-07-29  Bruno Haible  <bruno@clisp.org>
7065
7066         * gnulib-tool (func_usage): Document option --no-libtool.
7067         Handle option --no-libtool.
7068         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7069         for changed semantics of $libtool variable.
7070         (func_import): Likewise. If libtool is not used, show this through
7071         an option --no-libtool.
7072         (func_create_testdir): Update.
7073
7074 2006-07-29  Bruno Haible  <bruno@clisp.org>
7075
7076         * gnulib-tool (func_import): Extend error message about missing
7077         --doc-base.
7078
7079 2006-07-29  Bruno Haible  <bruno@clisp.org>
7080
7081         * gnulib-tool (func_import): Don't create the $docbase directory if
7082         there is no file to store there.
7083
7084 2006-07-29  Bruno Haible  <bruno@clisp.org>
7085
7086         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7087         relevant, look for configure.ac there, not in the current directory.
7088         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7089
7090 2006-07-29  Bruno Haible  <bruno@clisp.org>
7091
7092         * gnulib-tool (SORT): New variable.
7093         (func_usage): Undocument --assume-autoconf option.
7094         Remove --assume-autoconf option handling.
7095         (autoconf_minversion): Determine from the contents of configure.ac.
7096         (func_import): Remove autoconf_minversion handling.
7097         Suggested by Eric Blake.
7098
7099 2006-07-29  Bruno Haible  <bruno@clisp.org>
7100
7101         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7102
7103 2006-07-29  Bruno Haible  <bruno@clisp.org>
7104
7105         * config/srclist.txt (*setenv.[ch]): Remove rules.
7106
7107 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7108
7109         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7110
7111 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7112
7113         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7114         arpa/inet.h.
7115
7116 2006-07-28  Simon Josefsson  <jas@extundo.com>
7117
7118         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7119         * modules/inet_pton (Depends-on): Likewise.
7120
7121 2006-07-28  Simon Josefsson  <jas@extundo.com>
7122
7123         * m4/netinet_in_h.m4: New file.
7124
7125 2006-07-28  Simon Josefsson  <jas@extundo.com>
7126
7127         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7128         #include's.
7129
7130 2006-07-28  Simon Josefsson  <jas@extundo.com>
7131
7132         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7133         #include's.
7134
7135 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7136
7137         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7138         setgid on directories only if they set these bits.
7139         * lib/modechange.h: Remove obsolete comment about masks.
7140
7141 2006-07-28  Eric Blake  <ebb9@byu.net>
7142
7143         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7144         macro expansion.
7145
7146 2006-07-28  Bruno Haible  <bruno@clisp.org>
7147
7148         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7149
7150 2006-07-28  Bruno Haible  <bruno@clisp.org>
7151
7152         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7153
7154 2006-07-28  Bruno Haible  <bruno@clisp.org>
7155
7156         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7157         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7158         Define fallbacks.
7159         Avoids link error on FreeBSD 4.x.
7160         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7161
7162         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7163         encoding.
7164         * lib/mbswidth.c (iswcntrl): Likewise.
7165
7166 2006-07-27  Bruno Haible  <bruno@clisp.org>
7167
7168         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7169         test.
7170
7171 2006-07-27  Bruno Haible  <bruno@clisp.org>
7172
7173         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7174         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7175         defined.
7176
7177 2006-07-26  Eric Blake  <ebb9@byu.net>
7178
7179         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7180
7181 2006-07-26  Eric Blake  <ebb9@byu.net>
7182
7183         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7184         like mingw that lack mkstemp.
7185         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7186         avoid compilation warning on mingw.
7187
7188 2006-07-26  Bruno Haible  <bruno@clisp.org>
7189
7190         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7191         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7192         INT_FAST*_MIN, INTPTR_MIN.
7193
7194 2006-07-25  Bruno Haible  <bruno@clisp.org>
7195
7196         * modules/version-etc (Depends-on): Add stdarg.
7197
7198 2006-07-25  Bruno Haible  <bruno@clisp.org>
7199
7200         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7201         complex commands.
7202
7203 2006-07-25  Bruno Haible  <bruno@clisp.org>
7204
7205         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7206         defined in <stdarg.h> or config.h.
7207
7208 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7209
7210         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7211         (gl_STDIO_SAFER): Remove.
7212
7213 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7214
7215         * MODULES.html.sh (File stream based Input/Output):
7216         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7217         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7218         * modules/fopen-safer, modules/tmpfile-safer: New files.
7219         * modules/stdio-safer: Remove.
7220
7221 2006-07-24  Bruno Haible  <bruno@clisp.org>
7222
7223         * modules/tmpdir: New file.
7224         * MODULES.html.sh (File system functions): Add it.
7225
7226 2006-07-24  Bruno Haible  <bruno@clisp.org>
7227
7228         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7229         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7230
7231 2006-07-24  Bruno Haible  <bruno@clisp.org>
7232
7233         * modules/clean-temp: New file.
7234
7235 2006-07-24  Bruno Haible  <bruno@clisp.org>
7236
7237         * m4/tmpdir.m4: New file, from GNU gettext.
7238
7239 2006-07-24  Bruno Haible  <bruno@clisp.org>
7240
7241         * lib/tmpdir.h: New file, from GNU gettext.
7242         * lib/tmpdir.c: New file, from GNU gettext.
7243
7244 2006-07-24  Bruno Haible  <bruno@clisp.org>
7245
7246         * lib/clean-temp.h: New file, from GNU gettext.
7247         * lib/clean-temp.c: New file, from GNU gettext.
7248
7249 2006-07-23  Eric Blake  <ebb9@byu.net>
7250
7251         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7252         (Depends-on): Add binary-io.
7253
7254 2006-07-23  Eric Blake  <ebb9@byu.net>
7255
7256         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7257
7258 2006-07-23  Eric Blake  <ebb9@byu.net>
7259
7260         * lib/tmpfile-safer.c: New file.
7261         * lib/stdio-safer.h (fopen_safer): Add prototype.
7262         * lib/stdio--.h (tmpfile): Make safer.
7263
7264 2006-07-23  Bruno Haible  <bruno@clisp.org>
7265
7266         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7267         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7268         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7269         gl_linked_remove_at): Use it.
7270
7271 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7272         and Simon Josefsson <jas@extundo.com>
7273
7274         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7275
7276         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7277
7278 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7279
7280         * modules/close-stream: New file.
7281         * modules/closeout (Description): Make it clear that it exits
7282         with a diagnostic on error.
7283         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7284         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7285
7286 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7287
7288         * m4/close-stream.m4: New file.
7289
7290 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7291
7292         * lib/close-stream.c, lib/close-stream.h: New files.
7293
7294 2006-07-22  Bruno Haible  <bruno@clisp.org>
7295
7296         Merge from GNU gettext 0.15.
7297
7298         2006-05-01  Bruno Haible  <bruno@clisp.org>
7299
7300                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7301
7302         2006-07-22  Bruno Haible  <bruno@clisp.org>
7303
7304                 * modules/javaversion: New file.
7305                 * MODULES.html.sh (Java): Add javaversion.
7306
7307         2006-03-12  Bruno Haible  <bruno@clisp.org>
7308
7309                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7310
7311         2005-12-04  Bruno Haible  <bruno@clisp.org>
7312
7313                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7314                 (untested).
7315
7316         2006-06-21  Bruno Haible  <bruno@clisp.org>
7317
7318                 Avoid warnings from recent versions of mcs.
7319                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7320                 -o, -L, -r any more. Use options documented since mcs-1.0
7321                 instead. Similarly for -g.
7322
7323         2005-12-04  Bruno Haible  <bruno@clisp.org>
7324
7325                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7326                 .resources, not .resource.
7327
7328         2005-07-09  Bruno Haible  <bruno@clisp.org>
7329
7330                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7331                 add a .dll suffix.
7332                 Reported by Mark Junker <mjscod@gmx.de>.
7333
7334         2006-07-22  Bruno Haible  <bruno@clisp.org>
7335
7336                 * modules/gettext: Upgrade to gettext-0.15.
7337                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7338                 m4/visibility.m4.
7339                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7340
7341 2006-07-22  Bruno Haible  <bruno@clisp.org>
7342
7343         Merge from GNU gettext 0.15.
7344
7345         2006-03-25  Bruno Haible  <bruno@clisp.org>
7346
7347                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7348
7349         2006-07-21  Bruno Haible  <bruno@clisp.org>
7350
7351                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7352                 "1.1".
7353
7354         2006-05-09  Bruno Haible  <bruno@clisp.org>
7355
7356                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7357                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7358                 for the conftestver execution.
7359
7360         2006-05-01  Bruno Haible  <bruno@clisp.org>
7361
7362                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7363                 optional target-version argument. Verify that the compiler
7364                 groks source of the specified source-version, or add -source
7365                 option as necessary. Verify that the compiler produces
7366                 bytecode in the specified target-version, or add -target and
7367                 -source options as necessary. Make the result of the test
7368                 available as variable CONF_JAVAC. Also log error output in
7369                 config.log.
7370
7371         2006-03-11  Bruno Haible  <bruno@clisp.org>
7372
7373                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7374
7375         2006-05-09  Bruno Haible  <bruno@clisp.org>
7376
7377                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7378                 CLASSPATH_SEPARATOR to a semicolon.
7379
7380         2006-03-12  Bruno Haible  <bruno@clisp.org>
7381
7382                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7383                 available as variable CONF_JAVA, for subsequent autoconf
7384                 tests. Also log error output in config.log.
7385
7386         2006-07-19  Bruno Haible  <bruno@clisp.org>
7387
7388                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7389                 that getline works on glibc2 systems. Needed to avoid trouble
7390                 in relocatable.c.
7391                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7392
7393         2005-12-04  Bruno Haible  <bruno@clisp.org>
7394
7395                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7396                 launcher (untested).
7397
7398         2005-12-04  Bruno Haible  <bruno@clisp.org>
7399
7400                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7401
7402         2006-07-22  Bruno Haible  <bruno@clisp.org>
7403
7404                 * gettext.m4: Update from GNU gettext-0.15.
7405                 * nls.m4: Likewise.
7406                 * po.m4: Likewise.
7407                 * inttypes-pri.m4: Likewise.
7408                 * inttypes-h.m4: Renamed from inttypes.m4.
7409                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7410
7411 2006-07-22  Bruno Haible  <bruno@clisp.org>
7412
7413         Merge from GNU gettext 0.15.
7414
7415         2005-07-05  Bruno Haible  <bruno@clisp.org>
7416
7417                 * printf-args.c (printf_fetchargs): Work around broken
7418                 definition of wint_t on mingw.
7419
7420         2005-02-12  Bruno Haible  <bruno@clisp.org>
7421
7422                 * xallocsa.h: Add extern "C" for C++.
7423
7424         2006-05-17  Bruno Haible  <bruno@clisp.org>
7425
7426                 Cygwin portability.
7427                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7428
7429         2006-04-30  Bruno Haible  <bruno@clisp.org>
7430
7431                 * progreloc.c: Include <mach-o/dyld.h> if available.
7432                 (find_executable): Use _NSGetExecutablePath when possible.
7433
7434         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7435
7436                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7437                 function.
7438
7439         2005-12-29  Bruno Haible  <bruno@clisp.org>
7440
7441                 * progreloc.c (set_program_name_and_installdir): Fix
7442                 compilation error.
7443
7444         2005-12-04  Bruno Haible  <bruno@clisp.org>
7445
7446                 Cygwin portability.
7447                 * progreloc.c: Include <windows.h> also on Cygwin.
7448                 (find_executable): Add support for Cygwin.
7449                 (set_program_name_and_installdir): Handle also platforms with
7450                 nonempty EXEEXT.
7451
7452         2006-07-11  Bruno Haible  <bruno@clisp.org>
7453
7454                 * javacomp.c: Fix a comment.
7455                 Reported by Jim Meyering.
7456
7457         2006-04-30  Bruno Haible  <bruno@clisp.org>
7458
7459                 * javacomp.h (compile_java_class): Add source_version,
7460                 target_version arguments.
7461                 * javacomp.c: Rewritten to choose only a compiler that
7462                 respects the specified source_version and target_version.
7463
7464         2006-06-27  Bruno Haible  <bruno@clisp.org>
7465
7466                 Assume correct S_ISDIR macro.
7467                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7468
7469         2006-07-22  Bruno Haible  <bruno@clisp.org>
7470
7471                 * javaversion.h: New file, from GNU gettext.
7472                 * javaversion.c: New file, from GNU gettext.
7473                 * javaversion.java: New file, from GNU gettext.
7474                 * javaversion.class: New file, from GNU gettext.
7475
7476         2006-05-17  Bruno Haible  <bruno@clisp.org>
7477
7478                 Cygwin portability.
7479                 * javaexec.c (execute_java_class): Test for jview program
7480                 also on Cygwin.
7481
7482         2006-04-09  Bruno Haible  <bruno@clisp.org>
7483
7484                 * fatal-signal.c: Don't include string.h.
7485                 (at_fatal_signal): Use a copying loop instead of memcpy.
7486
7487         2005-12-04  Bruno Haible  <bruno@clisp.org>
7488
7489                 * csharpexec.c: Add support for 'clix' launcher (untested).
7490                 (execute_csharp_using_sscli): New function.
7491                 (execute_csharp_program): Call it.
7492
7493         2006-06-21  Bruno Haible  <bruno@clisp.org>
7494
7495                 Avoid warnings from recent versions of mcs.
7496                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7497                 -o, -L, -r any more. Use options documented since mcs-1.0
7498                 instead. Similarly for -g.
7499
7500         2005-07-09  Bruno Haible  <bruno@clisp.org>
7501
7502                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7503                 add a .dll suffix.
7504                 Reported by Mark Junker <mjscod@gmx.de>.
7505
7506         2006-06-17  Bruno Haible  <bruno@clisp.org>
7507
7508                 * config.charset: Update for NetBSD 3.0.
7509
7510         2006-05-17  Bruno Haible  <bruno@clisp.org>
7511
7512                 Cygwin portability.
7513                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7514
7515         2006-05-16  Bruno Haible  <bruno@clisp.org>
7516
7517                 * localcharset.c [CYGWIN]: Include <windows.h>.
7518                 (get_charset_aliases): For Cygwin, return the same CPxxx
7519                 aliases list as under WIN32.
7520                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7521                 the environment variables. Fall back to GetACP().
7522
7523         2006-04-05  Bruno Haible  <bruno@clisp.org>
7524
7525                 * config.charset: Update Juan Manuel Guerrero's address.
7526
7527         2005-02-12  Bruno Haible  <bruno@clisp.org>
7528
7529                 * allocsa.h: Add extern "C" for C++.
7530
7531         2005-02-10  Bruno Haible  <bruno@clisp.org>
7532
7533                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7534                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7535
7536         2006-07-22  Bruno Haible  <bruno@clisp.org>
7537
7538                 * gettext.h: Update to GNU gettext-0.15.
7539
7540 2006-07-22  Bruno Haible  <bruno@clisp.org>
7541
7542         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7543         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7544         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7545
7546 2006-07-21  Eric Blake  <ebb9@byu.net>
7547
7548         * modules/stdlib-safer: New file.
7549         * MODULES.html.sh (File stream based Input/Output): Add
7550         stdlib-safer.
7551
7552 2006-07-21  Eric Blake  <ebb9@byu.net>
7553
7554         * lib/stdlib-safer.h: New file from coreutils, required by
7555         stdlib--.h.
7556
7557 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7558
7559         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7560
7561 2006-07-20  Bruno Haible  <bruno@clisp.org>
7562
7563         * gnulib-tool: Recognize new option --assume-autoconf.
7564         (autoconf_minversion): New variable.
7565         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7566
7567 2006-07-20  Bruno Haible  <bruno@clisp.org>
7568
7569         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7570
7571 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7572
7573         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7574         Reindent and repaginate.
7575
7576 2006-07-19  Derek Price  <derek@ximbiot.com>
7577
7578         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7579         Correct grammar.
7580
7581 2006-07-17  Bruno Haible  <bruno@clisp.org>
7582
7583         * modules/list: New file.
7584         * modules/array-list: New file.
7585         * modules/carray-list, modules/carray-list-tests: New files.
7586         * modules/linked-list, modules/linked-list-tests: New files.
7587         * modules/avltree-list, modules/avltree-list-tests: New files.
7588         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7589         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7590         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7591         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7592         * modules/oset: New file.
7593         * modules/array-oset: New file.
7594         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7595         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7596         * tests/test-carray_list.c: New file.
7597         * tests/test-linked_list.c: New file.
7598         * tests/test-avltree_list.c: New file.
7599         * tests/test-rbtree_list.c: New file.
7600         * tests/test-linkedhash_list.c: New file.
7601         * tests/test-avltreehash_list.c: New file.
7602         * tests/test-rbtreehash_list.c: New file.
7603         * tests/test-avltree_oset.c: New file.
7604         * tests/test-rbtree_oset.c: New file.
7605         * MODULES.html.sh (Container data structures): New section.
7606
7607 2006-07-17  Bruno Haible  <bruno@clisp.org>
7608
7609         * m4/gl_list.m4: New file.
7610
7611 2006-07-17  Bruno Haible  <bruno@clisp.org>
7612
7613         * lib/gl_list.h: New file.
7614         * lib/gl_list.c: New file.
7615         * lib/gl_array_list.h: New file.
7616         * lib/gl_array_list.c: New file.
7617         * lib/gl_carray_list.h: New file.
7618         * lib/gl_carray_list.c: New file.
7619         * lib/gl_linked_list.h: New file.
7620         * lib/gl_linked_list.c: New file.
7621         * lib/gl_anylinked_list1.h: New file.
7622         * lib/gl_anylinked_list2.h: New file.
7623         * lib/gl_avltree_list.h: New file.
7624         * lib/gl_avltree_list.c: New file.
7625         * lib/gl_anyavltree_list1.h: New file.
7626         * lib/gl_anyavltree_list2.h: New file.
7627         * lib/gl_rbtree_list.h: New file.
7628         * lib/gl_rbtree_list.c: New file.
7629         * lib/gl_anyrbtree_list1.h: New file.
7630         * lib/gl_anyrbtree_list2.h: New file.
7631         * lib/gl_anytree_list1.h: New file.
7632         * lib/gl_anytree_list2.h: New file.
7633         * lib/gl_linkedhash_list.h: New file.
7634         * lib/gl_linkedhash_list.c: New file.
7635         * lib/gl_anyhash_list1.h: New file.
7636         * lib/gl_anyhash_list2.h: New file.
7637         * lib/gl_avltreehash_list.h: New file.
7638         * lib/gl_avltreehash_list.c: New file.
7639         * lib/gl_rbtreehash_list.h: New file.
7640         * lib/gl_rbtreehash_list.c: New file.
7641         * lib/gl_anytreehash_list1.h: New file.
7642         * lib/gl_anytreehash_list2.h: New file.
7643
7644         * lib/gl_oset.h: New file.
7645         * lib/gl_oset.c: New file.
7646         * lib/gl_array_oset.h: New file.
7647         * lib/gl_array_oset.c: New file.
7648         * lib/gl_avltree_oset.h: New file.
7649         * lib/gl_avltree_oset.c: New file.
7650         * lib/gl_rbtree_oset.h: New file.
7651         * lib/gl_rbtree_oset.c: New file.
7652         * lib/gl_anytree_oset.h: New file.
7653
7654 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7655
7656         * m4/mkancesdirs.m4: New file.
7657         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7658         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7659         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7660         it.
7661
7662 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7663
7664         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7665         * lib/mkancesdirs.h: New files.
7666         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7667         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7668         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7669         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7670         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7671         callers changed.  Revamp internals significantly, by not
7672         attempting to create directories that are temporarily more
7673         permissive than the final results.  Do not attempt to use
7674         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7675         This removes some race conditions, fixes some bugs, and simplifies
7676         things.  Use new dirchownmod function to do owner and mode changes.
7677         * lib/mkdir-p.h: Likewise.
7678         * lib/modechange.c (octal_to_mode): New function.
7679         (struct mode_change): New member mentioned.
7680         (make_node_op_equals): New arg mentioned.  All callers changed.
7681         (mode_compile): Keep track of which mode bits the user has explicitly
7682         mentioned.
7683         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7684         New arg PMODE_BITS, to keep track of which mode bits the user
7685         mentioned; it treats S_ISUID and S_ISGID speciall.
7686         All callers changed.
7687         * lib/modechange.h: Likewise.
7688
7689 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7690
7691         * MODULES.html.sh: Add mkancestors.
7692         * modules/mkancesdirs: New module.
7693         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7694         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7695         The chdir-safer and afs files are now orphans; I'll remove them
7696         unless someone speaks up.
7697         Add lib/dirchownmod.c, lib/dirchownmod.h.
7698         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7699         Add lchown, mkancesdirs.
7700         (Maintainer): Add self.
7701
7702 2006-07-15  Karl Berry  <karl@gnu.org>
7703
7704         * gnulib-tool: help message wording/arrangement.
7705
7706 2006-07-14  Simon Josefsson  <jas@extundo.com>
7707
7708         * doc/gnulib.texi (Libtool and Windows): New section.
7709
7710 2006-07-12  Simon Josefsson  <jas@extundo.com>
7711
7712         * modules/gendocs (License): Fix license, approved by Karl.
7713
7714 2006-07-12  Eric Blake  <ebb9@byu.net>
7715
7716         * MODULES.html.sh: Add gendocs.
7717
7718 2006-07-11  Eric Blake  <ebb9@byu.net>
7719
7720         * modules/fdl: New module, to install doc/fdl.texi.
7721         * MODULES.html.sh: Add new section for documentation modules.
7722         * gnulib-tool: Avoid space-tab.
7723         (--doc-base): New option, to manage files from doc.
7724
7725 2006-07-11  Eric Blake  <ebb9@byu.net>
7726
7727         * m4/absolute-header.m4: Fix comments to match recent change.
7728
7729 2006-07-11  Eric Blake  <ebb9@byu.net>
7730
7731         * gnulib-tool: List --doc-base before --tests-base.
7732
7733 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7734
7735         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7736
7737 2006-07-11  Bruno Haible  <bruno@clisp.org>
7738
7739         * README: Mention where to put documentation.
7740
7741 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7742
7743         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7744
7745 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7746
7747         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7748         to stdint.m4.
7749
7750 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7751
7752         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7753         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7754         "no/such/file/stdint.h" when there is no such file, so that
7755         the resulting C code can be parsed by dodgy compilers.
7756         Problems reported by Bob Proulx.
7757
7758 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7759
7760         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7761         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7762         macros into the GNU _D_EXACT_NAMLEN.
7763         * lib/savedir.c:  Likewise.
7764         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7765
7766 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7767         and Paul Eggert  <eggert@cs.ucla.edu>
7768
7769         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7770         * m4/savedir.m4:
7771         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7772         macros into the GNU _D_EXACT_NAMLEN.
7773
7774 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7775
7776         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7777         around the absolute name, to work around a problem with the HP-UX
7778         11.23 native C compiler, reported by Bob Proulx.
7779
7780 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7781
7782         * doc/maintain.texi, make-stds.texi: Sync from
7783         <http://savannah.gnu.org/projects/gnustandards>.
7784
7785 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7786
7787         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7788
7789 2006-07-09  Jim Meyering  <jim@meyering.net>
7790
7791         * m4/glob.m4: Remove a doubled word in a comment.
7792
7793 2006-07-09  Jim Meyering  <jim@meyering.net>
7794
7795         * lib/argp-pv.c: Remove a doubled word in a comment.
7796         * lib/check-version.c (check_version): Likewise.
7797         * lib/javacomp.c (compile_java_class): Likewise.
7798
7799 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7800
7801         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7802         for the benefit of people using Autoconf 2.60.  If you want to
7803         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7804         (or m4/onceonly.m4, if pre-2.57) manually.
7805
7806 2006-07-08  Jim Meyering  <jim@meyering.net>
7807
7808         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7809         comment.
7810         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7811         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7812         comment.
7813
7814 2006-07-08  Jim Meyering  <jim@meyering.net>
7815
7816         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7817
7818 2006-07-07  Simon Josefsson  <jas@extundo.com>
7819
7820         * tests/test-crc.c: Change expected crc value, the test vector
7821         were probably computed using the old broken crc.c?
7822
7823 2006-07-06  Simon Josefsson  <jas@extundo.com>
7824
7825         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7826         now the canonical place for the M4 file).
7827
7828         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7829         from the sys_socket dependency now.
7830
7831         * modules/inet_pton (Files): Ditto.
7832
7833         * modules/inet_ntop (Files): Ditto.
7834
7835 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7836
7837         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7838         not gl_PREREQ_GETUSERSHELL.
7839
7840 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7841
7842         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7843         with only one argument, for Autoconf 2.60.
7844         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7845         expand to nothing, so add a shell command to avoid syntax error.
7846         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7847
7848 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7849
7850         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7851
7852 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7853
7854         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7855         no longer needed.  Check for isblank decl.
7856         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7857         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7858         of existence.
7859
7860 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7861
7862         * lib/getloadavg.c: Use __VMS, not VMS.
7863         * lib/getopt.c: Likewise.
7864         * lib/getpagesize.h: Likewise.
7865         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7866         and probably does not work.
7867
7868 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7869
7870         * lib/.cppi-disable: Add wcwidth.
7871         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7872         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7873         (ISGRAPH): Remove.  All uses changed to isgraph.
7874         (FOLD) [!defined _LIBC]: Remove special case.
7875         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7876         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7877         HAVE_ISBLANK.
7878         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7879         case.
7880
7881 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7882
7883         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7884         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7885         brackets.  Other minor changes to suppress some compiler
7886         warnings.
7887
7888 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7889         and Paul Eggert  <eggert@cs.ucla.edu>
7890
7891         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7892         of invoking obsolescent AC_HEADER_DIRENT macro.
7893         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7894         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7895         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7896         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7897         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7898         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7899         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7900         * m4/readdir.m4: Remove; no longer needed.
7901
7902 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7903         and Paul Eggert  <eggert@cs.ucla.edu>
7904
7905         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7906         Don't worry about this obsolete case any more.
7907         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7908         directories.
7909         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7910         worry about this obsolete case any more.
7911         * lib/fts.c: Likewise.
7912         * lib/getcwd.c: Likewise.
7913         * lib/glob.h: Likewise.
7914         * lib/savedir.c: Likewise.
7915
7916 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7917
7918         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7919         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7920         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7921         needed.
7922         All uses removed.
7923         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7924         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7925         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7926         needed.
7927         * m4/getdate.m4 (gl_GETDATE): Likewise.
7928         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7929         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7930         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7931         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7932         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7933         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7934         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7935         needed.
7936
7937 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7938
7939         * lib/memcasecmp.c: Include <limits.h>.
7940         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7941         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7942         Don't assume isdigit succeeds only on '0' through '9'.
7943
7944 2006-07-05  Eric Blake  <ebb9@byu.net>
7945
7946         * modules/getaddrinfo (Depends-on): Add snprintf.
7947
7948 2006-07-05  Eric Blake  <ebb9@byu.net>
7949
7950         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7951         to avoid 'header present but could not be compiled' on cygwin.
7952
7953 2006-07-05  Eric Blake  <ebb9@byu.net>
7954
7955         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7956         missing from netdb.h.
7957         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7958
7959 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7960
7961         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7962         no longer needed.
7963         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7964         * m4/getdate.m4 (gl_GETDATE): Likewise.
7965         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7966         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7967         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7968         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7969         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7970
7971 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7972
7973         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7974         All uses of is_space replaced by isspace.
7975         * lib/exit.h: Don't talk about STDC_HEADERS.
7976         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7977         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7978         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7979         replaced by isprint etc.
7980         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7981         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7982         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7983         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7984         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7985         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7986
7987 2006-07-05  Bruno Haible  <bruno@clisp.org>
7988
7989         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7990         the function exists, before testing against AIX.
7991         Reported by Martin Lambers <marlam@marlam.de>.
7992
7993 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7994
7995         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7996         From Mark D. Baushke.
7997
7998 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7999
8000         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8001         to the absolute name, not just one, to bypass Sun C 5.8's
8002         "warning: #include of /usr/include/... may be non-portable".
8003
8004 2006-07-04  Eric Blake  <ebb9@byu.net>
8005
8006         * modules/dirname-tests: New test module.
8007         * tests/test-dirname.c: New file, replacing dirname.c
8008         TEST_DIRNAME section that was recently deleted.
8009
8010 2006-07-04  Bruno Haible  <bruno@clisp.org>
8011
8012         Assume ANSI C header files and <ctype.h> functions.
8013         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8014         (mbsnwidth): Use isprint, iscntrl instead.
8015
8016 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8017
8018         Merge from coreutils.
8019         * MODULES.html.sh: Add xstrtold.
8020         * modules/xstrtold: New file.
8021         * modules/cycle-check (Files): Add lib/same-inode.h.
8022         * modules/dirname (Files): Add m4/double-slash-root.m4.
8023         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8024         * modules/mkdir-p (Files): Add lib/same-inode.h.
8025         * modules/same (Files): Add lib/same-inode.h.
8026
8027 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8028
8029         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8030         This is to keep the terminology clean; POSIX talks about
8031         "absolute pathnames", not "full pathnames", but the GNU
8032         Coding Standards say to use "path" for something else;
8033         so use "absolute" to keep both sides happy.
8034         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8035         Set gl_absolute_header, not gl_full_header_path.
8036         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8037         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8038         All uses changed.
8039
8040         Merge from coreutils.
8041
8042         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8043
8044         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8045         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8046         want to require the building of c-strtod.o.
8047         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8048         needs -lm directly.
8049         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8050
8051         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8052
8053         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8054         --as-needed option if available.  Problem reported by Albert Chin in
8055         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8056         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8057         cc merely issues a bunch of annoying warnings for --as-needed
8058         (this problem was reported by Bob Proulx).  Also, try linking with
8059         -lm to detect a bug in binutils 2.16 (this problem was reported
8060         by Ralf Wildenhues).
8061
8062         2006-06-18  Jim Meyering  <jim@meyering.net>
8063
8064         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8065         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8066         macro.
8067         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8068         also check for glibc-2.4's abort-inducing bug.
8069
8070         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8071         Low-probability clean-up should be to use rmdir to get rid of
8072         the just-created directory, not unlink.
8073
8074         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8075         configure fail, and request a bug report to inform us about it.
8076         Add a comment that, barring reports to the contrary, in 2007 we'll
8077         assume ftruncate is universally available.
8078
8079         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8080
8081         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8082
8083         2006-03-12  Jim Meyering  <jim@meyering.net>
8084
8085         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8086         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8087         * m4/same.m4 (gl_SAME): Likewise.
8088         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8089
8090         2006-03-11  Eric Blake  <ebb9@byu.net>
8091
8092         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8093         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8094         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8095         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8096
8097 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8098
8099         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8100         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8101         reported by Mark D. Baushke, one in
8102         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8103
8104         Merge from coreutils.
8105
8106         * lib/.cppi-disable: Add stdint_.h.
8107         * lib/.cvsignore: Add stdint.h.
8108
8109         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8110
8111         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8112         both double and long double versions.
8113         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8114         * lib/xstrtold.c: New file.
8115         * lib/xstrtod.h (xstrtold): New decl.
8116
8117         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8118
8119         * lib/filemode.c (setst): Remove.
8120         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8121         (arguably) clearer, and the generated code is a bit smaller on my
8122         Debian GNU/Linux stable x86 host.
8123
8124         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8125
8126         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8127         Assume that filemode.h includes sys/types.h and sys/stat.h.
8128         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8129         (ftypelet): Reorder to put common cases first, for efficiency.
8130         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8131         to do 'M'.
8132         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8133         of 10, for compatibility with FreeBSD.  All callers changed.
8134         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8135         types that can't be deduced solely from st_mode.  First arg is now a
8136         const pointer.
8137         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8138         (strmode): Renamed from mode_string.
8139         (filemodestring): New decl.
8140         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8141         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8142         needed.
8143         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8144
8145         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8146
8147         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8148         fsusage.h now does that.  Include fsusage.h first, to test interface.
8149         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8150         at most one method (the old code could have generated decls that
8151         didn't conform to C89, not that this was ever exercised).
8152         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8153
8154         2006-03-19  Jim Meyering  <jim@meyering.net>
8155
8156         Work even in a chroot where d_ino values for entries in "/"
8157         don't match the stat.st_ino values for the same names.
8158         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8159         number, iterate through all entries again, using lstat instead.
8160         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8161         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8162
8163         * lib/getcwd.c (__getcwd): Clarify a comment.
8164         Use memcpy in place of a call to strcpy.
8165
8166         2006-03-12  Jim Meyering  <jim@meyering.net>
8167
8168         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8169         matches that of the current directory (which we're about to chdir ".."
8170         out of), then save the dev-ino of the parent, instead.
8171
8172         * lib/same-inode.h (SAME_INODE): New file/macro.
8173         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8174         Include "same-inode.h", instead.
8175         * lib/same.c: Likewise.
8176         * lib/cycle-check.h: Include "same-inode.h".
8177         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8178         * lib/cycle-check.c (SAME_INODE): Remove definition.
8179         * lib/root-dev-ino.h: Include "same-inode.h".
8180
8181         2006-03-11  Eric Blake  <ebb9@byu.net>
8182
8183         * lib/same.c (same_name): s/base_name/last_component/
8184         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8185         * lib/filenamecat.c (file_name_concat): Likewise.
8186
8187         2006-03-11  Eric Blake  <ebb9@byu.net>,
8188                     Paul Eggert  <eggert@cs.ucla.edu>
8189
8190         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8191         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8192         drive prefix.
8193         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8194         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8195         (last_component): New method.
8196         * lib/dirname.c (dir_len): Determine when drive letters need a
8197         subsequent slash.  Preserve // when it is special.
8198         (dir_name): Don't append dot when drive letter is absolute.
8199         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8200         * lib/basename.c (base_name): New semantics - malloc the result.
8201         Preserve // when it is special.  Preserve relative files that look
8202         like drive letters.
8203         (base_len): Preserve // when it is special.
8204         (last_component): New method, similar to old base_name semantics.
8205         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8206         base_name.  Strip redundant slashes from ///.
8207
8208 2006-07-03  Jim Meyering  <jim@meyering.net>
8209
8210         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8211         macro is used before the first cycle_check call.
8212
8213 2006-07-03  Eric Blake  <ebb9@byu.net>
8214
8215         * modules/dirname (Depends-on): Add xstrndup.
8216
8217 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8218
8219         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8220         test cases, so that config.log is a bit easier to follow.
8221
8222 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8223
8224         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8225         both are 64 bits, since this seems to be the tradition, and this
8226         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8227         we ever run into a host that prefers long long to long in this
8228         case, we'll need another configure-time test.  Problem reported by
8229         Jim Meyering.
8230
8231 2006-07-02  Eric Blake  <ebb9@byu.net>
8232
8233         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8234
8235 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8236
8237         * modules/inttypes (Depends-on): No longer depends on stdint.
8238         * modules/stdint (Description): Say more about assumptions.
8239         Say that the fast types might differ.  Say macros are used.
8240         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8241         (Makefile.am): Revise list of substituted symbols to match
8242         new stdint.m4.
8243         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8244         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8245         * tests/test-stdint.c (verify_same_types)
8246         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8247         the code conforms to C99/C89.
8248         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8249         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8250
8251 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8252
8253         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8254         but fix a bug, by requiring at least 64 bits.
8255         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8256         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8257         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8258         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8259
8260         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8261         changes.  Make 2.59 a prerequisite.  Check and substitute for
8262         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8263         inttypes.h.  Do not use special include files; just use the
8264         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8265         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8266         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8267         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8268         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8269         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8270         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8271         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8272         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8273         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8274         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8275         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8276         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8277         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8278         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8279         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8280         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8281         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8282         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8283         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8284         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8285         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8286         not check for things that C99 does not require, e.g., int8_t.  If
8287         a test isn't needed unless <stdint.h> isn't working, and is
8288         unlikely to be needed for any other reason, then don't do it
8289         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8290         size_t, since we assume C89 freestanding at least.  Do not check
8291         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8292         the right thing even if the types are not defined.  Instead use:
8293         (gl_STDINT_TYPE_PROPERTIES): New macro.
8294         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8295         testing whether <sys/types.h> clashes, as Autoconf does this for
8296         us now.  All uses removed.
8297         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8298         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8299         (gl_CHECK_TYPE_SAME):
8300         Remove; no longer needed.
8301         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8302         exists, since we'll return 0 anyway in that case.
8303         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8304
8305 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8306
8307         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8308         possible collision with system files.
8309         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8310         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8311         WCHAR_MIN and WCHAR_MAX in this case.
8312         (<stddef.h>): Do not include; no longer needed.
8313         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8314         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8315         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8316         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8317         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8318         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8319         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8320         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8321         !defined(__c99))]: Include in this case too, since it's harmless
8322         now.
8323         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8324         dangerous to do so.
8325         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8326         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8327         (_STDINT_MIN, _STDINT_MAX): New macros.
8328         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8329         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8330         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8331         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8332         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8333         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8334         macros, not typedefs; this simplifies things quite a bit.
8335         Use long int for all types narrower than int64_t.
8336         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8337         Define in terms of long long int or int64_t or long int,
8338         not int64_t or int32_t.  This saves some compile-time testing.
8339         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8340         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8341         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8342         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8343         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8344         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8345         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8346         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8347         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8348         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8349         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8350         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8351         undef any previous version and define our own version, for
8352         simplicity and consistency with the new macros for types.
8353         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8354         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8355         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8356         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8357         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8358         @WINT_T_SUFFIX@ to keep things simple here.
8359         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8360         Simplify by assuming typical 8/16/32/64 host, since we're
8361         already doing that elsewhere anyway.
8362         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8363         and assume long long int is 64 bits if available.  This
8364         speeds up 'configure'.
8365
8366 2006-07-01  Eric Blake  <ebb9@byu.net>
8367
8368         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8369         Reported by Andreas Buening.
8370
8371 2006-07-01  Eric Blake  <ebb9@byu.net>
8372
8373         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8374
8375 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8376
8377         * lib/getaddrinfo.c: fixed typo
8378
8379 2006-06-29  Jim Meyering  <jim@meyering.net>
8380
8381         * modules/strftime (Maintainer): Add my name, since with the
8382         FPRINTFTIME changes strftime.c has forked from glibc.
8383
8384 2006-06-29  Eric Blake  <ebb9@byu.net>
8385
8386         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8387
8388 2006-06-29  Eric Blake  <ebb9@byu.net>
8389
8390         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8391
8392 2006-06-29  Eric Blake  <ebb9@byu.net>
8393
8394         * lib/stat_.h: New file.
8395
8396 2006-06-29  Eric Blake  <ebb9@byu.net>
8397
8398         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8399         unused static function.
8400
8401 2006-06-29  Eric Blake  <ebb9@byu.net>
8402
8403         * doc/functions.texi (Function Portability): Document missing lstat
8404         on mingw.
8405
8406 2006-06-29  Eric Blake  <ebb9@byu.net>
8407
8408         * MODULES.html.sh: Add sys_stat.
8409         * modules/sys_stat: New module.
8410         * modules/mkstemp (Depends-on): Add sys_stat.
8411
8412 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8413
8414         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8415
8416 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8417
8418         * m4/c-bs-a.m4: Removed.
8419
8420 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8421
8422         * lib/strftime.c: Assume strftime() exists.
8423
8424 2006-06-29  Derek Price  <derek@ximbiot.com>
8425
8426         * modules/c-bs-a: Removed - \a is C89.
8427         * MODULES.html.sh: Remove c-bs-a.
8428
8429 2006-06-29  Bruno Haible  <bruno@clisp.org>
8430
8431         * modules/wcwidth (License): Change to LGPL.
8432
8433 2006-06-28  Simon Josefsson  <jas@extundo.com>
8434
8435         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8436         on _WIN32.
8437
8438         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8439         getnameinfo.
8440
8441 2006-06-28  Simon Josefsson  <jas@extundo.com>
8442
8443         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8444
8445 2006-06-28  Simon Josefsson  <jas@extundo.com>
8446
8447         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8448         functions there.  It will succeed on Windows XP, but on Windows
8449         2000 and (presumably) earlier, it will fail, and use the internal
8450         re-implementation.
8451         (use_win32_p): New function.
8452         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8453         Support AI_NUMERICSERV to disable getservbyname.
8454         (getnameinfo): New function, only supports
8455         NI_NUMERICHOST|NI_NUMERICSERV for now.
8456
8457         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8458         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8459         getnameinfo.
8460
8461 2006-06-28  Eric Blake  <ebb9@byu.net>
8462
8463         * modules/wcwidth: New file.
8464         * modules/mbchar (Depends-on): Add wcwidth.
8465         * modules/mbswidth (Depends-on): Add wcwidth.
8466         * MODULES.html.sh: Add wcwidth.
8467
8468 2006-06-28  Eric Blake  <ebb9@byu.net>
8469
8470         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8471         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8472
8473 2006-06-28  Eric Blake  <ebb9@byu.net>
8474
8475         * lib/xvasprintf.h: Fix comments.
8476
8477 2006-06-28  Eric Blake  <ebb9@byu.net>
8478
8479         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8480         * lib/mbswidth.c (wcwidth): Move from here...
8481         * lib/wcwidth.h: ...to this new file.
8482
8483 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8484
8485         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8486
8487         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8488         it's obsolete.
8489         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8490
8491 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8492
8493         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8494         Autoconf 2.60 says this stuff was obsolete.
8495
8496 2006-06-28  Bruno Haible  <bruno@clisp.org>
8497
8498         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8499
8500 2006-06-28  Bruno Haible  <bruno@clisp.org>
8501
8502         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8503         gt_TYPE_WCHAR_T.
8504
8505 2006-06-28  Bruno Haible  <bruno@clisp.org>
8506
8507         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8508         declaration for wcwidth.
8509         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8510
8511 2006-06-28  Bruno Haible  <bruno@clisp.org>
8512
8513         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8514         (mkdir): Define using _mkdir.
8515
8516 2006-06-28  Bruno Haible  <bruno@clisp.org>
8517
8518         * lib/getaddrinfo.h: Fix POSIX URL.
8519         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8520         _WIN32.
8521         (use_win32_p): Make static.
8522         (getaddrinfo): Reject service name if it is empty or does not consist
8523         solely of decimal digits, or if its value is > 65535.
8524         (getnameinfo): Remove useless casts.
8525
8526 2006-06-27  Simon Josefsson  <jas@extundo.com>
8527
8528         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8529         Eggert and Martin Lambers.
8530
8531 2006-06-27  Simon Josefsson  <jas@extundo.com>
8532
8533         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8534         Eggert and Martin Lambers.
8535
8536 2006-06-27  Bruno Haible  <bruno@clisp.org>
8537
8538         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8539         result to 0, not to empty.
8540         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8541
8542 2006-06-27  Bruno Haible  <bruno@clisp.org>
8543
8544         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8545
8546 2006-06-26  Simon Josefsson  <jas@extundo.com>
8547
8548         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8549         present.
8550
8551 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8552
8553         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8554         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8555         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8556
8557 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8558
8559         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8560
8561 2006-06-26  Bruno Haible  <bruno@clisp.org>
8562
8563         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8564
8565 2006-06-26  Bruno Haible  <bruno@clisp.org>
8566
8567         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8568
8569 2006-06-26  Bruno Haible  <bruno@clisp.org>
8570
8571         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8572         SGI C compiler in pre-C99 mode.
8573         Suggested by Mark D. Baushke and Larry Jones.
8574
8575 2006-06-26  Bruno Haible  <bruno@clisp.org>
8576
8577         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8578         WCHAR_MAX.
8579         Reported by Mark D. Baushke and Larry Jones.
8580
8581 2006-06-26  Bruno Haible  <bruno@clisp.org>
8582
8583         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8584         in pre-C99 mode.
8585         Suggested by Mark D. Baushke and Larry Jones.
8586
8587 2006-06-23  Simon Josefsson  <jas@extundo.com>
8588             Bruno Haible  <bruno@clisp.org>
8589
8590         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8591         Emit mostlyclean-local rule.
8592         (func_emit_tests_Makefile_am): Likewise.
8593         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8594
8595 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8596
8597         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8598
8599 2006-06-23  Bruno Haible  <bruno@clisp.org>
8600
8601         * tests/test-stdint.c: Update to match ISO C 99 Technical
8602         Corrigendum 1.
8603
8604 2006-06-23  Bruno Haible  <bruno@clisp.org>
8605
8606         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8607
8608 2006-06-23  Bruno Haible  <bruno@clisp.org>
8609
8610         * lib/stdint_.h: Treat IRIX like OpenBSD.
8611
8612 2006-06-23  Bruno Haible  <bruno@clisp.org>
8613
8614         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8615         ISO C 99 Technical Corrigendum 1.
8616
8617 2006-06-22  Simon Josefsson  <jas@extundo.com>
8618
8619         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8620         MinGW.
8621
8622 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8623
8624         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8625         needed.  Some compiler complained about some of them.  Problem reported
8626         by Larry Jones in
8627         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8628
8629 2006-06-21  Simon Josefsson  <jas@extundo.com>
8630
8631         * tests/test-getaddrinfo.c: New file.
8632
8633         * modules/getaddrinfo-tests: New file.
8634
8635         * MODULES.html.sh: Add inet_pton.
8636
8637         * modules/inet_pton: New file.
8638
8639 2006-06-21  Simon Josefsson  <jas@extundo.com>
8640
8641         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8642         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8643         of using the (limited) gnulib implementation on Windows XP.
8644
8645         * m4/inet_pton.m4: New file.
8646
8647 2006-06-21  Simon Josefsson  <jas@extundo.com>
8648
8649         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8650         variable.
8651
8652         * lib/socket_.h: Don't define WINVER.
8653
8654         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8655         slightly modified to work in gnulib.
8656
8657 2006-06-21  Simon Josefsson  <jas@extundo.com>
8658
8659         * doc/gnulib.texi (Windows sockets): Add.
8660
8661 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8662
8663         * lib/read-file.c (fread_file): Start with buffer allocation of
8664         0 bytes rather than 1 byte; this simplifies the code.
8665         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8666         code to free buffer and save/restore errno.
8667         (internal_read_file): Remove unused local.
8668
8669 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8670
8671         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8672         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8673         Problem reported by Denis Excoffier in
8674         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8675
8676 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8677
8678         * modules/sys_socket, modules/socklen: Include sys/types since
8679         FreeBSD 4.x's sys/socket.h needs it.
8680
8681 2006-06-19  Simon Josefsson  <jas@extundo.com>
8682
8683         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8684
8685 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8686
8687         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8688
8689 2006-06-19  Bruno Haible  <bruno@clisp.org>
8690
8691         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8692         and FULL_PATH_INTTYPES_H in angle brackets.
8693         Reported by Mark D. Baushke <mdb@gnu.org>.
8694
8695 2006-06-17  Eric Blake  <ebb9@byu.net>
8696
8697         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8698         errno.
8699
8700 2006-06-17  Bruno Haible  <bruno@clisp.org>
8701
8702         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8703         <sys/inttypes.h>.
8704
8705 2006-06-17  Bruno Haible  <bruno@clisp.org>
8706
8707         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8708         whether errno is declared. Assume <errno.h> declares errno.
8709
8710 2006-06-17  Bruno Haible  <bruno@clisp.org>
8711
8712         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8713
8714 2006-06-17  Bruno Haible  <bruno@clisp.org>
8715
8716         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8717         problem on Solaris 2.5.1.
8718
8719 2006-06-16  Eric Blake  <ebb9@byu.net>
8720
8721         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8722         * lib/unicodeio.c [!defined errno]: Likewise.
8723         * lib/strtol.c [!defined errno]: Likewise.
8724         * lib/strtod.c [!defined errno]: Likewise.
8725
8726 2006-06-15  Eric Blake  <ebb9@byu.net>
8727
8728         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8729
8730 2006-06-15  Eric Blake  <ebb9@byu.net>
8731
8732         * config/srclist.txt (ssize_t.m4): Lose sync.
8733
8734 2006-06-15  Bruno Haible  <bruno@clisp.org>
8735
8736         * modules/stdint (Files): Include m4/full-header-path.m4,
8737         m4/size_max.m4, m4/wchar_t.m4.
8738         (Makefile.am): Many more substitutions.
8739         * modules/stdint-tests: New file.
8740         * tests/test-stdint.c: New file.
8741
8742 2006-06-15  Bruno Haible  <bruno@clisp.org>
8743
8744         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8745         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8746         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8747         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8748         gl_CHECK_TYPE_SAME): New macros.
8749
8750 2006-06-15  Bruno Haible  <bruno@clisp.org>
8751
8752         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8753
8754 2006-06-15  Bruno Haible  <bruno@clisp.org>
8755
8756         * lib/stdint_.h: Rewritten to be fully auto-configured.
8757         Fixes bug on HP-UX/IA64.
8758
8759 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8760
8761         * lib/getdate.y (__attribute__): Don't define if already defined.
8762         Problem reported by Larry Jones.
8763         * lib/utimens.c (__attribute__): Likewise.
8764
8765 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8766
8767         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8768         reported by Andreas Schwab.
8769
8770 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8771             Bruno Haible  <bruno@clisp.org>
8772
8773         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8774         check for the declaration of strnlen and a run test that exposes the
8775         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8776         rpl_strndup.
8777
8778 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8779             Bruno Haible  <bruno@clisp.org>
8780
8781         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8782
8783 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8784
8785         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8786         compile test, for Tru64 4.0D.
8787
8788 2006-05-28  Karl Berry  <karl@gnu.org>
8789
8790         * config/srclist.txt (printf-args.c): lose sync.
8791
8792 2006-05-26  Martin Lambers  <marlam@marlam.de>
8793
8794         * lib/getpass.c: Updates the test for the native W32 API, and adds
8795         missing includes, thus fixing compilation warnings.
8796
8797 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8798
8799         * lib/exclude.c (exclude_fnmatch): New function.
8800         (excluded_file_name): Call exclude_fnmatch.
8801         * lib/exclude.h (excluded_file_name): New prototype
8802
8803 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8804
8805         * lib/tempname.c (small_open, large_open): New macros.
8806         (__open, __open64) [!_LIBC]: Remove.
8807         (__gen_tempname): Use small_open and large_open instead of __open
8808         and __open64.  This fixes a portability bug on HP-UX 11.11i
8809         reported by Simon Wing-Tang in
8810         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8811
8812 2006-05-24  Bruno Haible  <bruno@clisp.org>
8813
8814         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8815         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8816         Reported by Thorsten Maerz <torte@netztorte.de> via
8817         Aaron Stone <aaron@serendipity.cx>.
8818
8819 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8820
8821         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8822         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8823         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8824         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8825         not really conditional on the cache.
8826         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8827
8828 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8829
8830         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8831         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8832         (my_usleep): Don't mishandle maximum value.
8833
8834 2006-05-19  Jim Meyering  <jim@meyering.net>
8835
8836         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8837
8838 2006-05-17  Bruno Haible  <bruno@clisp.org>
8839
8840         Cygwin portability.
8841         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8842
8843 2006-05-17  Bruno Haible  <bruno@clisp.org>
8844
8845         * lib/stdint_.h: Fix recognition of Cygwin.
8846
8847 2006-05-15  Bruno Haible  <bruno@clisp.org>
8848
8849         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8850         on libtool patch by Ralf Wildenhues.
8851
8852 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8853
8854         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8855         test for C99 conformance; (bool) 0.5 is an integer constant
8856         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8857         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8858
8859 2006-05-11  Simon Josefsson  <jas@extundo.com>
8860
8861         * m4/xvasprintf.m4: Fix obvious typo.
8862
8863 2006-05-11  Jim Meyering  <jim@meyering.net>
8864
8865         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8866         James Lemley.
8867
8868 2006-05-10  Simon Josefsson  <jas@extundo.com>
8869
8870         * lib/md4.c: Typo fix, update copyright years.
8871         (K1, K2): Don't use L because it turn computations into 64-bit on
8872         64-bit platforms.
8873
8874 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8875
8876         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8877         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8878         unwanted sign propagation, e.g., on hosts with 64-bit int.
8879         There still are some problems with reeelly weird theoretical hosts
8880         (e.g., 33-bit int) but it's not worth worrying about now.
8881         * lib/sha1.c (rol): Likewise.
8882         (K1, K2, K3, K4): Remove unnecessary L suffix.
8883
8884 2006-05-10  Bruno Haible  <bruno@clisp.org>
8885
8886         * lib/des.c: Cast to avoid warnings.
8887
8888 2006-05-09  Bruno Haible  <bruno@clisp.org>
8889
8890         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8891         (Depends-on): Depend also on xsize, stdarg.
8892         (configure.ac): Add gl_XVASPRINTF.
8893
8894 2006-05-09  Bruno Haible  <bruno@clisp.org>
8895
8896         * m4/xvasprintf.m4: New file.
8897
8898 2006-05-09  Bruno Haible  <bruno@clisp.org>
8899
8900         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8901         (EOVERFLOW): Define fallback value.
8902         (xstrcat): New function.
8903         (xvasprintf): Recognize the special case of a string concatenation.
8904
8905 2006-05-08  Eric Blake  <ebb9@byu.net>
8906
8907         * gnulib-tool (func_version): Base copyright year on CVS date.
8908         (func_emit_copyright_notice): New function.
8909         (func_emit_lib_Makefile_am): Use it.
8910         (func_emit_tests_Makefile_am): Likewise.
8911         (func_import): Likewise.
8912
8913 2006-05-08  Bruno Haible  <bruno@clisp.org>
8914
8915         * modules/stdarg: New file.
8916         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8917
8918 2006-05-08  Bruno Haible  <bruno@clisp.org>
8919
8920         * m4/stdarg.m4: New file, from GNU gettext.
8921
8922 2006-05-08  Bruno Haible  <bruno@clisp.org>
8923
8924         * config/srclist.txt (build-aux/config.rpath): different from latest
8925         release.
8926
8927 2006-05-08  Bruno Haible  <bruno@clisp.org>
8928
8929         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8930
8931 2006-05-05  Jim Meyering  <jim@meyering.net>
8932
8933         * m4/warning.m4: New file, derived from bison's file by the same name.
8934
8935 2006-05-03  Bruno Haible  <bruno@clisp.org>
8936
8937         * lib/stdint_.h: Shorter URL.
8938         * lib/inttypes.h: Likewise.
8939
8940 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8941
8942         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8943
8944 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8945
8946         * lib/verify.h: Document the internals better.  Most of this change
8947         was written by Bruno Haible.
8948
8949 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8950
8951         * doc/verify.texi: New file, partly based on a proposal by
8952         Bruno Haible.
8953
8954 2006-05-02  Bruno Haible  <bruno@clisp.org>
8955
8956         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8957         test from here...
8958         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8959
8960 2006-04-29  Bruno Haible  <bruno@clisp.org>
8961
8962         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8963         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8964
8965 2006-04-29  Bruno Haible  <bruno@clisp.org>
8966
8967         * gnulib-tool: Make --update option actually work.
8968
8969 2006-04-29  Bruno Haible  <bruno@clisp.org>
8970
8971         * doc/gcd.texi: New file.
8972         * doc/gnulib.texi: Include it.
8973
8974 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8975
8976         * lib/getdate.y (get_date): When adding relative date, start with the
8977         initial time, not with the result of the first mktime call.
8978
8979 2006-04-25  Bruno Haible  <bruno@clisp.org>
8980
8981         * gnulib-tool (func_import): Output the include directives in three
8982         blocks, sorted separately.
8983         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8984
8985 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8986
8987         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8988         to define main with arguments, for C++.  Reported by Eric Blake.
8989         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8990         Prefer 'int main ()' to 'int main (void)', for C++.
8991         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8992         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8993         for 'main', for C99 and C++.
8994
8995 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8996
8997         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8998         Don't assume that exit status -1 is valid.
8999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9000         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9001         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9002         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9003         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9004         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9005         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9006         functions can be used without declaring them, or that you can
9007         exit with status -1.
9008         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9009
9010 2006-04-24  Karl Berry  <karl@gnu.org>
9011
9012         * config/srclist.txt (longdouble.m4): sync lost.
9013
9014 2006-04-24  Eric Blake  <ebb9@byu.net>
9015
9016         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9017
9018 2006-04-24  Bruno Haible  <bruno@clisp.org>
9019
9020         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9021         poll() implementation in AIX.
9022         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9023
9024 2006-04-24  Bruno Haible  <bruno@clisp.org>
9025
9026         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9027         assigned exactly once.
9028
9029 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9030             Bruno Haible  <bruno@clisp.org>
9031
9032         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9033         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9034         for AM_CPPFLAGS.
9035
9036 2006-04-23  Bruno Haible  <bruno@clisp.org>
9037
9038         * modules/copy-file: Depend on unistd.
9039         * modules/execute: Likewise.
9040         * modules/fatal-signal: Likewise.
9041         * modules/findprog: Likewise.
9042         * modules/mkdtemp : Likewise.
9043         * modules/pipe: Likewise.
9044         * modules/wait-process: Likewise.
9045
9046 2006-04-23  Bruno Haible  <bruno@clisp.org>
9047
9048         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9049         condition was already detected.
9050         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9051
9052 2006-04-23  Bruno Haible  <bruno@clisp.org>
9053
9054         * lib/copy-file.c: Include <unistd.h> unconditionally.
9055         * lib/execute.c: Likewise.
9056         * lib/fatal-signal.c: Likewise.
9057         * lib/findprog.c: Likewise.
9058         * lib/mkdtemp.c: Likewise.
9059         * lib/pipe.h: Likewise.
9060         * lib/pipe.c: Likewise.
9061         * lib/wait-process.h: Likewise.
9062
9063 2006-04-23  Bruno Haible  <bruno@clisp.org>
9064
9065         * gnulib-tool (func_usage): Fix --import description. Document
9066         --update.
9067         (func_import): Create temporary file in a temporary directory, if
9068         --dry-run is specified. Silence errors from 'grep' when there are no
9069         m4 files in $m4dir.
9070         (func_create_testdir): Silence errors from 'grep' when there are no
9071         m4 files in $m4dir.
9072         Reported by Karl Berry <karl@freefriends.org>.
9073
9074 2006-04-20  Bruno Haible  <bruno@clisp.org>
9075
9076         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9077         one argument, so that the code will be portable to Autoconf 2.60.
9078         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9079         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9080         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9081
9082 2006-04-19  Derek Price  <derek@ximbiot.com>
9083             Eric Blake  <ebb9@byu.net>
9084
9085         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9086         rather than "/full/path.h".  Update comment to match.  Shorten &
9087         generalize m4_translit call via AS_TR_CPP.
9088
9089 2006-04-19  Derek Price  <derek@ximbiot.com>
9090             Eric Blake  <ebb9@byu.net>
9091
9092         * lib/inttypes.h: Correct grammar in comment.
9093
9094 2006-04-18  Derek Price  <derek@ximbiot.com>
9095             Paul Eggert  <eggert@cs.ucla.edu>
9096
9097         * modules/inttypes: New file.
9098         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9099
9100 2006-04-18  Derek Price  <derek@ximbiot.com>
9101             Paul Eggert  <eggert@cs.ucla.edu>
9102
9103         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9104         New files.
9105
9106 2006-04-18  Derek Price  <derek@ximbiot.com>
9107             Paul Eggert  <eggert@cs.ucla.edu>
9108
9109         * lib/inttypes.h: New file.
9110         * lib/strtoimax.c: Assume <inttypes.h>.
9111
9112 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9113
9114         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9115         isn't mounted.  Problem reported by Kir Kolyshkin.
9116
9117 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9118
9119         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9120         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9121         Derek R. Price.
9122         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9123         implementation.
9124
9125 2006-04-12  Eric Blake  <ebb9@byu.net>
9126
9127         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9128         is now done automatically by the corresponding Autoconf macro.
9129
9130 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9131
9132         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9133         time_r.h.
9134
9135 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9136
9137         Merge regex changes from libc, removing some of our
9138         POSIX-conformance changes that were rejected and redoing them in a
9139         less-intrusive way.
9140
9141         * lib/regcomp.c (re_compile_internal, init_dfa):
9142         Length arg is now size_t, not Idx.  All uses changed.
9143         (peek_token): Forward decl now says internal_function.
9144         (__re_error_msgid, __re_error_msgid_idx):
9145         Now static rather than extern with attribute_hidden.
9146         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9147         For some reason libc prefers K&R style defns for external functions.
9148         (regerror) [!defined _LIBC]: Likewise.
9149         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9150         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9151         (build_range_exp, build_collating_symbol):
9152         Use K&R-style defn.
9153         (re_compile_fastmap): Use '\0' to memset, not 0.
9154         (utf8_sb_map): Make the calculations more obvious.
9155         (init_dfa, parse_bracket_exp, build_charclass_op):
9156         Call calloc and cast result, as glibc does.
9157         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9158         (build_range_exp, build_collating_symbol):
9159         Now internal functions.
9160
9161         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9162
9163         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9164         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9165         Don't depend on VMS; depend on __VMS instead, for POSIX
9166         namespace cleanness.
9167         (regoff_t): Define to ssize_t, not long int.
9168
9169         Remove the REG_ macros named below.  Instead, make the old names
9170         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9171         __USE_GNU_REGEX.
9172         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9173         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9174         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9175         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9176         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9177         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9178         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9179         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9180         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9181         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9182         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9183         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9184         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9185         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9186         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9187         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9188         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9189         (REG_NREGS):
9190         Remove.  All uses replaced by the old RE_* names.
9191         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9192         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9193         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9194         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9195         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9196         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9197         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9198         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9199         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9200         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9201         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9202         Don't bother having these macros be independent of each others'
9203         values, since they no longer exist in the POSIX name space.
9204
9205         Rename the following member names back to their old names,
9206         unless !__USE_GNU_REGEX.  All uses changed back.
9207         (buffer): Renamed from re_buffer.
9208         (allocated): Renamed from re_allocated.
9209         (used): Renamed from re_used.
9210         (syntax): Renamed from re_syntax.
9211         (fastmap): Renamed from re_fastmap.
9212         (translate): Renamed from re_translate.
9213         (can_be_null): Renamed from re_can_be_null.
9214         (regs_allocated): Renamed from re_regs_allocated.
9215         (fastmap_accurate): Renamed from re_fastmap_accurate.
9216         (no_sub): Renamed from re_no_sub.
9217         (not_bol): Renamed from re_not_bol.
9218         (not_eol): Renamed from re_not_eol.
9219         (newline_anchor): Renamed from re_newline_anchor.
9220         (num_regs): Renamed from rm_num_regs.
9221         (start): Renamed from rm_start.
9222         (end): Renamed from rm_end.
9223
9224         (free_state): Move up a bit.
9225
9226         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9227         #define to be empty.
9228         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9229         when that is what is intended.
9230         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9231         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9232         (MAX): New macro.
9233         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9234         All uses changed back to re_malloc, etc.  It's now the caller's
9235         responsibility to check for overflow; all callers changed.
9236         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9237         (re_x2nrealloc): Remove.
9238         (free_state): Remove decl.
9239
9240         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9241         (re_set_registers, re_exec):
9242         Use K&R-style defn.
9243
9244         2006-01-31  Roland McGrath  <roland@redhat.com>
9245
9246         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9247         Reported by Mike Frysinger <vapier@gentoo.org>.
9248
9249         2006-01-15  Andreas Jaeger  <aj@suse.de>
9250
9251         [BZ #1950]
9252         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9253         build_wcs_upper_buffer change.
9254         (build_wcs_upper_buffer): Change return type.
9255
9256         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9257
9258         * lib/regex_internal.h: Include <stdint.h> if available.
9259
9260         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9261
9262         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9263
9264         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9265
9266         * lib/regcomp.c: Adjust for changed secondary hash function.
9267
9268         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9269
9270         * lib/regex.h: Pretty printing.
9271         Clean up namespace a bit.
9272
9273         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9274
9275         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9276         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9277
9278         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9279                     Ulrich Drepper  <drepper@redhat.com>
9280
9281         [BZ #1302]
9282         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9283         changed.
9284         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9285
9286         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9287
9288         [BZ #281]
9289         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9290         * lib/regcomp.c: Remove unnecessary uses of
9291         unsigned RE_TRANSLATE_TYPE.
9292         * lib/regex_internal.h: Likewise.
9293         * lib/regex_internal.c: Likewise.
9294         * lib/regexec.c: Likewise.
9295         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9296
9297         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9298
9299         * lib/regexec.c (find_recover_state): Remove unnecessary
9300         initialization.
9301         (transit_state_bkref): Make DFA a const pointer.
9302         (get_subexp): Likewise.
9303         (check_arrival): Likewise.
9304         (update_cur_sifted_state): Likewise.
9305         (re_search_internal): Likewise.
9306         (prune_impossible_nodes): Likewise.
9307         (acquire_init_state_context): Likewise.
9308         (proceed_next_node): Likewise.
9309         (set_regs): Likewise.
9310         (free_fail_stack_return): Likewise.
9311         (check_arrival_expand_ecl): Mark DFA parameter as const.
9312         (check_arrival_expand_ecl_sub): Likewise.
9313         (check_subexp_limits): Likewise.
9314         (sub_epsilon_src_nodes):  Likewise.
9315         (add_epsilon_src_nodes):  Likewise.
9316         (merge_state_array): Likewise.
9317         (update_regs): Likewise.
9318         (build_trtable): Likewise.
9319         (sift_states_backward): Mark MCTX parameter as const.
9320         (build_sifted_states): Likewise.
9321         (update_cur_sifted_state): Likewise.
9322         (sift_states_mkref): Likewise.
9323         (check_arrival_expand_ecl): Mark eclosure as const.
9324         (check_dst_limits_calc_pos_1): Likewise.
9325         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9326         pointer.
9327
9328         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9329
9330         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9331         (transit_state_sb): Likewise.
9332         (transit_state_mb): Likewise.
9333         (sift_states_iter_mb): Likewise.
9334         (check_arrival_add_next_nodes): Likewise.
9335         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9336         [_LIBC] (re_search_2_stub): Use mempcpy.
9337
9338         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9339         mbrtowc for very simple UTF-8 case.
9340
9341         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9342         a pointer-to-const.
9343         (re_acquire_state_context): Likewise.
9344         * lib/regex_internal.h: Adjust prototypes.
9345
9346         * lib/regex.c: Prevent using C++ compilers.
9347
9348         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9349         (re_acquire_state_context): Likewise.
9350
9351 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9352
9353         * modules/regex (Depends-on): Add ssize_t.
9354
9355 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9356
9357         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9358         translation table.
9359
9360 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9361
9362         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9363
9364 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9365             Bruno Haible  <bruno@clisp.org>
9366
9367         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9368         <sys/types.h> and <inttypes.h>.
9369
9370 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9371
9372         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9373         `__error_t_defined', so argp.h will not typedef the former.
9374
9375 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9376
9377         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9378         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9379         glibc names.  Even if glibc is changed to conform to POSIX, the
9380         traditional names will be available anyway, since regex depends on
9381         the extensions module.  Also, fix a longstanding typo in the
9382         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9383         reported by Emanuele Giaquinta.  Also, change sense of cached
9384         variable, so that the message makes sense.
9385
9386 2006-03-24  Simon Josefsson  <jas@extundo.com>
9387
9388         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9389         including some doc fixes.
9390         (base64_encode_alloc): Fix +1 bug on allocation failures.
9391
9392 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9393
9394         * lib/base64.c (base64_encode): Do not read past end of array with
9395         unsanitized input on systems with CHAR_BIT > 8.
9396
9397 2006-03-24  Eric Blake  <ebb9@byu.net>
9398
9399         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9400
9401 2006-03-22  Karl Berry  <karl@gnu.org>
9402
9403         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9404         * config/srclistvars.sh (COREUTILS): new var.
9405
9406 2006-03-17  Jim Meyering  <jim@meyering.net>
9407
9408         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9409         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9410
9411 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9412
9413         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9414         no longer needs it.  Instead, check that regoff_t is as least
9415         as wide as ptrdiff_t.
9416
9417         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9418         so that our regex.h stays compatible with the installed regex.
9419         This is helpful for installers who configure --without-included-regex.
9420         Problem reported by Emanuele Giaquinta.
9421
9422 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9423
9424         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9425         Typedef to long int, not to off_, as POSIX will likely change
9426         in that direction.
9427
9428 2006-03-15  Eric Blake  <ebb9@byu.net>
9429
9430         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9431
9432 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9433
9434         * lib/argp-help.c (validate_uparams): Fix typo
9435         * lib/argp-parse.c (argp_default_options): Consistently begin help
9436         messages with a lowercase letter.
9437
9438 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9439
9440         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9441         overrun buffers and shouldn't be used (much as gets shouldn't be
9442         used).
9443         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9444
9445 2006-03-08  Simon Josefsson  <jas@extundo.com>
9446
9447         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9448         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9449
9450 2006-03-08  Simon Josefsson  <jas@extundo.com>
9451
9452         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9453         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9454
9455 2006-03-08  Simon Josefsson  <jas@extundo.com>
9456
9457         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9458         signal that configure disabled the device.
9459
9460 2006-03-08  Simon Josefsson  <jas@extundo.com>
9461
9462         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9463         languages.
9464
9465 2006-03-07  Simon Josefsson  <jas@extundo.com>
9466
9467         * modules/getopt (Depends-on): Add unistd.
9468
9469         * modules/unistd: New file.
9470
9471 2006-03-07  Simon Josefsson  <jas@extundo.com>
9472
9473         * modules/gc-random: New file.
9474
9475 2006-03-07  Simon Josefsson  <jas@extundo.com>
9476
9477         * m4/unistd_h.m4: New file.
9478
9479 2006-03-07  Simon Josefsson  <jas@extundo.com>
9480
9481         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9482         test to be side-effect free by storing the result in the cache
9483         variable gl_cv_lib_readline, and moving the assignment of
9484         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9485         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9486
9487 2006-03-07  Simon Josefsson  <jas@extundo.com>
9488
9489         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9490         error on missing devices (the functions will return an error).
9491
9492         * m4/gc.m4: Move random stuff to gc-random.m4
9493
9494 2006-03-07  Simon Josefsson  <jas@extundo.com>
9495
9496         * lib/unistd_.h: New file.
9497
9498 2006-03-07  Simon Josefsson  <jas@extundo.com>
9499
9500         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9501
9502 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9503
9504         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9505         Problem reported by Juan Manuel Guerrero.
9506
9507 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9508
9509         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9510         the unistd module.
9511         * lib/getlogin_r.c: Likewise.
9512         * lib/getlogin_r.h: Likewise.
9513         * lib/glob.c: Likewise.
9514         * lib/pagealign_alloc.c: Likewise.
9515         * lib/unistd_.h: Remove; no longer needed.
9516
9517 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9518
9519         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9520         Add unistd.
9521         * modules/c-stack (Depends-on): Add unistd.
9522         * modules/getlogin_r: Likewise.
9523         * modules/glob: Likewise.
9524         * modules/pagealign_alloc: Likewise.
9525         * modules/unistd (Files): Remove lib/unistd_.h.
9526         (EXTRA_DIST): Remove.
9527         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9528         need unistd_.h.
9529         (MOSTLYCLEANFILES): Remove unistd.h-t.
9530
9531 2006-03-03  Simon Josefsson  <jas@extundo.com>
9532
9533         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9534
9535 2006-03-03  Simon Josefsson  <jas@extundo.com>
9536
9537         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9538         libidn and bison.
9539
9540 2006-03-03  Simon Josefsson  <jas@extundo.com>
9541
9542         * build-aux/maint.mk: Add indent target.
9543
9544 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9545
9546         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9547         our replacement poll.h in any case, to avoid a differing
9548         declaration from a system header.  Seen on AIX.
9549
9550 2006-03-01  Simon Josefsson  <jas@extundo.com>
9551
9552         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9553         <kasal@ucw.cz>.
9554
9555 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9556
9557         * modules/gettime (Depends-on): Add extensions module.
9558         * modules/nanosleep (Depends-on): Likewise.
9559         * modules/settime (Depends-on): Likewise.
9560
9561 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9562
9563         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9564         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9565         pedantically.
9566         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9567         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9568
9569         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9570         not "==".  Reported by Ralf Wildenhues.
9571
9572 2006-03-01  Karl Berry  <karl@gnu.org>
9573
9574         * doc/Copyright/request-*: new files, synced from gnuorg.
9575
9576 2006-03-01  Karl Berry  <karl@gnu.org>
9577
9578         * config/srclist.txt (Copyright/*): new entries.
9579
9580 2006-02-28  Simon Josefsson  <jas@extundo.com>
9581
9582         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9583
9584 2006-02-27  Simon Josefsson  <jas@extundo.com>
9585
9586         * lib/base64.h: Indent #define's.  From Jim Meyering
9587         <jim@meyering.net>.
9588
9589 2006-02-27  Jim Meyering  <jim@meyering.net>
9590
9591         Revert the change of 2006-02-24, so these files can continue
9592         to be sync'd from gettext.
9593         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9594         of `config.h'.
9595
9596 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9597
9598         * modules/intprops: New file.
9599         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9600         Add intprops.
9601         * modules/getloadavg (Files): Remove lib/intprops.h.
9602         (Depends-on): Add intprops.
9603         * modules/human: Likewise.
9604         * modules/inttostr: Likewise.
9605         * modules/openat: Likewise.
9606         * modules/sig2str: Likewise.
9607         * modules/userspec: Likewise.
9608         * modules/utimecmp: Likewise.
9609         * modules/xnanosleep: Likewise.
9610         * modules/xstrtol: Likewise.
9611
9612 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9613
9614         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9615         * modules/lock-tests (TESTS): Use $(EXEEXT).
9616         * modules/tls-tests: Likewise.
9617         * modules/argp-tests: Likewise.
9618         (check_PROGRAMS): New var, replacing...
9619         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9620
9621 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9622
9623         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9624         `config.h'.
9625
9626 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9627
9628         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9629
9630 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9631
9632         Sync from coreutils.
9633         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9634         gl_CHDIR_SAFER.
9635
9636 2006-02-22  Jim Meyering  <jim@meyering.net>
9637
9638         Sync from coreutils.
9639         * m4/chdir-safer.m4: New file.
9640
9641 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9642
9643         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9644         AT_FDCWD exceeds INT_MAX.
9645         * lib/openat.h (AT_FDCWD): Likewise.
9646
9647 2006-02-17  Eric Blake  <address@hidden>
9648
9649         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9650
9651 2006-02-16  Simon Josefsson  <jas@extundo.com>
9652
9653         * modules/getaddrinfo (Depends-on): Add sys_socket.
9654
9655 2006-02-15  Simon Josefsson  <jas@extundo.com>
9656
9657         * build-aux/maint.mk: Add dsyntax-check rule.
9658
9659 2006-02-15  Eric Blake  <ebb9@byu.net>
9660
9661         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9662         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9663         'present but cannot compile' warnings on cygwin.
9664         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9665         use ws2tcpip.h if sys/socket.h works.
9666         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9667         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9668
9669 2006-02-14  Simon Josefsson  <jas@extundo.com>
9670
9671         * modules/maintainer-makefile (Files): Rename.
9672
9673         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9674         and (the local) Makefile.cfg to maint-cfg.mk.
9675
9676         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9677         to the latter.
9678
9679         * modules/maintainer-makefile: New module.
9680
9681         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9682         severaly stripped to make it possible to build it up from scratch
9683         with reliable tests.
9684
9685         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9686         fixes to permit overriding the default actions when configure and
9687         makefile are not available.
9688
9689 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9690
9691         Sync from coreutils.
9692         * modules/lstat (Depends-on): Don't depend on xalloc.
9693         (License): Change from GPL to LGPL, since this is now simply a
9694         replacement for a libc function.
9695
9696 2006-02-14  Jim Meyering  <jim@meyering.net>
9697
9698         Sync from coreutils.
9699
9700         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9701         failure on deficient systems, and simplify gnulib lgpl dependencies.
9702         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9703         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9704
9705         * lib/xalloc-die.c: Remove unused definition of N_.
9706
9707 2006-02-14  Jim Meyering  <jim@meyering.net>
9708
9709         Sync from coreutils.
9710         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9711         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9712         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9713         double-quote uses of that variable, to accommodate the rare case in
9714         which getmntent is available in none of the libraries checked.  This
9715         happens at least on FreeBSD 5.0.
9716
9717 2006-02-13  Simon Josefsson  <jas@extundo.com>
9718
9719         * gnulib-tool (Usage): Fix --import, from
9720         karl@freefriends.org (Karl Berry).
9721
9722 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9723
9724         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9725
9726 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9727
9728         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9729         "autoupdate" on 2005-12-12.
9730
9731 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9732
9733         * modules/closeout (Depends-on): Remove atexit.
9734
9735 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9736
9737         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9738         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9739
9740 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9741
9742         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9743         __EXTENSIONS__ if this causes compilation to fail.  Problem
9744         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9745         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9746
9747 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9748
9749         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9750         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9751         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9752         All uses changed.
9753
9754 2006-01-26  Simon Josefsson  <jas@extundo.com>
9755
9756         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9757         prototype is visible on mingw32.
9758
9759         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9760         for mingw32.
9761
9762         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9763         mingw32).
9764
9765 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9766
9767         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9768         attempt to open for write; this always fails, at least on POSIX
9769         hosts.  This reinstates the 2006-01-09 change, which was
9770         inadvertently removed.
9771
9772 2006-01-26  Bruno Haible  <bruno@clisp.org>
9773
9774         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9775         Reported by Paul Eggert.
9776
9777 2006-01-26  Bruno Haible  <bruno@clisp.org>
9778             Paul Eggert  <eggert@cs.ucla.edu>
9779
9780         * lib/stdbool_.h (_Bool)
9781         [(! (defined __cplusplus || defined __BEOS__)
9782           && !defined __GNUC__
9783           && !(defined __HP_cc || defined __xlc__
9784                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9785                || defined __sgi))]:
9786         #define to signed char in these cases too; this simplifies
9787         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9788         etc., separately) and makes it more conservative.
9789
9790 2006-01-25  Simon Josefsson  <jas@extundo.com>
9791
9792         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9793         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9794         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9795
9796 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9797
9798         * lib/argp-namefrob.h: Bugfix. Remove stray #
9799
9800 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9801
9802         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9803         so that we test the test.
9804         Check for yet another HP-UX cc bug involving *bool |= bool.
9805
9806 2006-01-25  Karl Berry  <karl@gnu.org>
9807
9808         * config/srclist.txt (vasnprintf.c): sync lost.
9809
9810 2006-01-25  Jim Meyering  <jim@meyering.net>
9811
9812         Sync from the stable (b5) branch of coreutils:
9813
9814         * lib/fts.c (fts_children): Don't let close() clobber errno from
9815         failed fchdir().
9816
9817         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9818         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9819         a dangling symlink.  That can also happen at least for ELOOP.
9820         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9821         FYI, this bug predates the inclusion of fts.c in coreutils.
9822
9823         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9824         in their own block, so pre-c99 compilers don't object.
9825
9826         Avoid the double-free (first in fts_read, second in fts_close) that
9827         would occur when an `active' directory is made inaccessible (e.g.,
9828         via chmod a-x) during a traversal.
9829         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9830         before returning.  Reproduce this failure by
9831         mkdir -p a/b; cd a; chmod a-x . b
9832         Reported by Stavros Passas.
9833
9834 2006-01-25  Jim Meyering  <jim@meyering.net>
9835
9836         * lib/fileblocks.c: Remove more useless parentheses.
9837         * lib/readutmp.h: Likewise.
9838
9839 2006-01-25  Bruno Haible  <bruno@clisp.org>
9840
9841         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9842         warnings.
9843         Reported by Paul Eggert.
9844
9845 2006-01-25  Bruno Haible  <bruno@clisp.org>
9846
9847         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9848         rid of a trap command. For Solaris sh.
9849         Reported by Mark D. Baushke <mdb@gnu.org>.
9850
9851 2006-01-24  Simon Josefsson  <jas@extundo.com>
9852
9853         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9854         Bruno.
9855
9856 2006-01-24  Karl Berry  <karl@gnu.org>
9857
9858         * config/srclist.txt (argp-namefrob.h): sync lost.
9859
9860 2006-01-24  Jim Meyering  <jim@meyering.net>
9861
9862         * modules/openat (Files): Add lib/intprops.h.
9863         From Mark D. Baushke.
9864
9865 2006-01-24  Jim Meyering  <jim@meyering.net>
9866
9867         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9868         Reported by Mark D. Baushke.
9869
9870 2006-01-24  Jim Meyering  <jim@meyering.net>
9871
9872         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9873
9874 2006-01-24  Bruno Haible  <bruno@clisp.org>
9875
9876         * modules/strnlen (Maintainer): Change from glibc to all.
9877
9878 2006-01-24  Bruno Haible  <bruno@clisp.org>
9879
9880         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9881         Patch by Paul Eggert.
9882
9883 2006-01-24  Bruno Haible  <bruno@clisp.org>
9884
9885         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9886         already has it.
9887         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9888         2005-11-26.
9889
9890         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9891         'signed char' to avoid problems with the built-in _Bool type.
9892         Reported by Paul Eggert on 2005-11-26.
9893
9894 2006-01-24  Bruno Haible  <bruno@clisp.org>
9895
9896         * gnulib-tool (func_import): Avoid constructing complicated sed
9897         expressions inside backquote.
9898         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9899
9900 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9901
9902         These changes imported from libc.
9903         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9904         test and two separate function calls.
9905         * lib/strndup.c (__strndup): Add libc_hidden_def.
9906
9907 2006-01-23  Simon Josefsson  <jas@extundo.com>
9908
9909         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9910         Remove the test_*_SOURCES variable: automake infers it by default.
9911         * modules/tls-tests: Likewise.
9912
9913 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9914
9915         Work around porting bugs reported by Dieter in
9916         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9917         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9918         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9919         Include "getopt.h" first, to check interface.
9920         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9921         !HAVE_DECL_GETENV.
9922         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9923         (__strndup): Revert to K&R-style function dfns, the glibc style.
9924         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9925         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9926         Include strnlen.h first, to get prototype properly.
9927         (strnlen): Renamed from __strnlen.
9928         Remove weak alias.
9929
9930 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9931
9932         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9933
9934 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9935
9936         * config/srclist.txt: Adjust to reflect glibc reorganization.
9937         This affects only comments.
9938
9939 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9940
9941          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9942          Reported by Bruce Korb <bkorb@gnu.org>.
9943
9944 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9945
9946         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9947         to pacify gcc -Wswitch-default.
9948
9949 2006-01-22  Bruno Haible  <bruno@clisp.org>
9950
9951         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9952         temporary buffer for sprintf, take into account the precision also
9953         for 'd', 'i', 'u', 'o', 'x', 'X'.
9954
9955 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9956
9957         * modules/argp-tests: New module
9958         * tests/test-argp.c: New file
9959         * tests/test-argp-2.sh: New file
9960
9961 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9962
9963         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9964         (__argp_base_name): Removed
9965         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9966         typo.
9967         (__argp_base_name): Provide macro definition or extern declaration
9968         depending on the configuration
9969
9970 2006-01-20  Simon Josefsson  <jas@extundo.com>
9971
9972         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9973
9974 2006-01-20  Simon Josefsson  <jas@extundo.com>
9975
9976         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9977
9978 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9979
9980         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9981         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9982         Suggested by Bruno Haible.
9983
9984 2006-01-20  Karl Berry  <karl@gnu.org>
9985
9986         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9987         until changes propagate, I guess.
9988
9989 2006-01-19  Simon Josefsson  <jas@extundo.com>
9990
9991         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9992
9993 2006-01-19  Simon Josefsson  <jas@extundo.com>
9994
9995         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9996
9997 2006-01-19  Simon Josefsson  <jas@extundo.com>
9998
9999         * gnulib-tool: Set check_PROGRAMS.
10000
10001         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10002         modules/des-tests, modules/gc-arcfour-tests,
10003         modules/gc-arctwo-tests, modules/gc-des-tests,
10004         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10005         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10006         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10007         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10008         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10009         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10010         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10011         test_*_SOURCES.
10012
10013 2006-01-18  Simon Josefsson  <jas@extundo.com>
10014
10015         * modules/socklen (Depends-on): Depend on sys_socket.
10016
10017 2006-01-18  Simon Josefsson  <jas@extundo.com>
10018
10019         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10020         modules/des-tests, modules/gc-arcfour-tests,
10021         modules/gc-arctwo-tests, modules/gc-des-tests,
10022         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10023         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10024         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10025         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10026         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10027         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10028         $(EXEEXT) to automake TESTS variable, for mingw32.
10029
10030 2006-01-17  Simon Josefsson  <jas@extundo.com>
10031
10032         * modules/socklen (Include): Need sys/socket.h.
10033
10034 2006-01-17  Bruno Haible  <bruno@clisp.org>
10035
10036         * modules/ssize_t (Include): Add <sys/types.h>.
10037
10038 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10039
10040         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10041         it's not portable and it doesn't work with cross-compiles.
10042         Problem reported by Bruno Haible.  Fix missing-$ typo in
10043         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10044         -zignore from being used with Sun's C compiler.
10045
10046 2006-01-12  Simon Josefsson  <jas@extundo.com>
10047
10048         * lib/base64.c: Fix warning, reported by Bruno Haible
10049         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10050
10051 2006-01-12  Bruno Haible  <bruno@clisp.org>
10052
10053         * modules/ldd: New file.
10054         * build-aux/ldd.sh.in: New file.
10055         * MODULES.html.sh (Support for building libraries and executables): Add
10056         ldd.
10057
10058 2006-01-12  Bruno Haible  <bruno@clisp.org>
10059
10060         * m4/ldd.m4: New file.
10061
10062 2006-01-12  Bruno Haible  <bruno@clisp.org>
10063
10064         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10065         endless loop while replacing $auxdir with build-aux.
10066
10067 2006-01-11  Simon Josefsson  <jas@extundo.com>
10068
10069         * lib/stdint_.h (SIZE_MAX): Add missing (.
10070
10071 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10072
10073         Sync from coreutils.
10074         * lib/md5.c: Fix commentary typos.
10075         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10076         * lib/md5.h (__attribute__): Remove; unused.
10077         * lib/sha1.c: Fix commentary to match md5 better.
10078         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10079         so that we don't need to worry about alignment.  All uses changed.
10080         This merges the 2005-10-28 md5 change into sha1.
10081
10082 2006-01-11  Jim Meyering  <jim@meyering.net>
10083
10084         Sync from coreutils.
10085         * lib/md5.c (OP): Fix spacing.
10086
10087 2006-01-11  Bruno Haible  <bruno@clisp.org>
10088
10089         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10090         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10091         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10092
10093 2006-01-11  Bruno Haible  <bruno@clisp.org>
10094
10095         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10096         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10097         the "early" section as well.
10098
10099 2006-01-11  Bruno Haible  <bruno@clisp.org>
10100
10101         Avoid "ar: no archive members specified" error on MacOS X.
10102         * gnulib-tool (func_modules_add_dummy): New function.
10103         (func_import, func_create_testdir): Invoke it.
10104
10105 2006-01-11  Bruno Haible  <bruno@clisp.org>
10106
10107         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10108         with $auxdir in AC_CONFIG_FILES statements.
10109
10110 2006-01-11  Bruno Haible  <bruno@clisp.org>
10111
10112         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10113         Initialize also noinst_HEADERS to empty.
10114
10115 2006-01-11  Bruno Haible  <bruno@clisp.org>
10116
10117         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10118         variables.
10119         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10120         autoreconf.
10121
10122 2006-01-11  Bruno Haible  <bruno@clisp.org>
10123
10124         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10125         overridable by the user.
10126         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10127
10128 2006-01-10  Simon Josefsson  <jas@extundo.com>
10129
10130         * modules/sys_socket: New file.
10131
10132 2006-01-10  Simon Josefsson  <jas@extundo.com>
10133
10134         * m4/sys_socket_h.m4: New file.
10135
10136 2006-01-10  Simon Josefsson  <jas@extundo.com>
10137
10138         * lib/socket_.h: New file.
10139
10140 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10141
10142         * modules/readutmp (Maintainer): Add myself.
10143
10144 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10145
10146         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10147         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10148         People who are still concerned with buggy memcmp implementations
10149         can invoke gl_FUNC_MEMCMP themselves.
10150
10151 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10152
10153         * lib/regex_internal.h (BITSET_WORD_BITS):
10154         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10155         preprocessor mishandles large unsigned values as if they were signed.
10156         Problem reported by Claudio Fontana in
10157         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10158
10159 2006-01-10  Jim Meyering  <jim@meyering.net>
10160
10161         Avoid the double-free (first in fts_read, second in fts_close) that
10162         would occur when an `active' directory is made inaccessible (e.g.,
10163         via chmod a-x) during a traversal.
10164         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10165         before returning.  Reproduce this failure by
10166         mkdir -p a/b; cd a; chmod a-x . b
10167         Reported by Stavros Passas.
10168
10169         Sync from coreutils.
10170         * lib/sha1.c: Tweak grammar in a comment.
10171
10172 2006-01-10  Jim Meyering  <jim@meyering.net>
10173
10174         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10175         Patch by Joerg Sonnenberger.
10176
10177 2006-01-10  Bruno Haible  <bruno@clisp.org>
10178
10179         * modules/readutmp: Depend on module free.
10180         * modules/strtok_r: Depend on module restrict.
10181
10182 2006-01-10  Bruno Haible  <bruno@clisp.org>
10183
10184         * modules/gettext (configure.ac): Add an invocation of
10185         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10186
10187 2006-01-10  Bruno Haible  <bruno@clisp.org>
10188
10189         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10190         Reported by Werner Lemberg <wl@gnu.org>.
10191
10192 2006-01-10  Bruno Haible  <bruno@clisp.org>
10193
10194         * lib/localcharset.c: Update from GNU gettext.
10195
10196 2006-01-10  Bruno Haible  <bruno@clisp.org>
10197
10198         * lib/argp.h (__const): Remove macro. Use const instead.
10199         * lib/argp-fmtstream.h (__const): Likewise.
10200         * lib/glob_.h (__const): Remove macro.
10201         * lib/glob-libc.h: Use const instead of __const.
10202
10203 2006-01-10  Bruno Haible  <bruno@clisp.org>
10204
10205         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10206         variable.
10207         Needed to avoid an automake error regarding the 'gettext' module.
10208
10209 2006-01-09  Simon Josefsson  <jas@extundo.com>
10210
10211         * modules/inet_ntop (Depends-on): Add restrict.
10212
10213 2006-01-09  Simon Josefsson  <jas@extundo.com>
10214
10215         * modules/gc-rijndael-tests (License): Put under LGPL.
10216
10217         * modules/gc-des-tests (License): Likewise.
10218
10219         * modules/gc-arcfour-tests (License): Likewise.
10220
10221         * modules/gc-arctwo-tests (License): Likewise.
10222
10223         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10224
10225         * modules/gc-hmac-sha1-tests (Files): Likewise.
10226
10227         * modules/gc-hmac-md5-tests (License): Likewise.
10228
10229         * modules/gc-sha1-tests (License): Likewise.
10230
10231         * modules/gc-md5-tests (License): Likewise.
10232
10233         * modules/gc-md4-tests (License): Likewise.
10234
10235         * modules/gc-md2-tests (License): Likewise.
10236
10237         * modules/gc-tests (License): Likewise.
10238
10239         * modules/des-tests (License): Likewise.
10240
10241         * modules/md4-tests (License): Likewise.
10242
10243         * modules/md2-tests (License): Likewise.
10244
10245 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10246
10247         Sync from coreutils:
10248
10249         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10250         * modules/lib-ignore: New file.
10251         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10252         chdir-safer.m4, lchmod.m4.
10253         * modules/openat: Add mkdirat.c, openat-priv.h.
10254
10255 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10256
10257         Sync from coreutils.
10258         * m4/lib-ignore.m4: New file.
10259         * m4/lchmod.m4: New file.
10260
10261 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10262
10263         Sync from coreutils.
10264         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10265         for write access: POSIX says that must fail.
10266         * lib/fts.c (diropen): Likewise.
10267         * lib/save-cwd.c (save_cwd): Likewise.
10268         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10269         well, for minor improvements on hosts that lack O_DIRECTORY.
10270         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10271         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10272         Fall back on chown if open failed with EACCES.
10273
10274         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10275         Report an error at compile-time if only a 1-second nominal clock
10276         resolution is found.
10277
10278         * lib/lchmod.h: New file.
10279         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10280         (make_dir_parents): Use lchown rather than chown, and
10281         lchmod rather than chmod.
10282
10283         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10284         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10285         "proc" reported by n0dalus.
10286
10287         * lib/mountlist.c: Include <limits.h>.
10288         (dev_from_mount_options)
10289         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10290         New function.  It no longer assumes "dev=" has the System V meaning
10291         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10292         (read_file_system_list)
10293         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10294         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10295         dev= in that case.
10296
10297         * lib/posixtm.h (PDS_PRE_2000): New macro.
10298         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10299         allow_century.  All usages changed.  Reject dates outside the range
10300         1969-1999 if PDS_PRE_2000 is used.
10301
10302 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10303
10304         Sync from coreutils.
10305         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10306         (Time of day items): Mention the possibility of leap seconds.
10307         Problem reported by Dr. David Alan Gilbert.
10308
10309 2006-01-09  Jim Meyering  <jim@meyering.net>
10310
10311         Sync from coreutils.
10312
10313         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10314
10315         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10316
10317         * lib/modechange.c (mode_compile): Reject an invalid mode string
10318         that starts with an octal digit.  From Andreas Gruenbacher.
10319
10320         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10321         and dup to open_safer and dup_safer, respectively.
10322         (openat_permissive): Fix typo in comment.
10323
10324         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10325         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10326         (_): Remove; no longer needed.
10327         (openat): Renamed from rpl_openat; no need for rpl_openat
10328         since openat.h renames openat for us.
10329         Replace most of the body with a call to openat_permissive,
10330         to avoid duplicate code.
10331         Port to (probably hypothetical) environments were mode_t is
10332         wider than int.
10333         (openat_permissive): Require mode arg, so that we can check
10334         types better.  Put it just after flags.  Change cwd failure
10335         indicator from pointer-to-bool to pointer-to-errno-value.
10336         All callers changed.
10337         Invoke openat_save_fail and/or openat_restore_fail if
10338         cwd_errno is null, so that openat can call us.
10339         (openat_permissive, fdopendir, fstatat, unlinkat):
10340         Simplify errno handling to avoid some duplicate code,
10341         as it's OK to set errno on success.
10342         * lib/openat.h: Revamp code so that function macros depend on
10343         __OPENAT_PREFIX only, not also on AT_FDCWD.
10344         (openat_ro): Remove.  Caller changed to use openat_permissive.
10345         (openat_permissive): Now a macro, if not a function.
10346         (openat_restore_fail, openat_save_fail): Now always functions,
10347         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10348
10349         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10350         and openat.c.
10351         * lib/mkdirat.c: Include openat-priv.h.
10352         Remove definitions of macros defined therein.
10353         * lib/openat.c: Likewise.
10354
10355         * lib/mkdirat.c (mkdirat): New file and function.
10356         * lib/openat.h (mkdirat): Declare.
10357
10358         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10359
10360         * lib/openat.h (openat_permissive): Declare.
10361         (openat_ro): Define.
10362
10363         * lib/openat.c (EXPECTED_ERRNO): New macro.
10364         (openat_permissive): New function -- used in remove.c rewrite.
10365         (all functions): Set errno just before returning, only if there
10366         was an actual failure.
10367         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10368
10369         Emulate openat-family functions using Linux's procfs, if possible.
10370         Idea and some code based on Ulrich Drepper's glibc changes.
10371
10372         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10373         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10374         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10375         before falling back on save_cwd and restore_cwd.
10376         (fdopendir, fstatat, unlinkat): Likewise.
10377
10378         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10379         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10380
10381         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10382         as second argument to va_arg.  Otherwise, some versions of gcc
10383         warn that `if this code is reached, the program will abort'.
10384
10385 2006-01-09  Jim Meyering  <jim@meyering.net>
10386
10387         Sync from coreutils.
10388         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10389         Require openat-priv.h.
10390
10391 2006-01-09  Bruno Haible  <bruno@clisp.org>
10392
10393         * modules/strnlen (Include): Use strnlen.h.
10394
10395 2006-01-09  Bruno Haible  <bruno@clisp.org>
10396
10397         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10398
10399 2006-01-09  Bruno Haible  <bruno@clisp.org>
10400
10401         * lib/sysexit_.h (EX_OK): New macro.
10402         Suggested by Martin Lambers <marlam@marlam.de>.
10403
10404 2006-01-09  Bruno Haible  <bruno@clisp.org>
10405
10406         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10407         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10408
10409 2006-01-09  Bruno Haible  <bruno@clisp.org>
10410
10411         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10412         numbers.
10413
10414 2006-01-09  Bruno Haible  <bruno@clisp.org>
10415
10416         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10417         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10418         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10419         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10420
10421 2006-01-09  Bruno Haible  <bruno@clisp.org>
10422
10423         * build-aux/javacomp.sh.in: New file, moved from lib/.
10424         * modules/javacomp-script (Files): Update.
10425         (configure.ac): Add AC_CONFIG_FILES invocation.
10426         (EXTRA_DIST): Remove variable.
10427
10428         * build-aux/javaexec.sh.in: New file, moved from lib/.
10429         * modules/javaexec (Files): Update.
10430         (configure.ac): Add AC_CONFIG_FILES invocation.
10431         (EXTRA_DIST): Remove javaexec.sh.in.
10432
10433         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10434         * modules/csharpcomp-script (Files): Update.
10435         (configure.ac): Add AC_CONFIG_FILES invocation.
10436         (EXTRA_DIST): Remove variable.
10437
10438         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10439         * modules/csharpexec (Files): Update.
10440         (configure.ac): Add AC_CONFIG_FILES invocation.
10441         (EXTRA_DIST): Remove csharpexec.sh.in.
10442
10443 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10444
10445         Sync from coreutils.
10446
10447         Add POSIX ACL support
10448         * lib/acl.h (copy_acl, set_acl): Add declarations.
10449         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10450         systems other than Linux.
10451         (chmod_or_fchmod): New function: use fchmod when possible,
10452         and chmod otherwise.
10453         (file_has_acl): Add a POSIX ACL implementation, with a
10454         Linux-specific subcase.
10455         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10456         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10457         acls are unsupported.
10458         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10459         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10460         are unsupported.
10461
10462 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10463
10464         Sync from coreutils.
10465         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10466
10467 2006-01-07  Bruno Haible  <bruno@clisp.org>
10468
10469         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10470         gl_EARLY.
10471
10472 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10473
10474         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10475         Problem reported for Mingw by Mark Junker.
10476
10477 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10478
10479         * README: Gnulib normally doesn't generate a tarball.
10480
10481 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10482
10483         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10484         long int, not int, for nanosecond counts, so that people who are
10485         used to POSIX struct timespec won't be surprised.  Reported by Jim
10486         Meyering.
10487
10488 2005-12-28  Bruno Haible  <bruno@clisp.org>
10489
10490         * build-aux/config.rpath: Update from GNU gettext.
10491
10492 2005-12-16  Jim Meyering  <jim@meyering.net>
10493
10494         * modules/fprintftime: New module.
10495         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10496
10497 2005-12-16  Jim Meyering  <jim@meyering.net>
10498
10499         * m4/fprintftime.m4: New file.
10500
10501 2005-12-16  Jim Meyering  <jim@meyering.net>
10502
10503         * lib/fprintftime.c, lib/fprintftime.h: New files.
10504
10505 2005-12-15  Simon Josefsson  <jas@extundo.com>
10506
10507         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10508         new m4/socklen.m4.
10509
10510 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10511
10512         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10513         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10514
10515 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10516
10517         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10518         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10519         struct uparams is valid. Fall back to the default values if it is
10520         not.
10521
10522 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10523
10524         * modules/argp (Files): Add argp-pin.c
10525         (Depends-on): dirname
10526         (lib_SOURCES): Add argp-pin.c
10527
10528 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10529
10530         * m4/argp.m4:  Check if program_invocation_name and
10531         program_invocation_short_name are declared and define appropriate
10532         macros if they are not.
10533
10534 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10535
10536         * lib/argp-help.c (__argp_base_name): New function
10537         (__argp_short_program_name): Rewrite using __argp_base_name
10538         * lib/argp-namefrob.h: Define program_invocation_name and
10539         program_invocation_short_name if requested
10540         (__argp_base_name): Add prototype
10541         * lib/argp-parse.c (argp_def): Use gettext wrappers
10542         (argp_default_parser): Use __argp_base_name
10543         * lib/argp-pin.c: New file. Defines program_invocation_name and
10544         program_invocation_short_name on systems that lack them.
10545
10546 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10547
10548         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10549         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10550         porting problem reported by Georg Schwarz in
10551         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10552
10553 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10554
10555         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10556         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10557         porting problem reported by Georg Schwarz in
10558         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10559
10560 2005-12-05  Bruno Haible  <bruno@clisp.org>
10561
10562         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10563         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10564         Reported by Mark Junker <mjscod@gmx.de>.
10565
10566 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10567
10568         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10569         Use implementation from Albert Chin, with some
10570         comments/corrections by Stepan Kasal and myself.
10571
10572 2005-12-02  Bruno Haible  <bruno@clisp.org>
10573
10574         * gnulib-tool (func_import): Accept GPLed build tool modules when
10575         --lgpl is given.
10576         * modules/csharpcomp-script: New file.
10577         * modules/csharpcomp: Depend on it.
10578         * modules/javacomp-script: New file.
10579         * modules/javacomp: Depend on it.
10580         Suggested by Simon Josefsson.
10581
10582 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10583
10584         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10585         statement, to work around an HP-UX 10.20 compiler bug reported by
10586         Peter O'Gorman.
10587
10588 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10589
10590         * modules/savedir (Depends-on): Add openat.
10591
10592 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10593
10594         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10595         (uintmax_t) [defined uintmax_t]: Do not declare.
10596         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10597         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10598         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10599         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10600         sake of portability to weird hosts that C allows (though we don't
10601         know of any practical examples).
10602
10603         * lib/savedir.h (fdsavedir): New decl.
10604         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10605         contains most of the former guts of savedir.
10606         (savedir): Use savedirstream.
10607         Include "openat.h".
10608
10609 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10610
10611         * modules/obstack (Files): Add m4/ulonglong.m4.
10612         Problem reported by Davide Angelocola.
10613
10614 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10615
10616         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10617         coreutils no longer futzes with rounding modes.
10618
10619 2005-11-14  Jim Meyering  <jim@meyering.net>
10620
10621         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10622         replacement of mkstemp.
10623
10624 2005-11-10  Simon Josefsson  <jas@extundo.com>
10625
10626         * lib/readline.c: Remove EOL.
10627
10628 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10629
10630         * modules/gethrxtime (Depends-on): Add gettime.
10631
10632 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10633
10634         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10635         or gettimeofday; no longer needed.
10636
10637 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10638
10639         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10640         time business.
10641         (gethrxtime) [! (HAVE_NANOUPTIME
10642         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10643         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10644         our own approximation.
10645
10646 2005-11-08  Eric Blake  <ebb9@byu.net>
10647
10648         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10649
10650 2005-11-08  Eric Blake  <ebb9@byu.net>
10651
10652         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10653
10654 2005-11-04  Bruno Haible  <bruno@clisp.org>
10655
10656         * gnulib-tool: Implement --update mode.
10657
10658 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10659
10660         Fix porting problem reported by Theodoros V. Kalamatianos.
10661         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10662         Don't assume that futimes failing means we must fail.
10663
10664 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10665
10666         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10667         variables to suggest the intended function of the PATH_MAX check.
10668
10669 2005-10-30  Kean Johnston  <jkj@sco.com>
10670
10671         Trivial changes to support SCO systems.
10672         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10673         as PATH_MAX.
10674         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10675         where __ptr is null when no I/O is pending.
10676
10677 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10678
10679         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10680         leave errno alone.  Problem reported by Dmitry V. Levin.
10681
10682 2005-10-28  Simon Josefsson  <jas@extundo.com>
10683
10684         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10685         Test more.
10686
10687         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10688
10689         * modules/md2, modules/md2-tests: New files.
10690
10691 2005-10-28  Simon Josefsson  <jas@extundo.com>
10692
10693         * m4/inet_ntop.m4: More tests.
10694
10695         * m4/gc-md2.m4, md2.m4: New file.
10696
10697 2005-10-28  Simon Josefsson  <jas@extundo.com>
10698
10699         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10700         "restrict" keywords, as per POSIX.  Protect the function
10701         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10702         Don't use K&R prototypes.  Check the sprintf return values.
10703         Re-define EAFNOSUPPORT if not present.  Indent.
10704
10705         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10706         suggested by Bruno Haible <bruno@clisp.org>.
10707
10708         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10709
10710         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10711
10712         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10713         libgcrypt).
10714
10715         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10716
10717         * lib/md2.h, lib/md2.c: New files.
10718
10719 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10720
10721         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10722         errno alone.  Problem reported by Frederic Jolliton.
10723
10724 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10725
10726         * modules/verify (License): Change from GPL to LGPL.  This is a
10727         tiny module and there are apparently near-equivalents that are
10728         under the BSD license.
10729
10730 2005-10-24  Simon Josefsson  <jas@extundo.com>
10731
10732         * modules/sha1: Relicense to LGPL.
10733
10734 2005-10-24  Simon Josefsson  <jas@extundo.com>
10735
10736         * lib/md4.h: Shrink buffer size, now that we changed the type.
10737
10738 2005-10-23  Simon Josefsson  <jas@extundo.com>
10739
10740         * gnulib-tool (func_import): Fix --tests-base.
10741
10742 2005-10-22  Simon Josefsson  <jas@extundo.com>
10743
10744         * modules/arcfour (Depends-on): Need stdint.
10745
10746 2005-10-22  Simon Josefsson  <jas@extundo.com>
10747
10748         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10749         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10750
10751 2005-10-22  Simon Josefsson  <jas@extundo.com>
10752
10753         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10754         suggested by Bruno Haible <bruno@clisp.org>.
10755
10756 2005-10-22  Simon Josefsson  <jas@extundo.com>
10757
10758         * lib/crc.h: Include stddef.h, for size_t.
10759
10760 2005-10-22  Simon Josefsson  <jas@extundo.com>
10761
10762         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10763         arcfour_context struct (simplify test vector testing in GNU
10764         Shishi).
10765
10766 2005-10-21  Simon Josefsson  <jas@extundo.com>
10767
10768         * modules/des, modules/des-tests: New files.
10769
10770         * modules/gc-des, modules/gc-des-tests: New files.
10771
10772         * tests/test-des.c, tests/test-gc-des.c: New file.
10773
10774 2005-10-21  Simon Josefsson  <jas@extundo.com>
10775
10776         * modules/arctwo, modules/arctwo-tests: New files.
10777
10778         * tests/test-arctwo.c: New file.
10779
10780         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10781
10782         * tests/test-gc-arctwo.c: New file.
10783
10784 2005-10-21  Simon Josefsson  <jas@extundo.com>
10785
10786         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10787         Bruno Haible <bruno@clisp.org>.
10788
10789         * m4/gc-des.m4: New file.
10790
10791 2005-10-21  Simon Josefsson  <jas@extundo.com>
10792
10793         * m4/arctwo.m4: New file.
10794
10795         * m4/gc-arctwo.m4: New file.
10796
10797 2005-10-21  Simon Josefsson  <jas@extundo.com>
10798
10799         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10800         block.
10801
10802 2005-10-21  Simon Josefsson  <jas@extundo.com>
10803
10804         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10805         <bruno@clisp.org>.
10806
10807         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10808
10809         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10810         Bruno Haible <bruno@clisp.org>.
10811
10812         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10813         <bruno@clisp.org>.
10814
10815 2005-10-21  Simon Josefsson  <jas@extundo.com>
10816
10817         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10818
10819 2005-10-21  Simon Josefsson  <jas@extundo.com>
10820
10821         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10822
10823 2005-10-21  Simon Josefsson  <jas@extundo.com>
10824
10825         * lib/des.h, lib/des.c: New files.
10826
10827         * lib/gc-gnulib.c: Support DES.c
10828
10829 2005-10-21  Simon Josefsson  <jas@extundo.com>
10830
10831         * lib/arctwo.h, lib/arctwo.c: New files.
10832
10833         * lib/gc-gnulib.c: Support ARCTWO.
10834
10835 2005-10-21  Simon Josefsson  <jas@extundo.com>
10836
10837         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10838         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10839
10840 2005-10-21  Simon Josefsson  <jas@extundo.com>
10841
10842         * gnulib-tool (func_import, func_create_testdir): Define automake
10843         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10844         Makefile.am snippet),
10845         suggested by Bruno Haible <bruno@clisp.org>.
10846
10847         * modules/gc (Makefile.am): Use it.
10848
10849 2005-10-21  Bruno Haible  <bruno@clisp.org>
10850
10851         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10852         patch.
10853
10854 2005-10-19  Simon Josefsson  <jas@extundo.com>
10855
10856         * tests/test-gc-rijndael.c: New file.
10857
10858         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10859
10860 2005-10-19  Simon Josefsson  <jas@extundo.com>
10861
10862         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10863         interface too.
10864
10865 2005-10-19  Simon Josefsson  <jas@extundo.com>
10866
10867         * tests/test-gc-arcfour.c: New file.
10868
10869         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10870
10871 2005-10-19  Simon Josefsson  <jas@extundo.com>
10872
10873         * modules/gc-md4, modules/gc-md4-tests: New file.
10874
10875         * tests/test-gc-md4.c: New file.
10876
10877 2005-10-19  Simon Josefsson  <jas@extundo.com>
10878
10879         * m4/gc-md4.m4: New file.
10880
10881 2005-10-19  Simon Josefsson  <jas@extundo.com>
10882
10883         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10884         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10885         <kasal@ucw.cz>.
10886
10887 2005-10-19  Simon Josefsson  <jas@extundo.com>
10888
10889         * m4/gc-arcfour.m4: New file.
10890
10891         * m4/gc-rijndael.m4: New file.
10892
10893 2005-10-19  Simon Josefsson  <jas@extundo.com>
10894
10895         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10896
10897 2005-10-19  Simon Josefsson  <jas@extundo.com>
10898
10899         * lib/gc-gnulib.c: Support ARCFOUR.
10900
10901 2005-10-19  Simon Josefsson  <jas@extundo.com>
10902
10903         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10904         support.
10905
10906         * lib/gc.h: Add ECB enum type.
10907
10908         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10909
10910 2005-10-18  Simon Josefsson  <jas@extundo.com>
10911
10912         * tests/test-md5.c: New file.
10913
10914         * modules/md5-tests: New file.
10915
10916 2005-10-18  Simon Josefsson  <jas@extundo.com>
10917
10918         * tests/test-md4.c: New file.
10919
10920         * modules/md4, modules/md4-tests: New files.
10921
10922 2005-10-18  Simon Josefsson  <jas@extundo.com>
10923
10924         * m4/md4.m4: New file.
10925
10926 2005-10-18  Simon Josefsson  <jas@extundo.com>
10927
10928         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10929
10930 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10931
10932         * gnulib-tool (func_create_testdir): Omit the second check whether
10933         BUILT_SOURCES in nonempty.
10934
10935 2005-10-17  Simon Josefsson  <jas@extundo.com>
10936
10937         * tests/test-rijndael.c: New file.
10938
10939 2005-10-17  Simon Josefsson  <jas@extundo.com>
10940
10941         * modules/sha1: Depend on stdint instead of md5.
10942
10943         * modules/md5: Depend on stdint, remove uint32_t.
10944
10945 2005-10-17  Simon Josefsson  <jas@extundo.com>
10946
10947         * modules/gc-sha1-tests: New file.
10948
10949         * tests/test-gc-sha1.c: New file.
10950
10951 2005-10-17  Simon Josefsson  <jas@extundo.com>
10952
10953         * m4/md5.m4: Remove call to uint32_t.m4.
10954
10955 2005-10-17  Simon Josefsson  <jas@extundo.com>
10956
10957         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10958
10959         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10960         md5.h.
10961
10962         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10963
10964         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10965
10966 2005-10-17  Simon Josefsson  <jas@extundo.com>
10967
10968         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10969
10970 2005-10-17  Simon Josefsson  <jas@extundo.com>
10971
10972         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10973
10974 2005-10-17  Simon Josefsson  <jas@extundo.com>
10975
10976         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10977
10978         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10979
10980 2005-10-17  Bruno Haible  <bruno@clisp.org>
10981
10982         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10983         that it can also be used in a test.
10984
10985 2005-10-16  Bruno Haible  <bruno@clisp.org>
10986
10987         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10988         TESTS_ENVIRONMENT, so that individual tests can augment it.
10989
10990         * gnulib-tool (func_create_testdir): Use an intermediate target for
10991         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10992         macros, like $(ALLOCA_H), which cannot be passed through the command
10993         line.
10994
10995 2005-10-15  Simon Josefsson  <jas@extundo.com>
10996
10997         * modules/rijndael-tests: New file.
10998
10999         * modules/rijndael: New file.
11000
11001 2005-10-15  Simon Josefsson  <jas@extundo.com>
11002
11003         * m4/rijndael.m4: New file.
11004
11005 2005-10-15  Simon Josefsson  <jas@extundo.com>
11006
11007         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11008
11009         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11010
11011 2005-10-14  Simon Josefsson  <jas@extundo.com>
11012
11013         * tests/test-arcfour.c: New file.
11014
11015         * modules/arcfour, modules/arcfour-tests: New files.
11016
11017 2005-10-14  Simon Josefsson  <jas@extundo.com>
11018
11019         * m4/arcfour.m4: New file.
11020
11021 2005-10-14  Simon Josefsson  <jas@extundo.com>
11022
11023         * lib/arcfour.h, lib/arcfour.c: New files.
11024
11025 2005-10-14  Roland McGrath  <roland@redhat.com>
11026
11027         Import from libc.  [BZ #1331]
11028         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11029         macro argument.
11030         Reported by Matej Vela <vela@debian.org>.
11031
11032 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11033
11034         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11035         include <wchar.h>; no longer needed.
11036
11037 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11038
11039         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11040
11041 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11042         and  Ulrich Drepper  <drepper@redhat.com>
11043
11044         Import from libc.
11045         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11046         instead of inline stream orientation test and two separate
11047         function calls.  Pay no attention to USE_IN_LIBIO.
11048
11049 2005-10-13  Simon Josefsson  <jas@extundo.com>
11050
11051         * modules/gc-hmac-md5-tests: New file.
11052
11053         * tests/test-gc-hmac-sha1.c: New file.
11054
11055         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11056
11057         * modules/gc-hmac-md5-tests: New file.
11058
11059         * tests/test-gc-md5.c: New file.
11060
11061         * modules/gc-md5-tests: New file.
11062
11063 2005-10-13  Simon Josefsson  <jas@extundo.com>
11064
11065         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11066         Move memory allocation outside of loop.
11067
11068 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11069
11070         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11071         intermediate directory is in a read-only file system.  Problem
11072         reported by Eric Blake.
11073
11074 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11075
11076         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11077
11078 2005-10-12  Simon Josefsson  <jas@extundo.com>
11079
11080         * tests/test-hmac-sha1.c: New file.
11081
11082         * modules/hmac-sha1-tests: New file.
11083
11084         * modules/hmac-sha1: New file.
11085
11086 2005-10-12  Simon Josefsson  <jas@extundo.com>
11087
11088         * modules/gc-sha1: New file.
11089
11090 2005-10-12  Simon Josefsson  <jas@extundo.com>
11091
11092         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11093
11094         * tests/test-gc-pbkdf2-sha1.c: New file.
11095
11096 2005-10-12  Simon Josefsson  <jas@extundo.com>
11097
11098         * modules/gc-md5, modules/gc-hmac-md5: New files.
11099
11100         * modules/gc (Files): Remove md5, memxor and hmac files.
11101
11102 2005-10-12  Simon Josefsson  <jas@extundo.com>
11103
11104         * m4/gc-pbkdf2-sha1.m4: New file.
11105
11106         * m4/gc-hmac-sha1.m4: New file.
11107
11108         * m4/gc-sha1: New file.
11109
11110         * m4/hmac-sha1.m4: New file.
11111
11112 2005-10-12  Simon Josefsson  <jas@extundo.com>
11113
11114         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11115
11116         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11117
11118 2005-10-12  Simon Josefsson  <jas@extundo.com>
11119
11120         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11121         suggested by Bruno Haible <bruno@clisp.org>.
11122
11123 2005-10-12  Simon Josefsson  <jas@extundo.com>
11124
11125         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11126
11127 2005-10-12  Simon Josefsson  <jas@extundo.com>
11128
11129         * lib/gc-pbkdf2-sha1.c: New file.
11130
11131         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11132
11133 2005-10-12  Simon Josefsson  <jas@extundo.com>
11134
11135         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11136
11137         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11138
11139 2005-10-12  Simon Josefsson  <jas@extundo.com>
11140
11141         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11142         GC_USE_HMAC_MD5, respectively.
11143
11144         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11145         (gc_md5): Fix typo.
11146
11147         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11148
11149         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11150
11151         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11152
11153 2005-10-12  Bruno Haible  <bruno@clisp.org>
11154
11155         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11156         Reported by Stepan Kasal <kasal@ucw.cz>.
11157
11158 2005-10-11  Simon Josefsson  <jas@extundo.com>
11159
11160         * tests/test-crc.c: New file.
11161
11162         * modules/crc, modules/crc-tests: New files.
11163
11164 2005-10-11  Simon Josefsson  <jas@extundo.com>
11165
11166         * m4/crc.m4: New file.
11167
11168 2005-10-11  Simon Josefsson  <jas@extundo.com>
11169
11170         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11171
11172         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11173
11174         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11175
11176 2005-10-11  Simon Josefsson  <jas@extundo.com>
11177
11178         * lib/crc.h, lib/crc.c: New files.
11179
11180         * lib/gc.h (gc_hash_buffer): Add doc.
11181
11182 2005-10-11  Bruno Haible  <bruno@clisp.org>
11183
11184         * modules/c-strcasestr: New file.
11185         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11186
11187 2005-10-11  Bruno Haible  <bruno@clisp.org>
11188
11189         * modules/c-strcase: New file.
11190         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11191
11192 2005-10-11  Bruno Haible  <bruno@clisp.org>
11193
11194         * lib/strcasecmp.c: Include limits.h.
11195         (strcasecmp): Avoid integer overflow on exotic platforms.
11196         * lib/strncasecmp.c: Include limits.h.
11197         (strncasecmp): Avoid integer overflow on exotic platforms.
11198         Reported by Paul Eggert.
11199
11200 2005-10-11  Bruno Haible  <bruno@clisp.org>
11201
11202         * lib/c-strcasestr.h: New file, from GNU gettext.
11203         * lib/c-strcasestr.c: New file, from GNU gettext.
11204
11205 2005-10-11  Bruno Haible  <bruno@clisp.org>
11206
11207         * lib/c-strcase.h: New file, from GNU gettext.
11208         * lib/c-strcasecmp.c: New file, from GNU gettext.
11209         * lib/c-strncasecmp.c: New file, from GNU gettext.
11210
11211 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11212
11213         * modules/mempcpy (License): GPL -> LGPL.
11214         * modules/strchrnul (License): Likewise.
11215         * modules/sysexits (License): Likewise.
11216
11217 2005-10-08  Simon Josefsson  <jas@extundo.com>
11218
11219         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11220
11221 2005-10-07  Simon Josefsson  <jas@extundo.com>
11222
11223         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11224
11225 2005-10-06  Simon Josefsson  <jas@extundo.com>
11226
11227         * tests/test-hmac-md5.c: New file.
11228
11229         * modules/hmac-md5-tests: New file.
11230
11231         * modules/hmac-md5: New file.
11232
11233 2005-10-06  Simon Josefsson  <jas@extundo.com>
11234
11235         * m4/hmac-md5.m4: New file.
11236
11237         * m4/memxor.m4: Require gl_C_RESTRICT.
11238
11239 2005-10-06  Simon Josefsson  <jas@extundo.com>
11240
11241         * lib/memxor.c (memxor): Avoid casts and warnings.
11242
11243 2005-10-06  Simon Josefsson  <jas@extundo.com>
11244
11245         * lib/hmac-md5.c: New file.
11246
11247         * lib/hmac.h: New file.
11248
11249 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11250
11251         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11252         promotes to int, not unsigned int, to catch the AIX 5.3
11253         compiler bug.
11254
11255 2005-10-05  Simon Josefsson  <jas@extundo.com>
11256
11257         * modules/memxor: New file.
11258
11259         * modules/iconv (Files): Move config.rpath to havelib, it is used
11260         there.
11261
11262         * modules/havelib (Files): Add config.rpath.
11263
11264 2005-10-05  Simon Josefsson  <jas@extundo.com>
11265
11266         * m4/memxor.m4: New file.
11267
11268 2005-10-05  Simon Josefsson  <jas@extundo.com>
11269
11270         * lib/memxor.c (memxor): Fix compiler error.
11271
11272         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11273         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11274
11275         * lib/memxor.h, lib/memxor.c: New files.
11276
11277         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11278         we assume all systems have it, suggested by Jim Meyering
11279         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11280         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11281         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11282         same reasons.
11283
11284 2005-10-05  Simon Josefsson  <jas@extundo.com>
11285
11286         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11287
11288 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11289
11290         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11291         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11292         needed, since the source code now assumes these .h files.
11293
11294 2005-10-05  Derek Price  <derek@ximbiot.com>
11295
11296         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11297
11298 2005-10-05  Bruno Haible  <bruno@clisp.org>
11299
11300         * modules/stdint (License): Change to LGPL.
11301
11302 2005-10-04  Simon Josefsson  <jas@extundo.com>
11303
11304         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11305         D. Baushke" <mdb@gnu.org>.
11306
11307 2005-10-04  Bruno Haible  <bruno@clisp.org>
11308
11309         * lib/verify.h (verify_true): Provide alternative definition for C++.
11310
11311 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11312
11313         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11314         (SSIZE_MAX): New macro, if not already defined.
11315         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11316         than 2 GiB.
11317
11318 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11319
11320         Sync from coreutils.
11321         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11322         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11323         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11324         ULLONG_MAX doesn't work with 2.7.2.1.
11325
11326 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11327
11328         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11329         From Ben Pfaff.
11330
11331         * modules/exclude (Depends-on): Depend on verify.
11332         * modules/strtoimax (Depends-on): Likewise.
11333         * modules/utimecmp (Depends-on): Likewise.
11334
11335 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11336
11337         * lib/exclude.c: Include verify.h.
11338         (verify): Remove.  All callers changed to use verify.h's version.
11339         * lib/strtoimax.c: Likewise.
11340         * lib/utimecmp.c: Likewis.e
11341
11342         Sync from coreutils.
11343         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11344         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11345         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11346         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11347         bother returning ENOSYS if settimeofday or stime fails; just let
11348         them return whatever errno they want to return.
11349         * lib/utimens.c: Include unistd.h, for dup2.
11350         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11351         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11352
11353 2005-10-02  Jim Meyering  <jim@meyering.net>
11354
11355         Sync from coreutils.
11356         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11357         from glibc-2.2.5 that fails for read-only files.
11358
11359 2005-10-02  Jim Meyering  <jim@meyering.net>
11360
11361         Sync from coreutils.
11362         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11363         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11364         `#if HAVE_CONFIG_H'.
11365         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11366         Remove AT_FDCWD test.
11367         Do not consume the fd unless successful.
11368         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11369         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11370         block, so that we don't even try to compile it if settimeofday is
11371         available.  This works around a compilation failure on OSF1 V5.1,
11372         due to stime requiring a `long int*' while tv_sec is `int'.
11373
11374 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11375
11376         Sync from coreutils.
11377         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11378         against `yes', rather than just testing for nonempty.
11379
11380 2005-10-01  Simon Josefsson  <jas@extundo.com>
11381
11382         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11383         and Darwin.
11384
11385         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11386         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11387         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11388         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11389         Check if struct addrinfo is declared.
11390
11391 2005-10-01  Simon Josefsson  <jas@extundo.com>
11392
11393         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11394         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11395         AI_* and EAI_* definitions.  Protect function declarations.
11396
11397 2005-10-01  Jim Meyering  <jim@meyering.net>
11398
11399         Sync from coreutils.
11400
11401         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11402         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11403         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11404         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11405         in the inet and nsl libraries.  Required on Solaris 5.7.
11406
11407 2005-10-01  Jim Meyering  <jim@meyering.net>
11408
11409         Sync from coreutils.
11410         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11411         in the inet and nsl libraries.  Required on Solaris 5.7.
11412
11413 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11414
11415         * lib/getdelim.c (getdelim): Remove unused variables.
11416
11417 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11418
11419         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11420         so that the code works even with ancient cpp.  Portability problem
11421         with GCC 2.7.2.1 reported by Thomas M.Ott.
11422
11423 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11424
11425         * modules/regex (Depends-on): Add strcase.
11426
11427         * modules/gethostname (Licence): Change from GPL to LGPL, since
11428         gethostname.c is a trivial implementation of a standard library
11429         function.
11430         * modules/poll (License): Change from GPL to LGPL, since it's
11431         derived from LGPL code.
11432
11433 2005-09-27  Jim Meyering  <jim@meyering.net>
11434
11435         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11436         HAVE_CONFIG_H.
11437
11438         * lib/intprops.h (signed_type_or_expr__): Define.
11439         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11440         for unsigned types.
11441
11442 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11443
11444         * lib/verify.h (verify_expr): Remove, replacing with:
11445         (verify_true): New macro that returns true instead of void.
11446         (verify_type__): Remove.
11447         (verify): Use verify_true rather than verify_type__.
11448
11449 2005-09-26  Bruno Haible  <bruno@clisp.org>
11450
11451         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11452         is necessary.
11453         (lib_SOURCES): Remove mbchar.c.
11454         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11455         (Files): Add m4/mbrtowc.m4.
11456         * modules/mbiter: Likewise.
11457         * modules/mbuiter: Likewise.
11458
11459 2005-09-26  Bruno Haible  <bruno@clisp.org>
11460
11461         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11462         compile mbchar.c if they are not both present.
11463         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11464         * m4/mbiter.m4 (gl_MBITER): Likewise.
11465         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11466         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11467         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11468
11469 2005-09-25  Jim Meyering  <jim@meyering.net>
11470
11471         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11472         also uses socklen_t.
11473
11474 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11475
11476         * lib/utimens.c (ENOSYS): Define if not already defined.
11477         (futimens): Support having a null PATH if the file descriptor
11478         is nonnegative.
11479
11480         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11481         Remove.
11482         (__attribute): Define to empty unless GCC 3.1 or later.
11483         This works around a core dump on OpenBSD 3.4, which has GCC
11484         2.95.3, which dumps core when given __attribute__(()).  It also
11485         simplifies other tests, since we really don't want to bother with
11486         worrying about which ancient version of GCC supported what.
11487         Original problem reported by Yoann Vandoorselaere, with part of
11488         the fix suggested by Derek Price.
11489
11490 2005-09-24  Jim Meyering  <jim@meyering.net>
11491
11492         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11493         so we can once again use a positive bitfield width of 1 -- now we
11494         don't have to explain why we were using a bitfield width of 2.
11495
11496 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11497
11498         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11499         and similarly for the other external symbols.  Problem reported
11500         by James Gallager.
11501
11502         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11503         bug reported by Jim Meyering.
11504
11505         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11506         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11507         not needed, since socklen is a prerequisite module.
11508
11509 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11510
11511         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11512         Problem reported by Eric Blake.
11513         (getaddrinfo): Initialize se so that it's not garbage.
11514         Redo internal storage allocation so that it doesn't make unportable
11515         assumptions about alignment.
11516         Fix a memory leak.
11517
11518         * lib/utimens.c (futimens): Use futimesat if available.
11519         Prefer it to futimes since it doesn't have the futimes bug.
11520
11521         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11522         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11523         Instead, declare a function that returns a pointer to an array,
11524         and use verify_type__ to declare the size of the array.
11525         Problem and germ of a solution reported by Bruno Haible.
11526         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11527         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11528
11529 2005-09-23  Jim Meyering  <jim@meyering.net>
11530
11531         Sync from coreutils.
11532         Correct build failure (socklen_t not defined) on at least
11533         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11534         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11535
11536 2005-09-23  Jim Meyering  <jim@meyering.net>
11537
11538         * modules/getaddrinfo (Depends-on): Add socklen.
11539
11540 2005-09-23  Bruno Haible  <bruno@clisp.org>
11541
11542         * tests/test-verify.c: New file.
11543
11544 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11545
11546         Sync from coreutils.
11547
11548         * modules/argmatch (Depends-on): Add verify.
11549         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11550         unistd-safer.
11551         * modules/save-cwd (Depends-on): Likewise.
11552
11553         * modules/openat (Files): Add lib/openat-die.c.
11554         (Depends-on): Remove error, exitfail.
11555         Add dirname.
11556
11557         * modules/verify: New file.
11558         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11559         with "verify" module.
11560
11561 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11562
11563         Sync from coreutils.
11564
11565         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11566         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11567         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11568         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11569         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11570         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11571         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11572         Don't bother checking for string.h, stdlib.h, unistd.h.
11573         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11574         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11575         module's job.
11576         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11577         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11578
11579         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11580         (gl_GETDATE): Use it.
11581
11582         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11583
11584 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11585
11586         Sync from coreutils.
11587
11588         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11589         stat-time.h.
11590         * lib/argmatch.h: Include verify.h
11591         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11592         (ARGMATCH_ASSERT): Remove; unused.
11593         * lib/canonicalize.c: Assume STDC_HEADERS.
11594         * lib/exclude.c: Include "strcase.h".
11595         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11596         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11597         and stdio-safer.h.
11598         (getusershell): Call fopen, not fopen_safer.
11599         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11600         Do not include unistd-safer.h.
11601         (save_cwd): Don't call fd_safer; no longer needed
11602         now that we include fcntl--.h.
11603
11604         * lib/getdate.y (relative_time): New type.
11605         (RELATIVE_TIME_0): New constant.
11606         (parser_control): Use relative_time instead of doing it ourselves.
11607         (%union): Add new relative_time rel member.
11608         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11609         Now typeless.
11610         (relunit, relunit_snumber): Now of type rel.
11611         (zone, rel, relunit, get_date): Adjust to above changes.
11612
11613         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11614         Do not include unistd-safer.h.
11615         (getloadavg): Don't call fd_safer; no longer needed
11616         now that we include fcntl--.h.
11617
11618         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11619         (make_dir_parents): Treat ENOSYS like EEXIST.
11620
11621         Improve quality of diagnostics on restore_cwd failure.
11622         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11623         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11624         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11625         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11626         each time through the loop.  Do not diagnose restore_cwd failure;
11627         that is the caller's job (and perhaps the caller does not care).
11628
11629         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11630         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11631         If the file already exists but is not a directory, don't bother
11632         to try to make its parents.
11633         Close potential file descriptor leak if we can't chdir("/") (!).
11634         Don't always return true if chdir($PWD) fails; return true only
11635         if the requested action was done successfully (except for the
11636         chdir($PWD)).
11637         Don't log final directory unless we actually made it.
11638         Refactor to avoid duplicate code to fix up permissions.
11639         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11640
11641         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11642         to make it a bit faster and (I hope) clearer.
11643         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11644         Fix bug in formats like %2N.
11645
11646         * lib/verify.h: New file.
11647
11648 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11649
11650         Sync from coreutils.
11651         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11652
11653 2005-09-22  Jim Meyering  <jim@meyering.net>
11654
11655         Sync from coreutils.
11656
11657         * m4/lstat.m4 (gl_FUNC_LSTAT):
11658         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11659         Remove obsolete comment.
11660         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11661         * m4/xstrtod.m4: Likewise.
11662
11663         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11664
11665 2005-09-22  Jim Meyering  <jim@meyering.net>
11666
11667         Sync from coreutils.
11668
11669         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11670
11671         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11672         the .tm_year member, since otherwise gcc-4.0 would now warn about
11673         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11674
11675         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11676         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11677
11678         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11679         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11680         when run in a time zone for which daylight savings time is in effect
11681         for the starting date.
11682
11683         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11684         stop us from restricting permissions of just-created absolute-named
11685         directories.
11686         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11687         to restore initial working directory.
11688         * lib/mkdir-p.c (make_dir_parents): New parameter:
11689         different_working_dir, to tell caller if/when we change the working
11690         directory and are unable to return to the initial one.
11691         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11692         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11693         `return false'.  This fixes a bug introduced on 2004-07-30.
11694
11695         * lib/openat.c (fdopendir): Be sure to close the supplied
11696         file descriptor before returning.  This makes our replacement
11697         implementation a little closer to Solaris's, where fdopendir
11698         ties the file descriptor to the returned DIR* pointer.
11699         * lib/openat.c (unlinkat): New function.
11700         * lib/openat.h (unlinkat): Add prototype.
11701         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11702         (openat_restore_fail): Rename from openat_restore_die.
11703         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11704
11705         Provide an alternative to exiting immediately upon save_cwd or
11706         restore_cwd failure.  Now, an application can arrange e.g.,
11707         to perform a longjump in that case.
11708         * lib/openat.c: Include dirname.h.
11709         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11710         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11711         and openat_restore_die rather than calling error directly.
11712         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11713
11714         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11715         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11716         define.
11717
11718         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11719         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11720                             int utc, int nanoseconds);
11721         Background:
11722         date should not have to allocate a megabyte of virtual memory to
11723         handle a format argument like +%1048575T.  When implemented with
11724         strftime, it must allocate such a buffer, use strftime to fill it
11725         in, print it, then free it.
11726         With fprintftime, it simply prints everything and exits.
11727         With no need for memory allocation, that's one fewer way to fail.
11728         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11729         optional field width, not before, so we accept %9:z, not %:9z.
11730         (my_strftime): Be sure to use L_('x') for literals.
11731
11732         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11733         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11734         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11735         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11736         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11737         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11738         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11739         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11740         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11741         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11742         * lib/xgethostname.c, lib/xreadlink.c:
11743         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11744
11745         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11746         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11747         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11748         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11749         and don't include <sys/file.h>).
11750
11751 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11752
11753         Sync from coreutils.
11754
11755         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11756         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11757         [!LDAV_DONE]: Avoid unused variable warning.
11758
11759 2005-09-21  Bruno Haible  <bruno@clisp.org>
11760
11761         * lib/unicodeio.h (unicode_to_mb): New declaration.
11762
11763 2005-09-20  Derek Price  <derek@ximbiot.com>
11764
11765         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11766         getaddrinfo.h.
11767
11768 2005-09-20  Bruno Haible  <bruno@clisp.org>
11769
11770         * gnulib-tool: Remove trailing slashes from the values specified for
11771         --source-base, --m4-base, --tests-base, --aux-dir.
11772         Suggested by Simon Josefsson <jas@extundo.com>.
11773
11774 2005-09-20  Bruno Haible  <bruno@clisp.org>
11775
11776         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11777         func_modules_to_filelist, func_import, func_create_testdir): Make all
11778         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11779         change when gnulib-tool is invoked in a different locale.
11780
11781 2005-09-19  Simon Josefsson  <jas@extundo.com>
11782
11783         * m4/socklen.m4: Fix typo.
11784
11785 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11786
11787         Use a consistent style for including <config.h>.
11788         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11789         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11790         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11791         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11792         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11793         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11794         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11795         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11796         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11797         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11798         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11799         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11800         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11801         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11802         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11803         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11804         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11805         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11806         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11807         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11808         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11809         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11810         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11811         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11812         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11813         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11814         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11815         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11816         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11817         lib/xstrtoumax.c, lib/yesno.c:
11818         Standardize inclusion of config.h.
11819         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11820         lib/inttostr.h:  Removed inclusion of config.h from header files.
11821         * lib/inttostr.c:  Adjusted in-tree users.
11822         * lib/timespec.h: Remove superfluous warning to include config.h.
11823         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11824         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11825         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11826         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11827         config.h with HAVE_CONFIG_H.
11828
11829 2005-09-19  Jim Meyering  <jim@meyering.net>
11830
11831         * modules/pathmax (License): Change to LGPL.
11832
11833 2005-09-19  Derek Price  <derek@ximbiot.com>
11834
11835         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11836
11837 2005-09-19  Bruno Haible  <bruno@clisp.org>
11838
11839         * gnulib-tool (import): Provide default for --tests-base.
11840
11841 2005-09-19  Bruno Haible  <bruno@clisp.org>
11842
11843         * doc/quote.texi: New file, extracted from gnulib.texi.
11844         * doc/ctime.texi: New file, extracted from gnulib.texi.
11845         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11846         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11847         * doc/gnulib.texi: Include them.
11848
11849 2005-09-18  Bruno Haible  <bruno@clisp.org>
11850
11851         Portability fix.
11852         * gnulib-tool (func_readlink): New function.
11853         (func_ln_if_changed): Use it.
11854
11855 2005-09-18  Bruno Haible  <bruno@clisp.org>
11856
11857         * gnulib-tool: Support --with-tests also with --import.
11858         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11859         (func_import): Use variables $testsbase and $inctests. Emit a
11860         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11861         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11862         SUBDIRS += $testsdir.
11863         (func_create_testdir): Update.
11864
11865 2005-09-18  Bruno Haible  <bruno@clisp.org>
11866
11867         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11868         instead of $dry_run.
11869         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11870         (func_ln_if_changed): Don't handle dry-run here.
11871         (func_import): In dry-run mode, detect more precisely which actions
11872         would be performed, and don't use "...ing" verbs.
11873
11874 2005-09-18  Bruno Haible  <bruno@clisp.org>
11875
11876         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11877         (func_import): Use join on two temporary files instead of three nested
11878         loops, in order to determine which files are new or old.
11879
11880 2005-09-18  Bruno Haible  <bruno@clisp.org>
11881
11882         * gnulib-tool (func_import): Comment out code that spits out the
11883         new files with --dry-run.
11884
11885 2005-09-18  Bruno Haible  <bruno@clisp.org>
11886
11887         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11888
11889 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11890
11891         * lib/stat-time.h: New file.
11892         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11893         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11894         in a different way.
11895         (timespec_cmp): New function.
11896         * lib/utimecmp.c: Include stat-time.h.
11897         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11898         members exist, not on the obsolescent ST_MTIM_NSEC.
11899         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11900
11901 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11902
11903         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11904
11905 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11906
11907         * MODULES.html.sh (File system functions): Add stat-time.
11908         * modules/stat-time: New file.
11909         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11910         is now done in a different way, by the stat-time module.
11911         * modules/utimecmp (Depends-on): Add stat-time.
11912
11913 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11914
11915         * m4/st_mtim.m4: Remove.  Superseded by...
11916         * m4/stat-time.m4: New file.
11917         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11918         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11919
11920 2005-09-15  Derek Price  <derek@ximbiot.com>
11921
11922         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11923
11924 2005-09-15  Derek Price  <derek@ximbiot.com>
11925
11926         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11927         * lib/regex_internal.c: Ditto, using this...
11928         (__GNUC_PREREQ): ...new macro.
11929         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11930         using...
11931         (__GNUC_PREREQ): ...this new macro.
11932
11933         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11934
11935 2005-09-15  Derek Price  <derek@ximbiot.com>
11936             Paul Eggert  <eggert@cs.ucla.edu>
11937
11938         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11939         changes, consolidating in...
11940         * lib/regex_internal.h: ...this file.
11941
11942 2005-09-13  Jim Meyering  <jim@meyering.net>
11943
11944         * lib/canon-host.c: Filter through gnu indent and reword comments
11945         slightly.
11946         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11947
11948 2005-09-13  Derek Price  <derek@ximbiot.com>
11949
11950         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11951         failure.
11952         Reported by Jim Meyering  <jim@meyering.net>.
11953
11954 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11955
11956         * lib/base64.c: Typo.
11957         (base64_encode): Put b64str in initialized data section.
11958
11959 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11960
11961         Merge glibc and coreutils changes into gnulib, plus a few
11962         extra fixes.
11963         * lib/md5.c: Use #error rather than a string.
11964         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11965         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11966         (__attribute__): Define to empty for non recent-GCC.
11967         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11968         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11969         Renamed from their non-__ counterparts, with new macros replacing
11970         them if not _LIBC.  Add __THROW attribute.
11971         (rol): Remove.
11972         (struct md5_ctx): Align buffer if using GCC.
11973         * lib/sha1.h (struct sha1_ctx): Likewise.
11974         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11975         The old name was backwards.
11976         (NOTSWAP): Remove; not used.
11977         (rol): New macro, moved here from md5.h.
11978         (sha1_process_block): Remove a FIXME that doesn't make sense.
11979
11980 2005-09-12  Derek Price  <derek@ximbiot.com>
11981
11982         Return usable errors from canon-host.
11983         * lib/canon-host.h: New file.
11984         * lib/canon-host.c (canon_host): Wrap...
11985         (canon_host_r): ...this new function, which now relies exclusively on
11986         getaddrinfo.
11987         (ch_strerror): New function.
11988         (last_cherror): New global.
11989         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11990         interface.
11991         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11992         void *.
11993         (freeaddrinfo): Free ai->ai_canonname when set.
11994
11995 2005-09-12  Derek Price  <derek@ximbiot.com>
11996
11997         Make canon-host require getaddrinfo.
11998         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11999         AC_LIBSOURCE canon-host.h.  Call...
12000         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12001         gl_GETADDRINFO.
12002         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12003
12004 2005-09-12  Derek Price  <derek@ximbiot.com>
12005
12006         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12007         LGPL.
12008         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12009
12010 2005-09-12  Derek Price  <derek@ximbiot.com>
12011
12012         * lib/gai_strerror.c: Include config.h when available.  Include
12013         getaddrinfo.h before other headers to test interface.
12014         Reported by Larry Jones <lawrence.jones@ugs.com>.
12015
12016 2005-09-12  Derek Price  <derek@ximbiot.com>
12017             Paul Eggert  <eggert@cs.ucla.edu>
12018
12019         * modules/glob (Files): Add glob-libc.h.
12020
12021 2005-09-12  Derek Price  <derek@ximbiot.com>
12022             Paul Eggert  <eggert@cs.ucla.edu>
12023
12024         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12025         glob_.h, glob-libc.h.
12026         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12027
12028 2005-09-12  Derek Price  <derek@ximbiot.com>
12029             Paul Eggert  <eggert@cs.ucla.edu>
12030
12031         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12032         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12033         protecting things that should be done only in gnulib contexts.
12034         * lib/glob_.h: New file, containing only the glob things needed for
12035         gnulib.
12036         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12037         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12038         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12039         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12040         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12041         and to respect the namespace rules better.
12042
12043 2005-09-08  Simon Josefsson  <jas@extundo.com>
12044
12045         * modules/socklen: New file.
12046
12047 2005-09-08  Simon Josefsson  <jas@extundo.com>
12048
12049         * m4/socklen.m4: New file.
12050
12051 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12052
12053         * modules/utimens (Files): Add m4/utimbuf.m4, since
12054         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12055         Reported by Sergey Poznyakoff.
12056
12057 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12058
12059         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12060         definitions, since that's the preferred style in glibc.
12061         Fix a minor spacing issue, and update copyright notice to match
12062         glibc's.
12063
12064 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12065
12066         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12067
12068 2005-09-06  Simon Josefsson  <jas@extundo.com>
12069
12070         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12071         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12072
12073 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12074
12075         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12076         warning.
12077
12078 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12079
12080         * config/srclist.txt: Add glibc bug 1302.
12081
12082 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12083
12084         Change bitset word type from unsigned int to unsigned long int,
12085         as this has better performance on typical 64-bit hosts.
12086         Port bitset code to hosts with unusual word sizes.
12087         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12088         (build_collating_symbol):
12089         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12090         argument is a bitset.  This is merely a style issue, but it makes
12091         it clearer that an entire array is expected.
12092         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12093         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12094         Port to the case where bitset_word is not the same as unsigned int.
12095         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12096         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12097         Likewise.
12098         * lib/regexec.c (check_dst_limits_calc_pos_1,
12099         check_subexp_matching_top):
12100         (build_trtable, group_nodes_into_DFAstates):
12101         Likewise.
12102         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12103         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12104         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12105         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12106         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12107         * lib/regcomp.c (optimize_subexps, lower_subexp):
12108         Work even if bitset_word has holes in its bitwise representation.
12109         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12110         * lib/regexec.c (check_dst_limits_calc_pos_1,
12111         check_subexp_matching_top):
12112         Likewise.
12113         * lib/regex_internal.c (re_string_reconstruct):
12114         Don't assume UCHAR_MAX == 255.
12115         * lib/regex_internal.h (bitset_set_all): Likewise.
12116         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12117         All uses changed.
12118         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12119         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12120         All uses changed.
12121         (BITSET_WORD_MAX): New macro.
12122         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12123         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12124         (bitset_empty, bitset_copy):
12125         Prefer sizeof (bitset) to multiplying it out ourselves.
12126         (bitset_not_merge): Remove; unused.
12127         (bitset_contain): Return bool, not unsigned int with one bit on.
12128         All callers changed.
12129         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12130         alignment than re_node_set; do this by defining a new internal
12131         type struct dests_alloc and using it to allocate memory.
12132
12133 2005-09-05  Bruno Haible  <bruno@clisp.org>
12134
12135         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12136         links.
12137
12138 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12139
12140         * modules/size_max (Makefile.am): Add size_max.h
12141
12142 2005-09-04  Derek Price  <derek@ximbiot.com>
12143
12144         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12145
12146 2005-09-03  Simon Josefsson  <jas@extundo.com>
12147
12148         * gnulib-tool: Fix typo.
12149
12150 2005-09-03  Simon Josefsson  <jas@extundo.com>
12151
12152         * config/srclist.txt: Add glibc bug 1293.
12153
12154 2005-09-03  Derek Price  <derek@ximbiot.com>
12155
12156         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12157         From Larry Jones <lawrence.jones@ugs.com>.
12158
12159 2005-09-02  Simon Josefsson  <jas@extundo.com>
12160
12161         * modules/socklen: New file.
12162
12163 2005-09-02  Simon Josefsson  <jas@extundo.com>
12164
12165         * modules/havelib: New module.
12166
12167         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12168         Use havelib.
12169
12170 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12171
12172         Check for arithmetic overflow when calculating sizes, to prevent
12173         some buffer-overflow issues.  These patches are conservative, in the
12174         sense that when I couldn't determine whether an overflow was possible,
12175         I inserted a run-time check.
12176         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12177         macros.
12178         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12179         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12180         (re_xnrealloc, re_x2nrealloc): New inline functions.
12181         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12182         parse_bracket_exp):
12183         (build_equiv_class, build_charclass): Check for arithmetic overflow
12184         in size expression calculations.
12185         * lib/regex_internal.c (re_string_realloc_buffers):
12186         (build_wcs_upper_buffer, re_node_set_add_intersect):
12187         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12188         (re_dfa_add_node, register_state): Likewise.
12189         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12190         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12191         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12192         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12193
12194 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12195
12196         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12197         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12198
12199 2005-09-02  Bruno Haible  <bruno@clisp.org>
12200
12201         Support for lib vs. lib64 distinction on biarch platforms.
12202         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12203         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12204         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12205
12206 2005-09-02  Bruno Haible  <bruno@clisp.org>
12207
12208         * gnulib-tool (import): In the other first-use case, provide defaults
12209         as well.
12210
12211 2005-09-02  Bruno Haible  <bruno@clisp.org>
12212
12213         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12214         patches not yet found in the latest gettext release.
12215
12216 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12217
12218         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12219         to avoid a collision with bits/local_lim.h in glibc.
12220         All uses changed.  Problem reported by Dmitry V. Levin in
12221         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12222
12223         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12224         bugs in int versus size_t comparisons.
12225         (re_string_context_at): Fix bug where the code assumed that
12226         Idx is signed.
12227
12228         Use bool where appropriate.
12229         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12230         All callers changed.
12231         (calc_eclosure_iter): Likewise, for ROOT arg.
12232         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12233         (build_charclass_op): Likewise, for NON_MATCH arg.
12234         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12235         (re_string_construct_common): Likewise, for ICASE arg.
12236         * lib/regexec.c (re_search_2_stub, re_search_stub):
12237         Likewise, for RET_LEN arg.
12238         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12239         (set_regs): Likewise, for FL_BACKTRACK arg.
12240         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12241         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12242         (calc_eclosure_iter, parse_bracket_exp):
12243         Use bool for internal variables that are booleans.
12244         * lib/regexec.c (re_search_internal, check_matching,
12245         proceed_next_node):
12246         (set_regs, build_sifted_states, sift_states_bkref):
12247         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12248         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12249         (find_collation_sequence_value):
12250         Likewise.
12251         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12252         (re_node_set_compare):
12253         Return bool, not int. All callers changed.
12254         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12255         (build_trtable, check_node_accept): Likewise.
12256         * lib/regex_internal.h: Include stdbool.h.
12257
12258         Fix bugs uncovered when converting to bool.
12259         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12260         failure instead of charging ahead blindly.
12261         * lib/regex_internal.c (register_state): Likewise.
12262         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12263         for freeing internal storage.
12264         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12265         bitset pieces used as boolean, to avoid undefined behavior
12266         on hosts that do int overflow checking.
12267
12268 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12269
12270         * config/srclist.txt: Add glibc bugs 1285-1287.
12271
12272 2005-09-01  Jim Meyering  <jim@meyering.net>
12273
12274         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12275         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12276         Require gl_STAT_MACROS, too.
12277
12278 2005-09-01  Bruno Haible  <bruno@clisp.org>
12279
12280         * gnulib-tool (import): In the first-use case, provide defaults.
12281
12282 2005-09-01  Bruno Haible  <bruno@clisp.org>
12283
12284         * gnulib-tool (func_import): Remove the .tmp files.
12285
12286 2005-09-01  Bruno Haible  <bruno@clisp.org>
12287
12288         * gnulib-tool (func_import): Fix handling of symbolic links.
12289
12290 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12291
12292         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12293         old glibc regex code mishandles strings longer than 2**31 bytes.
12294         This patch fixes this when the regex code is used in gnulib
12295         (i.e., outside glibc).
12296
12297         This patch should not affect the use of the regex code inside
12298         glibc.  No doubt this problem also needs to be handled for glibc
12299         as well, but the result will be an incompatible change to the
12300         glibc ABI, and the old ABI will have to be supported too.  That
12301         can be the the subject for another patch.
12302
12303         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12304         governing whether the rest of this patch is active.  By default,
12305         the macro is disabled and the patch has no effect.
12306         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12307         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12308         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12309         (re_match_2, re_set_registers): Use the new types.
12310         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12311         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12312         New macros.
12313         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12314         (re_string_context_at, bin_tree_t, re_dfastate_t):
12315         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12316         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12317         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12318         (re_string_char_size_at, re_string_wchar_at):
12319         (re_string_elem_size_at):
12320         Use the new types and macros to port to 64-bit hosts.
12321         Use unsigned types for internal values, so that the code
12322         mostly works even for arrays larger than SSIZE_MAX.
12323         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12324         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12325         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12326         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12327         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12328         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12329         (calc_inveclosure, parse_dup_op, build_range_exp):
12330         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12331         (fetch_number, create_token_tree, mark_opt_subexp):
12332         Likewise.
12333         * lib/regex_internal.c (re_string_construct_common,
12334         create_ci_newstate):
12335         (create_cd_newstate, re_string_allocate, re_string_construct):
12336         (re_string_realloc_buffers, build_wcs_upper_buffer):
12337         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12338         (re_string_reconstruct, re_string_peek_byte_case):
12339         (re_string_fetch_byte_case, re_string_context_at):
12340         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12341         (re_node_set_init_copy, re_node_set_add_intersect):
12342         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12343         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12344         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12345         (re_acquire_state, re_acquire_state_context, register_state):
12346         Likewise.
12347         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12348         search_cur_bkref_entry):
12349         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12350         (re_search_internal, re_search_2_stub, re_search_stub)
12351         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12352         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12353         (update_cur_sifted_state, check_dst_limits):
12354         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12355         (check_subexp_limits, sift_states_bkref, merge_state_array):
12356         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12357         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12358         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12359         (expand_bkref_cache, check_node_accept_bytes):
12360         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12361         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12362         (acquire_init_state_context, check_halt_node_context):
12363         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12364         (sift_states_backward, clean_state_log_if_needed):
12365         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12366         (find_recover_state, transit_state_sb, transit_state_mb):
12367         (transit_state_bkref, build_trtable, match_ctx_clean):
12368         Likewise.
12369         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12370         to work around an assumption that REG_MISSING is negative.
12371
12372         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12373         (seek_collating_symbol_entry) [defined _LIBC]:
12374         (lookup_collation_sequence_value) [defined _LIBC]:
12375         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12376         Use prototypes rather than old-style function definitions.
12377         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12378         (transit_state_sb) [0]:
12379         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12380
12381         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12382         rm_eo.
12383
12384         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12385         (optimize_subexps, lower_subexp):
12386         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12387         since the signed shift might overflow.  Use 1u<<31 instead.
12388         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12389         Likewise.
12390         * lib/regexec.c (check_dst_limits_calc_pos_1,
12391         check_subexp_matching_top): Likewise.
12392
12393         * lib/regcomp.c (optimize_subexps, lower_subexp):
12394         Use CHAR_BIT rather than 8, for clarity.
12395         * lib/regexec.c (check_dst_limits_calc_pos_1):
12396         (check_subexp_matching_top): Likewise.
12397         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12398         have to worry about portability issues when shifting it left.
12399         Remove no-longer-needed test for table_size > 0.
12400         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12401         in a word, as the resulting behavior is undefined.
12402         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12403         in one case, a <= should have been an <, and in another case the
12404         whole test was missing.
12405         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12406         the standard name CHAR_BIT.
12407         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12408         this is not true on one's complement and signed-magnitude hosts.
12409
12410         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12411         next_last_offset.
12412         (struct re_dfa_t): Remove unused member states_alloc.
12413         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12414
12415 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12416
12417         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12418         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12419         and large-file glibc and in 32-bit large-file Solaris.
12420
12421 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12422
12423         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12424         lengths fit in regoff_t; this isn't true if regoff_t is the same
12425         width as size_t.
12426         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12427         (= START + RANGE) instead of RANGE.  This avoids overflow
12428         problems when regoff_t is the same width as size_t.
12429         All callers changed.
12430         (re_search_2_stub): Check for overflow when adding the
12431         sizes of the two strings.
12432         (re_search_stub): Check for overflow when adding START
12433         to RANGE; if it occurs, substitute the extreme value.
12434
12435 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12436
12437         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12438
12439 2005-08-31  Jim Meyering  <jim@meyering.net>
12440
12441         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12442         a pointer-to-const.
12443         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12444         (register_state): Likewise.
12445         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12446         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12447         (group_nodes_into_DFAstates): Likewise.
12448
12449 2005-08-31  Jim Meyering  <jim@meyering.net>
12450
12451         * check-module: Add a FIXME comment.
12452
12453 2005-08-31  Eric Blake  <ebb9@byu.net>
12454
12455         * modules/unistd-safer (Files): Add unistd--.h.
12456         * modules/stdio-safer (Files): Add stdio--.h.
12457
12458 2005-08-31  Derek Price  <derek@ximbiot.com>
12459
12460         * lib/getdelim.c (getdelim): Return EOF on EOF.
12461         Reported by Larry Jones <lawrence.jones@ugs.com>.
12462
12463 2005-08-31  Bruno Haible  <bruno@clisp.org>
12464
12465         Avoid unnecessary diffs in the generated lib/Makefile.am.
12466         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12467         the generated files.
12468         (func_import): Don't set cmd.
12469
12470 2005-08-31  Bruno Haible  <bruno@clisp.org>
12471
12472         * lib/strstr.c: Include <stddef.h>, for NULL.
12473         * lib/strcasestr.c: Likewise.
12474         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12475
12476 2005-08-31  Bruno Haible  <bruno@clisp.org>
12477
12478         * gnulib-tool: New option --macro-prefix.
12479         (func_import): Use macro_prefix.
12480         (import): Handle option --macro-prefix.
12481
12482 2005-08-31  Bruno Haible  <bruno@clisp.org>
12483
12484         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12485         Also use new variables cached_lgpl, cached_libtool.
12486
12487 2005-08-31  Bruno Haible  <bruno@clisp.org>
12488
12489         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12490         always instantiating them.
12491
12492 2005-08-31  Bruno Haible  <bruno@clisp.org>
12493
12494         * gnulib-tool (func_import): Read the previous cached settings
12495         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12496         earlier added by gnulib but are now dropped. Warn when a gnulib file
12497         overwrites a non-gnulib file.
12498
12499 2005-08-31  Bruno Haible  <bruno@clisp.org>
12500
12501         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12502         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12503         projects that don't keep autogenerated files in CVS. Put into
12504         actioncmd only the specified modules, not the transitive closure.
12505
12506 2005-08-31  Bruno Haible  <bruno@clisp.org>
12507
12508         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12509         Create directories that shall be filled.
12510         (import): Don't look for gl_* macros in configure.ac. Recurse across
12511         all directories containing a gnulib-cache.m4 files, if meaningful.
12512
12513 2005-08-31  Bruno Haible  <bruno@clisp.org>
12514
12515         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12516         (import): Set seen_libtool when we see gl_LIBTOOL.
12517
12518 2005-08-31  Bruno Haible  <bruno@clisp.org>
12519
12520         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12521         declaration macro definitions from generated gnulib.m4.
12522
12523 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12524
12525         * lib/iconvme.h: Add prototype for iconv_alloc.
12526
12527 2005-08-29  Simon Josefsson  <jas@extundo.com>
12528
12529         * lib/iconvme.c: Fix errno.
12530
12531 2005-08-29  Bruno Haible  <bruno@clisp.org>
12532
12533         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12534         that it works when the directory contains spaces.
12535
12536 2005-08-29  Bruno Haible  <bruno@clisp.org>
12537
12538         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12539
12540 2005-08-29  Bruno Haible  <bruno@clisp.org>
12541
12542         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12543         Emit more advice.
12544
12545 2005-08-29  Bruno Haible  <bruno@clisp.org>
12546         and Stepan Kasal  <kasal@ucw.cz>
12547
12548         * check-module: If more parameters are given, check each of them
12549         separately; add more exceptions, as noted by Jim Meyering.
12550         (check_module): New procedure.
12551         (%exempt_header): Now contains all exceptions.
12552
12553 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12554
12555         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12556
12557 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12558
12559         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12560
12561 2005-08-28  Bruno Haible  <bruno@clisp.org>
12562
12563         * m4/gnulib-tool.m4: New file.
12564
12565 2005-08-27  Jim Meyering  <jim@meyering.net>
12566
12567         * modules/unistd-safer (Files): Add pipe-safer.c.
12568         * modules/fcntl-safer (Files): Add creat-safer.c.
12569
12570 2005-08-27  Jim Meyering  <jim@meyering.net>
12571
12572         * m4/stdlib-safer.m4: New file.  From coreutils.
12573         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12574         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12575         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12576         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12577         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12578
12579 2005-08-27  Jim Meyering  <jim@meyering.net>
12580
12581         * lib/fopen-safer.c: Merge minor changes from coreutils.
12582         * lib/dup-safer.c: Likewise.
12583         * lib/fd-safer.c: Likewise.
12584
12585         Merge from coreutils.
12586         * lib/stdio--.h: New file.
12587         * lib/stdlib--.h: New file.
12588         * lib/mkstemp-safer.c: New file.
12589
12590         GNU tar needs these.
12591         * lib/pipe-safer.c: New file.
12592         * lib/creat-safer.c: New file.
12593         * lib/fcntl--.h (creat): Define to creat_safer.
12594         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12595         * lib/unistd--.h (pipe): Define to pipe_safer.
12596         * lib/unistd-safer.h: Declare pipe_safer.
12597
12598 2005-08-26  Simon Josefsson  <jas@extundo.com>
12599
12600         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12601         Haible <bruno@clisp.org>.
12602
12603 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12604
12605         * lib/regex_internal.h: Remove all references to
12606         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12607         or better.
12608         (bitset_not, bitset_merge, bitset_not_merge):
12609         (bitset_mask, re_string_allocate, re_string_construct):
12610         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12611         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12612         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12613         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12614         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12615         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12616         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12617         (re_acquire_state_context):
12618         Remove unnecessary forward decls.
12619         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12620         Put __attribute at function definition,
12621         now that the function decl has been removed.
12622         * lib/regex_internal.c (re_string_peek_byte_case):
12623         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12624         Likewise.
12625
12626 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12627
12628         * m4/regex.m4: Add AC_PREREQ(2.50).
12629         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12630
12631 2005-08-25  Simon Josefsson  <jas@extundo.com>
12632
12633         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12634         __fsetlocking.
12635
12636 2005-08-25  Simon Josefsson  <jas@extundo.com>
12637
12638         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12639         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12640         GLIBC specific code.
12641
12642 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12643
12644         Make regex safe for g++.  This fixes one real bug (an "err"
12645         that should have been "*err").  g++ problem reported by
12646         Sam Steingold.
12647         * lib/regex_internal.h (re_calloc): New macro, consistent with
12648         re_malloc etc.  All callers of calloc changed to use re_calloc.
12649         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12650         not int.  All callers changed.
12651         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12652         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12653         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12654         (find_recover_state): Change "err" to "*err"; this fixes what
12655         appears to be a real bug.
12656         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12657         versus int.
12658
12659 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12660
12661         * modules/regex (Depends-on): Add malloc, since the code
12662         assumes that !malloc(0) means failure.
12663
12664 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12665
12666         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12667
12668         alloca modernization/simplification for regex.
12669         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12670         needs to be at the start of the file, and can be moved into
12671         regex_internal.h and simplified.
12672         * lib/regex_internal.h: Include <alloca.h>.
12673         (__libc_use_alloca) [!defined _LIBC]: New macro.
12674         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12675         now works outside glibc.
12676
12677 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12678
12679         * config/srclist.txt: Add glibc bugs 1241, 1245.
12680
12681 2005-08-25  Jim Meyering  <jim@meyering.net>
12682
12683         * lib/open-safer.c: Include <config.h>.
12684         Otherwise, we'd lose LARGEFILE support in any file using
12685         e.g. "fcntl--.h"
12686
12687 2005-08-25  Bruno Haible  <bruno@clisp.org>
12688
12689         * m4/minmax.m4: Require autoconf 2.52.
12690         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12691         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12692         alternatives of translit over the alphabet.
12693         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12694
12695 2005-08-24  Simon Josefsson  <jas@extundo.com>
12696
12697         * tests/test-getpass.c: New file.
12698
12699 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12700
12701         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12702         for GNU regex features.
12703
12704 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12705
12706         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12707         * lib/regex.h (regerror): Likewise.
12708
12709         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12710         requires this.  (The code never needed it.)
12711
12712         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12713         All uses of recently-renamed identifiers changed to use the new,
12714         POSIX-compliant names.  The code will build and run just fine
12715         without these changes, but it's better to eat our own dog food
12716         and use the standard-conforming names.
12717
12718         * lib/regex.h: Fix a multitude of POSIX name space violations.
12719         These changes have an effect only for programs that define
12720         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12721         do not change anything for programs compiled in the normal way.
12722         Also, there is no effect on the ABI.
12723
12724         (_REGEX_SOURCE): New macro.
12725         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12726         defined and _GNU_SOURCE is not; this fixes a name space violation.
12727
12728         Rename the following macros to obey POSIX requirements.
12729         The old names are still visible as macros if _REGEX_SOURCE is defined.
12730         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12731         RE_BACKSLASH_ESCAPE_IN_LISTS.
12732         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12733         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12734         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12735         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12736         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12737         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12738         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12739         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12740         (REG_INTERVALS): renamed from RE_INTERVALS.
12741         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12742         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12743         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12744         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12745         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12746         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12747         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12748         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12749         RE_UNMATCHED_RIGHT_PAREN_ORD.
12750         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12751         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12752         (REG_DEBUG): renamed from RE_DEBUG.
12753         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12754         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12755         unusual, since we can't clash with the POSIX REG_ICASE.
12756         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12757         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12758         (REG_NO_SUB): renamed from RE_NO_SUB.
12759         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12760         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12761         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12762         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12763         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12764         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12765         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12766         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12767         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12768         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12769         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12770         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12771         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12772         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12773         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12774         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12775         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12776         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12777         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12778         (REG_FIXED): Renamed from REGS_FIXED.
12779         (REG_NREGS): Renamed from RE_NREGS.
12780
12781         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12782         of other REG_* macros, since POSIX says the user is allowed to
12783         #undef these macros selectively.
12784
12785         (reg_errcode_t): Update comment stating what other tables need
12786         to be consistent.
12787
12788         Rename the following enum values to obey POSIX requirements.
12789         The old names are still visible as macros.
12790         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12791         is not defined, since GNU is supposed to be a superset of POSIX as
12792         much as possible, and since we want reg_errcode_t to be a signed
12793         type for implementation consistency.
12794         (_REG_NOERROR): Renamed from REG_NOERROR.
12795         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12796         (_REG_BADPAT): Renamed from REG_BADPAT.
12797         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12798         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12799         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12800         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12801         (_REG_EBRACK): Renamed from REG_EBRACK.
12802         (_REG_EPAREN): Renamed from REG_EPAREN.
12803         (_REG_EBRACE): Renamed from REG_EBRACE.
12804         (_REG_BADBR): Renamed from REG_BADBR.
12805         (_REG_ERANGE): Renamed from REG_ERANGE.
12806         (_REG_ESPACE): Renamed from REG_ESPACE.
12807         (_REG_BADRPT): Renamed from REG_BADRPT.
12808         (_REG_EEND): Renamed from REG_EEND.
12809         (_REG_ESIZE): Renamed from REG_ESIZE.
12810         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12811         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12812         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12813         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12814         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12815
12816         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12817         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12818         changed.  But support the old name if the new one is not defined
12819         and if _REGEX_SOURCE.
12820
12821         Change the following member names in struct re_pattern_buffer.
12822         The old names are still supported if !_REGEX_SOURCE.
12823         The new names are always supported, regardless of _REGEX_SOURCE.
12824         (re_buffer): Renamed from buffer.
12825         (re_allocated): Renamed from allocated.
12826         (re_used): Renamed from used.
12827         (re_syntax): Renamed from syntax.
12828         (re_fastmap): Renamed from fastmap.
12829         (re_translate): Renamed from translate.
12830         (re_can_be_null): Renamed from can_be_null.
12831         (re_regs_allocated): Renamed from regs_allocated.
12832         (re_fastmap_accurate): Renamed from fastmap_accurate.
12833         (re_no_sub): Renamed from no_sub.
12834         (re_not_bol): Renamed from not_bol.
12835         (re_not_eol): Renamed from not_eol.
12836         (re_newline_anchor): Renamed from newline_anchor.
12837
12838         Change the following member names in struct re_registers.
12839         The old names are still supported if !_REGEX_SOURCE.
12840         The new names are always supported, regardless of _REGEX_SOURCE.
12841         (rm_num_regs): Renamed from num_regs.
12842         (rm_start): Renamed from start.
12843         (rm_end): Renamed from end.
12844
12845         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12846         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12847         Prepend __ to parameter names.
12848
12849         Undo yesterday's changes.
12850
12851 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12852
12853         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12854         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12855         lib/regex.c.
12856
12857 2005-08-24  Jim Meyering  <jim@meyering.net>
12858
12859         Sync from coreutils.
12860         * m4/fcntl-safer.m4: New file.
12861
12862         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12863         and object files for this module.
12864
12865 2005-08-24  Jim Meyering  <jim@meyering.net>
12866
12867         Sync from coreutils.
12868         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12869
12870 2005-08-24  Jim Meyering  <jim@meyering.net>
12871
12872         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12873         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12874
12875 2005-08-24  Jim Meyering  <jim@meyering.net>
12876
12877         * modules/fcntl-safer: New module.
12878         * modules/fts (Depends-on): Add fcntl-safer.
12879         * MODULES.html.sh (File descriptor based Input/Output):
12880         Add fcntl-safer.
12881
12882 2005-08-24  Bruno Haible  <bruno@clisp.org>
12883
12884         Support for unit test modules.
12885         * modules/README: Mention tests modules.
12886         * modules/TEMPLATE-TESTS: New file.
12887         * gnulib-tool: New options --extract-tests-module, --with-tests and
12888         --tests-base (unused for the moment).
12889         (testsbase, inctests): New variables.
12890         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12891         (func_verify_module): Exclude TEMPLATE-TESTS.
12892         (func_verify_nontests_module, func_verify_tests_module): New functions.
12893         (func_get_dependencies): Add implicit dependency for tests modules.
12894         (func_get_tests_module): New function.
12895         (func_modules_transitive_closure): When --with-tests was specified,
12896         include the unit tests as well, unless explicitly avoided.
12897         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12898         (func_emit_tests_Makefile_am): New function.
12899         (func_create_testdir): When --with-tests was specified, emit a
12900         tests/ directory.
12901         * MODULES.html.sh (Future developments): Update.
12902
12903 2005-08-24  Bruno Haible  <bruno@clisp.org>
12904
12905         * modules/tls-tests: New file.
12906         * tests/test-tls.c: New file, from GNU gettext.
12907
12908 2005-08-24  Bruno Haible  <bruno@clisp.org>
12909
12910         * modules/lock-tests: New file.
12911         * tests/test-lock.c: New file, from GNU gettext.
12912
12913 2005-08-24  Bruno Haible  <bruno@clisp.org>
12914
12915         * lib/lock.h: Add multiple inclusion guard.
12916         * lib/tls.h: Add multiple inclusion guard.
12917
12918 2005-08-24  Bruno Haible  <bruno@clisp.org>
12919
12920         * gnulib-tool: Add support for the --aux-dir option to
12921         --create-testdir, --create-megatestdir, --test, --megatest.
12922         (func_create_testdir, func_create_megatestdir): Optionally emit a
12923         AC_CONFIG_AUX_DIR directive.
12924         (create-testdir, create-megatestdir, test, megatest): Provide a
12925         default value for $auxdir.
12926
12927 2005-08-24  Bruno Haible  <bruno@clisp.org>
12928
12929         * gnulib-tool (import): Use compound statement instead of subshell
12930         where possible.
12931
12932 2005-08-24  Bruno Haible  <bruno@clisp.org>
12933
12934         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12935
12936 2005-08-24  Bruno Haible  <bruno@clisp.org>
12937
12938         * gnulib-tool (func_version): Update.
12939
12940 2005-08-24  Bruno Haible  <bruno@clisp.org>
12941
12942         * gnulib-tool (func_import, func_create_testdir,
12943         func_create_megatestdir): Quote all autoconf macro arguments.
12944
12945 2005-08-24  Bruno Haible  <bruno@clisp.org>
12946
12947         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12948         option --force, because --force causes the aclocal.m4 of each
12949         subdirectory to be newer than the corresponding config.h.in.
12950
12951 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12952
12953         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12954         All contents moved to gl_REGEX.
12955         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12956         assume that it does.
12957
12958 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12959
12960         * lib/regex.h (REG_NOSYS)
12961         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12962         Define, since POSIX requires it as of 2001.
12963         (_REG_ENOSYS)
12964         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12965         New private symbol, used to keep the enum signed in all cases.
12966         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12967         Youngman in
12968         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12969
12970         * lib/regex_internal.c (re_string_skip_chars, register_state):
12971         (calc_state_hash):
12972         Remove forward decls; no longer needed now that we use prototypes.
12973         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12974         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12975         (clean_state_log_if_needed): Likewise.
12976
12977 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12978
12979         * config/srclist.txt: Add glibc bugs 1231-1233.
12980
12981 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12982
12983         Fix problems reported by Sam Steingold in
12984         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12985         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12986         assumed that reg_errcode_t is a signed type, which is not
12987         necessarily true if _XOPEN_SOURCE is not defined.
12988         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12989         since some compilers warn about it otherwise.
12990
12991 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12992
12993         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12994         (init_word_char, create_initial_state, duplicate_node_closure):
12995         (fetch_token, peek_token_bracket, build_range_exp):
12996         (build_collating_symbol): Remove forward decls; no longer needed
12997         now that we use prototypes.
12998
12999         * lib/regcomp.c:
13000         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13001         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13002         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13003         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13004         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13005         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13006         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13007         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13008         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13009         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13010         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13011         (build_charclass, build_charclass_op, fetch_number, create_tree):
13012         (create_token_tree, mark_opt_subexp, duplicate_tree):
13013         Use prototypes rather than old-style definitions.
13014
13015         * lib/regex_internal.c:
13016         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13017         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13018         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13019         (re_string_reconstruct, re_string_peek_byte_case):
13020         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13021         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13022         (re_node_set_init_copy, re_node_set_add_intersect):
13023         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13024         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13025         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13026         (re_acquire_state, re_acquire_state_context, register_state):
13027         (create_ci_newstate, create_cd_newstate, free_state):
13028         Likewise.
13029         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13030         re_search_2):
13031         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13032         (re_search_internal, prune_impossible_nodes):
13033         (acquire_init_state_context, check_matching, static):
13034         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13035         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13036         (update_regs, sift_states_backward, build_sifted_states):
13037         (clean_state_log_if_needed, merge_state_array):
13038         (update_cur_sifted_state, add_epsilon_src_nodes):
13039         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13040         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13041         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13042         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13043         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13044         (check_arrival, check_arrival_add_next_nodes):
13045         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13046         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13047         (check_node_accept_bytes, check_node_accept, extend_buffers):
13048         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13049         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13050         (sift_ctx_init):
13051         Likewise.
13052
13053         * lib/regex_internal.h:
13054         (re_string_allocate, re_string_construct, re_string_reconstruct):
13055         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13056         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13057         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13058         (re_string_context_at, re_string_peek_byte_case):
13059         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13060         is defined, since we now use prototypes always.
13061
13062         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13063         C89 or better.  All uses removed.
13064
13065 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13066
13067         * config/srclist.txt: Add glibc bugs 1220-1227.
13068
13069 2005-08-20  Jim Meyering  <jim@meyering.net>
13070
13071         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13072         of unused local, dfa.
13073
13074 2005-08-20  Bruno Haible  <bruno@clisp.org>
13075
13076         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13077
13078 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13079
13080         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13081         (re_node_set_insert_last, re_dfa_add_node):
13082         Rename local variables to avoid GCC shadowing warnings.
13083
13084 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13085
13086         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13087         [defined lint]: Suppress bogus uninitialized-variable warnings.
13088
13089         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13090         and let the caller return REG_ESPACE if out of space.  This
13091         removes an uninitialied-variable warning with GCC 4.0.1, and also
13092         avoids taking the address of a local variable.  All callers
13093         changed.
13094
13095 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13096
13097         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13098         $LIBCSRC/posix/regexec.c.
13099         Add glibc bug 1217 for regcomp.c.
13100
13101 2005-08-19  Jim Meyering  <jim@meyering.net>
13102
13103         * lib/regexec.c (proceed_next_node): Redo local variables to
13104         avoid GCC shadowing warnings.
13105
13106 2005-08-18  Bruno Haible  <bruno@clisp.org>
13107
13108         * lib/strstr.c (strstr): Fix return value in multibyte case.
13109         * lib/strcasestr.c (strcasestr): Likewise.
13110
13111 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13112
13113         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13114
13115 2005-08-17  Jim Meyering  <jim@meyering.net>
13116
13117         Make the %s format (seconds since the epoch) work for a negative
13118         number and when used with a zero-padded field width, e.g. %015s.
13119
13120         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13121         label so that it precedes the code to set `digits'.  Otherwise,
13122         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13123         print `00-22'.  Now, it prints `-0022', as it should.
13124
13125 2005-08-17  Bruno Haible  <bruno@clisp.org>
13126
13127         * modules/strstr (Files): Add m4/mbrtowc.m4.
13128         (Depends-on): Add mbuiter.
13129
13130 2005-08-17  Bruno Haible  <bruno@clisp.org>
13131
13132         * modules/strcasestr: New file.
13133         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13134         strcasestr.
13135
13136 2005-08-17  Bruno Haible  <bruno@clisp.org>
13137
13138         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13139
13140 2005-08-17  Bruno Haible  <bruno@clisp.org>
13141
13142         * modules/mbuiter: New file.
13143         * MODULES.html.sh (Extended multibyte and wide character utilities):
13144         Add mbuiter.
13145
13146 2005-08-17  Bruno Haible  <bruno@clisp.org>
13147
13148         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13149         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13150
13151 2005-08-17  Bruno Haible  <bruno@clisp.org>
13152
13153         * m4/strcasestr.m4: New file.
13154
13155 2005-08-17  Bruno Haible  <bruno@clisp.org>
13156
13157         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13158         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13159
13160 2005-08-17  Bruno Haible  <bruno@clisp.org>
13161
13162         * lib/strcasestr.h: New file.
13163         * lib/strcasestr.c: New file.
13164
13165 2005-08-17  Bruno Haible  <bruno@clisp.org>
13166
13167         * lib/strcasecmp.c: Use mbuiter.h.
13168
13169 2005-08-17  Bruno Haible  <bruno@clisp.org>
13170
13171         * lib/mbuiter.h: New file.
13172
13173 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13174
13175         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13176         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13177         and gl_GETOPT are both invoked via different paths (as happens
13178         with GNU tar CVS because it uses both argp and getopt), the former
13179         wins.
13180
13181 2005-08-16  Bruno Haible  <bruno@clisp.org>
13182
13183         * modules/tls: New file.
13184         * MODULES.html.sh (Multithreading): Add tls.
13185
13186 2005-08-16  Bruno Haible  <bruno@clisp.org>
13187
13188         * modules/strnlen1: New file.
13189         * MODULES.html.sh (String handling): Add strnlen1.
13190
13191 2005-08-16  Bruno Haible  <bruno@clisp.org>
13192
13193         * modules/strcase (Files): Add m4/mbrtowc.m4.
13194         (Depends-on): Add strnlen1, mbchar.
13195
13196 2005-08-16  Bruno Haible  <bruno@clisp.org>
13197
13198         * modules/mbiter: New file.
13199         * MODULES.html.sh (Extended multibyte and wide character utilities):
13200         Add mbiter.
13201
13202 2005-08-16  Bruno Haible  <bruno@clisp.org>
13203
13204         * modules/mbfile: New file.
13205         * MODULES.html.sh (Extended multibyte and wide character utilities):
13206         Add mbfile.
13207
13208 2005-08-16  Bruno Haible  <bruno@clisp.org>
13209
13210         * modules/mbchar: New file.
13211         * MODULES.html.sh (Extended multibyte and wide character utilities):
13212         New section.
13213
13214 2005-08-16  Bruno Haible  <bruno@clisp.org>
13215
13216         * m4/tls.m4: New file, from GNU gettext.
13217
13218 2005-08-16  Bruno Haible  <bruno@clisp.org>
13219
13220         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13221         always.
13222         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13223
13224 2005-08-16  Bruno Haible  <bruno@clisp.org>
13225
13226         * m4/mbiter.m4: New file.
13227
13228 2005-08-16  Bruno Haible  <bruno@clisp.org>
13229
13230         * m4/mbfile.m4: New file.
13231
13232 2005-08-16  Bruno Haible  <bruno@clisp.org>
13233
13234         * m4/mbchar.m4: New file.
13235
13236 2005-08-16  Bruno Haible  <bruno@clisp.org>
13237
13238         * lib/tls.h: New file, from GNU gettext.
13239         * lib/tls.c: New file, from GNU gettext.
13240
13241 2005-08-16  Bruno Haible  <bruno@clisp.org>
13242
13243         * lib/strnlen1.h: New file.
13244         * lib/strnlen1.c: New file.
13245
13246 2005-08-16  Bruno Haible  <bruno@clisp.org>
13247
13248         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13249         (mbi_init): Update.
13250         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13251         NUL byte, not after it.
13252
13253 2005-08-16  Bruno Haible  <bruno@clisp.org>
13254
13255         * lib/strcase.h (strcasecmp): Add note in comments.
13256         * lib/strncasecmp.c: Use code from strcasecmp.c.
13257         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13258         (strcasecmp): Work correctly in multibyte locales.
13259
13260 2005-08-16  Bruno Haible  <bruno@clisp.org>
13261
13262         * lib/mbiter.h: New file.
13263
13264 2005-08-16  Bruno Haible  <bruno@clisp.org>
13265
13266         * lib/mbfile.h: New file.
13267
13268 2005-08-16  Bruno Haible  <bruno@clisp.org>
13269
13270         * lib/mbchar.h: New file.
13271         * lib/mbchar.c: New file.
13272
13273 2005-08-16  Bruno Haible  <bruno@clisp.org>
13274
13275         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13276         the valid ones. Makes the comparison operations transitive:
13277         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13278         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13279
13280 2005-08-15  Simon Josefsson  <jas@extundo.com>
13281
13282         * modules/ssize_t (License): Change to 'unlimited'.
13283
13284         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13285
13286 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13287
13288         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13289         Add comments for each pending glibc patch.
13290
13291 2005-08-15  Bruno Haible  <bruno@clisp.org>
13292
13293         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13294         __cplusplus is defined.
13295
13296 2005-08-14  Jim Meyering  <jim@meyering.net>
13297
13298         Sync from coreutils.
13299
13300         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13301         Use the hash-table-based cycle-detection code not just when
13302         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13303         Reported by James Youngman in
13304         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13305         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13306         FTS_TIGHT_CYCLE_CHECK.
13307         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13308         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13309         once again.
13310         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13311         * lib/fts.c (fd_safer): Remove decl.
13312         Include fcntl--.h rather than unistd-safer.h
13313         (fts_safe_changedir): Don't call fd_safer; no longer needed
13314         now that we include fcntl--.h.
13315
13316 2005-08-12  Simon Josefsson  <jas@extundo.com>
13317
13318         * modules/getndelim2: Use ssize_t module.
13319         * modules/getnline: Likewise.
13320         * modules/safe-read: Likewise.
13321         * modules/xreadlink: Likewise.
13322
13323         * modules/ssize_t: New file.
13324
13325 2005-08-12  Simon Josefsson  <jas@extundo.com>
13326
13327         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13328
13329 2005-08-12  Simon Josefsson  <jas@extundo.com>
13330
13331         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13332         ssize_t.
13333
13334 2005-08-12  Simon Josefsson  <jas@extundo.com>
13335
13336         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13337         readline, getdelim and check_version.
13338         (Support for systems lacking ISO C 99: Sizes of integer types):
13339         Add size_max.
13340
13341 2005-08-12  Bruno Haible  <bruno@clisp.org>
13342
13343         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13344
13345 2005-08-11  Simon Josefsson  <jas@extundo.com>
13346
13347         * modules/readline: New file.
13348
13349         * modules/strnlen (Files): Add strnlen.h.
13350
13351 2005-08-11  Simon Josefsson  <jas@extundo.com>
13352
13353         * m4/readline.m4: New file.
13354
13355 2005-08-11  Simon Josefsson  <jas@extundo.com>
13356
13357         * lib/readline.h, readline.c: New file.
13358
13359 2005-08-11  Simon Josefsson  <jas@extundo.com>
13360
13361         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13362         gl_AVOID.
13363
13364 2005-08-11  Bruno Haible  <bruno@clisp.org>
13365
13366         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13367
13368 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13369
13370         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13371
13372 2005-08-10  Simon Josefsson  <jas@extundo.com>
13373
13374         * tests/test-iconvme.c: New file.
13375
13376 2005-08-10  Simon Josefsson  <jas@extundo.com>
13377
13378         * m4/strnlen.m4: New file.
13379
13380         * m4/strndup.m4: Don't check for strnlen declaration, done in
13381         strnlen.m4.
13382
13383 2005-08-10  Simon Josefsson  <jas@extundo.com>
13384
13385         * lib/strndup.c: Use strnlen.h.
13386
13387         * lib/strnlen.h: New file.
13388
13389 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13390
13391         * README: Typos.
13392
13393 2005-08-02  Simon Josefsson  <jas@extundo.com>
13394
13395         * modules/readline: New file.
13396
13397 2005-08-02  Simon Josefsson  <jas@extundo.com>
13398
13399         * modules/getdelim: New file.
13400
13401         * modules/getline: Rewrite, don't use getndelim2.
13402
13403 2005-08-02  Simon Josefsson  <jas@extundo.com>
13404
13405         * m4/getline.m4: Separate out getdelim stuff into separate module.
13406
13407         * m4/getdelim.m4: New file.
13408
13409 2005-08-02  Simon Josefsson  <jas@extundo.com>
13410
13411         * lib/getline.h, getline.c: Rewrite.
13412
13413         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13414
13415 2005-07-31  Bruno Haible  <bruno@clisp.org>
13416
13417         * lib/lock.h (gl_lock_initializer): New macro.
13418         (gl_lock_define_initialized): Use it.
13419         (gl_rwlock_initializer): New macro.
13420         (gl_rwlock_define_initialized): Use it.
13421         (gl_recursive_lock_initializer): New macro.
13422         (gl_recursive_lock_define_initialized): Use it.
13423
13424 2005-07-30  Karl Berry  <karl@gnu.org>
13425
13426         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13427         Report from Ben Pfaff, regarding getopt.
13428
13429 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13430
13431         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13432         normal way.
13433         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13434         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13435         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13436         (gl_GETOPT): Use the new macros.  Most of the implementation
13437         is moved to the new macros.  This is for programs like Emacs
13438         that don't want all the functionality of gl_GETOPT.
13439
13440 2005-07-26  Bruno Haible  <bruno@clisp.org>
13441
13442         * m4/lock.m4: Update from GNU gettext.
13443
13444 2005-07-26  Bruno Haible  <bruno@clisp.org>
13445
13446         * lib/lock.h: Update from GNU gettext.
13447         * lib/lock.c: Update from GNU gettext.
13448
13449 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13450
13451         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13452         obsolescent AC_TRY_RUN.  Include the default includes files, for
13453         'exit'.
13454
13455 2005-07-24  Bruno Haible  <bruno@clisp.org>
13456
13457         * modules/visibility: New file.
13458         * MODULES.html.sh (Misc): Add visibility.
13459
13460 2005-07-24  Bruno Haible  <bruno@clisp.org>
13461
13462         * m4/visibility.m4: New file.
13463
13464 2005-07-24  Bruno Haible  <bruno@clisp.org>
13465
13466         * doc/visibility.texi: New file.
13467
13468 2005-07-22  Bruno Haible  <bruno@clisp.org>
13469
13470         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13471         $(ALLOCA_H), redundant through BUILT_SOURCES.
13472         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13473         redundant through BUILT_SOURCES.
13474         * modules/byteswap (Makefile.am): Remove explicit dependency on
13475         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13476         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13477         $(FNMATCH_H), redundant through BUILT_SOURCES.
13478         * modules/getopt (Makefile.am): Remove explicit dependency on
13479         $(GETOPT_H), redundant through BUILT_SOURCES.
13480         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13481         redundant through BUILT_SOURCES.
13482         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13483         redundant through BUILT_SOURCES.
13484         * modules/stdbool (Makefile.am): Remove explicit dependency on
13485         $(STDBOOL_H), redundant through BUILT_SOURCES.
13486         * modules/stdint (Makefile.am): Remove explicit dependency on
13487         $(STDINT_H), redundant through BUILT_SOURCES.
13488         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13489         Remove explicit dependency on $(SYSEXITS_H).
13490         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13491
13492 2005-07-18  Simon Josefsson  <jas@extundo.com>
13493
13494         * lib/check-version.c (check_version): Accept identical versions too.
13495
13496 2005-07-18  Bruno Haible  <bruno@clisp.org>
13497
13498         * modules/lock: New file.
13499         * MODULES.html.sh (Multithreading): New section.
13500
13501 2005-07-18  Bruno Haible  <bruno@clisp.org>
13502
13503         * m4/lock.m4: New file, from GNU gettext.
13504
13505 2005-07-18  Bruno Haible  <bruno@clisp.org>
13506
13507         * lib/lock.h: New file, from GNU gettext.
13508         * lib/lock.c: New file, from GNU gettext.
13509
13510 2005-07-18  Bruno Haible  <bruno@clisp.org>
13511
13512         * lib/lock.h (gl_once_t): New type.
13513         (gl_once_define, gl_once): New macros.
13514         * lib/lock.c (fresh_once): New variable.
13515         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13516         functions.
13517
13518 2005-07-16  Simon Josefsson  <jas@extundo.com>
13519
13520         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13521         workaround, suggested by Bruno.
13522
13523 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13524
13525         * modules/xalloc (Depends-on): Add xalloc-die.
13526         * modules/xvasprintf (Depends-on): Add xalloc-die.
13527
13528 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13529
13530         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13531         with a minor change.
13532
13533 2005-07-15  Bruno Haible  <bruno@clisp.org>
13534
13535         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13536         When using lib/poll.c, define poll as rpl_poll.
13537
13538 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13539
13540         * modules/argp (Depends-on): Remove unlocked-io.
13541
13542 2005-07-14  Derek Price  <derek@ximbiot.com>
13543
13544         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13545         for glob symlink bug.
13546
13547 2005-07-14  Bruno Haible  <bruno@clisp.org>
13548
13549         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13550         Instead, test for *_unlocked function declarations directly.
13551
13552 2005-07-11  Simon Josefsson  <jas@extundo.com>
13553
13554         * modules/size_max: New file.
13555
13556         * modules/xsize: Depend on size_max module for size_max.m4.
13557
13558 2005-07-11  Simon Josefsson  <jas@extundo.com>
13559
13560         * lib/size_max.h: New file.
13561
13562 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13563
13564         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13565         copyright symbol and the year.
13566         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13567         (version_etc_va): Use parameterized copyright notice.
13568         Reword to conform to the current GNU coding standards.
13569
13570 2005-07-11  Karl Berry  <karl@gnu.org>
13571
13572         * doc/gnulib.texi (Quoting): new node.
13573         (Initial import): more info, from Patrice.
13574
13575 2005-07-11  Bruno Haible  <bruno@clisp.org>
13576
13577         * gnulib-tool (func_usage): Document option --avoid.
13578         (Command line options): Handle --avoid.
13579         (func_acceptable): New function.
13580         (func_modules_transitive_closure): Use it.
13581
13582 2005-07-11  Bruno Haible  <bruno@clisp.org>
13583
13584         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13585         Reported by Jim Meyering.
13586
13587 2005-07-10  Bruno Haible  <bruno@clisp.org>
13588
13589         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13590         Needed when size_t is smaller than 'unsigned int'.
13591         Reported by Paul Eggert.
13592
13593 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13594
13595         * modules/argp (Depends-on): Add unlocked-io
13596
13597 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13598
13599         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13600         block of defines.
13601
13602 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13603
13604         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13605         fix now.
13606
13607 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13608         and Paul Eggert  <eggert@cs.ucla.edu>
13609
13610         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13611         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13612
13613 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13614
13615         * modules/regex (Files): Add lib/regex_internal.c,
13616         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13617         (Depends-on): Add extensions.
13618         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13619
13620 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13621
13622         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13623         pathconf.
13624         * m4/same.m4 (gl_SAME): Likewise.
13625         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13626
13627         * m4/regex.m4: Adjust to new libc regex implementation.
13628         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13629         all the .c and .h parts of (the new) regex.
13630         Quote the m4 stuff better.
13631         Check for RE_ICASE bug of old gnulib.
13632         Check for REG_STARTEND of recent libc.
13633         Rename local variables from jm_* to gl_*.
13634         Quote operand of "test -f".
13635         Say "recent enough" version of libc, not "version 2".
13636         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13637         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13638         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13639         Remove check for btowc, isascii.
13640         Require AM_LANGINFO_CODESET.
13641
13642 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13643
13644         * lib/regex.c, regex.h: Sync from libc.
13645         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13646         * lib/regexec.c:
13647         New files, synced from libc, except that regex_internal.h
13648         currently has a small porting fix.
13649
13650 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13651
13652         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13653         regex_internal.c, regexec.c.
13654         Add regex_internal.h too, but as a comment, since the libc version
13655         is currently broken in gnulib mode.
13656
13657 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13658
13659         Support programs like Emacs that use gnulib but not gettext.
13660         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13661         * modules/gettext-h: New file.
13662         * modules/gettext (Files): Remove lib/gettext.h.
13663         (Depends-on): Add gettext-h.
13664         (Makefile.am): Remove lib_SOURCES.
13665         * modules/argmatch, modules/c-stack, modules/closeout:
13666         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13667         * modules/execute, modules/file-type, modules/getaddrinfo:
13668         * modules/getopt, modules/human, modules/javacomp:
13669         * modules/javaexec, modules/mkdir-p, modules/obstack:
13670         * modules/openat, modules/pagealign_alloc, modules/pipe:
13671         * modules/quotearg, modules/regex, modules/rpmatch:
13672         * modules/unicodeio, modules/userspec, modules/version-etc:
13673         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13674         * modules/xsetenv:
13675         Depend on gettext-h, not gettext.
13676
13677 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13678
13679         * gnulib-tool (func_import): Add support for 'public domain' license.
13680         * modules/alloca, modules/atexit, modules/memmove:
13681         Now public domain, not GPL.
13682         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13683         * modules/realloc, modules/strerror, modules/strtod:
13684         Now LGPL, not GPL.
13685
13686 2005-07-05  Bruno Haible  <bruno@clisp.org>
13687
13688         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13689         autoconf CVS. Needed for mingw.
13690
13691 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13692
13693         Remove the dependency of the strftime module on the tzset module.
13694         * modules/strftime (Depends-on): Remove dependency on tzset.
13695
13696 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13697
13698         Remove the dependency of the strftime module on the tzset module.
13699         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13700         gl_FUNC_TZSET_CLOBBER.
13701
13702 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13703
13704         Remove the dependency of the strftime module on the tzset module.
13705         * lib/strftime.c (my_strftime)
13706         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13707         Copy the input structure, to work around some of the bug with
13708         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13709         Solaris releases, you should also use the tzset module, but we won't
13710         require it as a dependency any more since we don't want LGPLed code
13711         to depend on GPLed code.
13712
13713 2005-07-02  Jim Meyering  <jim@meyering.net>
13714
13715         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13716         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13717         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13718         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13719
13720 2005-07-02  Jim Meyering  <jim@meyering.net>
13721
13722         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13723
13724 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13725
13726         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13727         declares only 'struct timespec;' (!).
13728
13729 2005-07-01  Jim Meyering  <jim@meyering.net>
13730
13731         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13732         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13733         * lib/save-cwd.c, tempname.c:
13734         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13735         and don't include <sys/file.h>).
13736
13737 2005-06-29  Jim Meyering  <jim@meyering.net>
13738
13739         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13740         type name.  Use the variable name instead.
13741         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13742         Likewise.
13743
13744 2005-06-28  Simon Josefsson  <jas@extundo.com>
13745
13746         * modules/check-version (Files): Add check-version.m4.
13747
13748 2005-06-28  Simon Josefsson  <jas@extundo.com>
13749
13750         * m4/check-version.m4: New file, suggested by Jim Meyering
13751         <jim@meyering.net>.
13752
13753 2005-06-28  Simon Josefsson  <jas@extundo.com>
13754
13755         * lib/check-version.h, lib/check-version.c: New files.
13756
13757 2005-06-28  Simon Josefsson  <jas@extundo.com>
13758
13759         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13760         collision with global variable.  Better indentation.  Don't
13761         increment buffer pointer beyond buffer end.  Based on comments
13762         from Paul Eggert <eggert@cs.ucla.edu>.
13763
13764         * lib/base64.h: Indent.
13765
13766 2005-06-28  Simon Josefsson  <jas@extundo.com>
13767
13768         * doc/gnulib.texi (Library version handling): New section.
13769
13770 2005-06-28  Jim Meyering  <jim@meyering.net>
13771
13772         * check-module (find_included_lib_files): Hard-code another
13773         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13774         but modules/fts-lgpl (correctly) does not list those files.
13775
13776         * modules/canonicalize (Files): Add lib/pathmax.h.
13777
13778 2005-06-25  Simon Josefsson  <jas@extundo.com>
13779
13780         * modules/check-version: New file.
13781
13782 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13783
13784         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13785         initializer of struct addrinfo, as an indication that we don't
13786         care how many members the structure has.
13787
13788 2005-06-24  Derek Price  <derek@ximbiot.com>
13789         and Bruno Haible  <bruno@clisp.org>
13790
13791         Remove stat module & update lstat.
13792         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13793         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13794         * m4/stat.m4: Remove this file.
13795
13796 2005-06-24  Derek Price  <derek@ximbiot.com>
13797         and Bruno Haible  <bruno@clisp.org>
13798
13799         Remove stat module & update lstat.
13800         * lib/stat.c: Remove this file...
13801         (slash_aware_lstat): ...moving this content and its support...
13802         * lib/lstat.c (rpl_lstat): ...into here.
13803         * lib/lstat.h: New file.
13804
13805 2005-06-24  Derek Price  <derek@ximbiot.com>
13806         and Bruno Haible  <bruno@clisp.org>
13807
13808         Remove stat module & update lstat.
13809         * config/srclist.txt (libc sources): Remove stat.
13810
13811 2005-06-24  Derek Price  <derek@ximbiot.com>
13812         and Bruno Haible  <bruno@clisp.org>
13813
13814         Remove stat module & update lstat.
13815         * MODULES.html.sh (stat): Remove.
13816         * MODULES.html: Regenerated.
13817         * modules/lstat (Description): Correct function name.
13818         (Files): Add "lstat.h".
13819         (Depends-on): Remove stat, add xalloc, stat-macros.
13820         * modules/stat: Remove this file.
13821         (Include): Add "lstat.h", remove <sys/stat.h>.
13822
13823 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13824
13825         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13826         (ranged_convert): Don't save conversion in a temporary struct.
13827         This causes a warning with GCC 4.0.0, and anyway in the typical
13828         case it's not worth the extra 100 bytes or so of code.
13829         (ranged_convert, __mktime_internal): When calling a function via a
13830         pointer P, use P () rather than (*P) (), as we now assume C89 or
13831         better.
13832
13833 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13834
13835         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13836         "who -r" failed to give output.  Problem reported by Tim Waugh.
13837
13838         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13839         (xcalloc): Use it to avoid needless tests.
13840         Problem reported by Jim Meyering.
13841
13842 2005-06-20  Derek Price  <derek@ximbiot.com>
13843
13844         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13845         unnecessary for Autoconfs > 2.59c.
13846
13847 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13848
13849         * lib/argp.h (__option_is_short): Check upper limit of
13850         __key. Isprint() requires its argument to have the value
13851         of an unsigned char or EOF.
13852
13853 2005-06-16  Jim Meyering  <jim@meyering.net>
13854
13855         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13856         when either N or S is zero.
13857
13858 2005-06-16  Derek Price  <derek@ximbiot.com>
13859
13860         * m4/bison.m4: Declare YACC & YFLAGS precious.
13861
13862 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13863
13864         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13865         multibyte string or pattern, fall back on unibyte matching.
13866         Problem reported by James Youngman.
13867
13868 2005-06-08  Bruno Haible  <bruno@clisp.org>
13869
13870         * modules/csharpcomp: New file.
13871         * MODULES.html.sh (C#): Add csharpcomp.
13872
13873 2005-06-08  Bruno Haible  <bruno@clisp.org>
13874
13875         * m4/csharpcomp.m4: New file, from GNU gettext.
13876
13877 2005-06-08  Bruno Haible  <bruno@clisp.org>
13878
13879         * lib/csharpcomp.h: New file, from GNU gettext.
13880         * lib/csharpcomp.c: New file, from GNU gettext.
13881         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13882
13883 2005-06-08  Bruno Haible  <bruno@clisp.org>
13884
13885         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13886         warning on mingw.
13887
13888 2005-06-07  Derek Price  <derek@ximbiot.com>
13889
13890         Sync from CVS.
13891         * lib/glob_.h: Indent nested #ifdef.
13892
13893 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13894
13895         Sync from coreutils.
13896         Use "file name" when talking about file names, instead of "filename"
13897         or "path", as per the GNU coding standards.
13898         * lib/mkdir-p.c: Renamed from makepath.c.
13899         (make_dir_parents): Renamed from make_path.  All callers changed.
13900         * lib/mkdir-p.h: Likewise.  All includers changed.
13901         * lib/filenamecat.c: Renamed from path-concat.c.
13902         (file_name_concat): Renamed from path_concat.  All callers changed.
13903         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13904         * lib/filenamecat.h: Likewise.  All includers changed.
13905         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13906         in comments or local variable names.
13907         * lib/basename.c: Likewise.
13908         * lib/canonicalize.c, canonicalize.h: Likewise.
13909         * lib/dirname.c, dirname.h: Likewise.
13910         * lib/euidaccess.c: Likewise.
13911         * lib/exclude.c: Likewise
13912         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13913         * lib/fsusage.c, fsuage.h: Likewise.
13914         * lib/fts.c, fts_.h: Likewise.
13915         * lib/getcwd.c: Likewise.
13916         * lib/getloadavg.c: Likewise.
13917         * lib/mkstemp.c: Likewise.
13918         * lib/mountlist.c, mountlist.h: Likewise.
13919         * lib/openat.c, openat.h: Likewise.
13920         * lib/readlink-stub.c: Likewise.
13921         * lib/readutmp.c, readutmp.h: Likewise.
13922         * lib/rename.c: Likewise.
13923         * lib/rmdir.c: Likewise.
13924         * lib/same.c: Likewise.
13925         * lib/savedir.c: Likewise.
13926         * lib/stripslash.c: Likewise.
13927         * lib/tempname.c: Likewise.
13928         * lib/xreadlink.c: Likewise.
13929         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13930         All uses changed.
13931         * lib/exclude.h: Likewise.
13932
13933         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13934         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13935         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13936         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13937         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13938         files have been getting away with it for years (MORE/BSD 4.3
13939         is extinct now).
13940         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13941         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13942
13943         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13944         Define to 256, not 255, as per modern POSIX.
13945
13946 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13947
13948         Sync from coreutils.
13949         Use "file name" when talking about file names, instead of "filename"
13950         or "path", as per the GNU coding standards.
13951         * MODULES.html.sh: mkdir-p renamed from makepath.
13952         filenamecat renamed from path-concat.
13953         * modules/filenamecat: Renamed from modules/path-concat.
13954         (Files): filenamecat.h and filenamecat.c renamed from
13955         path-concat.h and path-concat.c.
13956         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13957         (Include): filenamecat.h, not path-concat.h.
13958         * modules/mkdir-p: Renamed from modules/makepath.
13959         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13960         makepath.c.
13961         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13962         (Include): mkdir-p.h, not makepath.h.
13963
13964 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13965
13966         Sync from coreutils.
13967         * m4/mkdir-p.m4: Renamed from makepath.m4.
13968         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13969         Rename files from makepath.c to mkdir-p.c, and from
13970         makepath.h to mkdir-p.h.
13971         * m4/filenamecat.m4: Renamed from path-concat.m4.
13972         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13973         Rename files from path-concat.c to filenamecat.c,
13974         and from path-concat.h to filenamecat.h.
13975         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13976         "file name" in local variables or comments.
13977         * m4/rename.m4: Likewise.
13978
13979 2005-06-01  Bruno Haible  <bruno@clisp.org>
13980
13981         * modules/csharpexec: New file.
13982         * MODULES.html.sh (C#): New section.
13983
13984 2005-06-01  Bruno Haible  <bruno@clisp.org>
13985
13986         * m4/csharp.m4: New file, from GNU gettext.
13987         * m4/csharpexec.m4: New file, from GNU gettext.
13988
13989 2005-06-01  Bruno Haible  <bruno@clisp.org>
13990
13991         * lib/csharpexec.h: New file, from GNU gettext.
13992         * lib/csharpexec.c: New file, from GNU gettext.
13993         * lib/csharpexec.sh.in: New file, from GNU gettext.
13994
13995 2005-05-31  Derek Price  <derek@ximbiot.com>
13996             Paul Eggert  <eggert@cs.ucla.edu>
13997
13998         Sync from cvs.
13999         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14000
14001 2005-05-31  Derek Price  <derek@ximbiot.com>
14002             Paul Eggert  <eggert@cs.ucla.edu>
14003
14004         Sync from cvs.
14005         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14006
14007 2005-05-29  Derek Price  <derek@ximbiot.com>
14008
14009         * config/srclist.txt (glob_.h, glob.c): Add these files.
14010
14011 2005-05-29  Derek Price  <derek@ximbiot.com>
14012
14013         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14014         * modules/glob: New file.
14015         * modules/getlogin_r: Add link to POSIX spec in description.
14016
14017 2005-05-29  Derek Price  <derek@ximbiot.com>
14018             Paul Eggert  <eggert@cs.ucla.edu>
14019
14020         * m4/glob.m4: New file.
14021
14022 2005-05-29  Derek Price  <derek@ximbiot.com>
14023             Paul Eggert  <eggert@cs.ucla.edu>
14024
14025         * lib/glob_.h, lib/glob.c: New files.
14026
14027 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14028
14029         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14030         * modules/fts-lgpl (Depends-on): Remove gettext.
14031
14032 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14033
14034         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14035         and don't require gt_INTTYPES_PRI.
14036
14037 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14038
14039         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14040
14041         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14042         the configuration hassle isn't worth it.
14043         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14044         (LONGEST_MODIFIER, PRIuMAX): Remove.
14045
14046 2005-05-27  Bruno Haible  <bruno@clisp.org>
14047
14048         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14049
14050 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14051
14052         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14053         _POSIX_PTHREAD_SEMANTICS for Solaris.
14054
14055 2005-05-25  Derek Price  <derek@ximbiot.com>
14056
14057         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14058
14059 2005-05-25  Derek Price  <derek@ximbiot.com>
14060             Paul Eggert  <eggert@cs.ucla.edu>
14061
14062         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14063         * lib/getlogin_r.c, getlogin_r.h: New files.
14064
14065 2005-05-25  Bruno Haible  <bruno@clisp.org>
14066             Derek Price  <derek@ximbiot.com>
14067
14068         * lib/getlogin_r.h: Simplify API documentation.
14069
14070 2005-05-23  Derek Price  <derek@ximbiot.com>
14071
14072         * modules/minmax (Files): Add m4/minmax.m4.
14073         (configure.ac): Add gl_MINMAX.
14074
14075 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14076
14077         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14078         so that unistd-safer.h (GPL'ed code) need not be included.
14079
14080 2005-05-22  Bruno Haible  <bruno@clisp.org>
14081
14082         * m4/minmax.m4: New file.
14083         Based on a patch by Derek Price <derek@ximbiot.com>.
14084
14085 2005-05-22  Bruno Haible  <bruno@clisp.org>
14086
14087         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14088         (INT64_MIN): Fix definition.
14089         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14090
14091         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14092         NEED_SIGNED_INT_TYPES.
14093
14094         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14095         HAVE_SYSTEM_INTTYPES.
14096
14097 2005-05-22  Bruno Haible  <bruno@clisp.org>
14098
14099         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14100         Also include <sys/param.h> if it defines MIN, MAX.
14101         Based on a patch by Derek Price <derek@ximbiot.com>.
14102
14103 2005-05-21  Jim Meyering  <jim@meyering.net>
14104
14105         * modules/fts (Files): Add m4/inttypes-pri.m4.
14106         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14107
14108 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14109
14110         New fts module.
14111         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14112         (setup_dir, free_dir): New functions.
14113         (enter_dir, leave_dir): Define trivial
14114         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14115         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14116         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14117         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14118         Move to fts-cycle.c.
14119         (fts_open): Use setup_dir.
14120         (fts_close): Use free_dir.
14121         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14122         This adds a label and some gotos, but the alternatives were messier.
14123         Check for memory allocation failure when entering a dir.
14124         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14125         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14126         (FTS): New member fts_cycle, that is a union that contains the
14127         old active_dir_ht and cycle_state.  All uses changed to mention
14128         fts_cycle.ht and fts_cycle.state.
14129         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14130         fts.c, with the following changes:
14131         (setup_dir, free_dir): New functions.
14132         (enter_dir): Now returns bool.  Return true if successful, false
14133         if memory exhausted.  All callers changed.
14134         Do not bother partly cleaning up on
14135         memory allocation failure; that is free_dir's job.
14136         However, free ad if hash_insert fails, to avoid memory leak.
14137         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14138         fts->fts_options to see which union member to use.
14139
14140 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14141
14142         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14143         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14144
14145 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14146
14147         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14148
14149 2005-05-20  Jim Meyering  <jim@meyering.net>
14150
14151         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14152         Now a macro, to pacify GCC.
14153
14154 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14155
14156         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14157         of -1.
14158
14159 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14160
14161         * lib/chown.c (rpl_chown): Return -1 on failure.
14162
14163 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14164
14165         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14166         Don't check for stddef.h.
14167         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14168         don't use its results.
14169         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14170         since we include them unconditionally.  Don't require
14171         AM_STDBOOL_H, since stdbool is a prerequisite.
14172         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14173         since we assume C89 or better.
14174         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14175         as we don't use their results.
14176         Don't check for fchdir, memmove, memset, strrchr, as we use
14177         them unconditionally.
14178         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14179         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14180
14181 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14182
14183         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14184         Include <stddef.h> unconditionally, since we assume C89 now.
14185         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14186         * lib/fts.c: Include fts_.h first, to check interface.
14187         Do not include intprops.h; no longer needed.
14188         Include cycle-check.h and hash.h, since fts_.h no longer does.
14189         Remove unnecessary casts of closedir to void.
14190         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14191         decide whether to decrement nlinks.
14192         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14193         (FTS): Use struct hash_table * instead of Hash_table, so that
14194         we no longer need to include hash.h here.
14195
14196 2005-05-18  Jim Meyering  <jim@meyering.net>
14197
14198         * modules/dirfd (License): Change to LGPL.  Most of the code
14199         is already in the public domain.
14200
14201 2005-05-18  Jim Meyering  <jim@meyering.net>
14202
14203         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14204         Reported by Yoann Vandoorselaere.
14205
14206 2005-05-17  Jim Meyering  <jim@meyering.net>
14207
14208         * m4/fts.m4: New file, from coreutils.
14209
14210 2005-05-17  Jim Meyering  <jim@meyering.net>
14211
14212         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14213
14214 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14215
14216         Sync from coreutils.
14217         * m4/unlinkdir.m4: New file.
14218
14219 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14220
14221         Sync from coreutils.
14222         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14223         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14224         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14225         White space changes only.
14226         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14227         special.
14228         * lib/yesno.c: Include getline.h, not ctype.h.
14229         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14230         Use getline to remove arbitrary restriction on response length.
14231
14232 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14233
14234         * config/srclist-update: Spell out "Street" in FSF postal
14235         mail address; this is the style the FSF seems to prefer.
14236
14237         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14238         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14239         this updates FSF postal mail address.
14240
14241         Sync from coreutils.
14242         * modules/unlinkdir: New file.
14243         * modules/yesno (Depends-on): Add getline.
14244         * MODULES.html.sh (File system functions): Add unlinkdir.
14245
14246 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14247
14248         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14249         lib/strsep.h:
14250         Change the initial comment to refer to GPL, not LGPL.
14251         gnulib-tool will change it to LGPL as needed.
14252
14253         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14254         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14255         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14256         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14257         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14258         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14259         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14260         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14261         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14262         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14263         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14264         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14265         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14266         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14267         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14268         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14269         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14270         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14271         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14272         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14273         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14274         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14275         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14276         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14277         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14278         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14279         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14280         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14281         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14282         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14283         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14284         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14285         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14286         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14287         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14288         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14289         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14290         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14291         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14292         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14293         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14294         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14295         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14296         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14297         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14298         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14299         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14300         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14301         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14302         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14303         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14304         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14305         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14306         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14307         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14308         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14309         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14310         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14311         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14312         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14313         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14314         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14315         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14316         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14317         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14318         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14319         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14320         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14321         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14322         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14323         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14324         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14325         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14326         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14327         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14328         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14329         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14330         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14331         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14332         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14333         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14334         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14335         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14336         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14337         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14338         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14339         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14340         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14341         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14342         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14343         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14344         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14345         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14346         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14347         lib/yesno.c, lib/yesno.h:
14348         Update FSF postal mail address.
14349
14350 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14351
14352         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14353         tests/test-memmem.c, tests/test-stpncpy.c:
14354         Update FSF postal mail address.
14355
14356 2005-05-13  Bruno Haible  <bruno@clisp.org>
14357
14358         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14359         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14360         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14361         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14362         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14363         Add support for 64-bit integers in the MSVC compiler.
14364
14365 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14366
14367         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14368
14369 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14370
14371         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14372
14373 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14374
14375         * doc/getdate.texi (General date syntax): Don't say that date
14376         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14377         Problem reported by Nic Ferrier.
14378
14379 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14380
14381         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14382         specified in ai_socktype. Fix invalid ai_protocol
14383         check. ai_protocol is usually set to 0 or depending on
14384         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14385         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14386         ai_socktype / ai_protocol in the returned addrinfo structure.
14387
14388 2005-05-10  Simon Josefsson  <jas@extundo.com>
14389
14390         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14391         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14392
14393 2005-05-10  Karl Berry  <karl@gnu.org>
14394
14395         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14396         (from http://www.gnu.org/licenses).
14397         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14398         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14399         fdl.texi suffices.
14400
14401 2005-05-10  Karl Berry  <karl@gnu.org>
14402
14403         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14404         (COPYING.DOC): remove.
14405
14406         * config/srclist-update: new FSF address.
14407
14408 2005-05-10  Derek Price  <derek@ximbiot.com>
14409
14410         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14411         possible.
14412
14413 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14414             Bruno Haible  <bruno@clisp.org>
14415
14416         * modules/inet_ntop: New file.
14417         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14418         inet_ntop.
14419
14420 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14421             Bruno Haible  <bruno@clisp.org>
14422
14423         * m4/inet_ntop.m4: New file.
14424
14425 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14426             Bruno Haible  <bruno@clisp.org>
14427
14428         * lib/inet_ntop.h: New file.
14429         * lib/inet_ntop.c: New file, from glibc with modifications.
14430
14431 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14432
14433         * modules/time_r (License): Change to LGPL.
14434         * modules/extensions (License): Change to LGPL.  Actually,
14435         the license is more permissive than that, but currently gnulib-tool
14436         doesn't know how to handle more-permissive licenses.
14437
14438         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14439         Problem reported by Dave Love.
14440
14441 2005-05-08  Jim Meyering  <jim@meyering.net>
14442
14443         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14444         blank.
14445
14446 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14447
14448         * modules/argmatch (Depends-on): Add stdbool.
14449         * modules/backupfile (Depends-on): Likewise.
14450         * modules/chdir-long (Depends-on): Likewise.
14451         * modules/closeout (Depends-on): Likewise.
14452         * modules/cycle-check (Depends-on): Likewise.
14453         * modules/dirname (Depends-on): Likewise.
14454         * modules/fnmatch (Depends-on): Likewise.
14455         * modules/fsusage (Depends-on): Likewise.
14456         * modules/fwriteerror (Depends-on): Likewise.
14457         * modules/getcwd (Depends-on): Likewise.
14458         * modules/getloadavg (Depends-on): Likewise.
14459         * modules/hard-locale (Depends-on): Likewise.
14460         * modules/makepath (Depends-on): Likewise.
14461         * modules/mountlist (Depends-on): Likewise.
14462         * modules/nanosleep (Depends-on): Likewise.
14463         * modules/posixtm (Depends-on): Likewise.
14464         * modules/quotearg (Depends-on): Likewise.
14465         * modules/readtokens (Depends-on): Likewise.
14466         * modules/readtokens0 (Depends-on): Likewise.
14467         * modules/readutmp (Depends-on): Likewise.
14468         * modules/save-cwd (Depends-on): Likewise.
14469         * modules/strftime (Depends-on): Likewise.
14470         * modules/userspec (Depends-on): Likewise.
14471         * modules/utimecmp (Depends-on): Likewise.
14472         * modules/xgetcwd (Depends-on): Likewise.
14473         * modules/xnanosleep (Depends-on): Likewise.
14474         * modules/xstrtod (Depends-on): Likewise.
14475         * modules/yesno (Depends-on): Likewise.
14476
14477 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14478
14479         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14480         needless checks.
14481
14482 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14483
14484         Merge from coreutils.  Among other things,
14485         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14486         * lib/fd-safer.c: New file.
14487         * lib/fcntl-safer.h, open-safer.c: Remove.
14488         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14489         * lib/dup-safer.c: Include unistd-safer.h first.
14490         Don't include errno.h.
14491         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14492         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14493         * lib/file-type.c: Rely on file-type.h change.
14494         * lib/getloadavg.c: Include unistd-safer.h.
14495         (getloadavg): Use safer open.
14496         * lib/getusershell.c: Include "stdio-safer.h".
14497         (getusershell): Use safer fopen.
14498         * lib/long-options.c (long_options): Use NULL rather than 0.
14499         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14500         'free'.
14501         * lib/modechange.c: Likewise.
14502         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14503         (MODE_DONE): New constant.
14504         (struct mode_change): Remove 'next' member.
14505         (make_node_op_equals): New function; like the old one of the
14506         same name, except it allocates an array.
14507         (mode_compile, mode_create_from_ref): Use it.
14508         (mode_compile): Allocate result as an array, not a linked list.
14509         Parse octal string ourself, so that we catch mistakes like "+0".
14510         (mode_adjust): Arg is an array, not a linked list.
14511         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14512         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14513         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14514         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14515         Remove.  This is now stat-macros.h's job.
14516         (talloc): Remove.  All callers replaced by xalloc, so that
14517         our invokers don't have to worry about reporting memory failures.
14518         (make_node_op_equals): Remove.
14519         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14520         New constants.
14521         (struct mode_change): Moved here from modechange.h.
14522         (mode_append_entry): Remove.
14523         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14524         apps to have incorrect behavior.  Use simpler algorithm for head
14525         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14526         Detect more invalid usages rather than having somewhat-random behavior.
14527         Don't insert an "a=" action, as that leads to incorrect behavior.
14528         (mode_compile, mode_create_from_ref): Return NULL on error instead
14529         of an enum, since now there's only one way to have an error.  All
14530         callers changed.
14531         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14532         at the correct time.  Simplify calculation of "+u" and its ilk.
14533         Don't mishandle "+X".
14534         (mode_free): Remove "register" and localize decls.
14535         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14536         (struct mode_change): Move to modechange.c; callers don't
14537         need to see this stuff.
14538         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14539         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14540         (mode_change, mode_adjust): Reflect the new signatures noted above.
14541         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14542         that might redefine system include files.
14543         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14544         (my_usleep): Use NULL rather than (void *) 0.
14545         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14546         Use siginterrupt to specify that system calls should be interrupted.
14547         (rpl_nanosleep): Move initialization of suspended closer to call of
14548         my_usleep.
14549         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14550         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14551         (desirable_utmp_entry): New function.
14552         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14553         using x2nrealloc, to simplify logic.
14554         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14555         size calculation.  Do not assume utmp file is a regular file.
14556         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14557         (READ_UTMP_CHECK_PIDS): New constant.
14558         * lib/save-cwd.c: Include unistd-safer.h.
14559         (save_cwd): Use fd_safer.
14560         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14561         [!_LIBC] Include "stat-macros.h" instead.
14562         * lib/unistd-safer.h (fd_safer): New decl.
14563
14564 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14565
14566         * modules/getloadavg (Depends-on): Add unistd-safer.
14567         * modules/getusershell (Depends-on): Add stdio-safer.
14568         * modules/lstat (Depends-on): Remove xalloc.
14569         * modules/mkstemp (Depends-on): Add stat-macros.
14570         * modules/modechange (Depends-on): Remove xstrtol.
14571         Add stat-macros, xalloc.
14572         * modules/save-cwd (Depends-on): Add unistd-safer.
14573         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14574         * modules/unistd-safer (Files): Add lib/fd-safer.c
14575         (Makefile.am): Remove lib_SOURCES.
14576
14577         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14578         Remove fcntl-safer; unistd-safer supersedes it.
14579
14580 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14581
14582         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14583         AC_HEADER_STAT.
14584         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14585         (gl_PREREQ_CHOWN): Remove.
14586         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14587         it.  Don't require AC_HEADER_STAT.
14588         (gl_PREREQ_LSTAT): Remove.
14589         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14590         Don't require AC_HEADER_STAT.
14591         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14592         (gl_PREREQ_RMDIR): Remove.
14593         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14594         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14595         the stat-macros module a prerequisite.
14596         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14597         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14598         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14599         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14600         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14601         variable names.
14602         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14603         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14604         variable prefixes.
14605         * m4/fcntl-safer.m4: Remove.
14606         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14607         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14608         Invoke gl_PREREQ_FD_SAFER.
14609         (gl_PREREQ_FD_SAFER): New macro.
14610         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14611         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14612         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14613         Remove duplicate call to AC_LIBOBJ(readutmp).
14614         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14615
14616         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14617         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14618
14619 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14620
14621         * MODULES.html.sh (Misc): Add byteswap.
14622
14623 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14624
14625         * modules/getcwd (Depends-on): Add extensions.
14626         * modules/openat (Depends-on): Likewise.
14627
14628 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14629
14630         * modules/byteswap: New file.
14631
14632 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14633
14634         * m4/byteswap.m4: New file.
14635
14636 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14637
14638         * lib/byteswap_.h: New file.
14639
14640 2005-04-25  Karl Berry  <karl@gnu.org>
14641
14642         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14643
14644 2005-04-25  Albert Chin  <china@thewrittenword.com>
14645
14646         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14647         Toolkit C bug.
14648
14649 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14650
14651         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14652         (func_ln_if_changed) Remove forcibly for no error message
14653         in case file does not exist.
14654
14655 2005-04-19  Simon Josefsson  <jas@extundo.com>
14656
14657         * gnulib-tool (Options): Make --symlink mean --symbolic.
14658
14659 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14660
14661         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14662
14663 2005-04-16  Simon Josefsson  <jas@extundo.com>
14664
14665         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14666
14667 2005-04-15  Simon Josefsson  <jas@extundo.com>
14668
14669         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14670
14671 2005-04-15  Simon Josefsson  <jas@extundo.com>
14672
14673         * gnulib-tool: Rename --symlink to --symbolic.
14674
14675 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14676
14677         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14678         symbolic links to files instead of copying/moving.  Add --aux-dir,
14679         specifying directory relative --dir where auxiliary build tools
14680         are placed.
14681
14682 2005-04-14  Bruno Haible  <bruno@clisp.org>
14683
14684         * modules/allocsa (License): Change to LGPL.
14685         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14686
14687 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14688
14689         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14690         that "UTC +1 second" continues to work.  Problem reported
14691         by Dmitry V. Levin.
14692         (relunit_snumber): New rule.
14693         (relunit): Use it.
14694
14695 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14696
14697         * lib/getdate.y (universal_time_zone_table): New constant.
14698         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14699         universal_time_zone_table.
14700         (lookup_zone): Prefer universal_time_zone_table to
14701         local_time_zone_table, so that "GMT" time stamps are allowed in
14702         London during the summer.  Problem reported by Ian Abbott.
14703
14704 2005-04-12  Jim Meyering  <jim@meyering.net>
14705
14706         * lib/human.c (humblock): Set *options even when returning due to
14707         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14708         warning from gcc-4.
14709
14710 2005-04-09  Jim Meyering  <jim@meyering.net>
14711
14712         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14713         -Wuninitialized: initialize tm0.tm_year.
14714
14715 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14718         count, since there's no maximum.  All uses changed.
14719         Add member dsts_seen.
14720         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14721         not being INT_MAX.
14722         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14723         Use pc_rels_seen to decide whther a date is absolute.
14724
14725         * lib/getdate.y (number): Don't overwrite year.
14726         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14727         check.
14728
14729 2005-04-02  Simon Josefsson  <jas@extundo.com>
14730
14731         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14732         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14733
14734 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14735
14736         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14737         where no absolute path name can be longer than PATH_MAX.
14738
14739 2005-03-27  Jim Meyering  <jim@meyering.net>
14740
14741         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14742
14743 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14744
14745         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14746         "one's complement" -> "ones' complement" in comment, as per Knuth.
14747         "value of type" -> "type or expression" in comment.
14748         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14749
14750 2005-03-26  Jim Meyering  <jim@meyering.net>
14751
14752         Comment nits.
14753         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14754         Correct typos: s/or/of/.
14755
14756 2005-03-26  Jim Meyering  <jim@meyering.net>
14757
14758         * modules/check-include-files: Move to ../ and rename to...
14759         * check-module: ...this.
14760
14761 2005-03-25  Jim Meyering  <jim@meyering.net>
14762
14763         * modules/xvasprintf (Files): Add xalloc.h.
14764
14765 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14766
14767         * modules/gettext (Files): config/config.rpath ->
14768         build-aux/config.rpath
14769         * modules/iconv (Files): Likewise.
14770         Problem reported by Oskar Liljeblad.
14771
14772 2005-03-23  Jim Meyering  <jim@meyering.net>
14773
14774         * modules/check-include-files: New script to check for
14775         missing dependencies, multiple includes, etc.
14776
14777         * modules/c-strtold (Depends-on): Add xalloc.
14778         * modules/c-strtod (Depends-on): Add xalloc.
14779         * modules/hash (Depends-on): Add xalloc.
14780         (Files): Remove lib/xalloc.h.
14781
14782         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14783         * modules/userspec (Files): Add lib/inttostr.h.
14784
14785 2005-03-23  Jim Meyering  <jim@meyering.net>
14786
14787         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14788
14789 2005-03-22  Jim Meyering  <jim@meyering.net>
14790
14791         * modules/stat-macros: New module.
14792         * modules/canonicalize, modules/euidaccess, modules/file-type,
14793         * modules/filemode, modules/lchown, modules/makepath,
14794         * modules/rmdir, modules/stat: Depend on new stat-macros module
14795         rather than listing lib/stat-macros.h manually.
14796         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14797
14798 2005-03-22  Jim Meyering  <jim@meyering.net>
14799
14800         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14801
14802 2005-03-22  Bruno Haible  <bruno@clisp.org>
14803
14804         * config/srclist.txt: Replace target directory 'config' with
14805         'build-aux'.
14806         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14807         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14808         ../build-aux/.
14809
14810 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14811
14812         * modules/chdir-long (Depends-on): Add mempcpy.
14813
14814         * modules/acl, modules/backupfile, modules/c-strtod,
14815         modules/c-strtold, modules/canon-host, modules/canonicalize,
14816         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14817         modules/exclude, modules/exitfail, modules/file-type,
14818         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14819         modules/getdate, modules/getline, modules/getpagesize,
14820         modules/getpass, modules/getugroups, modules/group-member,
14821         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14822         modules/inttostr, modules/long-options, modules/makepath,
14823         modules/md5, modules/memcasecmp, modules/memcoll,
14824         modules/modechange, modules/mountlist, modules/path-concat,
14825         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14826         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14827         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14828         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14829         modules/strftime, modules/strndup, modules/strverscmp,
14830         modules/timespec, modules/unlocked-io, modules/userspec,
14831         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14832         modules/yesno:
14833         Remove lib_SOURCES line from Makefile.am section, as this is now
14834         done automatically by the corresponding Autoconf macro.
14835
14836 2005-03-21  Jim Meyering  <jim@meyering.net>
14837
14838         Changes imported from coreutils.
14839
14840         * lib/cycle-check.c: Don't include xalloc.h.
14841
14842         * lib/path-concat.c: Don't include assert.h.
14843         (path_concat): Remove assertion that would have triggered
14844         for ABASE starting with more than one slash.
14845         Reported by Andreas Schwab.
14846
14847         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14848         properly when ABASE is an absolute file name.
14849         Correct the description of this function.
14850         Include <assert.h>.
14851         Add an assertion and a test driver.
14852         This fixes a bug introduced on 2004-07-02.
14853         Andreas Schwab reported the resulting failure of cp --parents:
14854         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14855
14856 2005-03-21  Jim Meyering  <jim@meyering.net>
14857
14858         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14859         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14860
14861 2005-03-21  Jim Meyering  <jim@meyering.net>
14862         and  Paul Eggert  <eggert@cs.ucla.edu>
14863
14864         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14865         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14866         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14867         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14868         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14869         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14870         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14871         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14872         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14873         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14874         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14875         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14876         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14877         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14878         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14879         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14880         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14881         for these modules.
14882
14883 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14884
14885         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14886         (which shouldn't happen), generate nothing instead of returning 0
14887         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14888
14889 2005-03-16  Bruno Haible  <bruno@clisp.org>
14890
14891         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14892         HAVE_LONGLONG_64BIT.
14893
14894 2005-03-16  Bruno Haible  <bruno@clisp.org>
14895
14896         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14897         HAVE_LONGLONG_64BIT.
14898
14899 2005-03-16  Bruno Haible  <bruno@clisp.org>
14900
14901         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14902         HAVE_LONGLONG_64BIT.
14903
14904 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14905
14906         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14907         reliably distinguish strftime failure from empty output on POSIX
14908         hosts.
14909
14910 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14911
14912         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14913         (iconv_string): Don't guess a size-zero buffer, as that might cause
14914         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14915         result would be 'too large', where 'too large' is (heuristically)
14916         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14917         overflow concerns.  This will prevent some unwanted malloc failures
14918         when the inputs are very large.
14919
14920 2005-03-15  Karl Berry  <karl@gnu.org>
14921
14922         * config/srclist.txt (config.rpath): from gettext.
14923         * config/config.rpath: update.
14924
14925 2005-03-15  Bruno Haible  <bruno@clisp.org>
14926
14927         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14928         to 'negate'.
14929
14930         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14931         variable.
14932
14933         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14934         results.
14935
14936 2005-03-14  Simon Josefsson  <jas@extundo.com>
14937
14938         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14939         <fx@gnu.org>.
14940
14941 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14942
14943         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14944         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14945         intprops.h.
14946         * lib/strtol.c: Likewise.
14947
14948 2005-03-14  Jim Meyering  <jim@meyering.net>
14949
14950         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14951         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14952         to be nonzero so that we (and caller) can detect the difference
14953         between a valid zero-length expansion and an error return, even
14954         when the underlying strftime fails before writing anything into
14955         that location.
14956
14957 2005-03-14  Bruno Haible  <bruno@clisp.org>
14958
14959         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14960         Update from GNU gettext 0.14.3.
14961
14962 2005-03-10  Jim Meyering  <jim@meyering.net>
14963
14964         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14965
14966 2005-03-10  Jim Meyering  <jim@meyering.net>
14967
14968         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14969         so that this module works on systems without fchdir.
14970
14971 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14972
14973         Factor int-properties macros into a single file, except for
14974         glibc-related files.
14975         * lib/intprops.h: New file.
14976         * lib/getloadavg.c: Include it instead of limits.h.
14977         (INT_STRLEN_BOUND): Remove.
14978         * lib/human.c: Include intprops.h.
14979         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14980         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14981         302/1000.
14982         * lib/inttostr.h: Include intprops.h instead of limits.h.
14983         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14984         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14985         for consistency with intprops.h.
14986         (time_t_is_integer, twos_complement_arithmetic): Use them.
14987         * lib/sig2str.h: Include <signal.h>, intprops.h.
14988         (INT_STRLEN_BOUND): Remove.
14989         * lib/strftime.c (TYPE_SIGNED): Remove.
14990         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14991         * lib/strtol.c: Adjust comments to match intprops.h.
14992         * lib/userspec.c: Include intprops.h.
14993         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14994         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14995         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14996         instead of rolling our own expressions.
14997         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14998
14999         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15000         instead of int.
15001         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15002         the right thing even if adding 1900 would overflow.  Similarly
15003         for tm_mon + 1 and tm_yday + 1.
15004         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15005         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15006         (DO_SIGNED_NUMBER): New macro.
15007         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15008
15009 2005-03-07  Bruno Haible  <bruno@clisp.org>
15010
15011         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15012
15013 2005-03-07  Bruno Haible  <bruno@clisp.org>
15014
15015         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15016
15017 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15018
15019         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15020         (func_import): Only replace files via --import when they have actually
15021         changed.
15022
15023 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15024
15025         * m4/mmap-anon.m4: New file.
15026         * m4/pagealign_alloc.m4: New file.
15027
15028 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15029             Bruno Haible  <bruno@clisp.org>
15030
15031         * modules/pagealign_alloc: New file.
15032         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15033
15034 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15035             Bruno Haible  <bruno@clisp.org>
15036
15037         * lib/pagealign_alloc.h: New file.
15038         * lib/pagealign_alloc.c: New file.
15039
15040 2005-03-03  Bruno Haible  <bruno@clisp.org>
15041
15042         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15043         Use an all-permissive copyright notice, recommended by RMS.
15044
15045 2005-03-02  Bruno Haible  <bruno@clisp.org>
15046
15047         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15048         of AIX, the replacement has to be done only after <string.h> is
15049         included, therefore not in config.h. stpncpy.h does the replacement,
15050         and stpncpy.c uses it.
15051
15052 2005-03-02  Bruno Haible  <bruno@clisp.org>
15053
15054         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15055         stpncpy.c uses it.
15056
15057 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15058
15059         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15060         The workaround isn't strictly needed for POSIX conformance, and
15061         it's too much of a pain to configure and maintain.  We'll ask
15062         people to fix their kernels instead.
15063         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15064         (NANOSLEEP_BUG_WORKAROUND): Remove.
15065         (xnanosleep): Remove the workaround.
15066
15067 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15068
15069         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15070         Reported by Derek Price.
15071         (Include): Add "timespec.h".
15072
15073         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15074
15075 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15076
15077         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15078         to detect nanosleep bug.
15079
15080 2005-03-01  Bruno Haible  <bruno@clisp.org>
15081
15082         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15083
15084 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15085
15086         * modules/gethrxtime: New file.
15087         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15088         (Depends-on): Add gethrxtime.
15089         (configure.ac): Add gl_XNANOSLEEP.
15090         (Makefile.am): Remove lib_SOURCES line.
15091
15092 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15093
15094         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15095         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15096
15097 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15098
15099         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15100         * lib/timespec.h (gettime): Return void, since it always
15101         succeeds now.  All uses changed.
15102         * lib/gettime.c (gettime) Likewise.
15103         [HAVE_NANOTIME]: Prefer nanotime.
15104         Assume gettimeofday succeeds, as POSIX requires.
15105         Assime time () succeeds, since other code already does.
15106         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15107         (timespec_subtract): Remove.
15108         (NANOSLEEP_BUG_WORKAROUND): New constant.
15109         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15110         things considerably.  Use it only on GNU/Linux hosts, since the
15111         workaround shouldn't be needed elsewhere.
15112
15113 2005-02-24  Bruno Haible  <bruno@clisp.org>
15114
15115         * modules/gettext (Files): Add m4/glibc2.m4.
15116
15117 2005-02-24  Bruno Haible  <bruno@clisp.org>
15118
15119         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15120         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15121         * m4/progtest.m4:
15122         Update from GNU gettext 0.14.2.
15123         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15124
15125 2005-02-24  Bruno Haible  <bruno@clisp.org>
15126
15127         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15128         * lib/config.charset: Update from GNU gettext 0.14.2.
15129
15130 2005-02-24  Bruno Haible  <bruno@clisp.org>
15131
15132         * lib/gettext.h: Update from GNU gettext 0.14.2.
15133
15134 2005-02-23  Simon Josefsson  <jas@extundo.com>
15135
15136         * m4/iconvme.m4: New file.
15137
15138 2005-02-23  Jim Meyering  <jim@meyering.net>
15139
15140         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15141         change.
15142         Thanks to Bruno Haible for catching it.
15143
15144 2005-02-22  Simon Josefsson  <jas@extundo.com>
15145
15146         * modules/iconvme: New file.
15147
15148         * MODULES.html.sh: Add iconvme.
15149
15150 2005-02-22  Simon Josefsson  <jas@extundo.com>
15151
15152         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15153
15154 2005-02-22  Simon Josefsson  <jas@extundo.com>
15155
15156         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15157
15158 2005-02-22  Jim Meyering  <jim@meyering.net>
15159
15160         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15161         s/ifndef/ifdef/.
15162
15163 2005-02-20  Neil Conway  <neilc@samurai.com>
15164
15165         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15166         returned by OSX/Darwin if the specified buffer is not large
15167         enough for the hostname.
15168
15169 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15170
15171         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15172         pass it to _help, otherwise the latter coredumps trying to
15173         dereference state.root_argp.
15174
15175 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15176
15177         * modules/chdir-long (Depends-on): Add memrchr.
15178         * modules/memrchr (Files): Add lib/memrchr.h.
15179         (Include): "memrchr.h".
15180
15181 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15184
15185 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * lib/memrchr.h: New file.
15188         * lib/chdir-long.c: Include it.
15189         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15190         Don't bother including stddef.h.
15191
15192 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15193
15194         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15195         inclusion.
15196         Include <sys/types.h>, for dev_t.
15197         (ME_DUMMY, ME_REMOTE): Move from here....
15198         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15199         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15200         Dmitry V. Levin.
15201         Include mountlist.h first, to test the interface.
15202
15203 2005-01-29  Bruno Haible  <bruno@clisp.org>
15204
15205         * lib/progname.c (program_name): Initialize.
15206         Needed when linking statically on MacOS X.
15207
15208 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15209
15210         Sync from coreutils.
15211         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15212         (Depends-on): Add c-strtod.
15213         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15214
15215 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15216
15217         Sync from coreutils.
15218         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15219
15220         Remove files that are specific to coreutils.
15221         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15222
15223 2005-01-28  Bruno Haible  <bruno@clisp.org>
15224
15225         * modules/javacomp: New file.
15226         * MODULES.html.sh (Java): Add javacomp.
15227
15228 2005-01-28  Bruno Haible  <bruno@clisp.org>
15229
15230         * m4/javacomp.m4: New file, from GNU gettext.
15231
15232 2005-01-28  Bruno Haible  <bruno@clisp.org>
15233
15234         * lib/javacomp.sh.in: New file, from GNU gettext.
15235         * lib/javacomp.h: New file, from GNU gettext.
15236         * lib/javacomp.c: New file, from GNU gettext.
15237
15238 2005-01-26  Simon Josefsson  <jas@extundo.com>
15239
15240         * lib/gai_strerror.c: Use GPL in header.
15241
15242 2005-01-26  Bruno Haible  <bruno@clisp.org>
15243
15244         * modules/javaexec: New file.
15245         * MODULES.html.sh (Java): Add javaexec.
15246
15247 2005-01-26  Bruno Haible  <bruno@clisp.org>
15248
15249         * m4/javaexec.m4: New file, from GNU gettext.
15250
15251 2005-01-26  Bruno Haible  <bruno@clisp.org>
15252
15253         * lib/javaexec.sh.in: New file, from GNU gettext.
15254         * lib/javaexec.h: New file, from GNU gettext.
15255         * lib/javaexec.c: New file, from GNU gettext.
15256
15257 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15258
15259         * modules/lchown (Depends-on): Remove lchown.h
15260
15261 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15262
15263         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15264         must be defined if the header file was not found, in order
15265         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15266
15267 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15268
15269         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15270         initializers for struct pentry_state.
15271         (__argp_error): Check return value of __asprintf
15272         (__argp_failure): Translate error message
15273
15274         * lib/argp-parse.c: Removed braces around the expansion of N_()
15275
15276 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15277
15278         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15279         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15280         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15281         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15282         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15283         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15284         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15285         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15286         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15287         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15288         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15289         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15290         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15291         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15292         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15293         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15294         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15295         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15296         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15297         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15298         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15299         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15300         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15301         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15302         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15303         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15304         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15305         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15306         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15307         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15308         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15309         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15310         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15311         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15312         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15313         Use an all-permissive copyright notice, recommended by RMS.
15314
15315 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15316
15317         * modules/chdir-long (Depends-on): Remove mempcpy.
15318
15319 2005-01-21  Jim Meyering  <jim@meyering.net>
15320
15321         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15322         same value as for Solaris 9.
15323
15324         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15325         component length.  This included changing the parameter to be
15326         of type `char *' rather than `char const *'.
15327         * lib/chdir-long.h (chdir_long): Update prototype.
15328
15329         * lib/openat.c (fdopendir, fstatat): New functions.
15330         * lib/openat.h: Include headers required for use of DIR and struct
15331         stat.
15332         [AT_SYMLINK_NOFOLLOW]: Define.
15333         (fdopendir, fstatat): Add prototypes.
15334
15335 2005-01-21  Bruno Haible  <bruno@clisp.org>
15336
15337         * modules/classpath: New file.
15338         * MODULES.html.sh (Java): Add classpath.
15339
15340 2005-01-21  Bruno Haible  <bruno@clisp.org>
15341
15342         * lib/classpath.h: New file, from GNU gettext.
15343         * lib/classpath.c: New file, from GNU gettext.
15344
15345 2005-01-20  Simon Josefsson  <jas@extundo.com>
15346
15347         * modules/version-etc-fsf: New file.
15348
15349 2005-01-20  Simon Josefsson  <jas@extundo.com>
15350
15351         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15352         * lib/version-etc.c: Remove version_etc_copyright.
15353         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15354         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15355
15356 2005-01-20  Simon Josefsson  <jas@extundo.com>
15357
15358         * lib/base64.h (isbase64): Add.
15359
15360         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15361         using a unsigned prototype, don't inline.
15362         (base64_decode): Use it.
15363
15364 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15365
15366         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15367         it.
15368
15369 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15370
15371         * lib/save-cwd.c (save_cwd): Remove code to support the case
15372         where fchdir is missing or flaky.
15373
15374 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15375
15376         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15377
15378 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15379
15380         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15381         AC_LIBSOURCES now does this.
15382         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15383         with new ullong_max module.
15384
15385 2005-01-19  Bruno Haible  <bruno@clisp.org>
15386
15387         * modules/sh-quote: New file.
15388         * MODULES.html.sh (Executing programs): Add sh-quote.
15389
15390 2005-01-19  Bruno Haible  <bruno@clisp.org>
15391
15392         * lib/sh-quote.h: New file, from GNU gettext.
15393         * lib/sh-quote.c: New file, from GNU gettext.
15394
15395 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15396
15397         Merge from coreutils.
15398         * m4/ullong_max.m4: New file.
15399         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15400         (gl_MACROS): Assume localeconv exists.
15401
15402 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15403
15404         Merge changes from coreutils, as described below in several
15405         changelogs dated today.
15406
15407         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15408         (O_DIRECTORY): Remove; not needed here, since "." must be
15409         a directory.  All uses removed.
15410         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15411         universal on Suns, and we also need to test for IRIX.
15412         Revamp code to use 'if' rather than '#if'.
15413         Avoid unnecessary comparison of cwd->desc to 0.
15414
15415         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15416         for known valid error numbers rather than observed invalid ones.
15417
15418 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15419
15420         * modules/ullong_max: New file.
15421
15422         * modules/chdir-long, modules/openat: New files.
15423         * modules/save-cwd (Depends-on): Depend on chdir-long.
15424         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15425
15426 2005-01-18  Jim Meyering  <jim@meyering.net>
15427
15428         Merge from coreutils.
15429         * m4/chdir-long.m4, m4/openat.m4: New files.
15430         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15431         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15432         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15433         is sane and DOES follow symlinks.  Besides, testing 20 different
15434         systems found no broken chown implementations.
15435         Prompted by a change in rsync's copy of this macro.
15436         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15437
15438         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15439
15440         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15441         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15442         NULL-means-set-to-current-time semantics.
15443         Remove temporary file immediately, rather than waiting
15444         for configure's at-exit trap code to do it.
15445
15446 2005-01-18  Jim Meyering  <jim@meyering.net>
15447
15448         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15449
15450         * lib/utimens.c (futimens): Account for the fact that futimes
15451         can also fail with errno == ENOSYS or errno == ENOENT.
15452         Patch from Dmitry V. Levin.
15453
15454         Change the name of the robust chdir function from chdir to chdir_long.
15455         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15456         (restore_cwd): Use chdir_long, not chdir.
15457         * lib/chdir-long.c: Renamed from chdir.c.
15458         * lib/chdir-long.h: Renamed from chdir.h.
15459         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15460         Hurd.
15461
15462 2005-01-18  Bruno Haible  <bruno@clisp.org>
15463
15464         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15465         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15466         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15467         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15468         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15469         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15470         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15471         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15472         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15473         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15474         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15475         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15476         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15477         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15478         Use an all-permissive copyright notice, recommended by RMS.
15479
15480 2005-01-18  Bob Proulx  <bob@proulx.com>
15481
15482         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15483         simplify offsetof() macro construct to avoid compile failure with
15484         native HP-UX 11.0 ANSI C compiler.
15485
15486 2005-01-17  Bruno Haible  <bruno@clisp.org>
15487
15488         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15489         redundant because stpncpy.m4 takes care of it.
15490
15491 2005-01-17  Bruno Haible  <bruno@clisp.org>
15492
15493         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15494
15495 2005-01-17  Bruno Haible  <bruno@clisp.org>
15496
15497         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15498         used.
15499
15500 2005-01-17  Bruno Haible  <bruno@clisp.org>
15501
15502         * lib/fwriteerror.h (fwriteerror): Change specification to include
15503         fclose.
15504         * lib/fwriteerror.c: Include <stdbool.h>.
15505         (fwriteerror): At the end, close the file stream. Record whether
15506         stdout was already closed.
15507
15508 2005-01-17  Bruno Haible  <bruno@clisp.org>
15509
15510         * lib/execute.c (environ): Declare if needed.
15511         * lib/pipe.c (environ): Likewise.
15512         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15513
15514 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15515
15516         * modules/argp: Depend on vsnprintf
15517
15518 2005-01-10  Jim Meyering  <jim@meyering.net>
15519
15520         * modules/closeout (Depends-on): Add atexit.
15521
15522 2005-01-06  Bruno Haible  <bruno@clisp.org>
15523
15524         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15525
15526 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15527
15528         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15529         definitions to be after all include files, to avoid collisions.
15530         Problem reported by Bob Proulx.
15531
15532 2005-01-04  Jim Meyering  <jim@meyering.net>
15533
15534         Changes imported from coreutils.
15535         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15536         as the mkstemp template, use a temporary directory and an
15537         8.3-friendly template to avoid trouble on systems like DJGPP.
15538         Reported by Juan M. Guerrero via Stepan Kasal.
15539         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15540         close. Remove the temporary directory right away, rather than waiting
15541         for configure's at-exit trap code to do it.
15542         Suggestion from Stepan Kasal.
15543
15544 2005-01-01  Simon Josefsson  <jas@extundo.com>
15545
15546         * gnulib-tool: Print #include directives when --import'ing.
15547
15548 2004-12-28  Simon Josefsson  <jas@extundo.com>
15549
15550         * tests/test-base64.c: Include required header files.  Remove
15551         unused variables.
15552
15553 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * modules/error (Depends-on): Remove gettext.
15556
15557 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15558
15559         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15560         not needed.  This removes a dependency on the gettext module.
15561         [defined _LIBC]: Do not include <libintl.h>; not needed.
15562
15563 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15564
15565         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15566         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15567
15568 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15569
15570         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15571         HAVE_DECL_STRTOLD.
15572
15573 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         * modules/getdate (Depends-on): Remove alloca-opt.
15576
15577 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15578
15579         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15580
15581 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15582
15583         * lib/argp-parse.c: Include <stddef.h>.
15584         (alignof, alignto): New macros.
15585         (parser_init): Don't assume that void * is aligned sufficiently
15586         for struct option.
15587
15588         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15589         need to extend the stack.
15590         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15591         large.
15592
15593 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15594
15595         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15596
15597 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15598
15599         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15600         (2004-10-24) change.  Apparently this was a false alarm.
15601
15602         * modules/getdate: Depend on alloca-opt, not alloca.
15603
15604 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15605
15606         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15607         Remove now-obsolete comment about AIX.
15608         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15609         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15610         (YYMAXDEPTH): New macro.
15611
15612 2004-12-18  Simon Josefsson  <jas@extundo.com>
15613
15614         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15615
15616 2004-12-18  Bruno Haible  <bruno@clisp.org>
15617
15618         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15619
15620 2004-12-18  Bruno Haible  <bruno@clisp.org>
15621
15622         * lib/fatal-signal.c (fatal_signals): Make non-const.
15623         (init_fatal_signals): New function.
15624         (uninstall_handlers, install_handlers): Ignore signals that were set to
15625         SIG_IGN.
15626         (at_fatal_signal): Call init_fatal_signals.
15627         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15628         SIG_IGN.
15629         Reported by Paul Eggert.
15630
15631 2004-12-18  Bruno Haible  <bruno@clisp.org>
15632
15633         * doc/alloca.texi: New file.
15634         * doc/alloca-opt.texi: New file.
15635
15636 2004-12-17  Jim Meyering  <jim@meyering.net>
15637
15638         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15639         Otherwise, install-sh could exit with improper exit status when
15640         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15641
15642 2004-12-16  Simon Josefsson  <jas@extundo.com>
15643
15644         * tests/test-base64.c: Add license.
15645
15646 2004-12-15  Stepan Kasal  <address@hidden>
15647
15648         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15649
15650 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15651
15652         * modules/getcwd (Files): Add m4/d-ino.m4.
15653         Suggested by Mark D. Baushke.
15654
15655 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15656
15657         * lib/getdate.y (textint): New member "negative".
15658         (time_zone_hhmm): New function.
15659         Expect 14 shift-reduce conflicts, not 13.
15660         (o_colon_minutes): New rule.
15661         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15662         (yylex): Set the "negative" member of signed numbers.
15663
15664 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15665
15666         * doc/getdate.texi (Time of day items, Time zone items):
15667         Describe new formats +00:00, UTC+00:00.
15668
15669 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15670
15671         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15672         spurious "-l"s.  Problem reported by Stepan Kasal.
15673
15674 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15675
15676         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15677         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15678
15679 2004-12-04  Simon Josefsson  <jas@extundo.com>
15680
15681         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15682         Vandoorselaere <yoann@prelude-ids.org>.
15683
15684 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15685
15686         Changes imported from coreutils.
15687         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15688         exist.
15689         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15690
15691 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15692
15693         Changes imported from coreutils.
15694         * lib/hard-locale.c: Assume <locale.h> exists.
15695         Include "strdup.h".
15696         (GLIBC_VERSION): New macro.
15697         (hard_locale): Assume setlocale exists.
15698         Rewrite to avoid #ifdef.
15699         Use strdup rather than malloc + strcpy.
15700         * lib/human.c: Assume <locale.h> exists.
15701         (human_readable): Assume localeconv exists.
15702
15703 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15704
15705         * modules/hard-locale (Depends-on): Add strdup.
15706
15707 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15708
15709         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15710         convert T2, not T.  (Imported from libc.)
15711
15712 2004-11-30  Simon Josefsson  <jas@extundo.com>
15713
15714         * modules/restrict (License): Change to LGPL.
15715
15716 2004-11-30  Simon Josefsson  <jas@extundo.com>
15717
15718         * m4/restrict.m4: Add copyright and copying conditions.
15719
15720 2004-11-30  Simon Josefsson  <jas@extundo.com>
15721
15722         * m4/base64.m4: New file.
15723
15724 2004-11-30  Simon Josefsson  <jas@extundo.com>
15725
15726         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15727         base64.
15728
15729         * tests/test-base64.c: New file.
15730
15731         * modules/base64: New file.
15732
15733 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15734
15735         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15736         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15737
15738         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15739
15740 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15741
15742         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15743         (__getcwd.c): Don't restore errno; glibc doesn't.
15744         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15745         first, falling back to our code only if its results look suspicious.
15746         Ensure that the resulting buffer is only as large as necessary.
15747
15748         * lib/readutmp.c: Include readutmp.h first.
15749         Include <errno.h>, since readutmp.h no longer does that.
15750         * lib/readutmp.h: Don't include <errno.h>,
15751         <sys/param.h>, <time.h>; not needed to establish interface.
15752         (errno): Remove decl.
15753         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15754         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15755         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15756
15757 2004-11-28  Simon Josefsson  <jas@extundo.com>
15758
15759         * lib/base64.h, base64.c: New file.
15760
15761 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15762
15763         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15764
15765 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15766
15767         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15768         (Depends-on): Remove pathmax, same.  Add mempcpy.
15769         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15770         (Makefile.am): Append getcwd.h to lib_SOURCES.
15771         (Include): Add getcwd.h.
15772         (Maintainer): Change from Jim Meyering to "all, glibc",
15773         since getdate now uses intended-for-glibc code.
15774         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15775         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15776
15777 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15778
15779         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15780         HP's ANSI C compiler.
15781         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15782         Declaring int functions causes warnings on some modern systems and
15783         shouldn't be needed to compile on ancient ones.
15784         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15785         defined.
15786
15787         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15788         with the following changes.
15789         (__set_errno): Parenthesize properly.
15790         Include <stdbool.h>.
15791         (MIN, MAX, MATCHING_INO): New macros.
15792         (__getcwd): Define with prototype, not K&R form.
15793         Use heuristics to allocate default buffer on stack if possible.
15794         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15795         behavior, and to avoid the PATH_MAX limit when computing
15796         ../../../../...
15797         Use MATCHING_INO to compare inode number to file.
15798         Check for arithmetic overflow in size calculations.
15799         Fix bug in reallocation of dot array that caused getcwd to fail
15800         on directories nested deeper than 75.
15801         Be more careful about saving errno on error.
15802         Do not use realloc; use only free+malloc, as this is a bit
15803         more flexible and avoids a needless copy operation.
15804         Do not inspect st_dev and st_ino for symbolic links; POSIX
15805         doesn't specify the latter.
15806         Check for closedir errors.
15807         Avoid needless casts.
15808         Use "#ifdef weak_alias" around weak_alias, to be like other
15809         glibc code.
15810         The following changes to getcwd.c have effect only when used in
15811         gnulib; they have no effect inside glibc proper.
15812         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15813         as alloca isn't used.
15814         (alloca, __alloca): Likewise.
15815         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15816         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15817         unconditionally, as gnulib assumes C89 or better.
15818         Do not include <sys/param.h>.
15819         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15820         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15821         better.
15822         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15823         Include <dirent.h> in a way that is compatible with modern Autoconf.
15824         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15825         New macros, if not already defined.
15826         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15827         Use "_LIBC", not "defined _LIBC", for consistency.
15828         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15829         a mempcpy module.
15830         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15831         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15832         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15833         credit only to Jim Meyering and adjust the copyright dates.
15834         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15835         <stdlib.h>, <unistd.h>, "pathmax.h".
15836         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15837         (INITIAL_BUFFER_SIZE): Remove.
15838         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15839
15840 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15841
15842         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15843         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15844         Use the _ONCE methods, for efficiency.
15845         Check for fcntl.h.  In test program, include <errno.h>
15846         and <fcntl.h> if available.  Remove old K&R cruft from
15847         test program.  Check for common errors in GNU/Linux,
15848         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15849         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15850         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15851         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15852         name accordingly.
15853         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15854         accommodate new getcwd.c.
15855         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15856         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15857         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15858         that's all we need now.
15859
15860 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15861
15862         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15863         argp-parse.c depends on getopt internals, that means we should
15864         always use our getopt, to be on the safe side.
15865         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15866         order not to spoil the result of an eventual previous invocation
15867         of gl_GETOPT_SUBSTITUTE.
15868
15869 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15870
15871         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15872         redefinition warnings. To avoid them, include the defines
15873         in `#if !defined __need_getopt ... #endif'. The only place
15874         where __getopt_argv_const is used is in definitions
15875         of getopt_long and getopt_long_only below, which are as well
15876         protected by `#ifndef __need_getopt'.
15877         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15878         __need_getopt after including <stdio.h> and <unistd.h> These
15879         headers might have defined it.
15880
15881 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15882
15883         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15884
15885 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15886
15887         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15888         (futimens): New function, which uses futimes if available.
15889         (futimens, utimens): Support timespec==NULL, with same semantics
15890         as utime and utimens.
15891         * lib/utimens.h (futimens): New decl.
15892
15893 2004-11-23  Jim Meyering  <jim@meyering.net>
15894
15895         * lib/getopt_.h: Remove trailing blanks.
15896
15897 2004-11-23  Jim Meyering  <jim@meyering.net>
15898
15899         * lib/__fpending.c: Add comment.
15900
15901 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15902
15903         * modules/canonicalize (Depends-on): Add xreadlink.
15904         Problem reported by James Youngman.
15905
15906 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15907
15908         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15909         New macros.
15910         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15911         optopt): Use them instead of invoking ## directly; otherwise, the
15912         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15913
15914 2004-11-19  Bruno Haible  <bruno@clisp.org>
15915
15916         * lib/strtok_r.c: Move comments from here...
15917         * lib/strtok_r.h: ... to here.
15918
15919 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15920
15921         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15922         implementations that mishandle size_t overflow.
15923
15924 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15925
15926         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15927         might fail.  Problem reported by Yoann Vandoorselaere.
15928         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15929         implementations that mishandle size_t overflow.
15930
15931 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15932
15933         * modules/canon-host (Depends-on): Add strdup.
15934
15935 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15936
15937         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15938
15939 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15940
15941         * lib/canon-host.c: Include "strdup.h".
15942         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15943         Use strdup instead of malloc/strcpy to duplicate strings.
15944
15945         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15946         (human_space_before_unit): New constant.
15947         * lib/human.c (human_readable): Support it.
15948
15949         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15950         (xgetcwd): Set errno correctly when failing.
15951         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15952         the failure is actually due to a PATH_MAX problem.
15953
15954         Further getopt changes to make it more likely that glibc will
15955         buy the changes back.
15956         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15957         (getopt): Use it, so to preserve glibc semantic
15958         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15959         when compiling for libc.
15960         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15961         (getopt_long, getopt_long_only): Use it.
15962
15963         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15964         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15965         (getopt): Argv is now char * const *, as per standard.
15966         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15967         not char *__getopt_argv_const *.
15968         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15969         _getopt_long_only_r): Likewise.
15970         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15971         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15972         _getopt_long_r, _getopt_long_only_r): Likewise.
15973         * lib/getopt_.h (__getopt_argv_const): Remove.
15974         (getopt): Argv is now char * const *, as per standard.
15975
15976         * lib/getdate.y (tORDINAL): New token.
15977         (day, relunit): Allow it for relative times.
15978         (relative_time_table): Use tORDINAL for ordinals.
15979
15980 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15981
15982         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15983         Document that "second" isn't allowed as an ordinal number.
15984
15985 2004-11-16  Jim Meyering  <jim@meyering.net>
15986
15987         * modules/closeout (Depends-on): Add fpending.
15988
15989 2004-11-15  Jim Meyering  <jim@meyering.net>
15990
15991         * lib/closeout.c: Include "__fpending.h" once again.
15992         Include <stdbool.h>.
15993         (close_stdout): Don't fail just because stdout was closed initially,
15994         since some programs don't write to stdout in the normal course of
15995         operation (other than --version and --help), and we don't want this
15996         function to make e.g. `touch file >&-' fail.
15997         But do fail if it was closed and someone has tried to write to it.
15998         E.g., `printf foo >&-' must fail.
15999
16000 2004-11-13  Jim Meyering  <jim@meyering.net>
16001
16002         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16003
16004 2004-11-12  Simon Josefsson  <jas@extundo.com>
16005
16006         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16007         small doc fix is still pending.
16008
16009 2004-11-11  Simon Josefsson  <jas@extundo.com>
16010
16011         * modules/strtok_r: New file.
16012
16013         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16014         strtok_r.
16015
16016 2004-11-11  Simon Josefsson  <jas@extundo.com>
16017
16018         * m4/strtok_r.m4: New file.
16019
16020         * m4/getopt.m4: Replace opterr.
16021
16022 2004-11-11  Simon Josefsson  <jas@extundo.com>
16023
16024         * lib/strtok_r.h, strtok_r.c: New file.
16025
16026 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16027
16028         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16029         of replacing opterr, getopt, etc.  This should handle the
16030         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16031
16032 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16033
16034         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16035         we can stop lying to compilers about the constness of argv when we
16036         are compiled outside glibc.
16037         (getopt, getopt_long, getopt_long_only): Use it.
16038         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16039         _getopt_internal, getopt): Likewise.
16040         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16041         _getopt_long_only_r): Likewise.
16042         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16043         _getopt_long_r, _getopt_long_only_r): Likewise.
16044
16045         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16046         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16047         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16048         the other external symbols.
16049         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16050         declaration, since the above renaming now works around collisions.
16051
16052 2004-11-11  Jim Meyering  <jim@meyering.net>
16053
16054         * lib/linebreak.c: Remove trailing blanks.
16055         * lib/alloca_.h: Likewise.
16056         * lib/acosl.c: Likewise.
16057         * lib/euidaccess.c: Likewise.
16058         * lib/allocsa.h: Likewise.
16059
16060 2004-11-10  Simon Josefsson  <jas@extundo.com>
16061
16062         * m4/getaddrinfo.m4: New file.
16063
16064 2004-11-10  Simon Josefsson  <jas@extundo.com>
16065
16066         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16067
16068 2004-11-10  Simon Josefsson  <jas@extundo.com>
16069
16070         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16071         getaddrinfo.
16072
16073         * modules/getaddrinfo: New file.
16074
16075 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16076
16077         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16078
16079 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16080
16081         * lib/mktime.c (SHR): New macro, which is a portable
16082         substitute for >> that should work even on Crays.
16083         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16084         Problem reported by Mark D. Baushke in
16085         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16086         * lib/getdate.y (SHR): Likewise.
16087         (tm_diff): Use it.
16088         * lib/strftime.c (SHR): Likewise.
16089         (tm_diff): Use it.
16090         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16091         quote_these_too, so that right shifts are well defined.  All uses
16092         changed.
16093
16094 2004-11-10  Jim Meyering  <jim@meyering.net>
16095
16096         Ensure that no close failure goes unreported.
16097         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16098         return early when it seems there's nothing to flush.
16099         Don't include __fpending.h.
16100
16101 2004-11-10  Jim Meyering  <jim@meyering.net>
16102
16103         * modules/closeout (Depends-on): Remove fpending.
16104
16105 2004-11-10  Jim Meyering  <jim@meyering.net>
16106
16107         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16108
16109 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16110
16111         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16112         gl_FUNC_STRFTIME.
16113         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16114         and AC_REQUIRE when possible, to avoid duplicate checks.
16115         Check for <wchar.h>.
16116
16117 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16118
16119         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16120
16121 2004-11-09  Bruno Haible  <bruno@clisp.org>
16122
16123         * m4/sockpfaf.m4: New file.
16124
16125 2004-11-05  Bruno Haible  <bruno@clisp.org>
16126
16127         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16128         Reported by Mark D. Baushke <mdb@cvshome.org>.
16129
16130 2004-11-04  Bruno Haible  <bruno@clisp.org>
16131
16132         2004-09-11  Bruno Haible  <bruno@clisp.org>
16133                 * allocsa.valgrind: New file.
16134         2004-02-06  Bruno Haible  <bruno@clisp.org>
16135                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16136                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16137                 Reported by Christopher Seip <chris.seip@hp.com>.
16138
16139 2004-11-04  Bruno Haible  <bruno@clisp.org>
16140
16141         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16142         (Makefile.am): Distribute it.
16143
16144 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16145
16146         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16147         with errno == ERANGE if the buffer is too small.
16148         Problem reported by Mark D. Baushke.
16149
16150 2004-11-03  Albert Chin  <china@thewrittenword.com>
16151             Paul Eggert  <eggert@cs.ucla.edu>
16152
16153         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16154         equivalent, substitute $ac_type for equivalent type rather than
16155         blindly using uint32_t *always* which won't work if uint32_t is not
16156         available.  Define _UINT32_T to work around typedef of uint32_t if
16157         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16158         2.5.1.
16159
16160 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16161
16162         * m4/jm-macros.m4: Sync from coreutils.
16163         (gl_MACROS): Check for mbrlen, for pathchk.
16164         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16165
16166 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16167
16168         * lib/xreadlink.c (MAXSIZE): New macro.
16169         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16170         size does not exceed MAXSIZE.  Avoid cast.
16171         As suggested by Mark D. Baushke in
16172         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16173         if readlink fails with buffer size just under MAXSIZE, try again
16174         with MAXSIZE.
16175
16176 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16177
16178         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16179
16180 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16181         and  Paul Eggert  <eggert@cs.ucla.edu>
16182
16183         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16184         (get_date): Overparenthesize to avoid GCC warning.
16185
16186 2004-11-02  Bruno Haible  <bruno@clisp.org>
16187
16188         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16189         returns void.
16190
16191 2004-11-02  Bruno Haible  <bruno@clisp.org>
16192
16193         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16194         function returns void.
16195
16196 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16197
16198         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16199         fflush_unlocked, flockfile, funlockfile, funlockfile,
16200         fputs_unlocked, putc_unlocked.
16201
16202 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16203
16204         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16205         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16206         already declared.
16207
16208 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16209
16210         * modules/getdate (Files): Add doc/getdate.texi.
16211         (Depends-on): Add setenv, xalloc.
16212
16213 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16214
16215         * lib/getdate.y: Add support for TZ="foo" within a date string.
16216         Fix some bugs near time_t boundaries.  Reject dates with
16217         out-of-range components, e.g., "Sept 31".
16218         Include <stdlib.h>, "setenv.h", "xalloc.h".
16219         (ISDIGIT_LOCALE): Remove; unused.
16220         Note that the TZ and time functions used here are not reentrant.
16221         (mktime_ok, get_tz): New functions.
16222         (TZBUFSIZE): New constant.
16223         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16224         This requires that we sometimes generate our own TZ="XXX..." setting.
16225
16226 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16227
16228         * doc/getdate.texi: New file, from coreutils with modifications for
16229         the new TZ parsing.
16230
16231 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16232
16233         * lib/mktime.c (not_equal_tm): Remove redundant check.
16234
16235 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16236
16237         * modules/regex (lib_SOURCES): Add regex.c.
16238         Reported by James Youngman in
16239         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16240
16241 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16242
16243         * lib/getdate.y: Use Bison 1.875 features, and some minor
16244         code cleanups.  This change does not affect semantics.
16245         Don't include <stdlib.h>; no longer needed.
16246         Don't include unlocked-io.h; only the "#if TEST" code uses
16247         stdio, and performance isn't crucial there.
16248         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16249         Bison 1.875 features as described below.
16250         All uses of "PC." replaced by "pc->".
16251         (YYSTYPE): Add a forward declaration.
16252         (yylex, yyerror): Use full prototypes in forward decls.
16253         Use "%pure-parser" rather than obsolescent "%pure_parser".
16254         Use %parse-param and %lex-param instead of obsolescent
16255         YYPARSE_PARAM and YYLEX_PARAM.
16256         (meridian_table, month_and_day_table, time_units_table,
16257         relative_time_table, time_zone_table, military_table,
16258         lookup_zone, lookup_word, get_date):
16259         Use NULL instead of 0 where appropriate.
16260         (to_hour): Avoid abort (), to avoid a dependency on
16261         stdlib.h.
16262         (yyerror, yylex): Now accepts parser_control * arg.
16263         (main) [TEST]: Use '\0' rather than 0 for char.
16264
16265 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16266
16267         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16268
16269 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16270
16271         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16272         It's now the caller's responsibility to handle the case where
16273         !HAVE_GETPAGESIZE && !defined getpagesize.
16274
16275         * lib/mktime.c (leapyear): Arg is long int, not int.
16276
16277 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16278
16279         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16280
16281 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16282
16283         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16284         missing.  Problem reported by James Youngman.
16285
16286 2004-10-16  Simon Josefsson  <jas@extundo.com>
16287
16288         * gnulib-tool: Fix comments.  Fix parse problem.
16289         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16290
16291 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16292
16293         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16294         implementation of getopt_long.  Problem reported by Alexander Taler in:
16295         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16296
16297 2004-10-15  Bruno Haible  <bruno@clisp.org>
16298
16299         * gnulib-tool: Untabify. Initialize supplied_libname.
16300         (func_usage): More homogenous output.
16301         (func_modules_transitive_closure, func_modules_to_filelist,
16302         func_emit_lib_Makefile_am): New functions.
16303         (func_import): New function, extracted from big case statement. Use
16304         func_get_license, func_modules_transitive_closure,
16305         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16306         opt_lgpl. Don't use test -a, as it's not portable.
16307         (func_create_testdir): Use func_modules_transitive_closure,
16308         func_modules_to_filelist, func_emit_lib_Makefile_am.
16309
16310 2004-10-15  Bruno Haible  <bruno@clisp.org>
16311
16312         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16313
16314 2004-10-15  Bruno Haible  <bruno@clisp.org>
16315
16316         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16317         the portions belonging to each module.
16318         Suggested by Derek Robert Price <derek@ximbiot.com>.
16319
16320 2004-10-12  Simon Josefsson  <jas@extundo.com>
16321
16322         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16323         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16324         to real functions.
16325
16326 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16327
16328         * modules/vsnprintf: New file.
16329
16330 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16331
16332         * m4/vsnprintf.m4: New file.
16333
16334 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16335
16336         * lib/vsnprintf.h: New file.
16337         * lib/vsnprintf.c: New file.
16338
16339 2004-10-11  Bruno Haible  <bruno@clisp.org>
16340
16341         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16342         vsnprintf.
16343
16344 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16345
16346         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16347
16348 2004-10-07  Bruno Haible  <bruno@clisp.org>
16349
16350         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16351         fits into the provided buffer.
16352
16353 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16354
16355         * lib/diacrit.c, diacrit.h: Add GPL notice.
16356
16357         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16358         notice.
16359         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16360         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16361         This avoids a potential constant-folding bug.
16362
16363 2004-10-05  Bruno Haible  <bruno@clisp.org>
16364
16365         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16366         for the declaration of strsep.
16367
16368 2004-10-05  Bruno Haible  <bruno@clisp.org>
16369
16370         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16371
16372 2004-10-04  Simon Josefsson  <jas@extundo.com>
16373
16374         * modules/memmem: New file.
16375         * tests/test-memmem.c: New file.
16376         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16377
16378 2004-10-04  Simon Josefsson  <jas@extundo.com>
16379
16380         * m4/memmem.m4: New file.
16381
16382 2004-10-04  Simon Josefsson  <jas@extundo.com>
16383
16384         * lib/memmem.h: New file.
16385         * lib/memmem.c: New file, taken from glibc.
16386
16387 2004-10-04  Simon Josefsson  <jas@extundo.com>
16388
16389         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16390         '#ifdef USE_UNLOCKED_IO'.
16391
16392 2004-10-04  Simon Josefsson  <jas@extundo.com>
16393
16394         * config/srclist.txt: Add memmem from glibc.
16395
16396 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16397
16398         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16399
16400         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16401         modules/exclude, modules/getdate, modules/getline,
16402         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16403         modules/getusershell, modules/linebuffer, modules/md5,
16404         modules/mountlist, modules/posixtm, modules/readtokens,
16405         modules/readutmp, modules/regex, modules/sha1,
16406         modules/version-etc, modules/yesno:
16407         Remove dependency on unlocked-io.
16408
16409 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16410
16411         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16412
16413         * m4/unlocked-io.m4: Add copyright notice.
16414         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16415
16416 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16417
16418         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16419         * lib/xmalloc.c (xmemdup): Likewise.
16420         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16421         XFREE): Remove these long-obsolescent macros.
16422         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16423         * lib/xstrdup.c: Remove.
16424
16425         * lib/regex.c (re_comp): Cast gettext return value to char *,
16426         Problem reported by Martin Neitzel via Mark D. Baushke.
16427
16428 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16429
16430         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16431         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16432         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16433         regex.c, sha1.c, version-etc.c, yesno.c:
16434         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16435         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16436         the includer's responsibility.
16437
16438         Sync from coreutils.
16439
16440         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16441         points to the start of a string, as the C Standard says the
16442         resulting behavior is undefined.
16443
16444         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16445         simple -> simple_backups, numbered_existing ->
16446         numbered_existing_backups, numbered -> numbered_backups
16447         to avoid shadowing problems.  All uses changed.
16448         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16449         * lib/backupfile.c (check_extension, numbered_backup):
16450         Rename locals to avoid shadowing 'basename'.
16451         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16452         once.
16453
16454         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16455         * lib/.cvsignore: Add getopt.h.
16456
16457 2004-10-04  Bruno Haible  <bruno@clisp.org>
16458
16459         * modules/README: New file.
16460         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16461         not a module.
16462
16463 2004-10-02  Jim Meyering  <jim@meyering.net>
16464
16465         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16466
16467 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16468
16469         * modules/strsep: New file.
16470
16471 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16472
16473         * m4/strsep.m4: New file.
16474
16475 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16476
16477         * lib/strsep.h: New file.
16478         * lib/strsep.c: New file.
16479
16480 2004-10-01  Simon Josefsson  <jas@extundo.com>
16481
16482         * lib/snprintf.c (snprintf): Handle size==0.
16483
16484 2004-10-01  Simon Josefsson  <jas@extundo.com>
16485             Bruno Haible  <bruno@clisp.org>
16486
16487         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16488         (snprintf): Declare 'args'.
16489
16490 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16491
16492         * lib/snprintf.c: Remove comments as to why each header is needed.
16493
16494 2004-10-01  Bruno Haible  <bruno@clisp.org>
16495
16496         * MODULES.html.sh: Add strsep.
16497
16498 2004-09-30  Simon Josefsson  <jas@extundo.com>
16499
16500         * modules/snprintf: New file.
16501
16502 2004-09-30  Simon Josefsson  <jas@extundo.com>
16503
16504         * m4/snprintf.m4: New file.
16505
16506 2004-09-30  Simon Josefsson  <jas@extundo.com>
16507
16508         * lib/snprintf.h, lib/snprintf.c: New files.
16509
16510 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16511
16512         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16513         (hol_entry_help): Never translate an empty string.
16514         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16515         * lib/argp.h (OPTION_NO_TRANS): New option.
16516
16517 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16518
16519         * modules/argp (Maintainer): Replace Simon Josefsson
16520         by Sergey Poznyakoff.
16521
16522 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16523
16524         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16525         changes merged back into glibc.
16526
16527 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16528
16529         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16530
16531 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16532
16533         * lib/xvasprintf.c: Include xalloc.h.
16534         (xvasprintf): Use xalloc_die, not xmalloc_die.
16535
16536 2004-09-29  Bruno Haible  <bruno@clisp.org>
16537
16538         * modules/alloca-opt: New file, derived from modules/alloca.
16539         * modules/allocsa: Depend on alloca-opt instead of alloca.
16540         * modules/setenv: Likewise.
16541         * modules/vasnprintf: Likewise.
16542         * MODULES.html.sh: Add alloca-opt.
16543
16544 2004-09-28  Simon Josefsson  <jas@extundo.com>
16545
16546         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16547         LGPL, and to replace license template from GPL to LGPL.
16548
16549 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16550
16551         * modules/dummy: Change license to LGPL.
16552
16553 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16554
16555         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16556
16557 2004-09-24  Simon Josefsson  <jas@extundo.com>
16558
16559         * modules/minmax (License): Change from GPL to LGPL.
16560
16561 2004-09-23  Simon Josefsson  <jas@extundo.com>
16562
16563         * gnulib-tool (--import): Typo.
16564
16565 2004-09-23  Simon Josefsson  <jas@extundo.com>
16566
16567         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16568
16569 2004-09-22  Bruno Haible  <bruno@clisp.org>
16570
16571         * modules/*: Add 'License' field.
16572         * gnulib-tool: Accept --extract-license option.
16573         (func_get_license): New function.
16574
16575 2004-09-21  Bruno Haible  <bruno@clisp.org>
16576
16577         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16578         Reported by Simon Josefsson.
16579
16580 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16581
16582         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16583         gl_AC_TYPE_LONG_LONG.
16584
16585 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16586
16587         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16588
16589 2004-09-18  Simon Josefsson  <jas@extundo.com>
16590         and  Paul Eggert  <eggert@cs.ucla.edu>
16591
16592         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16593         calls with autoreconf.  Define GL_LIB.
16594
16595 2004-09-14  Karl Berry  <karl@gnu.org>
16596
16597         * config/srclist.txt: unsync setenv.c, sigh.
16598
16599 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16600
16601         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16602         Problem reported by Bruno Haible in:
16603         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16604
16605 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16606
16607         * config/srclist.txt: Comment out argp-pvh.c.
16608
16609 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16610
16611         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16612         in case some system header has #define'd it.  Problem reported by
16613         Soeren D. Schulze in
16614         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16615
16616 2004-09-09  Karl Berry  <karl@gnu.org>
16617
16618         * regex.[ch]: delete from the root.  These were supposed to be
16619                 synced with emacs cvs, but this has not happened for about
16620                 a year, and anyway nothing else uses emacs regex.[ch].
16621                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16622                 lib/regex[.ch] is untouched.
16623
16624 2004-09-09  Bruno Haible  <bruno@clisp.org>
16625
16626         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16627
16628 2004-09-09  Bruno Haible  <bruno@clisp.org>
16629
16630         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16631         modifications.
16632         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16633
16634 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16635
16636         * modules/xvasprintf: New file.
16637         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16638
16639 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16640
16641         * lib/xvasprintf.h: New file.
16642         * lib/xvasprintf.c: New file.
16643         * lib/xasprintf.c: New file.
16644
16645 2004-09-08  Bruno Haible  <bruno@clisp.org>
16646
16647         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16648
16649 2004-09-08  Bruno Haible  <bruno@clisp.org>
16650
16651         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16652         length is > INT_MAX.
16653         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16654         more.
16655
16656 2004-09-08  Bruno Haible  <bruno@clisp.org>
16657
16658         * lib/stdint_.h: New file, taken from GNU clisp.
16659
16660 2004-09-08  Bruno Haible  <bruno@clisp.org>
16661             Oskar Liljeblad  <oskar@osk.mine.nu>
16662
16663         * modules/stdint: New file.
16664         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16665
16666 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16667
16668         Import from coreutils.
16669         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16670         strings on unbounded length.  alloca's performance benefits aren't
16671         that important here.
16672         (V_STRDUP): Remove.
16673         (parse_with_separator): New function, with most of the internals
16674         of the old parse_user_spec.  Allow user to omit both user and group,
16675         for compatibility with FreeBSD.
16676         Clone only the user name, not the entire spec.
16677         Do not set *uid, *gid unless entirely successful.
16678         Avoid memory leak in some failing cases.
16679         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16680         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16681         (parse_user_spec): Rewrite to use parse_with_separator.
16682
16683 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16684
16685         * modules/userspec: Don't depend on alloca.
16686
16687 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16688
16689         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16690
16691 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16692
16693         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16694         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16695         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16696
16697 2004-08-16  Simon Josefsson  <jas@extundo.com>
16698
16699         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16700         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16701         Add --dry-run for --import.
16702         Let user provided command line parameters override configure.ac
16703         settings.
16704
16705 2004-08-12  Simon Josefsson  <jas@extundo.com>
16706
16707         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16708         as discussed with Paul Eggert in threads rooted at
16709         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16710         and
16711         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16712         Before, the test was empty, and relied on ELIDE_CODE in source
16713         code.)
16714         (gl_PREREQ_GETOPT): New macro.
16715         (gl_GETOPT): Use them.
16716
16717 2004-08-12  Simon Josefsson  <jas@extundo.com>
16718
16719         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16720         * lib/getopt_.h: Renamed from getopt.h.
16721
16722 2004-08-12  Simon Josefsson  <jas@extundo.com>
16723
16724         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16725         Change default library name from libfoo to libgnu.
16726         Now, if you have a configure.ac that says:
16727                 gl_SOURCE_BASE(gl)
16728                 gl_M4_BASE(gl/m4)
16729                 gl_MODULES(error getopt etcetera)
16730                 gl_INIT
16731         you can import all you need by running:
16732                 ../gnulib/gnulib-tool --import
16733
16734         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16735         (Makefile.am): Rewrite, use logic from argz.
16736         (Include): Use <getopt.h> instead of "getopt.h".
16737
16738 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16739
16740         * modules/argp (Files): Add m4/unlocked-io.m4.
16741         (Depends-on): Add extensions.
16742
16743 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16744
16745         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16746         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16747         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16748         Check for program_invocation_name, program_invocation_short_name,
16749         flockfile, funlockfile, features.h, _getopt_long_only_r.
16750
16751 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16752
16753         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16754         its complicated substitute.
16755         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16756         and program_invocation_name.
16757         (__argp_basename) [!_LIBC]: Remove; the only use was
16758         replaced by its body.
16759         (__argp_short_program_name): Change condition from
16760         !defined __argp_short_program_name to
16761         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16762         to match argp-namefrob.h.
16763         (__argp_failure): Don't assume strerror_r returns char *.
16764         * lib/argp-parse.c (N_): Define unconditionally.
16765         (argp_default_options): Fill out initializers with 0 to avoid
16766         gcc warnings.
16767
16768 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16769
16770         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16771         getopt1.c.
16772
16773 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16774
16775         Merge from coreutils.
16776
16777         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16778
16779         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16780         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16781
16782 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16783
16784         Merge from coreutils.
16785
16786         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16787         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16788         for Reliant Unix 5.43.
16789
16790         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16791         (union fooround): Use uintmax_t, not long int.
16792         The rest is a merge from libc:
16793         [defined _LIBC]: Include <shlib-compat.h>.
16794         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16795
16796         * lib/settime.c (settime): Recode to avoid warning with
16797         Sun Forte C 6U2.
16798
16799         * lib/strverscmp.c: Convert to UTF-8.
16800
16801 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16802
16803         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16804         m4/uintmax_t.m4.
16805
16806 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16807
16808         * modules/xalloc-die: New file.
16809         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16810
16811         * modules/md5 (Files): Add m4/uint32_t.m4.
16812         * modules/sha1: Renamed from modules/sha.
16813         (Files):
16814         Rename lib/sha.h to lib/sha1.h.
16815         Rename lib/sha.c to lib/sha1.c.
16816         Rename m4/sha.m4 to m4/sha1.m4.
16817         (lib_SOURCES): Likewise.
16818         (configure.ac): Rename gl_SHA to gl_SHA1.
16819         (Include): sha.h -> sha1.h.
16820
16821 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16822
16823         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16824         * m4/sha1.m4: Renamed from sha.m4.
16825         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16826
16827 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16828
16829         * lib/obstack.h (obstack_empty_p):
16830         Don't assume that chunk->contents is suitably aligned.
16831         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16832         Likewise. Problem reported by Benno in
16833         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16834
16835         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16836         readable.  This could be improved further but it'd take some work.
16837
16838 2004-08-08  Simon Josefsson  <jas@extundo.com>
16839
16840         * modules/xgethostname (Depends-on): Remove exit and error (not
16841         used).
16842
16843         * modules/getpass-gnu: Add getpass.h.
16844         (Depends-on): Add stdbool.
16845         * modules/getpass: Add getpass.h.
16846
16847 2004-08-08  Simon Josefsson  <jas@extundo.com>
16848
16849         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16850         Check getpass declaration.
16851
16852 2004-08-08  Simon Josefsson  <jas@extundo.com>
16853
16854         * lib/xgethostname.c: Don't include error.h (not used).
16855
16856         * lib/getpass.h: Add.
16857         * lib/getpass.c: Include getpass.h first.
16858
16859 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16860
16861         * lib/xalloc-die.c: New file.
16862         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16863         All uses removed.
16864         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16865         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16866         xalloc-die.c.
16867         (_, N_, xalloc_die): Move to xalloc-die.c.
16868         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16869         so that we needn't mess with xalloc_msg_memory_exhausted.
16870
16871         * lib/sha1.h: Renamed from sha.h.
16872         (SHA1_H): Renamed from _SHA_H.
16873         (sha1_ctx): Renamed from sha_ctx.
16874         (sha1_init_ctx): Renamed from sha_init_ctx.
16875         (sha1_process_block): Renamed from sha_process_block.
16876         (sha1_process_bytes): Renamed from sha_process_bytes.
16877         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16878         (sha1_read_ctx): Renamed from sha_read_ctx.
16879         (sha1_stream): Renamed from sha_stream.
16880         (sha1_buffer): Renamed from sha_buffer.
16881         * lib/sha1.c: Likewise; renamed from sha.c.
16882         Do not include <sys/types.h>.
16883         Include <stddef.h> rather than <stdlib.h>.
16884
16885 2004-08-08  Bruno Haible  <bruno@clisp.org>
16886
16887         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16888         FILESYSTEM_PREFIX_LEN.
16889         * lib/progreloc.c: Likewise.
16890         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16891
16892 2004-08-06  Simon Josefsson  <jas@extundo.com>
16893
16894         * modules/progname (Depends-on): Don't depend on stdbool.
16895
16896 2004-08-06  Simon Josefsson  <jas@extundo.com>
16897
16898         * modules/getsubopt: New file.
16899         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16900         getsubopt.
16901
16902 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16903
16904         More merge from coreutils.
16905
16906         * m4/utimens.m4, m4/utimecmp.m4: New files.
16907         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16908         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16909         prereq.m4, sha.m4: Import changes from coreutils.
16910
16911 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16912
16913         More merge from coreutils.
16914         * modules/raise, modules/readtokens0, modules/utimens:
16915         * modules/utimecmp, module/xnanosleep: New files.
16916         * modules/strftime: Add lib/strftime.h.
16917         Change include from <time.h> to "strftime.h".
16918         * modules/yesno: Add lib/yesno.h.
16919         * modules/backupfile: Remove lib/addext.c.
16920         * modules/euidaccess: Add stat-macros.h.
16921         * modules/canonicalize, modules/euidaccess,
16922         modules/filemode, modules/lchown, modules/makepath,
16923         modules/rmdir, modules/stat: Likewise.
16924
16925 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16926
16927         Merge from tar.
16928         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16929         SIZE_MAX is a valid preprocessor constant.
16930         (__argp_basename): Change from "#ifndef _LIBC"
16931         to "#ifndef __argp_short_program_name", so that
16932         we don't compile these functions for tar.
16933
16934         More merges from coreutils.
16935         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16936         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16937         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16938         * lib/addext.c: Remove; no longer needed.
16939         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16940         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16941         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16942         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16943         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16944         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16945         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16946         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16947         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16948         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16949         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16950         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16951         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16952         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16953         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16954         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16955         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16956         Import changes from coreutils.
16957
16958 2004-08-05  Simon Josefsson  <jas@extundo.com>
16959
16960         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16961
16962 2004-08-05  Simon Josefsson  <jas@extundo.com>
16963
16964         * m4/getsubopt.m4: New file.
16965
16966 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16967
16968         Merge from coreutils.
16969
16970         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16971         * m4/getcwd-path-max.m4: New files.
16972
16973         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16974         FILESYSTEM_PREFIX_LEN ->
16975         FILE_SYSTEM_PREFIX_LEN.
16976         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16977         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16978         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16979         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16980
16981         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16982         prerequisite modules now handle the DOS stuff.
16983         Don't check for unistd.h.
16984
16985 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16986
16987         Merge from coreutils.
16988
16989         * lib/.gdb-history: Remove; this doesn't belong here.
16990
16991         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16992         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16993         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16994         * lib/getcwd.c: New files.
16995
16996         * lib/dirname.h: Include <stdbool.h>.
16997         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16998         for consistency with POSIX terminology.  All uses changed.
16999         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17000         (strip_trailing_slashes): Use bool for booleans.
17001         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17002
17003         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17004         sometimes returns a positive errno value even when it succeeds.
17005         (print_errno_message) [!LIBC]: Fall back on strerror if
17006         __strerror_r fails.
17007
17008         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17009         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17010         (longest_relative_suffix): New function.
17011         (path_concat): Use it.  Assume first argument is not NULL.
17012         Port to DOS.  Omit redundant separators.
17013         Report an error instead of returning NULL.
17014         Use mempcpy instead of memcpy.
17015         (xpath_concat): Remove: not declared or used.
17016
17017         * lib/same.h: Include <stdbool.h>
17018         (same_name): Return bool, not int.
17019         * lib/same.c (same_name): Likewise.
17020         (errno): Don't declare; we assume C89 or better now.
17021
17022         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17023         if not already defined.
17024
17025         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17026         * lib/dup-safer.c (errno): Likewise.
17027
17028 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17029
17030         Merge from coreutils.
17031         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17032         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17033         * modules/path-concat: Don't depend on strdup.
17034
17035 2004-08-03  Simon Josefsson  <jas@extundo.com>
17036
17037         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17038         * lib/progname.h: Don't include stdbool.h.
17039
17040 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17041
17042         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17043         * MODULES.html.sh (func_all_modules): Remove fatal.
17044
17045 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17046
17047         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17048
17049 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17050
17051         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17052         working.
17053
17054 2004-08-02  Simon Josefsson  <jas@extundo.com>
17055
17056         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17057         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17058         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17059
17060 2004-08-01  Simon Josefsson  <jas@extundo.com>
17061
17062         * lib/xgetdomainname.c: Include stdlib.h, for free().
17063
17064 2004-07-19  Bruno Haible  <bruno@clisp.org>
17065
17066         * MODULES.html.sh (func_all_modules): Add dummy.
17067
17068 2004-07-16  Simon Josefsson  <jas@extundo.com>
17069
17070         * modules/dummy: New file.
17071
17072 2004-07-16  Simon Josefsson  <jas@extundo.com>
17073
17074         * lib/dummy.c: New file.
17075
17076 2004-07-16  Bruno Haible  <bruno@clisp.org>
17077
17078         * lib/backupfile.h: Add extern "C" for C++.
17079         * lib/closeout.h: Likewise.
17080         * lib/copy-file.h: Likewise.
17081         * lib/findprog.h: Likewise.
17082         * lib/full-write.h: Likewise.
17083         * lib/pathname.h: Likewise.
17084         * lib/progname.h: Likewise.
17085         * lib/stpcpy.h: Likewise.
17086         * lib/stpncpy.h: Likewise.
17087         * lib/strcase.h: Likewise.
17088         * lib/strstr.h: Likewise.
17089         * lib/xalloc.h: Likewise.
17090
17091         * lib/mbswidth.h: Add extern "C" for C++.
17092         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17093
17094 2004-07-13  Robert Millan  <robertmh@gnu.org>
17095
17096         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17097
17098 2004-07-09  Simon Josefsson  <jas@extundo.com>
17099
17100         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17101         failed without this.)
17102
17103 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         * modules/chown (Files): Add lib/fchown-stub.c, since
17106         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17107
17108 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17109
17110         * lib/fchown-stub.c: New file.
17111
17112 2004-06-24  Jim Meyering  <jim@meyering.net>
17113
17114         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17115
17116 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17117
17118         * modules/argz: Omit "#include".
17119
17120         * MODULES.html.sh (func_all_modules): Add calloc, to match
17121         2004-06-01 addition of calloc module.
17122
17123 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17124
17125         * m4/argz.m4: New file, which is autoupdated from libtool.
17126
17127 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17128
17129         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17130         libtool.
17131
17132 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17133
17134         * config/srclist-update: Don't insist on "USA." before the
17135         close-comment, as libtool omits the period and puts the */ on a
17136         separate line.
17137         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17138         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17139
17140 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17141
17142         * modules/argz: New file.
17143         * MODULES.html.sh (func_all_modules): Add argz.
17144
17145 2004-06-12  Jim Meyering  <jim@meyering.net>
17146         and  Paul Eggert  <eggert@cs.ucla.edu>
17147
17148         * modules/hash (Files): Add lib/xalloc.h.
17149         * modules/pipe (Depends-on): Add wait-process.
17150         * modules/stat (Depends-on): Add xalloc.
17151         * modules/userspec (Files): Add lib/userspec.h.
17152         * modules/xstrto
17153
17154         Upgrade from gettext-0.13.
17155         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17156         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17157         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17158
17159 2004-06-10  Jim Meyering  <jim@meyering.net>
17160
17161         * lib/calloc.c: New file.
17162
17163 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17164
17165         * lib/getdate.y (yylex): Allow space between sign and number.
17166         Problem reported by Dan Jacobson.
17167
17168 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17169
17170         Merge from coreutils CVS.
17171
17172         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17173         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17174         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17175         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17176         xstrtol.m4: Fix copyright date and/or serial number.
17177
17178         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17179         See if we need an fchown replacement.
17180         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17181         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17182         and use the replacement function if we detect either defect.
17183
17184         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17185         gl_UTIMECMP.
17186
17187 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17188         and  Jim Meyering  <jim@meyering.net>
17189
17190         Merge from coreutils CVS.
17191
17192         * lib/stat-macros.h: New file, with contents from file-type.h
17193         and coreutils' system.h.
17194         * lib/file-type.c: Include "stat-macros.h".
17195         * lib/file-type.h (file_type): Move all macro definitions to new file,
17196         stat-macros.h.
17197
17198         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17199         Wrap old code with this conditional.
17200         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17201         function that does not dereference symlinks.
17202         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17203
17204         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17205         dependency problems.
17206         (xreadlink): Accept new arg SIZE, for efficiency.
17207         All decls and uses changed.
17208         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17209
17210         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17211         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17212
17213         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17214         sysexits.h.
17215
17216 2004-06-01  Jim Meyering  <jim@meyering.net>
17217
17218         * m4/calloc.m4: New file.
17219
17220 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17221
17222         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17223         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17224         Also, fix a typo in a diagnostic.
17225
17226 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17227
17228         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17229         or AC_FUNC_REALLOC.
17230
17231 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17232
17233         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17234         macros to be defined.
17235         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17236         the allocator returns NULL because the requested size is zero.
17237
17238 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17239
17240         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17241         var.  Add comment explaining why libc still defines it.  This
17242         merges the following patch from glibc:
17243         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17244
17245 2004-05-20  Andreas Schwab  <schwab@suse.de>
17246
17247         * m4/free.m4: Replace free if it not known to work, not the other
17248         way round.
17249
17250 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17251
17252         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17253         present in glibc since revision 1.1 of this file.
17254         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17255         obstack_alignment_mask, obstack_alloc, obstack_base,
17256         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17257         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17258         obstack_grow0, obstack_init, obstack_int_grow,
17259         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17260         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17261         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17262         nonexistent functions.
17263
17264 2004-05-18  Karl Berry  <karl@gnu.org>
17265
17266         * config/srclist.txt: break link for vasnprintf.c.
17267
17268 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17269
17270         Port obstack to the AS/400, where pointers are 16 bytes wide and
17271         you cannot cast an integer to a valid pointer.  This patch is
17272         currently waiting to be integrated into glibc; see
17273         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17274
17275         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17276         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17277         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17278         (struct obstack): temp member is now a union of a pointer and
17279         an integer, instead of an integer.  All integer uses changed.
17280         This does not affect the physical layout of struct obstack,
17281         except on hosts (like the AS/400) where the size or alignment of
17282         void * is greater than that of ptrdiff_t.
17283         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17284         __STDC__)]: Store temporary in pointer member of union, not
17285         integer member.
17286         * lib/obstack.c: Include <stddef.h>, for offsetof.
17287         (struct fooalign): Remove; it doesn't need a name.
17288         (union fooround): Change double to long double, and add void *.
17289         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17290         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17291         not a macro.  Hence the values are always int; so remove all
17292         casts-to-int in uses.
17293
17294 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17295
17296         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17297         we can get this patch merged into glibc.
17298
17299 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17300             Paul Eggert  <eggert@cs.ucla.edu>
17301
17302         * m4/argp: Depend on alloca.
17303
17304 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17305             Paul Eggert  <eggert@cs.ucla.edu>
17306
17307         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17308         freecoding.
17309
17310 2004-05-17  Bruno Haible  <bruno@clisp.org>
17311
17312         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17313         precision that consists of a '.' followed by an empty digit string.
17314         Patch by Tor Lillqvist <tml@iki.fi>.
17315
17316 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17317
17318         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17319         for backward compatibility with older code.  We need our own
17320         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17321         it under some other name, and our alloca.h will define it.
17322
17323 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17324             Derek Price  <derek@ximbiot.com>
17325
17326         * lib/alloca.c: Include <alloca.h>, to get our interface.
17327         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17328         include <alloca.h> first.  Use C89 prototype for alloca; this
17329         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17330         Use #elif for simplicity, since we can assume C89 now.
17331         Don't try to source the system alloca.h since it will not be found
17332         and to prevent recursively including its replacement.
17333         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17334         * lib/regex.c: Likewise.
17335
17336 2004-05-16  Derek Price  <derek@ximbiot.com>
17337             Paul Eggert  <eggert@cs.ucla.edu>
17338
17339         getline cleanup.  This changes the getndelim2 API: both order of
17340         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17341         no delimiter).
17342
17343         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17344         interface does that.
17345         (getline): Always use getdelim, so that we don't have two
17346         copies of this code.
17347         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17348         if available.
17349         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17350         (GETNDELIM2_MAXIMUM): New macro.
17351         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17352         instead of the old practice of delim2==0.  All callers changed.
17353         Return -1 on overflow, instead of returning junk.
17354         Do not set *linesize unless allocation succeeds.
17355         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17356         that we include sys/types.h.
17357         * lib/getnline.h: Likewise.
17358         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17359         (getndelim2): Reorder arguments.
17360         * lib/getnline.c (getnline, getndelim):
17361         Don't discard the NMAX argument.
17362         (getnline): Invoke getndelim, to avoid code duplication.
17363         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17364         of (size_t) -1 by callers of the getnline family.
17365
17366 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17367
17368         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17369         Check for gettimeofday.
17370         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17371         Check for settimeofday, stime.
17372
17373 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17374
17375         * lib/nanosleep.c (suspended): Change its type from int to
17376         sig_atomic_t volatile.
17377         (first_call): Make it private to rpl_nanosleep, and have it
17378         be zero initially as that's a bit faster.
17379         (my_usleep): Round up fractional times instead of truncating them,
17380         as this is the usual meaning for 'sleep'.
17381
17382         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17383         doesn't work.
17384         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17385         (ENOSYS): Define if not defined.
17386         (settime): Fall back on stime if it exists and settimeofday fails.
17387         But don't bother with fallbacks if a method fails with errno == EPERM.
17388
17389 2004-05-11  Jim Meyering  <jim@meyering.net>
17390
17391         Prior to this change, the save_cwd caller required read access to the
17392         current directory on most systems (ones with the fchdir function).
17393
17394         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17395         fails, try write-only, and finally, resort to using xgetcwd.
17396
17397 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17398
17399         * lib/obstack.c, obstack.h: Import changes from libc.
17400
17401 2004-04-28  Bruno Haible  <bruno@clisp.org>
17402
17403         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17404         also implicitly appends .exe to executables.
17405         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17406         accepts Windows pathnames.
17407         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17408         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17409         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17410         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17411         Reported by Derek Robert Price <derek@ximbiot.com>.
17412
17413 2004-04-21  Karl Berry  <karl@gnu.org>
17414
17415         * config/srclist.txt (localcharset.c): break sync.
17416
17417 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17418
17419         * m4/host-os.m4: Add a copyright notice.
17420
17421 2004-04-20  Jim Meyering  <jim@meyering.net>
17422
17423         Change UTILS_ to gl_ in AC_DEFINE'd names.
17424         Change utils_- and jm_-prefixed variables, too.
17425         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17426         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17427         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17428
17429         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17430         Don't emit trailing blanks.
17431         Also rename jm_-prefixed variables to have gl_ prefix.
17432
17433         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17434         Also rename jm_-prefixed variables to have gl_ prefix.
17435
17436         * m4/jm-macros.m4: Reflect the renamings.
17437         * m4/prereq.m4: Likewise.
17438
17439 2004-04-20  Jim Meyering  <jim@meyering.net>
17440
17441         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17442         memory.
17443
17444 2004-04-20  Jim Meyering  <jim@meyering.net>
17445             Bruno Haible  <bruno@clisp.org>
17446
17447         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17448         memory when realloc fails.
17449
17450 2004-04-19  Jim Meyering  <jim@meyering.net>
17451
17452         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17453         now that readutmp.c may call `free (0)'.
17454
17455 2004-04-19  Bruno Haible  <bruno@clisp.org>
17456
17457         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17458         * m4/inttypes_h.m4: Likewise.
17459         * m4/stdint_h.m4: Likewise.
17460         * m4/intmax_t.m4: Likewise.
17461         * m4/uintmax_t.m4: Likewise.
17462
17463 2004-04-18  Jim Meyering  <jim@meyering.net>
17464
17465         * m4/prereq.m4: Don't forbid jm_ prefix.
17466
17467         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17468         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17469         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17470         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17471         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17472         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17473         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17474         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17475         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17476         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17477         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17478         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17479         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17480         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17481         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17482         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17483         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17484         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17485         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17486
17487 2004-04-18  Jim Meyering  <jim@meyering.net>
17488
17489         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17490         failure, don't leak memory and do call END_UTMP_ENT.
17491
17492 2004-04-16  Jim Meyering  <jim@meyering.net>
17493
17494         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17495         coreutils' stat program.
17496         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17497
17498 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17499
17500         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17501         C89.
17502         (CHAR_BIT): Remove, since we assume C89.
17503         Include <stdint.h> if available, as per current Autoconf CVS advice.
17504
17505 2004-03-31  Jim Meyering  <jim@meyering.net>
17506
17507         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17508         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17509         * m4/xalloc.m4: Likewise.
17510
17511 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17512
17513         Merge from coreutils.
17514
17515         * m4/inttostr.m4: New file.
17516         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17517         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17518         Require gl_CLOCK_TIME.
17519         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17520
17521 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17522
17523         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17524         not bool, to be more consistent with Unix conventions.
17525         Suggested by Bruno Haible.
17526
17527         Merge from coreutils.
17528
17529         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17530         * lib/umaxtostr.c: New files.
17531
17532         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17533         the usual <time.h> dance.
17534         (get_date): Change signature to support fractional time stamps.
17535         All callers changed.
17536         * lib/getdate.y: Include "getdate.h" first, as we can now
17537         assume C89 and don't need to worry about 'const'.
17538         Similarly, include "unlocked-io.h" near start, not in middle.
17539         Include <limits.h>.
17540         (textint.value): Use long int rather than int.
17541         (textint.digits): Use size_t rather than int.
17542         (BILLION, LOG10_BILLION): New constants.
17543         (parser_control): New member rel_ns.  Members day_ordinal,
17544         time_zone, month, day, hour, minutes, rel_year, rel_month,
17545         rel_day, rel_hour, rel_minutes, rel_seconds
17546         are now long int, not int.  Member seconds is now struct timespec,
17547         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17548         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17549         not int.
17550         (%union.intval): Now long int, not int.
17551         New member timespec.
17552         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17553         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17554         (spec): Now is a timespec or an item list.
17555         (timespec, items): New nonterminals.
17556         (time, rel, relunit, number, get_date):
17557         Add support for fractional seconds.
17558         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17559         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17560         (to_hour): First arg is now long int, not int.
17561         (to_year): Returns long int, not int.
17562         Don't treat year -70 like 70.
17563         (tm_diff): Returns long int, not int.
17564         (lookup_word): Use bool instead of int when appropriate.
17565         (yylex): Use size_t for count, not int.
17566         Detect overflow when parsing large integer constants.
17567         Add support for fractions.
17568         (get_date): Make pointers 'const' if possible.
17569         Use more-portable code to detect integer overflow.
17570         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17571         Don't use ctime; it's not reliable if the year has >4 digits.
17572
17573         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17574         This is for compatibility with BSD.
17575
17576         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17577         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17578         From coreutils' system.h.
17579
17580         * lib/userspec.c: Don't include "posixver.h".
17581         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17582         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17583         compatible extension.  Simplify code by removing a boolean int
17584         that was always nonzero if a string was nonnull.
17585
17586 2004-03-30  Jim Meyering  <jim@meyering.net>
17587
17588         Merge from coreutils.
17589
17590         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17591         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17592         on some systems one must include <grp.h> before it.
17593         Reported by Christian Krackowizer.
17594
17595 2004-03-30  Jim Meyering  <jim@meyering.net>
17596
17597         Merge from coreutils.
17598
17599         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17600
17601         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17602         an empty input stream.
17603
17604         * lib/readtokens.c: Include <stdbool.h>.
17605         (readtoken): Use `size_t' rather than int/long.
17606         All callers adjusted.
17607         Use `bool' rather than `int' where appropriate.
17608         Use memset rather than an explicit loop.
17609         Use x2nrealloc rather than xrealloc.
17610         Allow the use of `\0' as a delimiter.
17611         (readtokens): Likewise.
17612         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17613
17614 2004-03-30  Jim Meyering  <jim@meyering.net>
17615
17616         * m4/realloc.m4: Remove file, since now it does no more than
17617         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17618         the `configure.ac' section of module/realloc.
17619         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17620
17621 2004-03-30  Bruno Haible  <bruno@clisp.org>
17622
17623         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17624         nonnull.
17625
17626 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17627
17628         Merge changes to getloadavg.c from coreutils and Emacs.
17629
17630         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17631         Define to an expression, not to the empty string.
17632         Include cloexec.h and xalloc.h.
17633         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17634         Use set_cloexec_flag rather than rolling our own.
17635         * lib/cloexec.c, lib/cloexec.h: New files.
17636
17637 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17638
17639         * m4/cloexec.m4: New file.
17640
17641 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17642
17643         * lib/getopt.h: Sync with libc CVS.
17644
17645 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17646             Bruno Haible  <bruno@clisp.org>
17647
17648         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17649         mbswidth.
17650
17651 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17652             Bruno Haible  <bruno@clisp.org>
17653
17654         * lib/mbswidth.h: Include <wchar.h> only if
17655         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17656         <wchar.h>.
17657         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17658
17659 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17660
17661         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17662         Sync with libc CVS.
17663         * lib/getopt_int.h: New file, also synced from libc.
17664
17665 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17666
17667         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17668         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17669         Bring back getopt.c, getopt.h, getopt1.c.
17670
17671 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17672
17673         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17674         All uses changed.  Check for sa_sigaction member; this fixes
17675         a bug first reported by Jason Andrade in
17676         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17677
17678 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17679
17680         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17681         '#if' expressions.  Unlike the code it replaces, it does not
17682         depend on (defined _SC_PAGESIZE).  However, it does depend on
17683         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17684         first reported by Jason Andrade in
17685         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17686
17687 2004-02-25  Simon Josefsson  <jas@extundo.com>
17688
17689         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17690
17691 2004-02-25  Simon Josefsson  <jas@extundo.com>
17692
17693         * lib/strdup.h: New file.
17694         * lib/strdup.c: Include it.
17695         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17696         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17697
17698 2004-02-23  Karl Berry  <karl@gnu.org>
17699
17700         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17701         (from fencepost.gnu.org:/gd/gnuorg).
17702
17703 2004-02-23  Karl Berry  <karl@gnu.org>
17704
17705         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17706         * config/srclist.txt: add maintain/standards documents.
17707
17708 2004-02-18  Bruno Haible  <bruno@clisp.org>
17709
17710         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17711         Reported by Derek Robert Price <derek@ximbiot.com>.
17712
17713 2004-02-16  Karl Berry  <karl@gnu.org>
17714
17715         * config/mkinstalldirs, install-sh: update from automake.
17716
17717 2004-02-06  Karl Berry  <karl@gnu.org>
17718
17719         * m4/po.m4: update from gettext 0.14.1.
17720
17721 2004-02-06  Karl Berry  <karl@gnu.org>
17722
17723         * lib/config.charset: update from gettext 0.14.1.
17724
17725 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17726
17727         Add comments and code, prompted by suggestions from Bruno Haible
17728         for sh-quote.
17729         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17730         describing the enum quoting_style values.
17731         * lib/quotearg.c (quotearg_alloc): New function.
17732         (quotearg_buffer_restyled): Treat lone { and } as special.
17733         Treat = as special.  Work around bug with older shells
17734         that "see" a '\' that is really the 2nd byte of a multibyte char.
17735         Quote empty string with shell_quoting_style.
17736
17737 2004-02-03  Bruno Haible  <bruno@clisp.org>
17738
17739         * m4/pipe.m4: New file, from GNU gettext.
17740
17741 2004-02-03  Bruno Haible  <bruno@clisp.org>
17742
17743         * lib/pipe.h: New file, from GNU gettext.
17744         * lib/pipe.c: New file, from GNU gettext.
17745
17746 2004-01-27  Bruno Haible  <bruno@clisp.org>
17747
17748         * m4/execute.m4: New file, from GNU gettext.
17749
17750 2004-01-27  Bruno Haible  <bruno@clisp.org>
17751
17752         * lib/execute.h: New file, from GNU gettext.
17753         * lib/execute.c: New file, from GNU gettext.
17754         * lib/w32spawn.h: New file, from GNU gettext.
17755
17756 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17757
17758         Merge from diffutils.
17759
17760         * lib/file-type.c (file_type): Add typed memory objects.
17761         * lib/file-type.h (S_TYPEISTMO): New macro.
17762
17763         * lib/c-stack.h (c_stack_action): Remove argv argument.
17764         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17765         (die): Don't calculate message unless segv_action returns.
17766         (get_stack_location, min_address_from_argv, max_address_from_argv,
17767         volatile stack_base, volatile_stack_size): Remove.
17768         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17769         that every segmentation violation is a stack overflow.  (Ouch!)
17770         See Debian bug 136249 (still outstanding) for more info about why
17771         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17772
17773 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17774
17775         Exit-status fix from coreutils.
17776
17777         Use exit_failure consistently in place of EXIT_FAILURE,
17778         so that program exit statuses are consistent on failure.
17779
17780         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17781         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17782         * lib/argmatch.h: Comment fix to match the above.
17783         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17784         Now a macro referring to exit_failure, instead of a separate
17785         variable.  Include "exitfail.h" to get it.
17786         * lib/xstrtol.h: Include "exitfail.h".
17787         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17788
17789         * lib/long-options.c (parse_long_options): Use prototype
17790         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17791         for clarity.
17792
17793 2004-01-21  Jim Meyering  <jim@meyering.net>
17794
17795         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17796         so as not to conflict with a different-sized __mktime_internal
17797         function in GNU libc.
17798         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17799         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17800
17801 2004-01-20  Karl Berry  <karl@gnu.org>
17802
17803         * config/config.guess: update from config.
17804
17805         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17806
17807 2004-01-20  Bruno Haible  <bruno@clisp.org>
17808
17809         Safer stack allocation.
17810         * lib/setenv.c: Include allocsa.h.
17811         (alloca): Remove fallback definition.
17812         (freea): Remove macro.
17813         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17814         instead of freea.
17815
17816 2004-01-20  Bruno Haible  <bruno@clisp.org>
17817
17818         * m4/eealloc.m4: New file, from GNU gettext.
17819
17820 2004-01-20  Bruno Haible  <bruno@clisp.org>
17821
17822         * m4/allocsa.m4: New file, from GNU gettext.
17823
17824 2004-01-20  Bruno Haible  <bruno@clisp.org>
17825
17826         * lib/xallocsa.h: New file, from GNU gettext.
17827         * lib/xallocsa.c: New file, from GNU gettext.
17828
17829 2004-01-20  Bruno Haible  <bruno@clisp.org>
17830
17831         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17832
17833 2004-01-20  Bruno Haible  <bruno@clisp.org>
17834
17835         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17836         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17837         specially.
17838
17839 2004-01-20  Bruno Haible  <bruno@clisp.org>
17840
17841         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17842         patch.
17843
17844 2004-01-20  Bruno Haible  <bruno@clisp.org>
17845
17846         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17847
17848 2004-01-20  Bruno Haible  <bruno@clisp.org>
17849
17850         * lib/eealloc.h: New file.
17851
17852 2004-01-20  Bruno Haible  <bruno@clisp.org>
17853
17854         * lib/binary-io.h: Avoid warnings on Cygwin.
17855
17856 2004-01-20  Bruno Haible  <bruno@clisp.org>
17857
17858         * lib/allocsa.h: New file, from GNU gettext.
17859         * lib/allocsa.c: New file, from GNU gettext.
17860
17861 2004-01-18  Karl Berry  <karl@gnu.org>
17862
17863         * doc/gpl.texi, doc/lgpl.texi: new files.
17864
17865 2004-01-18  Karl Berry  <karl@gnu.org>
17866
17867         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17868         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17869
17870 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17871
17872         Merge from coreutils.
17873
17874         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17875         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17876         (gl_DEFAULT_POSIX2_VERSION): Move
17877         the documentation from 'configure' into 'config.hin',
17878         so that 'configure --help' isn't burdened by it and
17879         we don't have to worry about its formatting there.
17880         Reword the documentation so that it's more succinct
17881         and can be run together into a single paragraph.
17882         * m4/same.m4 (gl_SAME): Check for pathconf.
17883
17884 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17885
17886         Merge from coreutils.
17887
17888         * lib/posixver.c: Include posixver.h.
17889
17890         * lib/same.c: Include <stdbool.h>, <limits.h>.
17891         (_POSIX_NAME_MAX): Define if not defined.
17892         (MIN): New macro.
17893         (same_name): If file names are silently truncated, report
17894         that the file names are the same if they are the same after
17895         the silent truncation.
17896
17897         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17898         conversion function.
17899         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17900         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17901         longer needed.
17902
17903 2004-01-15  Jim Meyering  <jim@meyering.net>
17904
17905         Merge from coreutils.
17906
17907         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17908         if no library is required.
17909         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17910         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17911         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17912         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17913         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17914         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17915         value, $ac_cv_search_crypt, if it's "none required".
17916         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17917         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17918         not gl_FUNC_GETLOADAVG.
17919         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17920         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17921
17922 2004-01-15  Jim Meyering  <jim@meyering.net>
17923
17924         Merge from coreutils.
17925
17926         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17927         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17928         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17929
17930         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17931         optional configure-time default.
17932
17933         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17934
17935         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17936
17937 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17938
17939         Merge from coreutils.
17940
17941         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17942         value, $ac_cv_search_nanosleep, if it's "none required".
17943
17944 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17945
17946         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17947         with like-named macro in fnmatch.c.
17948         (EXT): Use an internal constant instead.
17949
17950         Merge fnmatch patches from glibc.
17951         * lib/fnmatch.c (mbsinit): Remove define.
17952         Add libc_hidden_ver (__fnmatch, fnmatch).
17953         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17954         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17955
17956 2004-01-14  Karl Berry  <karl@gnu.org>
17957
17958         * config/install-sh: update from automake.
17959
17960 2004-01-13  Karl Berry  <karl@gnu.org>
17961
17962         * config/install-sh: update from automake.
17963
17964 2004-01-09  Karl Berry  <karl@gnu.org>
17965
17966         * config/install-sh: update from automake.
17967
17968 2004-01-05  Karl Berry  <karl@gnu.org>
17969
17970         * config/config.{sub,guess}: update from config.
17971
17972 2003-12-31  Karl Berry  <karl@gnu.org>
17973
17974         * config/depcomp: update from automake.
17975
17976 2003-12-14  Karl Berry  <karl@gnu.org>
17977
17978         * lib/config.charset: update from gettext-runtime.
17979
17980 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17981
17982         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17983         Bug reported by Alfred M. Szmidt.
17984
17985 2003-12-03  Bruno Haible  <bruno@clisp.org>
17986
17987         * m4/gettext.m4: Upgrade from gettext-0.13.
17988         * m4/po.m4: Upgrade from gettext-0.13.
17989         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17990         * m4/intmax.m4: New file, from gettext-0.13.
17991         * m4/printf-posix.m4: New file, from gettext-0.13.
17992
17993 2003-11-29  Karl Berry  <karl@gnu.org>
17994
17995         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17996
17997 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17998             Bruno Haible  <bruno@clisp.org>
17999
18000         * lib/printf-parse.h: Don't include sys/types.h.
18001         (ARG_NONE): New macro.
18002         (char_directive): Change type of *arg_index fields to size_t.
18003         * lib/printf-parse.c: Don't include sys/types.h.
18004         (SSIZE_MAX): Remove macro.
18005         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18006         Remove unnecessary overflow check.
18007         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18008         fields.
18009
18010 2003-11-25  Bruno Haible  <bruno@clisp.org>
18011
18012         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18013
18014 2003-11-25  Bruno Haible  <bruno@clisp.org>
18015
18016         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18017         gt_TYPE_SSIZE_T.
18018
18019 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18020
18021         * modules/alloca: Remove dependency on xalloc.
18022
18023 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18024
18025         * lib/alloca.c: Remove dependency on xalloc module.
18026         (xalloc_die): Remove.
18027         (memory_full) [!defined emacs]: New macro.
18028         [!defined emacs]: Don't include xalloc.h.
18029         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18030         address arithmetic overflows.  Change datatypes a bit to avoid
18031         unnecessary casts.
18032
18033 2003-11-22  Jim Meyering  <jim@meyering.net>
18034
18035         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18036         s/size/size_t/.
18037
18038 2003-11-21  Karl Berry  <karl@gnu.org>
18039
18040         * config/config.{sub,guess}: update from config.
18041
18042 2003-11-18  Karl Berry  <karl@gnu.org>
18043
18044         * config/config.{sub,guess}: update from config.
18045
18046         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18047
18048 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18049
18050         * README: Mention that S+T cannot overflow if S is the size of
18051         an existing object and T is sufficiently small.
18052
18053 2003-11-17  Jim Meyering  <jim@meyering.net>
18054
18055         On systems without utime and without a utimes function capable of
18056         dealing with a NULL struct utimbuf* argument, this utime replacement
18057         could -- in unusual circumstances -- leak a file descriptor.
18058         * lib/utime.c: Include <unistd.h> and <errno.h>.
18059         (utime_null): Be sure to close `fd' and to preserve errno.
18060         Reported by Geoff Collyer via Arnold Robbins.
18061
18062 2003-11-17  Bruno Haible  <bruno@clisp.org>
18063
18064         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18065         (Depends-on): Add xsize.
18066
18067 2003-11-17  Bruno Haible  <bruno@clisp.org>
18068
18069         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18070
18071 2003-11-17  Bruno Haible  <bruno@clisp.org>
18072
18073         * lib/vasnprintf.c (alloca): Remove fallback definition.
18074         (freea): Remove definition.
18075         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18076         Reported by Paul Eggert.
18077
18078 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18079             Bruno Haible  <bruno@clisp.org>
18080
18081         Protect against address arithmetic overflow.
18082         * lib/printf-args.h: Include stddef.h.
18083         (arguments): Change type of field 'count' to size_t.
18084         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18085         'unsigned int' where appropriate.
18086         * lib/printf-parse.h: Include sys/types.h.
18087         (char_directive): Change type of *arg_index fields to ssize_t.
18088         (char_directives): Change type of fields 'count', max_*_length to
18089         size_t.
18090         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18091         (SSIZE_MAX): Define fallback value.
18092         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18093         instead of 'int' where appropriate. Check a_allocated, d_allocated
18094         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18095         * lib/vasnprintf.c: Include xsize.h.
18096         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18097         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18098         overflow. Avoid wraparound when converting a width or precision from
18099         decimal to binary.
18100
18101 2003-11-16  Bruno Haible  <bruno@clisp.org>
18102
18103         Update from GNU gettext.
18104         * lib/printf-parse.c: Generalize to it can be compiled for wide
18105         strings.
18106         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18107         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18108         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18109         SNPRINTF): New macros.
18110         Don't include <alloca.h> if the file is used inside libintl.
18111         (local_wcslen): New function, for Solaris 2.5.1.
18112         (VASNPRINTF): Use it instead of wcslen.
18113
18114 2003-11-16  Bruno Haible  <bruno@clisp.org>
18115
18116         * lib/xsize.h (xmax): New function.
18117         (xsum, xsum3, xsum4): Declare as "pure" functions.
18118
18119 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18120
18121         * modules/xalloc (Files): Undo latest change, since xalloc.h
18122         no longer needs SIZE_MAX or PTRDIFF_MAX.
18123
18124 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18125
18126         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18127         gl_PTRDIFF_MAX.
18128
18129 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18130
18131         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18132         "return", to pacify some unknown compiler.  Problem reported
18133         by Joerg Schilling.
18134
18135 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18136
18137         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18138         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18139         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18140         heuristic is just as accurate as far as we know, and it removes a
18141         dependency on size_max.m4 and ptrdiff_max.m4.
18142
18143 2003-11-11  Bruno Haible  <bruno@clisp.org>
18144
18145         * modules/xsize (Files): Add m4/size_max.m4.
18146         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18147
18148 2003-11-11  Bruno Haible  <bruno@clisp.org>
18149
18150         * m4/size_max.m4: New file.
18151         * m4/ptrdiff_max.m4: New file.
18152         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18153         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18154         (gl_XALLOC): Invoke it.
18155
18156 2003-11-11  Bruno Haible  <bruno@clisp.org>
18157
18158         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18159         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18160         defined.
18161
18162 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18163
18164         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18165         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18166         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18167         From Bruno Haible.
18168         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18169         not (size_t) -1, since it's defined here.
18170
18171 2003-11-09  Karl Berry  <karl@gnu.org>
18172
18173         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18174
18175 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18176
18177         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18178         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18179         Reject sizes of exactly SIZE_MAX bytes.
18180         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18181         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18182
18183 2003-11-05  Bruno Haible  <bruno@clisp.org>
18184
18185         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18186         SIZE_MAX defined in <limits.h> on Solaris.
18187
18188 2003-11-04  Jim Meyering  <jim@meyering.net>
18189
18190         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18191         variable names, rather than @VAR@.
18192         * modules/poll: Likewise.
18193
18194 2003-11-04  Bruno Haible  <bruno@clisp.org>
18195
18196         * modules/xsize: New file.
18197         * modules/linebreak: Depend on xsize.
18198         * MODULES.html.sh (func_all_modules): Add xsize.
18199
18200 2003-11-04  Bruno Haible  <bruno@clisp.org>
18201
18202         * m4/xsize.m4: New file.
18203
18204 2003-11-04  Bruno Haible  <bruno@clisp.org>
18205
18206         * lib/xsize.h: New file.
18207         * lib/linebreak.c: Include xsize.h.
18208         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18209         argument for overflow.
18210         Suggested by Paul Eggert.
18211
18212 2003-11-03  Karl Berry  <karl@gnu.org>
18213
18214         * config/config.{guess,sub}: update from config.
18215
18216 2003-11-03  Jim Meyering  <jim@meyering.net>
18217
18218         * modules/userspec (lib_SOURCES): Add userspec.h.
18219         (Include): Add "userspec.h".
18220         Improve description.
18221
18222 2003-11-03  Jim Meyering  <jim@meyering.net>
18223
18224         * lib/userspec.c: Include "userspec.h".
18225         * lib/userspec.h: New file.
18226
18227 2003-11-03  Bruno Haible  <bruno@clisp.org>
18228
18229         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18230
18231 2003-11-03  Bruno Haible  <bruno@clisp.org>
18232
18233         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18234         available, to avoid (extremely rare) race condition.
18235         Suggested by Paul Eggert.
18236
18237 2003-11-02  Karl Berry  <karl@gnu.org>
18238
18239         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18240
18241 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18242
18243         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18244         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18245         (read_filesystem_list): Set and use me_type_malloced.
18246         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18247         whatever the type happens to be), for brevity and consistency.
18248         Check for size calculation overflow on Alphas running OSF/1.
18249
18250 2003-10-31  Jim Meyering  <jim@meyering.net>
18251
18252         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18253
18254         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18255
18256 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18257             Bruno Haible  <bruno@clisp.org>
18258
18259         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18260         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18261
18262 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18263
18264         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18265         netbsd*-gnu*.  Suggested by Robert Millan.
18266
18267 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18268
18269         * modules/group-member: Depend on stdbool.
18270
18271 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18272
18273         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18274
18275 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18276
18277         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18278         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18279         after the 'gnu' in these cases.  This fixes some bugs in the
18280         previous change, and is based on suggestions by Robert Millan.
18281
18282 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18283
18284         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18285         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18286         no longer needed.
18287         * lib/quotearg.c (quotearg_n_options): Use it.
18288         * lib/group-member.c: Include <stdbool.h>.
18289         (free_group_info): Arg is now const *; don't free arg.
18290         (get_group_info): Now returns bool and accepts struct group_info *,
18291         rather than returning a malloc'ed struct group_info *.
18292         All uses changed.  Check for overflow in internal size calculation.
18293
18294         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18295         rather than xmalloc/xrealloc.
18296         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18297         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18298         conformance bug: the old code used a pointer after freeing the
18299         storage that it addressed.
18300         * lib/hash.c (hash_initialize): Simplify the code by using
18301         xalloc_oversized rather than doing it by hand.
18302         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18303         the buffer preserved.  Use free and xmalloc instead.
18304         * lib/quotearg.c (quotearg_n_options): Likewise.
18305         Use a simpler test for size overflow.  Don't use xalloc_oversized
18306         because unsigned int might be wider than size_t (!); this suggests
18307         that we should switch from unsigned int to size_t for slot numbers.
18308
18309 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18310
18311         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18312         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18313         NetBSD kernels.  Requested by Richard Stallman.
18314
18315 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18316
18317         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18318         to allocate the returned structure.  Do not allocate a subarray,
18319         as x2nrealloc will do that.
18320         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18321         instead of xnrealloc.
18322         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18323
18324 2003-10-27  Bruno Haible  <bruno@clisp.org>
18325
18326         * lib/stdbool_.h: Better support for BeOS.
18327
18328 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18329
18330         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18331         now uses inline.
18332
18333 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18334
18335         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18336         callers that want to do their own size-overflow checking.  Include
18337         <stdbool.h>, since xalloc_oversized returns bool.
18338         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18339         to use xalloc_oversized.
18340
18341         Add two functions x2realloc, x2nrealloc, for programs that grow
18342         arrays dynamically by doubling their sizes.
18343         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18344         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18345         New functions.
18346
18347         Port to C99 semantics for 'inline' of external functions.
18348         Bug reported by Bruno Haible.
18349         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18350         with the old contents of xnmalloc.
18351         (xnmalloc, xmalloc): Use it.
18352         (xnrealloc_inline): New static inline function,
18353         with the old contents of xnrealloc.
18354         (xnrealloc, xrealloc): Use it.
18355
18356         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18357         that.
18358
18359 2003-10-26  Karl Berry  <karl@gnu.org>
18360
18361         * config/srclist.txt (COPYING.DOC): no longer available from
18362         /gd/gnuorg; don't know where the ultimate source is.
18363
18364 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18365
18366         Fix several address-calculation bugs in the hash modules,
18367         plus some minor code cleanup.
18368
18369         * lib/hash.h: Include <stdbool.h>, for bool.
18370         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18371         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18372         hash_get_n_entries, hash_get_max_bucket_length,
18373         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18374         hash_rehash): Use size_t rather than unsigned.
18375         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18376         hash_get_n_buckets_used, hash_get_n_entries,
18377         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18378         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18379         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18380         Likewise.
18381         (SIZE_MAX): Define if not defined.
18382         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18383         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18384         hash_print):
18385         Use const * when possible.
18386         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18387         (check_tuning): Fix bug: if tuning parameters were very close to
18388         0 or 1, rounding errors could have caused subscript violations.
18389         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18390         (hash_initialize): Add 'fail:' label
18391         to free table and return NULL, and use it to simplify code.
18392         Use calloc rather than clearing the storage ourself.
18393         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18394         buffer size calculations.
18395         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18396         Include <stddef.h>, for size_t.
18397         * lib/hash-pjw.c (hash_pjw): Likewise.
18398         Switch to method described by Bruno Haible.
18399         Include <limits.h>, for CHAR_BIT.
18400         (SIZE_BITS): New macro.
18401
18402 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18403
18404         * m4/getline.m4 (AM_FUNC_GETLINE):
18405         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18406         hosts.  Problem reported by Derek Robert Price in
18407         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18408         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18409         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18410
18411 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18412
18413         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18414         ceiling the allocation at NMAX bytes rather than silently
18415         discarding input bytes before NMAX is reached.  This makes
18416         a difference only if NMAX exceeds SIZE_MAX / 2.
18417
18418         * lib/obstack.c: Merge from glibc.
18419         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18420         Add libc_hidden_def (_obstack_newchunk).
18421         (_obstack_free) [! defined _LIBC]: Remove.
18422         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18423         a clone of the function body.
18424         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18425         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18426
18427         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18428         glibc.
18429         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18430         arg to memcpy.
18431
18432         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18433         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18434         Don't use lvalue casts, as GCC plans to remove support for them
18435         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18436         was also present in the non-GCC version, indicating that this
18437         code had always been buggy and had never been widely used.
18438         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18439         Use the fast variant of each macro, rather than copying the
18440         definiens of the fast variant; that way, we'll be more likely to
18441         catch future bugs in the fast variants.
18442
18443 2003-10-20  Bruno Haible  <bruno@clisp.org>
18444
18445         * modules/wait-process: New file.
18446         * MODULES.html.sh (func_all_modules): Add wait-process.
18447
18448 2003-10-20  Bruno Haible  <bruno@clisp.org>
18449
18450         * m4/wait-process.m4: New file.
18451
18452 2003-10-20  Bruno Haible  <bruno@clisp.org>
18453
18454         * lib/wait-process.h: New file, from GNU gettext.
18455         * lib/wait-process.c: New file, from GNU gettext.
18456
18457 2003-10-19  Jim Meyering  <jim@meyering.net>
18458
18459         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18460         HPUX 10.20.
18461
18462 2003-10-18  Karl Berry  <karl@gnu.org>
18463
18464         * config/config.guess: update from config.
18465
18466 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18467
18468         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18469         (getgroups): First arg is int, not size_t.
18470         Don't let 'free' mangle errno.
18471
18472 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18473
18474         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18475
18476 2003-10-16  Karl Berry  <karl@gnu.org>
18477
18478         * config/config.{guess,sub}: update from config.
18479
18480 2003-10-16  Jim Meyering  <jim@meyering.net>
18481
18482         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18483         memcpy.
18484
18485 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18486
18487         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18488         (SIZE_MAX): Remove.
18489         (new_exclude, add_exclude_file): Initial size no longer needs to
18490         be a power of 2.
18491         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18492         our own address arithmetic overflow checking.
18493
18494         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18495         (fnmatch): Do not alloca more than 2000 wide characters;
18496         instead, use malloc for large buffers.
18497         Check for address arithmetic overflow, and return -1
18498         with errno set to ENOMEM in that case.
18499         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18500         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18501         instead, return -1.  Check for address arithmetic overflow.
18502
18503 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18504
18505         Handle invalid suffixes and overflow independently, so that
18506         callers can treat them independently as needed.  Fix some bugs in
18507         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18508         suffix for a human-readable blocksize.  The major caller-visible
18509         change is the addition of a new
18510         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18511         that both overflow and suffix chars were found.
18512
18513         * lib/human.c (humblock): Don't check separately for invalid suffix
18514         char; that is xstrtoumax's job (now that its bug is fixed).
18515         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18516         INTMAX_MAX]: New macros.
18517         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18518         TYPE_MAXIMUM): New macros.
18519         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18520         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18521         if overflow occurs, as it's what __strtol does and it's more useful
18522         in practice.
18523         (__xstrtol): If __strtol reports some error other than ERANGE,
18524         reflect it to the caller as LONGINT_INVALID.  If it reports
18525         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18526         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18527         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18528         value.
18529         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18530         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18531         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18532         [defined UINTMAX_MAX]: New macros.
18533
18534 2003-10-14  Bruno Haible  <bruno@clisp.org>
18535
18536         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18537
18538 2003-10-14  Bruno Haible  <bruno@clisp.org>
18539
18540         * m4/sig_atomic_t: New file, from GNU gettext.
18541         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18542
18543 2003-10-14  Bruno Haible  <bruno@clisp.org>
18544
18545         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18546         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18547         Also use volatile where needed.
18548
18549 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18550
18551         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18552         Change maintainer from Bruno Haible to 'all'.
18553
18554 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18555
18556         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18557
18558 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18559
18560         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18561         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18562         and define in terms of the other primitives.
18563         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18564         (SIZE_MAX): Define if not already defined.
18565         (array_size_overflow): New function.
18566         (xalloc_die): Abort instead of exiting if 'error' returns.
18567         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18568         (xmalloc, xrealloc): Use them.
18569         (xcalloc): Check for address arithmetic overflow.
18570         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18571         a bit faster than strcpy.
18572
18573 2003-10-10  Simon Josefsson  <jas@extundo.com>
18574
18575         * modules/argp (Depends-on): Add restrict and strcase.
18576
18577 2003-10-10  Simon Josefsson  <jas@extundo.com>
18578
18579         * m4/argp.m4: Add AC_C_INLINE.
18580
18581 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18582
18583         Merge getpass from libc, plus a few fixes.
18584
18585         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18586         Include <stdbool.h>.
18587         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18588         __fsetlocking to empty.
18589         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18590         do include <bits/libc-lock.h>.
18591         Do not include <fcntl.h>; not needed.
18592         [_LIBC]: Include <wchar.h>.
18593         (NOTCANCEL_MODE): New macro.
18594         (flockfile, funlockfile) [_LIBC]: New macros.
18595         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18596         [!_LIBC]: New macros.
18597         (call_fclose): New function.
18598         (getpass): Use it.  Save tty stream separately; this simplifies the
18599         code and makes it more reliable if stdin happens to equal stdout.
18600         Invoke __fsetlocking on tty.
18601         Handle thread cancellation if needed.
18602         Namespace cleanup (use __tcgetattr, __getline).
18603         Use bool for Booleans.
18604         [USE_IN_LIBIO]: Handle wide streams.
18605         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18606         stream might go where.
18607
18608         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18609         doesn't have to include <stdio.h> before us.
18610         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18611         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18612         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18613         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18614         if not declared, so that we can use getpass.c code from libc without
18615         rewriting it.
18616         (flockfile, ftrylockfile, funlockfile): New macros.
18617
18618 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18619
18620         * modules/getpass: Depend on stdbool.
18621
18622 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18623
18624         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18625
18626 2003-10-07  Karl Berry  <karl@gnu.org>
18627
18628         * config/config.{guess,sub}: update from config.
18629
18630 2003-10-06  Jim Meyering  <jim@meyering.net>
18631             Bruno Haible  <bruno@clisp.org>
18632
18633         This lets translators provide better translations for the
18634         "Written by ..." part of --version output.
18635         * lib/version-etc.h: Include stdarg.h.
18636         (version_etc_copyright): Declare as readonly.
18637         (version_etc): Make this function variadic with a NULL-terminated list
18638         of author name strings.
18639         (version_etc_va): New declaration.
18640         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18641         (version_etc_copyright): Declare as readonly.
18642         (version_etc_va): New function. Provide a different translatable string
18643         for each possible number of authors < 10. Abbreviate when there are 10
18644         authors or more.
18645         (version_etc): Make this function variadic. Call version_etc_va.
18646         Suggestion from Gary V. Vaughan.
18647
18648         * lib/long-options.h (parse_long_options): Change prototype: the
18649         authors string is moved to the end and becomes variadic.
18650         * lib/long-options.c: Include stdarg.h.
18651         (parse_long_options): Make this function variadic, too.
18652         Call version_etc_va, not version_etc.
18653
18654 2003-10-06  Bruno Haible  <bruno@clisp.org>
18655
18656         * modules/version-etc-2: Remove file.
18657         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18658
18659 2003-10-06  Bruno Haible  <bruno@clisp.org>
18660
18661         * modules/fatal-signal: New file.
18662         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18663
18664 2003-10-06  Bruno Haible  <bruno@clisp.org>
18665
18666         * m4/fatal-signal.m4: New file.
18667         * m4/signalblocking.m4: New file, from GNU gettext.
18668
18669 2003-10-06  Bruno Haible  <bruno@clisp.org>
18670
18671         * lib/version-etc-2.h: Remove file.
18672         * lib/version-etc-2.c: Remove file.
18673
18674 2003-10-06  Bruno Haible  <bruno@clisp.org>
18675
18676         * lib/fatal-signal.h: New file, from GNU gettext.
18677         * lib/fatal-signal.c: New file, from GNU gettext.
18678
18679 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18680
18681         * README: Rework advice for preventing empty .o files.
18682         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18683         not <sys/types.h>.
18684
18685 2003-10-04  Karl Berry  <karl@gnu.org>
18686
18687         * lib/argp*: update from libc.
18688
18689 2003-10-04  Karl Berry  <karl@gnu.org>
18690
18691         * config/config.{guess,sub}: update from config.
18692
18693 2003-10-02  Bruno Haible  <bruno@clisp.org>
18694
18695         * modules/lchown (Include): Add lchown.h.
18696         * modules/time_r (Include): Use "..." syntax.
18697         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18698
18699 2003-10-01  Simon Josefsson  <jas@extundo.com>
18700
18701         * MODULES.html.sh (func_all_modules): Move gethostname from section
18702         'based on' to section 'lacking' POSIX:2001.
18703
18704 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18705
18706         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18707         to output mode on the same stream.
18708
18709 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18710
18711         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18712         Fix arg typo in previous patch.
18713
18714 2003-09-28  Jim Meyering  <jim@meyering.net>
18715
18716         * lib/error.c: Correct cpp indentation.
18717
18718 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18719
18720         * modules/free: New file.
18721
18722 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18723
18724         * m4/free.m4: New file.
18725
18726 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18727
18728         * lib/minmax.h (MIN, MAX)
18729         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18730         Omit the special code that used __typeof__, since we worry that
18731         it could be more trouble than it's worth.  See:
18732         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18733         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18734
18735         * lib/free.c: New file.
18736
18737 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18738
18739         Trivial fixes to Makefile.am parts of module listings.
18740         * modules/strstr: Append strstr.h to lib_SOURCES.
18741         * modules/strcase: Likewise, for strcase.h.
18742
18743 2003-09-27  Karl Berry  <karl@gnu.org>
18744
18745         * config/mkinstalldirs: update from automake.
18746
18747 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18748
18749         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18750         (error_tail): Do not loop, reallocating temporary buffer, since
18751         the output cannot contain more wide characters than the input
18752         contains bytes, the size must be big enough already.  This avoids
18753         one potential size overflow calculation.  Check for size overflow
18754         when calculating temporary buffer size.  Free temporary buffer
18755         when done, if it was allocated with malloc; this plugs a memory
18756         leak.  Remove casts from void * to pointers, that are no longer
18757         needed now that we're assuming C89 or better.
18758
18759         Merge error changes from glibc.
18760
18761         * lib/error.c, error.h: Update copyright notice header to match glibc.
18762         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18763         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18764         Disable cancellation while printing error.
18765         * lib/error.h: Prepend __ to parameter names.
18766
18767 2003-09-26  Jim Meyering  <jim@meyering.net>
18768
18769         * lib/error.c (error_tail): Move some declarations
18770         into inner scope where the local variables are used.
18771
18772 2003-09-26  Bruno Haible  <bruno@clisp.org>
18773
18774         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18775         stpncpy().
18776         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18777
18778 2003-09-26  Bruno Haible  <bruno@clisp.org>
18779
18780         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18781         (stpncpy): Define as alias for gnu_stpncpy.
18782         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18783
18784 2003-09-25  Simon Josefsson  <jas@extundo.com>
18785
18786         * lib/xgetdomainname.h: New file.
18787         * lib/xgetdomainname.c: New file.
18788
18789 2003-09-25  Simon Josefsson  <jas@extundo.com>
18790             Bruno Haible  <bruno@clisp.org>
18791
18792         * modules/getdomainname: New file.
18793         * modules/xgetdomainname: New file.
18794         * MODULES.html.sh (func_all_modules): Add getdomainname,
18795         xgetdomainname.
18796
18797 2003-09-25  Simon Josefsson  <jas@extundo.com>
18798             Bruno Haible  <bruno@clisp.org>
18799
18800         * m4/getdomainname.m4: New file.
18801
18802 2003-09-25  Simon Josefsson  <jas@extundo.com>
18803             Bruno Haible  <bruno@clisp.org>
18804
18805         * lib/getdomainname.h: New file.
18806         * lib/getdomainname.c: New file.
18807
18808 2003-09-25  Karl Berry  <karl@gnu.org>
18809
18810         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18811
18812 2003-09-25  Karl Berry  <karl@gnu.org>
18813
18814         * config/install-sh: update from automake.
18815
18816 2003-09-25  Bruno Haible  <bruno@clisp.org>
18817
18818         * modules/version-etc-2: New file, from modules/version-etc with
18819         modifications.
18820         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18821
18822 2003-09-25  Bruno Haible  <bruno@clisp.org>
18823
18824         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18825         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18826
18827 2003-09-24  Simon Josefsson  <jas@extundo.com>
18828
18829         * modules/xgethostname: Add xgethostname.h.
18830
18831 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18832
18833         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18834         the buffer associated with the argument.  Bug reported by
18835         Simon Josefsson.
18836
18837 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18838
18839         * README: Document assumptions that 'int' is at least 32 bits
18840         wide, that integer arithmetic is 2's complement without overflow,
18841         that there are no holes in integer values, that adding sizes of
18842         two nonoverlapping objects can't overflow, and that all-bits-zero
18843         yields scalar zero.  Fix spelling and capitalization typos.
18844
18845 2003-09-19  Karl Berry  <karl@gnu.org>
18846
18847         * lib/argp.h: update from libc.
18848
18849 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18850
18851         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18852         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18853         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18854
18855 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18856
18857         * gnulib-tool: Use "test -h", not "test -L", for portability
18858         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18859         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18860         (sed_extract_prog): Issue s commands one-by-one, rather than
18861         using \| in one s command.
18862
18863 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18864
18865         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18866         input error, instead of returning NULL the next time we are called
18867         (and therefore losing track of errno).
18868
18869 2003-09-16  Bruno Haible  <bruno@clisp.org>
18870
18871         * gnulib-tool (func_create_testdir): Warn about duplicated
18872         dependencies.
18873
18874 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18875
18876         * modules/argmatch, modules/fatal, modules/obstack,
18877         modules/xalloc, modules/xgethostname: Sort dependencies by
18878         importance, not alphabetically.
18879
18880 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18881
18882         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18883         fails, so that the caller gets the proper errno.
18884
18885         * lib/readutmp.c (read_utmp): Likewise.
18886         Check for fstat error.  Close stream and free storage
18887         when failing.
18888
18889 2003-09-14  Karl Berry  <karl@gnu.org>
18890
18891         * config/srclist.txt (strdup.c): disable for c89 changes.
18892
18893 2003-09-14  Jim Meyering  <jim@meyering.net>
18894
18895         * lib/getloadavg.c: Correct cpp indentation.
18896         * lib/strdup.c: Likewise.
18897         * lib/vasnprintf.c: Likewise.
18898
18899 2003-09-14  Bruno Haible  <bruno@clisp.org>
18900
18901         * modules/fwriteerror: New file.
18902         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18903
18904 2003-09-14  Bruno Haible  <bruno@clisp.org>
18905
18906         * lib/fwriteerror.h: New file.
18907         * lib/fwriteerror.c: New file.
18908
18909 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18910
18911         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18912         modules/xgethostname, modules/xalloc: Depend on exit.
18913
18914 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18915
18916         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18917
18918         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18919         and AC_MINIX, too, so that their extensions are available.
18920
18921         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18922         This macro has been superseded by gl_BACKUPFILE.
18923
18924         More patches to assume C89 or better.
18925
18926         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18927
18928         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18929         unconditionally.
18930         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18931         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18932         Include <string.h>, <stdlib.h> unconditionally.
18933         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18934         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18935         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18936         headers or for string.h.
18937         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18938         or strtoul.
18939
18940         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18941         headers.
18942         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18943         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18944         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18945         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18946         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18947         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18948         memcpy, memset.
18949         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18950         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18951         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18952         strtol.
18953         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18954         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18955         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18956         strtoul.
18957
18958 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18959
18960         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18961         * lib/obstack.c [!defined _LIBC]: Likewise.
18962         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18963         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18964         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18965
18966         More changes to assume C89 or better.
18967
18968         * lib/error.c (error_tail): Assume vprintf.
18969
18970         * lib/argmatch.c (getenv): Remove decl.
18971         * lib/progreloc.c (get_full_program_name): Define via prototype.
18972         * lib/setenv.c (clearenv): Likewise.
18973         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18974         needed.
18975         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18976         (malloc, memcpy): Remove decls.
18977         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18978         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18979         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18980         (memcpy): Remove macro.
18981         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18982         (__P): Remove.  All uses removed.
18983         (PTR): Remove.  All uses changed to void *.
18984         (CHAR_BIT, NULL): Remove.
18985         (spaces, zeros, memset_space, memset_zero)
18986         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18987         Remove.
18988         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18989         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18990         Define with prototype.
18991         Remove now-unnecessary prototype decl.
18992         (extra_args_spec): Assume ANSI C.  All uses changed.
18993         (extra_args_spec_iso): Remove.
18994         (my_strftime, emacs_strftimeu): Define via prototype.
18995         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18996         unconditionally.
18997         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18998         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18999         (strtoul, strtol): Remove decls.
19000         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19001         LONG_MAX): Remove.
19002         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19003         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19004         (LOCALE_PARAM_PROTO): New macro.
19005         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19006         (INTERNAL (strtol), strtol): Define with a prototype.
19007         (PARAMS): Remove.  All uses removed.
19008         * lib/tempname.c: Include <string.h> unconditionally.
19009         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19010         * lib/xgethostname.c (main): Define with a prototype.
19011         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19012         Include <stdlib.h> unconditionally.
19013         (calloc, malloc, realloc, free): Remove decls.
19014         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19015         Include <stdlib.h> unconditionally.  Sort include file names.
19016         (strtod): Remove.
19017         (xstrtod): Define with a prototype.
19018         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19019         (strtol, strtoul): Remove decls.
19020
19021 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19022
19023         More patches to assume C89 or better.
19024         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19025         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19026         string.h, memchr, STDC_HEADERS.
19027
19028 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19029
19030         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19031         Include <stdlib.h>, <string.h> unconditionally.
19032         Remove now-unnecessary cast to char *.
19033         * lib/strnlen.c: Include <string.h> unconditionally.
19034         * lib/yesno.c (yesno): Define with a prototype.
19035
19036 2003-09-11  Bruno Haible  <bruno@clisp.org>
19037
19038         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19039
19040 2003-09-10  Jim Meyering  <jim@meyering.net>
19041
19042         * lib/error.c: Correct indentation of cpp directives.
19043
19044 2003-09-10  Bruno Haible  <bruno@clisp.org>
19045
19046         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19047         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19048         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19049         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19050         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19051         <stdlib.h> and <string.h> checks.
19052         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19053         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19054
19055 2003-09-10  Bruno Haible  <bruno@clisp.org>
19056
19057         * lib/strcspn.c: Include <string.h> unconditionally.
19058         * lib/strpbrk.c: Include <string.h> unconditionally.
19059         * lib/strstr.c: Include <string.h> unconditionally.
19060         * lib/unicodeio.c: Include <string.h> unconditionally.
19061         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19062         * lib/unsetenv.c: Likewise.
19063         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19064         * lib/yesno.c: Include <stdlib.h> unconditionally.
19065         (rpmatch): Add prototype.
19066
19067 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19068
19069         More patches to assume C89 or better.
19070         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19071         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19072         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19073         or for string.h.
19074         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19075         stdlib.h.
19076         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19077         C headers.
19078         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19079         string.h.
19080         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19081         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19082         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19083         or for string.h.
19084         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19085         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19086         C headers.
19087         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19088         memcpy.
19089         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19090         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19091         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19092         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19093         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19094         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19095         string.h, free.
19096         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19097         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19098         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19099         C headers, or for string.h.
19100         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19101         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19102         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19103         headers, memory.h, stdlib.h, string.h, strings.h.
19104         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19105         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19106         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19107         strchr.
19108         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19109         headers, memory.h, string.h.
19110         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19111         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19112         free.
19113         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19114         headers.
19115         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19116         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19117         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19118         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19119         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19120
19121 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19122
19123         More K&R removal.
19124
19125         * lib/acosl.c (main): Use a prototype.
19126         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19127         tanl.c: Likewise.
19128
19129         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19130
19131         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19132         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19133         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19134         with a prototype.
19135         * lib/getopt.c (const): Remove macro.
19136         Include <string.h> unconditionally.
19137         (my_index): Remove; all uses changed to strchr.
19138         (strlen): Remove decl.
19139         (exchange): Remove forward decl; no longer needed.
19140         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19141         Define with prototype.
19142         * lib/getopt1.c (const): Remove macro.
19143         (getopt_long, getopt_long_only, main): Define with prototype.
19144
19145         * lib/getugroups.c: Include <string.h> unconditionally.
19146
19147         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19148         (getusershell, setusershell, endusershell, readname, main):
19149         Define with prototypes.
19150
19151         * lib/group-member.c: Include group-member.h first.
19152         Include <stdlib.h> unconditionally.
19153
19154         * lib/hard-locale.c: Include hard-locale.h first.
19155         Include <stdlib.h>, <string.h> unconditionally.
19156
19157         * lib/hash.c (free, malloc): Remove decls.
19158         Include <stdlib.h> unconditionally.
19159
19160         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19161         (getenv): Do not declare.
19162
19163         * lib/idcache.c: Include <string.h> unconditionally.
19164
19165         * lib/long-options.c: Include long-options.h first, to test interface.
19166         Include <stdlib.h> unconditionally.
19167
19168         * lib/makepath.c: Include makepath.h first, to test interface.
19169         Include <stdlib.h> and <string.h> unconditionally.
19170
19171         * lib/linebuffer.c: Include <stdlib.h>.
19172         (free): Remove decl.
19173
19174         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19175         stddef.h. rpl_malloc returns void *, not char *.
19176         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19177         prototype.
19178
19179         * lib/md5.h: Include <limits.h> unconditionally.
19180         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19181         (__P): Remove; all uses removed.
19182         * lib/md5.c: Include "md5.h" first.
19183         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19184         md5_buffer, md5_process_bytes, md5_process_block):
19185         Define with prototypes.
19186         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19187         * lib/sha.c: Include "sha.h" first.
19188         Include <stdlib.h>, <string.h> unconditionally.
19189
19190         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19191         * lib/memcmp.c (__ptr_t): Likewise.
19192         * lib/memrchr.c (__ptr_t): Likewise.
19193         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19194         Include <string.h> unconditionally.
19195         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19196         * lib/memchr.c: Include <stdlib.h> unconditionally.
19197         * lib/memchr.c (LONG_MAX): Remove.
19198         * lib/memrchr.c (LONG_MAX): Likewise.
19199         * lib/memchr.c (__memchr): Define via a prototype.
19200         * lib/memrchr.c (__memrchr): Likewise.
19201         * lib/memcmp.c (__P): Remove, and remove all uses.
19202         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19203         Remove forward decls; no longer needed.
19204         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19205         Use types required by C89 in prototype.
19206
19207         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19208         * lib/savedir.c: Likewise.
19209         * lib/mkdir.c (free): Remove decl.
19210         * lib/rmdir.c (rmdir): Define with a prototype.
19211         * lib/savedir.c: Include savedir.h first, to test interface.
19212
19213         * lib/mktime.c (STDC_HEADERS): Remove.
19214         Include <stdlib.h>, <string.h> unconditionally.
19215
19216         * lib/modechange.c: Include <stdlib.h> unconditionally.
19217         (malloc): Remove decl.
19218
19219         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19220         (free): Remove decl.
19221
19222         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19223         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19224         (This type really should be intptr_t, but that's a C99ism.)
19225         (_obstack_memcpy): Remove: all uses changed to memcpy.
19226         Include <string.h> unconditionally.
19227         (struct obstack): Assume __STDC__ for types of members
19228         chunkfun, freefun, extra_arg.
19229         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19230         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19231         obstack_begin, obstack_specify_allocation,
19232         obstack_specify_allocation_with_arg, obstack_chunkfun,
19233         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19234         Remove unprototyped decls and the macros that use them.
19235         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19236         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19237         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19238         (defined __STDC__ && __STDC__)]:
19239         Remove nonprototyped code.
19240         Include <stdlib.h> unconditionally.
19241         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19242         _obstack_allocated_p, _obstack_free, obstack_free,
19243         _obstack_memory_used, print_and_abort):
19244         Define using prototypes.
19245         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19246         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19247         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19248         obstack_next_free, obstack_object_size, obstack_room) [0]:
19249         Remove unused, unprototyped code.
19250
19251         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19252
19253         * lib/physmem.c (physmem_total, physmem_available, main): Define
19254         with prototypes.
19255
19256         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19257         (main): Define with a prototype.
19258
19259         * lib/posixver.c (getenv): Remove decl.
19260
19261         * lib/putenv.c (malloc): Returns void *, not char *.
19262         Include <string.h> unconditionally.
19263         (strchr, memcpy, NULL): Do not define.
19264
19265         * lib/readtokens.c: Include readtokens.h first, to test interface.
19266         Include <stdlib.h>, <string.h> unconditionally.
19267         (init_tokenbuffer): Define with a prototype.
19268
19269         * lib/regex.c (PARAMS): Remove.  All uses removed.
19270         All uses of _RE_ARGS removed, too.
19271         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19272         unconditionally.
19273         (bzero): Assume memset exists.
19274         (memcmp, memcpy, NULL): Remove.
19275         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19276         char, or assignments to local vars of type signed char.
19277         (init_syntax_once, PREFIX(extract_number_and_incr),
19278         PREFIX(print_partial_compiled_pattern),
19279         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19280         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19281         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19282         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19283         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19284         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19285         wcs_compile_range, byte_compile_range, truncate_wchar,
19286         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19287         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19288         count_mbs_length, wcs_re_match_2_internal,
19289         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19290         PREFIX(alt_match_null_string_p),
19291         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19292         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19293         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19294         now-unnecessary declaration, if any.
19295         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19296         regcomp, regexec):
19297         Remove now-unnecessary casts among pointer types.
19298         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19299
19300         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19301         (free): Remove decl.
19302
19303         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19304
19305         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19306         (free): Remove decl.
19307
19308         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19309         * lib/xgetcwd.c: Likewise.
19310
19311         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19312         (free): Remove decl.
19313
19314         * lib/strchrnul.c (strchrnul): Define with a prototype.
19315         Fix bug: c_in was not converted to char before searching.
19316
19317         The following changes are not K&R related:
19318
19319         * lib/group-member.h: Include <sys/types.h>, so that this file is
19320         self-contained.
19321         * lib/makepath.h: Likewise.
19322
19323         * lib/getusershell.c (readname, default_index, line_size, readname):
19324         Use size_t, not int, for sizes.
19325         (readname): If the size overflows, report an error instead of
19326         looping forever.
19327
19328 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19329
19330         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19331         libc.
19332
19333 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19334
19335         * README: New section: portability guidelines.
19336
19337 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19338
19339         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19340         C89 spec.
19341
19342 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19343
19344         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19345
19346 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19347
19348         Assume C89 or better; remove K&R cruft.
19349         A few of these changes were first proposed by Derek Robert Price
19350         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19351
19352         * lib/addext.c: Include <string.h> unconditionally.
19353         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19354         Don't declare getenv or malloc.
19355
19356         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19357         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19358         (NULL): Remove.
19359         (find_stack_direction, alloca): Use prototypes.
19360
19361         * lib/atexit.c (atexit): Define using a prototype.
19362
19363         * lib/basename.c, dirname.c, stripslash.c:
19364         Include <string.h> unconditionally.
19365
19366         * lib/bcopy.c: Include <stddef.h>.
19367         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19368
19369         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19370
19371         * lib/error.h (error, error_at_line, error_print_progname)
19372         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19373         * lib/error.c: Include error.h first, to check interface.
19374         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19375         (VA_START): Remove; all uses changeed to va_start.
19376         (exit, strerror): Remove decls.
19377         (error_print_progname): Prototype uncondionally.
19378         Don't include <errno.h>; no longer needed.
19379         (private_strerror): Remove.
19380         (error_tail): Always define.
19381         (error, error_at_line): Assume C89 or better; always use prototypes.
19382         * lib/fatal.c: Include "fatal.h" first, to test interface.
19383         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19384         (VA_START): Remove; all uses changed to va_start.
19385         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19386         this case.
19387         (exit): Remove decl.
19388         (fatal): Prototype unconditionally.  Assume va_start works.
19389         Abort at end, to pacify gcc.
19390
19391         * lib/euidaccess.c (main): Define with a prototype.
19392
19393         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19394
19395         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19396
19397         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19398         prototypes.
19399         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19400         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19401         (getenv): Remove decl.
19402         (fnmatch): Define using a prototype.
19403         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19404         (FCT): Define using a prototype.
19405
19406         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19407
19408         * lib/gethostname.c: Include <stddef.h>.
19409         (gethostname): Define with prototype.  Length is size_t, not int.
19410
19411 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19412
19413         Assume C89 or better; remove K&R cruft.
19414         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19415         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19416         string.h, getenv, malloc.
19417         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19418         headers.
19419         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19420         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19421         do not check for strerror.
19422         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19423         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19424         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19425         do not check for doprnt or vprintf.
19426         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19427         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19428
19429 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19430
19431         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19432         getversion.c should have been removed then, but was accidentally
19433         preserved.
19434
19435         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19436         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19437
19438 2003-09-08  Karl Berry  <karl@gnu.org>
19439
19440         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19441                 config, forget about prep.
19442
19443         * config/depcomp, missing: update from automake.
19444
19445 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19446
19447         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19448         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19449
19450 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19451
19452         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19453         copy_tm_result.  Bug reported by Simon Josefsson in
19454         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19455
19456 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19457
19458         * m4/time_r.m4: New file.
19459         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19460         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19461         is. Check for timegm declaration.
19462         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19463         Do not check for gmtime_r.
19464         Replace mktime if __mktime_internal does not exist and if mktime
19465         hasn't been replaced already.
19466
19467 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19468
19469         * lib/time_r.c, lib/time_r.h: New files.
19470
19471         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19472         __localtime_r.
19473         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19474         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19475
19476         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19477         __gmtime_r.
19478         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19479         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19480         Include <time_r.h>.
19481
19482         * lib/timegm.c: Switch to glibc implementation, with the following
19483         changes:
19484         [defined HAVE_CONFIG_H]: Include <config.h>.
19485         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19486         (__mktime_internal) [!defined _LIBC]: New decl.
19487         (__gmtime_r) [!defined _LIBC]: New macro and function.
19488         (timegm): Use a prototype, since gnulib assumes C89.
19489         Do not bother declaring tmp to be const, as it's not really usefu.
19490         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19491         (timegm): Declare only if HAVE_DECL_TIMEGM.
19492
19493 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19494
19495         * MODULES.html.sh (func_all_modules): Add time_r.
19496         * modules/time_r: New file.
19497         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19498         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19499
19500 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19501
19502         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19503         Bug reported by Lute Kamstra in
19504         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19505
19506         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19507         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19508         course with correspondingly smaller numbers for tomorrow and
19509         yesterday.  From Tadayoshi Funaba.  Originally installed into
19510         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19511         coreutils merge?).
19512
19513 2003-08-31  Simon Josefsson  <jas@extundo.com>
19514
19515         * modules/timegm: New file.
19516         * MODULES.html.sh (func_all_modules): Add timegm.
19517
19518 2003-08-31  Simon Josefsson  <jas@extundo.com>
19519
19520         * m4/timegm.m4: New file.
19521
19522 2003-08-31  Simon Josefsson  <jas@extundo.com>
19523
19524         * lib/timegm.h: New file.
19525         * lib/timegm.c: New file.  Based on
19526         wget-1.8.2/src/http.c:mktime_from_utc.
19527
19528 2003-08-31  Karl Berry  <karl@gnu.org>
19529
19530         * lib/argp.h: update from libc.
19531
19532 2003-08-28  Bruno Haible  <bruno@clisp.org>
19533
19534         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19535         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19536         followed by '#define fnmatch fnmatch_posix' gives an error.
19537
19538 2003-08-28  Bruno Haible  <bruno@clisp.org>
19539
19540         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19541         warning on QNX, which defines O_BINARY to 000000.
19542
19543 2003-08-27  Jim Meyering  <jim@meyering.net>
19544
19545         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19546         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19547         would fail after 32.  Reported by Danny Levinson.  Details here:
19548         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19549
19550 2003-08-24  Bruno Haible  <bruno@clisp.org>
19551
19552         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19553         MSVC7 <stdio.h> is included later.
19554
19555 2003-08-22  Simon Josefsson  <jas@extundo.com>
19556
19557         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19558
19559 2003-08-20  Karl Berry  <karl@gnu.org>
19560
19561         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19562
19563 2003-08-20  Bruno Haible  <bruno@clisp.org>
19564
19565         * modules/progname: New file.
19566         * MODULES.html.sh (func_all_modules): Add progname.
19567
19568 2003-08-20  Bruno Haible  <bruno@clisp.org>
19569
19570         * lib/progname.h: New file, from GNU gettext.
19571         * lib/progname.c: New file, from GNU gettext.
19572         * lib/progreloc.c: New file, from GNU gettext.
19573
19574 2003-08-19  Jim Meyering  <jim@meyering.net>
19575
19576         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19577         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19578
19579 2003-08-19  Bruno Haible  <bruno@clisp.org>
19580
19581         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19582         more.
19583
19584 2003-08-19  Bruno Haible  <bruno@clisp.org>
19585
19586         * lib/xstrdup.c: Assume <string.h> exists.
19587
19588 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19589
19590         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19591         in makefile rules.
19592
19593 2003-08-18  Jim Meyering  <jim@meyering.net>
19594
19595         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19596         * m4/lib-ld.m4: Likewise.
19597
19598 2003-08-18  Jim Meyering  <jim@meyering.net>
19599
19600         * lib/setenv.h: Indent nested cpp directive.
19601         * lib/vasnprintf.c: Remove trailing blanks.
19602
19603 2003-08-17  Simon Josefsson  <jas@extundo.com>
19604
19605         * modules/xstrndup: New file.
19606         * MODULES.html.sh (func_all_modules): Add xstrndup.
19607
19608 2003-08-17  Simon Josefsson  <jas@extundo.com>
19609
19610         * modules/argp: Fix autoconf macro name. Add more dependencies.
19611
19612 2003-08-17  Simon Josefsson  <jas@extundo.com>
19613
19614         * m4/xstrndup.m4: New file.
19615
19616 2003-08-17  Simon Josefsson  <jas@extundo.com>
19617
19618         * m4/argp.m4: New file.
19619
19620 2003-08-17  Simon Josefsson  <jas@extundo.com>
19621             Bruno Haible  <bruno@clisp.org>
19622
19623         * lib/xstrndup.h: New file.
19624         * lib/xstrndup.c: New file.
19625
19626 2003-08-17  Bruno Haible  <bruno@clisp.org>
19627
19628         * modules/strndup (Files, Include): Add lib/strndup.h.
19629
19630 2003-08-17  Bruno Haible  <bruno@clisp.org>
19631
19632         * modules/euidaccess (Files): Add lib/euidaccess.h.
19633
19634 2003-08-17  Bruno Haible  <bruno@clisp.org>
19635
19636         * lib/strndup.h: New file.
19637
19638 2003-08-17  Bruno Haible  <bruno@clisp.org>
19639
19640         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19641         like AC_GNU_SOURCE.
19642         * modules/extensions (configure.ac): Comment out the invocation of
19643         gl_USE_SYSTEM_EXTENSIONS.
19644
19645 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19646
19647         Merges from coreutils, etc.
19648         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19649         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19650         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19651         fixing a typo.
19652         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19653         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19654
19655 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19656
19657         Document merge from coreutils.
19658         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19659         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19660         * modules/utime: Add m4/utimes-null.m4.
19661
19662 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19663
19664         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19665         space, undoing this 2003-08-12 change:
19666         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19667
19668 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19669
19670         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19671         strtoul.c from libc, undoing this 2003-08-12 change:
19672         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19673
19674 2003-08-16  Jim Meyering  <jim@meyering.net>
19675
19676         Merges from coreutils.
19677         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19678         prefix.  Adjust cache variables similarly.  Create 500 rather than
19679         just 300 files, to exercise bug on Darwin6.5, too.
19680         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19681         $missing_dir.
19682         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19683         AM_SYS_POSIX_TERMIOS.
19684         Reported by mkc@mathdogs.com.
19685         Also change use of $am_cv_sys_posix_termios
19686         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19687         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19688         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19689         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19690         in /proc/mounts until it finds one with matching device number.  This
19691         is unnecessary when the FILE argument *is* a mount point.  No stat call
19692         is necessary in that case.  So, disable the statvfs-testing code on
19693         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19694         as RedHat bug# 84846.
19695         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19696         to 1MB, so as not to render systems with no stack size limit (e.g.,
19697         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19698         Include <unistd.h>.  On some systems,
19699         it is required for the definition of _SC_PAGESIZE.
19700
19701 2003-08-16  Jim Meyering  <jim@meyering.net>
19702
19703         Merge from coreutils.
19704         * lib/xstrtoimax.c: #else #if -> #elif.
19705         * lib/xstrtoumax.c: Likewise.
19706
19707 2003-08-16  Jim Meyering  <jim@meyering.net>
19708
19709         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19710         * m4/utimes.m4: Removed.
19711         * m4/utimes-null.m4: Renamed from utimes.m4.
19712
19713         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19714         to 1MB, so as not to render systems with no stack size limit (e.g.,
19715         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19716         Include <unistd.h>.  On some systems,
19717         it is required for the definition of _SC_PAGESIZE.
19718
19719 2003-08-16  Jim Meyering  <jim@meyering.net>
19720         and Paul Eggert  <eggert@cs.ucla.edu>
19721
19722         Merges from coreutils, etc.
19723
19724         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19725         using the latest version from cvs.  This avoids problems with #line
19726         directives using a vendor (Sun) compiler.
19727         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19728         Don't set GETGROUPS_LIB here; now it's
19729         done via getgroups.m4's wrapper function.
19730         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19731         rather than just in sh-util/configure.in, so that the
19732         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19733         same.
19734         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19735         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19736         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19737         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19738         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19739         Remove code that is now done by the newly-required macros.
19740         Append $(EXEEXT) to DF_PROG.
19741         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19742         Do not invoke or require the following here,
19743         since prereq.m4 or some gnulib .m4 now does this for us:
19744         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19745         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19746         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19747         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19748         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19749         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19750         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19751         AC_FUNC_OBSTACK.
19752         Do not replace the following functions, as this is now the job
19753         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19754         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19755         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19756         atexit getpass, strdup, getpagesize.
19757         Replace 'raise'.
19758         Do not check for the following functions, as this is now the job
19759         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19760         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19761         setregid.
19762         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19763         Check for sys/sysctl.h.
19764         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19765         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19766         of checking for ssize_t ourselves.
19767
19768         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19769         Require every macro that gnulib/modules/* suggests for us.
19770         (jm_PREREQ_ADDEXT): New macro.
19771         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19772         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19773
19774         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19775         (gl_PHYSMEM): Use it.
19776         Also check for `table' function.
19777         Check for new headers and functions.
19778         Add check for sys/sysmp.h.
19779         With suggestions from Kaveh Ghazi.
19780         Ignore headers that are present but cannot be compiled.  This
19781         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19782         C 5.4.
19783
19784 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19785
19786         Document merge from coreutils.
19787         * modules/userspec: Depend on posixver.
19788         * modules/strftime: Depend on tzset.
19789
19790 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19791
19792         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19793         rather than tab, after '#' in shell-script copyright notices.
19794         Suggested by Bruno Haible.
19795
19796 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19797
19798         * config/srclist-update: Use three spaces, rather than tab, after '#'
19799         in shell-script copyright notices.  Suggested by Bruno Haible.
19800         Remove unnecessary parenthesization in regular expression.
19801
19802 2003-08-15  Jim Meyering  <jim@meyering.net>
19803
19804         Merge from coreutils.
19805         * lib/xgethostname.c: Include <stdlib.h>.
19806         (xghostname): Don't exit for anything other than memory-related
19807         failure; just return NULL.
19808         * lib/userspec.c: Include "posixver.h".
19809         (parse_user_spec): Accept `.' as a separator only
19810         in pre-POSIX-200112 mode.
19811         * lib/strtoimax.c: Use #elif rather than #else #if.
19812         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19813         Remove function, now that we can rely on a working tzset function.
19814         [!_LIBC]: Ensure that the required autoconf test has been run.
19815         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19816         Use underlying_strftime for %r.
19817         * lib/sha.c: Merge in some clean-up and optimization changes from
19818         glibc.
19819         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19820         Ensure that it is a multiple of 64.
19821         Rearrange loop exit tests so as to avoid performing an
19822         additional fread after encountering an error or EOF.
19823         * lib/realloc.c: Update copyright date.
19824
19825 2003-08-15  Jim Meyering  <jim@meyering.net>
19826         and Paul Eggert  <eggert@twinsun.com>
19827
19828         Merge from coreutils.
19829         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19830         member but strut utmpx does not.  Needed for AIX 4.3.3.
19831         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19832
19833 2003-08-15  Jim Meyering  <jim@meyering.net>
19834         and Paul Eggert  <eggert@cs.ucla.edu>
19835
19836         Merges from coreutils, etc.
19837         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19838         Require gl_FUNC_TZSET_CLOBBER.
19839         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19840         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19841         members.
19842
19843 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19844
19845         Help the merge from coreutils.
19846         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19847         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19848         * m4/tzset.m4: Use it too.
19849
19850 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19851
19852         * modules/tzset: New file.
19853
19854 2003-08-14  Jim Meyering  <jim@meyering.net>
19855
19856         Merges from coreutils.
19857         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19858         variable names, rather than @FNMATCH_H@.
19859         * modules/alloca: Likewise for $(ALLOCA_H).
19860
19861         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19862         the three copies of the literal target, `fnmatch.h'.
19863         * modules/alloca (alloca.h): Likewise.
19864
19865 2003-08-14  Jim Meyering  <jim@meyering.net>
19866
19867         Merge from coreutils.
19868         * m4/tzset.m4: New file.
19869         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19870         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19871         otherwise, AIX 5.1 systems would end up using the latter.
19872         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19873         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19874         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19875         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19876
19877 2003-08-14  Jim Meyering  <jim@meyering.net>
19878
19879         Merge from coreutils.
19880         * lib/obstack.h: Whitespace changes.
19881         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19882         and xcalloc return values.
19883         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19884         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19885         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19886         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19887         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19888         error from mntctl.
19889         Use mntctl's return value to drive the entry-processing loop, since
19890         we can't rely on the value of the vmt_length member in the last
19891         entry.  On some systems doing so could result in exhausting
19892         virtual memory.  Based in part on a patch from Mike Jetzer.
19893
19894 2003-08-14  Jim Meyering  <jim@meyering.net>
19895         and Paul Eggert  <eggert@twinsun.com>
19896
19897         Merges from coreutils, plus other fixes.
19898         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19899         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19900         for credits and details.  Thanks to Kaveh Ghazi for helping
19901         to keep these files in sync.
19902         (ARRAY_SIZE): Define it.
19903         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19904         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19905         (memcasecmp): Don't assume size_t fits in unsigned int.
19906         Remove casts and duplicate code.
19907         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19908         (memcpy): Remove definition.
19909         Merge in some clean-up and optimization changes from glibc.
19910         [BLOCKSIZE]: Move definition to top of file.
19911         Ensure that it is a multiple of 64.
19912         Rearrange loop exit tests so as to avoid performing an
19913         additional fread after encountering an error or EOF.
19914         * lib/md5.h (md5_uintptr): Define.
19915         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19916         return to the initial working directory.  Preserve errno
19917         for caller.
19918         * lib/idcache.c: Include "xalloc.h".
19919         (xmalloc, xrealloc): Remove decls.
19920         (getuser): Remove casts no longer required in C89.
19921         * lib/human.c: Include stdio.h, for sprintf.
19922         * lib/group-member.c: Include "xalloc.h".
19923         (xmalloc, xrealloc): Remove decls.
19924         (get_group_info): Remove casts no longer required in C89.
19925         * lib/getusershell.c (readname): Remove casts no longer required in
19926         C89.
19927         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19928         * lib/getline.c: Whitespace fix, from coreutils.
19929
19930 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19931
19932         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19933         Check for isascii.
19934
19935         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19936         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19937         Undo previous (whitespace-only) change.
19938
19939 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19940
19941         * lib/exclude.c: Include <ctype.h>
19942         (IN_CTYPE_DOMAIN): New macro.
19943         (is_space): New fn.
19944         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19945         and empty lines.
19946
19947         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19948         Undo previous (whitespace-only) change.
19949
19950 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19951
19952         * config/srclist-update: Change update back to the old behavior,
19953         leaving whitespace alone.  Use one 'sed' command rather than a
19954         pipeline.
19955         (fixlicense): Now a variable, not a function.
19956         (remove_trailing_blanks): Remove.
19957         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19958         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19959         Undo previous (whitespace-only) change.
19960
19961 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19962
19963         Merge from coreutils.
19964         * modules/euidaccess: Add lib_SOURCES, include for new
19965         file euidaccess.h
19966
19967 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19968
19969         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19970         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19971         Normalize leading white space and remove trailing white space.
19972
19973         Merge from coreutils
19974         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19975
19976         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19977         0.12.1.  These files are now being upgraded automatically by
19978         ../config/srclist-update.
19979
19980 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19981
19982         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19983         Normalize leading white space and remove trailing white space.
19984         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19985         notice, as per ../config/srclist-update.
19986
19987         Merge from coreutils.
19988         * lib/euidaccess.h: New file.
19989         * lib/euidaccess.c: Include it.
19990         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19991         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19992         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19993
19994 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19995
19996         * config/srclist-update: Add copyright notice.
19997         (remove_id_lines, remove_trailing_blanks): New constants.
19998         (fixfile): Use them to normalize spacing a bit in copied files.
19999         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20000         Normalize leading white space and remove trailing white space.
20001
20002         * config/texinfo.tex: Sync with texinfo.
20003
20004         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20005         strtoul.c from libc, to merge coreutils whitespace changes.
20006
20007         * config/srclist.txt: Get the following m4 files from gettext:
20008         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20009         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20010         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20011         wint_t.m4.
20012
20013 2003-08-12  Karl Berry  <karl@gnu.org>
20014
20015         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20016         been made.
20017
20018 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20019
20020         * modules/gnu-source, m4/gnu-source.m4:
20021         Remove; we're assuming Autoconf 2.54 or later now.
20022         Suggested by Bruno Haible.
20023         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20024
20025 2003-08-11  Bruno Haible  <bruno@clisp.org>
20026
20027         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20028
20029 2003-08-11  Bruno Haible  <bruno@clisp.org>
20030
20031         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20032         (vasnprintf): Use it instead of wcslen.
20033
20034 2003-08-11  Bruno Haible  <bruno@clisp.org>
20035
20036         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20037         value to ensure that _Bool promotes to int. Use #define for _Bool when
20038         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20039
20040 2003-08-10  Karl Berry  <karl@gnu.org>
20041
20042         * lib/regex.h: update from libc (whitespace fix).
20043
20044 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20045
20046         Merge some files from coreutils.  These changes were
20047         originally made by Jim Meyering.
20048         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20049         many older Unixes require this.
20050         * lib/alloca.c (alloca): Remove cast to argument of free;
20051         no longer needed in C89.
20052         * lib/alloca_.h, regex.h: Fix white space to match
20053         what GNU indent does.
20054
20055 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20056
20057         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20058         apparently Emacs's Unicode mode got confused before my 2003-08-05
20059         checkin.
20060
20061 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20062
20063         * m4/extensions.m4: New file.
20064         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20065         Require gl_USE_SYSTEM_EXTENSIONS.
20066         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20067         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20068
20069 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20070
20071         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20072         * modules/extensions, modules/gnu-source: New files.
20073         * modules/timespec, modules/unlocked-io: Depend on extensions.
20074
20075 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20076
20077         * modules/restrict: New file.
20078         * MODULES.html.sh (func_all_modules): Add restrict.
20079         * modules/regex: Depend on restrict.
20080
20081 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20082
20083         * m4/restrict.m4: New file.
20084         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20085
20086 2003-08-07  Bruno Haible  <bruno@clisp.org>
20087
20088         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20089         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20090
20091 2003-08-07  Bruno Haible  <bruno@clisp.org>
20092
20093         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20094         makes the module 'getndelim2' compatible with the module 'getline'.
20095
20096 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20097
20098         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20099         byte with "\201" to avoid glitches when editing that source file
20100         with multi-gnome-terminal.
20101
20102 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20103
20104         * lib/bumpalloc.h: Remove.
20105
20106 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20107
20108         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20109         * modules/bumpalloc: Remove.
20110
20111 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20112
20113         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20114         GNU coding style.
20115
20116         Merge from coreutils.
20117         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20118         1. From glibc.
20119         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20120         from Karl Berry, implemented by Jim Meyering.
20121         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20122         from Dmitry V. Levin.
20123         Remove anachronistic cast of xrealloc.
20124         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20125         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20126         type. Otherwise, it wouldn't compile with at least /bin/cc on
20127         ymp-cray-unicos9.0.2.X.
20128         Combine two mostly-identical uses of alloca into one.
20129         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20130
20131 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20132
20133         [From Emacs.]
20134
20135         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20136         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20137         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20138         obsolete NLIST_NAME_UNION.
20139         [__GNU__]: Undef BSD and FSCALE.
20140         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20141
20142 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20143
20144         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20145         an enum type, so that it's guaranteed to promote to int.  See:
20146         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20147
20148 2003-08-03  Karl Berry  <karl@gnu.org>
20149
20150         * config/depcomp: update from automake.
20151
20152 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20153
20154         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20155         (strerror): Don't assume that a printable int fits in 14 bytes.
20156
20157 2003-07-31  Bruno Haible  <bruno@clisp.org>
20158
20159         * modules/getpass-gnu: New file.
20160         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20161
20162 2003-07-31  Bruno Haible  <bruno@clisp.org>
20163
20164         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20165
20166 2003-07-24  Karl Berry  <karl@gnu.org>
20167
20168         * config/missing: update from automake.
20169
20170 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20171             Bruno Haible  <bruno@clisp.org>
20172
20173         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20174         * lib/getline.c (getline, getdelim): Likewise.
20175         Remove _GNU_SOURCE define; now it's defined in config.h through
20176         m4/getline.m4.
20177
20178 2003-07-23  Karl Berry  <karl@gnu.org>
20179
20180         * config/config.sub: update from prep.
20181
20182 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20183
20184         * modules/xalloc (Depends-on): Add exitfail.
20185         * modules/xmemcoll: Likewise.
20186
20187 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20188
20189         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20190         over-parenthesization in macros.
20191
20192         Sync with coreutils.
20193
20194         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20195         required by C99.
20196
20197         Use `exit_failure' for xalloc and xmemcoll instead of their own
20198         private exit-failure variables.
20199         * lib/xalloc.h (xalloc_exit_failure): Remove.
20200         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20201         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20202         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20203         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20204         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20205
20206 2003-07-20  Jim Meyering  <jim@meyering.net>
20207
20208         * modules/closeout (Depends-on): Add exitfail.
20209         Suggestion from Bruno Haible.
20210
20211 2003-07-19  Karl Berry  <karl@gnu.org>
20212
20213         * config/config.sub: update from prep.
20214
20215 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20216
20217         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20218         Remove.
20219         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20220         to test that it can stand by itself.  Include "exitfail.h".
20221         Clients should set exit_failure instead.
20222         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20223
20224 2003-07-18  Bruno Haible  <bruno@clisp.org>
20225
20226         * modules/getndelim2: New file.
20227         * modules/getline: Share files with module getndelim2.
20228         * modules/getnline: Depend on getndelim2 instead of sharing files with
20229         it. Add getnline.c to lib_SOURCES.
20230         * MODULES.html.sh (func_all_modules): Add getndelim2.
20231
20232 2003-07-18  Bruno Haible  <bruno@clisp.org>
20233
20234         * m4/getndelim2.m4: New file.
20235         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20236         invoke gl_PREREQ_GETNDELIM2.
20237         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20238         gl_PREREQ_GETNDELIM2.
20239         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20240         gl_GETNDELIM2.
20241
20242 2003-07-18  Bruno Haible  <bruno@clisp.org>
20243
20244         * lib/getndelim2.h: New file.
20245         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20246         getndelim2.h.
20247         (getndelim2): Make non-static. Change return type to ssize_t.
20248         * lib/getline.h: Change argument names.
20249         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20250         * lib/getnline.c: Include getndelim2.h.
20251
20252 2003-07-18  Andreas Schwab  <schwab@suse.de>
20253
20254         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20255
20256 2003-07-17  Karl Berry  <karl@gnu.org>
20257
20258         * config/config.sub: update from prep.
20259
20260 2003-07-17  Bruno Haible  <bruno@clisp.org>
20261
20262         * modules/getnline: New file.
20263         * modules/getline: Add lib/getndelim2.c to source file list.
20264         * MODULES.html.sh (func_all_modules): Add getnline.
20265
20266 2003-07-17  Bruno Haible  <bruno@clisp.org>
20267
20268         * m4/getnline.m4: New file.
20269
20270 2003-07-17  Bruno Haible  <bruno@clisp.org>
20271
20272         * m4/Makefile.am.in: Remove file.
20273         * m4/Makefile.am: Remove file.
20274         * m4/Makefile.in: Remove file.
20275
20276 2003-07-17  Bruno Haible  <bruno@clisp.org>
20277
20278         * lib/getnline.h: New file.
20279         * lib/getnline.c: New file.
20280         * lib/getndelim2.c: New file, extracted from getline.c.
20281         (getndelim2): Renamed from getdelim2, with added nmax argument.
20282         * lib/getline.c: Include getndelim2.c.
20283         (getdelim2): Moved out to getndelim2.c.
20284         (getline, getdelim): Update.
20285
20286 2003-07-17  Bruno Haible  <bruno@clisp.org>
20287
20288         * lib/Makefile.am: Remove file.
20289         * lib/Makefile.in: Remove file.
20290
20291 2003-07-17  Bruno Haible  <bruno@clisp.org>
20292
20293         * configure.in: Remove file.
20294         * Makefile.in: Remove file.
20295
20296 2003-07-17  Bruno Haible  <bruno@clisp.org>
20297
20298         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20299
20300 2003-07-16  Karl Berry  <karl@gnu.org>
20301
20302         * config/srclist-update: was running fixlicense twice, which caused
20303                 texinfo.tex to be nullified for some reason.  Simplify,
20304                 $gplsrc is no longer needed as far as I can see?
20305
20306 2003-07-16  Jim Meyering  <jim@meyering.net>
20307
20308         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20309
20310 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20311
20312         * config/srclist.txt: Get the following files from gettext-runtime/intl
20313         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20314         ref-del.sin.  From Bruno Haible.
20315         * config/srclist-update (fixfile): Change grep pattern again, since the
20316         previous fix didn't work (there was another trailing $).  Use
20317         '[$]' to escape the $s.
20318
20319 2003-07-15  Karl Berry  <karl@gnu.org>
20320
20321         * lib/vasnprintf.c: update from gettext.
20322
20323 2003-07-15  Karl Berry  <karl@gnu.org>
20324
20325         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20326         gets expanded when surrounded by '$'.
20327
20328 2003-07-15  Jim Meyering  <jim@meyering.net>
20329
20330         * modules/save-cwd: Don't depend on error.  From Derek Price.
20331
20332 2003-07-15  Jim Meyering  <jim@meyering.net>
20333
20334         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20335
20336 2003-07-14  Simon Josefsson  <jas@extundo.com>
20337
20338         * modules/mempcpy: New file.
20339         * MODULES.html.sh (func_all_modules): Add mempcpy.
20340
20341 2003-07-14  Simon Josefsson  <jas@extundo.com>
20342
20343         * m4/mempcpy.m4: New file.
20344
20345 2003-07-14  Simon Josefsson  <jas@extundo.com>
20346
20347         * lib/mempcpy.h: New file.
20348         * lib/mempcpy.c: New file.
20349
20350 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20351
20352         * modules/getdate, modules/posixtm: Depend on mktime.
20353
20354 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20355
20356         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20357         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20358         unicodeio.c, unicodeio.h, unlocked-io.h:
20359         Switch from LGPL to GPL.
20360
20361 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20362
20363         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20364         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20365         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20366         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20367         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20368         updated automatically by ../config/srclist-update.  This changes
20369         their license from LPGL to GPL.
20370
20371 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20372
20373         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20374         assumed to refer to the root of the most recent stable gettext version.
20375         * config/srclistvars.sh: Add defaults for eggert.
20376         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20377         Match "This program" as well as "The program".  This is needed
20378         for gettext.
20379
20380 2003-07-14  Jim Meyering  <jim@meyering.net>
20381
20382         Don't emit diagnostics.  Let callers do that.
20383         * lib/save-cwd.c: Don't include "error.h".
20384         (save_cwd): Don't call error.  Ensure that errno is valid
20385         when returning nonzero.
20386
20387         * lib/save-cwd.h (restore_cwd): Update prototype.
20388         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20389         Simplify.  Don't call error upon failure.  Let callers do that.
20390         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20391         when auditing is enabled.  But don't bother updating the #if.
20392
20393 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20394
20395         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20396         it breaks C++ compilation.
20397         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20398
20399 2003-07-10  Simon Josefsson  <jas@extundo.com>
20400
20401         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20402
20403 2003-07-10  Jim Meyering  <jim@meyering.net>
20404
20405         * m4/clock_time.m4: Remove trailing blank.
20406         * m4/intmax_t.m4: Likewise.
20407
20408 2003-07-10  Jim Meyering  <jim@meyering.net>
20409
20410         * lib/vasnprintf.c: Remove trailing blanks.
20411         Make cpp indentation consistent.
20412
20413 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20414
20415         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20416         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20417         Switch from LGPL to GPL.
20418
20419 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20420
20421         * config/srclist.txt: Sort sublists.  Add
20422         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20423         that differ from gnulib for one reason or another; we'd like this list
20424         to be smaller but for now let's document what we have.
20425
20426 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20427
20428         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20429         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20430         and sweeter "eval x=$x".
20431         * config/srclist.txt: Get lib/argp* from glibc.
20432
20433 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20434
20435         * lib/mktime.c: Fix some boundary cases and remove need for floating
20436         point.
20437
20438         Issue a compile-time diagnostic if time_t is floating point, or if
20439         two's complement arithmetic is not in effect, or if arithmetic
20440         right shift does not propagate the sign.  These assumptions were
20441         all in the original code but they weren't checked.
20442
20443         (TIME_T_MIDPOINT, verify): New macros.
20444         (__isleap): Remove; it has integer overflow problems.
20445         (leapyear): New function, without those problems.
20446         (ydhms_tm_diff): Remove; splitting into two parts.
20447         (ydhms_diff): New function, containing the arithmetic part of
20448         the old ydhms_tm_diff function.  Issue a compile-time
20449         diagnostic if we are not using C99 integer division.
20450         Avoid casts when possible.
20451         (guess_time_tm): New function, containing the checking part of
20452         the old ydhms_tm_diff function.  Return the new value, rather than
20453         the difference between it and the old.  Accept a new argument T
20454         so that *T specifies the old value.  Check for overflow in the result.
20455
20456         (__mktime_internal): Use a time_t offset, not a long int offset.
20457         This undoes the 2003-06-04 change, which is no longer needed now
20458         that we have better overflow checking.
20459         (localtime_offset): Likewise.
20460
20461         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20462         and long are 64-bit but int is only 32-bit.
20463         (ydhms_diff): Use long int to store year1 and yday1.
20464         Issue a compile-time diagnostic if long int is not wide enough.
20465
20466         (__mktime_internal): Use long int to store adjusted year and yday.
20467         Use plain C rather than preprocessor commands, if that doesn't
20468         affect efficiency.
20469         Check for overflow (and try to repair) after each probe
20470         rather than checking only at the very end.  This avoids some bugs
20471         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20472         does not equal GMT offset at maximum time).
20473         Use integer to check for overflow rather than floating point; this
20474         is more portable to non-IEEE hosts, and is a tad faster.
20475         When we detect that we are oscillating between two values,
20476         don't check whether tm_isdst has the requested value, since
20477         we already know the answer.  When tm_isdst has the wrong value,
20478         use a different heuristic to find the right one, based on the
20479         extreme values actually observed in practice in tz2003a,
20480         rather than the (overly optimistic) "previous 3 calendar quarters".
20481
20482         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20483         "T const" to accommodate glibc style.
20484         (check_result): Use less-confusing report format.  "long" -> "long int.
20485         (main): Likewise.
20486         Don't loop if the iteration overflows time_t.
20487         Allow a negative step in the iteration.
20488
20489 2003-07-06  Karl Berry  <karl@gnu.org>
20490
20491         * config/depcomp: update from automake.
20492         * config/config.sub: update from prep.
20493
20494 2003-07-03  Karl Berry  <karl@gnu.org>
20495
20496         * config/config.guess: update from prep.
20497
20498 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20499
20500         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20501         xreadlink.c now includes it unconditionally.
20502
20503 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20504
20505         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20506         having it depend on HAVE_SYS_TYPES_H.
20507
20508 2003-07-01  Bruno Haible  <bruno@clisp.org>
20509
20510         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20511         <sys/types.h> should be sufficient.
20512         Reported by Paul Eggert.
20513
20514 2003-06-26  Karl Berry  <karl@gnu.org>
20515
20516         * config/depcomp: update from automake.
20517
20518 2003-06-26  Bruno Haible  <bruno@clisp.org>
20519
20520         * modules/human: Depend on module stdbool.
20521
20522 2003-06-25  Bruno Haible  <bruno@clisp.org>
20523
20524         * modules/readlink: New file.
20525         * modules/xreadlink: Depend on it.
20526         * MODULES.html.sh (func_all_modules): Add readlink.
20527
20528 2003-06-25  Bruno Haible  <bruno@clisp.org>
20529
20530         * m4/readlink.m4: New file.
20531
20532 2003-06-25  Bruno Haible  <bruno@clisp.org>
20533
20534         * lib/readlink.c: New file.
20535
20536 2003-06-22  Karl Berry  <karl@gnu.org>
20537
20538         * config/srclist.txt: update mkinstalldirs from automake.
20539         * config/mkinstalldirs: update.
20540
20541 2003-06-22  Bruno Haible  <bruno@clisp.org>
20542
20543         Portability to mingw32.
20544         * m4/ssize_t.m4: New file, from GNU gettext.
20545         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20546         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20547
20548 2003-06-22  Bruno Haible  <bruno@clisp.org>
20549
20550         * modules/safe-read: Add m4/ssize_t.m4.
20551         * modules/xreadlink: Add m4/ssize_t.m4.
20552
20553 2003-06-20  Bruno Haible  <bruno@clisp.org>
20554
20555         Assume C89, so PARAMS isn't needed.
20556         * lib/unicodeio.h (PARAMS): Remove.
20557         * lib/unicodeio.c: Don't use PARAMS.
20558
20559 2003-06-18  Karl Berry  <karl@gnu.org>
20560
20561         * config/config.{guess,sub}: update from prep.
20562
20563 2003-06-18  Jim Meyering  <jim@meyering.net>
20564
20565         Merge changes from coreutils.
20566         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20567         Remove explicit declarations of xmalloc and realloc.
20568         Include xalloc.h.
20569         (read_utmp): Remove anachronistic cast of xmalloc.
20570
20571 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20572
20573         Assume C89, so PARAMS isn't needed.
20574         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20575         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20576         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20577         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20578         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20579         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20580         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20581         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20582         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20583         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20584         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20585         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20586         no longer needed. Anyway, config.h should always be included before any
20587         other file.
20588
20589 2003-06-11  Simon Josefsson  <jas@extundo.com>
20590
20591         * modules/sysexits: New file.
20592         * MODULES.html.sh (func_all_modules): Add sysexits.
20593
20594 2003-06-11  Simon Josefsson  <jas@extundo.com>
20595
20596         * lib/sysexit_.h: New file.
20597
20598 2003-06-11  Derek Price  <derek@ximbiot.com>
20599
20600         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20601         necessary.
20602
20603 2003-06-11  Bruno Haible  <bruno@clisp.org>
20604
20605         * m4/sysexits.m4: New file.
20606
20607 2003-06-10  Simon Josefsson  <jas@extundo.com>
20608
20609         * lib/argp.h: New file, from glibc.
20610         * lib/argp-ba.c: New file, from glibc.
20611         * lib/argp-eexst.c: New file, from glibc.
20612         * lib/argp-fmtstream.c: New file, from glibc.
20613         * lib/argp-fmtstream.h: New file, from glibc.
20614         * lib/argp-fs-xinl.c: New file, from glibc.
20615         * lib/argp-help.c: New file, from glibc.
20616         * lib/argp-namefrob.h: New file, from glibc.
20617         * lib/argp-parse.c: New file, from glibc.
20618         * lib/argp-pv.c: New file, from glibc.
20619         * lib/argp-pvh.c: New file, from glibc.
20620         * lib/argp-xinl.c: New file, from glibc.
20621
20622 2003-06-10  Simon Josefsson  <jas@extundo.com>
20623
20624         * modules/strchrnul: New file.
20625
20626 2003-06-10  Simon Josefsson  <jas@extundo.com>
20627
20628         * modules/argp: New file.
20629
20630 2003-06-10  Simon Josefsson  <jas@extundo.com>
20631
20632         * m4/strchrnul.m4: New file.
20633
20634 2003-06-10  Simon Josefsson  <jas@extundo.com>
20635
20636         * lib/strchrnul.h: New file.
20637         * lib/strchrnul.c: New file.
20638
20639 2003-06-10  Bruno Haible  <bruno@clisp.org>
20640
20641         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20642
20643 2003-06-07  Karl Berry  <karl@gnu.org>
20644
20645         * config/config.{guess,sub}: update from prep.
20646
20647 2003-06-07  Jim Meyering  <jim@meyering.net>
20648
20649         * modules/strtod: Use $(...) notation, not @...@ for
20650         AC_REPLACE'd variables.
20651         * modules/localcharset: Likewise.
20652
20653 2003-06-07  Jim Meyering  <jim@meyering.net>
20654
20655         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20656         in place of my name in the copyright comment.
20657         Remove definition and uses of __P.
20658
20659         From coreutils.
20660         * lib/stat.c: Don't declare xmalloc explicitly.
20661         Instead, include "xalloc.h".
20662         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20663         xrealloc, and xcalloc return values.
20664         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20665         Improve comment.
20666         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20667
20668 2003-06-07  Bruno Haible  <bruno@clisp.org>
20669
20670         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20671         avoid AC_CONFIG_LINKS.
20672         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20673         fnmatch.h, to avoid AC_CONFIG_LINKS.
20674         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20675
20676 2003-06-07  Bruno Haible  <bruno@clisp.org>
20677
20678         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20679         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20680         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20681         directory.
20682         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20683         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20684         directory.
20685
20686 2003-06-06  Jim Meyering  <jim@meyering.net>
20687
20688         Merge from coreutils.
20689         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20690         Consolidate declarations and initializations of *_base* locals.
20691
20692         Merge from coreutils.
20693         This avoids a core dump on systems without GNU putenv,
20694         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20695         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20696         (unsetenv): New static function, from GNU libc.
20697         (rpl_putenv): Use it.
20698
20699         * lib/modechange.c: Remove trailing blanks.
20700
20701         Merge from coreutils.
20702         * lib/fsusage.c: Remove declaration of statfs.
20703         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20704
20705         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20706
20707 2003-06-06  Jim Meyering  <jim@meyering.net>
20708
20709         * lib/stdbool_.h: Renamed from stdbool.h.in.
20710
20711 2003-06-06  Jim Meyering  <jim@meyering.net>
20712             Bruno Haible  <bruno@clisp.org>
20713
20714         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20715         Adjust Makefile.am snippet not to redirect directly to target.
20716         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20717
20718 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20719
20720         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20721         mismatch, look in future quarters as well as past.  This fixes a
20722         bug when processing fall-backwards gaps immediately after a long
20723         period of daylight-saving time.
20724
20725         * lib/mktime.c: Assume freestanding C89 or better.
20726         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20727         (__P): Remove; not used.
20728         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20729         (mktime, not_equal_tm, print_tm, check_result,
20730         main): Use prototypes.  Use const * where appropriate.
20731         (main): Fix typo in testing code that uncovered by above changes.
20732         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20733
20734 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20735
20736         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20737         locale.h, localeconv.  This merges changes from coreutils.
20738
20739         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20740         It can be removed after the next Autoconf is released.
20741         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20742         needed.
20743
20744 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20745
20746         * lib/mktime.c: Fix Debian bug 177940
20747         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20748         (localtime_offset): Now long int, not time_t, because we want it
20749         to be guaranteed to be signed.  All uses changed.
20750         (__mktime_internal): If overflow would occur when adding offset,
20751         don't add it.
20752
20753         Merge 'human' changes from coreutils.  Rewrite to support
20754         locale-specific notations like thousands separators.
20755         * lib/human.c: Simplify authorship notice.
20756         Include human.h immediately after config.h.
20757         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20758         <limits.h>: Do not include, since human.h does.
20759         (SIZE_MAX, UINTMAX_MAX): New macros.
20760         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20761         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20762         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20763         (power_letter): Renamed from suffixes.
20764         (generate_suffix_backwards): Remove.
20765         (adjust_value): Now takes int style (because of human.h changes)
20766         and long double value (for greater precision on some platforms).
20767         (group_number): New function.
20768         (human_readable): Use it.  Use integer options, not enum.
20769         Put the options before the sizes in the arg list.
20770         Support all the new options.
20771         The old human_readable function has been removed;
20772         use inttostr.h instead.
20773         (human_readable, default_block_size, humblock):
20774         Use uintmax_t, not int, for block sizes.
20775         (human_readable_inexact, block_size_types): Remove.
20776         (block_size_opts): New constant.
20777         (human_options): Renamed from human_block_size, with new signature
20778         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20779         * lib/human.h: Add copyright and authorship notice.
20780         Include <limits.h> and <stdbool.h> unconditionally.
20781         (PARAMS): Remove.  All uses removed.
20782         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20783         (enum human_inexact_style): Remove tag; now a nameless enum.
20784         (human_floor, human_ceiling, human_round_to_even): Now have
20785         values 2, 0, 1 rather than -1, 1, 0.
20786         (human_group_digits, human_suppress_point_zero, human_autoscale,
20787         human_base_1024, human_SI, human_B): New constants.
20788         (human_readable_inexact, human_block_size): Remove.
20789         (human_readable): Size args are now uintmax_t, not int.
20790         (human_options): New decl.
20791
20792         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20793         unnecessary now that we assume C89 or better.  This change
20794         imported from coreutils.
20795
20796         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20797         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20798         in the 2003-05-30 sync from glibc.
20799
20800         .h files should stand alone, but we shouldn't include <sys/types.h>
20801         if we can get away with just <stddef.h>.
20802
20803         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20804         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20805         rather than <sys/types.h>, as we merely need size_t.
20806         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20807         to get size_t.
20808         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20809         Include <stdio.h>, to get FILE.
20810         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20811         memcasecmp.h has included <stddef.h> and all we need is size_t.
20812         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20813         our interface, instead of including <sys/types.h>
20814
20815 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20816
20817         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20818         now, as glibc mktime is buggy on non-glibc systems.
20819
20820 2003-06-03  Karl Berry  <karl@gnu.org>
20821
20822         * config/config.sub: update from prep.
20823
20824 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20825
20826         [from coreutils]
20827         Fix some minor time-related bugs with POSIX time arguments.
20828         Some valid time stamps were being rejected (notably -1, and
20829         time stamps before 1900 on 64-bit hosts).  And some invalid
20830         time stamps were being accepted, e.g. September 31.
20831
20832         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20833         that we can return (time_t) -1 successfully.
20834         * lib/posixtm.c: Likewise.
20835         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20836         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20837         (t): Remove static var.
20838         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20839         of static var.  All uses changed.
20840         (year): Do not reject years before 1900; they can occur with
20841         64-bit time_t.
20842         (posix_time_parse): Do not check for out-of-range components;
20843         that is now the caller's responsibility, since our checks were
20844         only approximations.
20845         (posixtime): Use mktime to check for out-of-range components,
20846         since it knows them exactly.
20847         If mktime returns (time_t) -1, check whether an error actually occurred
20848         by invoking localtime on -1.
20849         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20850         posixtime failures better.
20851         Improve the test data (in comments only).
20852
20853 2003-06-02  Karl Berry  <karl@gnu.org>
20854
20855         * config/mkinstalldirs (version): new variable.
20856         (--version): new option.
20857         (usage): improve message.
20858
20859 2003-05-30  Karl Berry  <karl@gnu.org>
20860
20861         * lib/mktime.c: update from libc.
20862
20863 2003-05-30  Bruno Haible  <bruno@clisp.org>
20864
20865         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20866         * config/config.rpath: Upgrade to gettext-0.12.1.
20867
20868 2003-05-30  Bruno Haible  <bruno@clisp.org>
20869
20870         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20871         * m4/nls.m4: New file, from gettext-0.12.1.
20872         * m4/po.m4: New file, from gettext-0.12.1.
20873         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20874
20875 2003-05-30  Bruno Haible  <bruno@clisp.org>
20876
20877         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20878         * lib/localcharset.h: Likewise.
20879         * lib/localcharset.c: Likewise.
20880
20881 2003-05-29  Karl Berry  <karl@gnu.org>
20882
20883         * config/config.rpath: update from gettext.
20884
20885 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20886
20887         Assume the headers required for C89 freestanding compilers.
20888         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20889         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20890         * m4/human.m4 (gl_HUMAN): Likewise.
20891         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20892         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20893         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20894         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20895         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20896         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20897
20898 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20899
20900         Assume the headers required for C89 freestanding compilers.
20901         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20902         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20903         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20904         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20905         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20906         define, since <limits.h> is guaranteed to do that.
20907         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20908         * lib/exclude.c: Include <stdbool.h> unconditionally.
20909         * lib/tempname.c: Include <stddef.h> unconditionally.
20910         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20911         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20912         <stddef.h> does that.
20913         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20914         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20915         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20916         needed.
20917         * lib/xstrtol.c: Likewise.
20918         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20919         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20920
20921         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20922         warnings on some platforms.
20923
20924         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20925         arbitrarily.
20926
20927 2003-05-26  Jim Meyering  <jim@meyering.net>
20928
20929         Merge in a change from coreutils:
20930         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20931         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20932         that condition, rather than `-1' which is slightly misleading.
20933         Change the name of the cache variable to have the gl_ prefix.
20934         Prompted by a patch from Richard Dawe for DJGPP.
20935
20936 2003-05-24  Karl Berry  <karl@gnu.org>
20937
20938         * config/config.guess: update from prep.
20939
20940 2003-05-22  Karl Berry  <karl@gnu.org>
20941
20942         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20943
20944 2003-05-20  Karl Berry  <karl@gnu.org>
20945
20946         * config/config.guess: update from prep.
20947
20948 2003-05-18  Karl Berry  <karl@gnu.org>
20949
20950         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20951         might actually be set by the user.
20952
20953         * config/depcomp, install-sh, mdate-sh: update from automake.
20954
20955 2003-05-17  Bruno Haible  <bruno@clisp.org>
20956
20957         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20958         invalid expansion for AC_EGREP_CPP.
20959         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20960         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20961         Suggested by Akim Demaille <akim@epita.fr> in
20962         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20963
20964 2003-05-12  Jim Meyering  <jim@meyering.net>
20965
20966         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20967         the space-padded-by-default conversion specifiers, %e, %k, %l.
20968
20969 2003-05-12  Bruno Haible  <bruno@clisp.org>
20970
20971         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20972         the string is longer than 4 KB.
20973
20974 2003-05-11  Karl Berry  <karl@gnu.org>
20975
20976         * config/config.{guess,sub}: update from prep.
20977
20978 2003-05-09  Bruno Haible  <bruno@clisp.org>
20979
20980         * modules/error: Add m4/strerror_r.m4 to file list.
20981
20982 2003-05-03  Bruno Haible  <bruno@clisp.org>
20983
20984         Upgrade to Unicode-4.0.
20985         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20986         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20987         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20988         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20989         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20990         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20991         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20992         Change width of U+E0100..U+E01EF from 1 to 0.
20993
20994 2003-04-25  Jim Meyering  <jim@meyering.net>
20995
20996         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20997         of type size_t, not int.
20998
20999 2003-04-25  Bruno Haible  <bruno@clisp.org>
21000
21001         * lib/copy-file.c: Include <stddef.h>, for size_t.
21002
21003 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21004
21005         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21006         code which expansion is under static control.  Patch imported from
21007         Akim Demaille's patch to Bison; see
21008         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21009
21010 2003-04-14  Bruno Haible  <bruno@clisp.org>
21011
21012         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21013
21014 2003-04-11  Jim Meyering  <jim@meyering.net>
21015
21016         Merge changes from Coreutils.
21017
21018         2003-03-22  Jim Meyering  <jim@meyering.net>
21019
21020         * lib/strftime.c (widen): Cast alloca return value to proper type.
21021
21022         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21023
21024         From GNU libc.
21025         * lib/strftime.c (my_strftime): Handle very large width
21026         specifications for numeric values correctly.  Improve checks for
21027         overflow.
21028
21029         2003-01-19  Jim Meyering  <jim@meyering.net>
21030
21031         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21032         definitions.
21033         (nl_get_alt_digit) [! defined my_strftime]: Define.
21034         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21035         _nl_get_alt_digit and _nl_get_walt_digit.
21036
21037         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21038         libc. These changes have no effect outside of _LIBC.
21039
21040 2003-04-10  Bruno Haible  <bruno@clisp.org>
21041
21042         * modules/findprog: New file.
21043         * MODULES.html.sh (func_all_modules): Add it.
21044
21045 2003-04-10  Bruno Haible  <bruno@clisp.org>
21046
21047         * m4/findprog.m4: New file.
21048         * m4/eaccess.m4: New file.
21049
21050 2003-04-10  Bruno Haible  <bruno@clisp.org>
21051
21052         * lib/findprog.h: New file, from GNU gettext.
21053         * lib/findprog.c: New file, from GNU gettext.
21054
21055 2003-04-05  Jim Meyering  <jim@meyering.net>
21056
21057         Merge changes from Coreutils.
21058
21059         * lib/exclude.h (PARAMS): Remove definition and uses.
21060         * lib/exclude.c: Remove uses of `PARAMS'.
21061
21062         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21063         Add test-cases for DOS filenames. Declare program_name.
21064         (main): Set up program_name.  Patch by Rich Dawe.
21065
21066         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21067         error from mntctl.
21068         Use mntctl's return value to drive the entry-processing loop, since
21069         we can't rely on the value of the vmt_length member in the last
21070         entry.  On some systems doing so could result in exhausting
21071         virtual memory.  Based in part on a patch from Mike Jetzer.
21072
21073 2003-04-04  Bruno Haible  <bruno@clisp.org>
21074
21075         * modules/linebreak: New file.
21076         * MODULES.html.sh (func_all_modules): Add it.
21077
21078 2003-04-04  Bruno Haible  <bruno@clisp.org>
21079
21080         * m4/linebreak.m4: New file.
21081
21082 2003-04-04  Bruno Haible  <bruno@clisp.org>
21083
21084         * lib/linebreak.h: New file, from GNU gettext.
21085         * lib/linebreak.c: New file, from GNU gettext with slight
21086         modifications.
21087         * lib/lbrkprop.h: New file, from GNU gettext.
21088
21089 2003-04-03  Bruno Haible  <bruno@clisp.org>
21090
21091         * modules/utf8-ucs4: New file.
21092         * modules/utf16-ucs4: New file.
21093         * modules/ucs4-utf8: New file.
21094         * modules/ucs4-utf16: New file.
21095         * MODULES.html.sh (func_all_modules): Add them.
21096
21097 2003-04-03  Bruno Haible  <bruno@clisp.org>
21098
21099         * m4/utf-ucs4.m4: New file.
21100         * m4/ucs4-utf.m4: New file.
21101
21102 2003-04-03  Bruno Haible  <bruno@clisp.org>
21103
21104         * lib/utf8-ucs4.h: New file, from GNU gettext.
21105         * lib/utf16-ucs4.h: New file, from GNU gettext.
21106         * lib/ucs4-utf8.h: New file, from GNU gettext.
21107         * lib/ucs4-utf16.h: New file, from GNU gettext.
21108
21109 2003-04-02  Bruno Haible  <bruno@clisp.org>
21110
21111         * modules/binary-io: New file.
21112         * MODULES.html.sh (func_all_modules): Add it.
21113
21114 2003-04-02  Bruno Haible  <bruno@clisp.org>
21115
21116         * lib/binary-io.h: New file, from GNU gettext.
21117
21118 2003-04-01  Bruno Haible  <bruno@clisp.org>
21119
21120         * modules/pathname: New file.
21121         * MODULES.html.sh (func_all_modules): Add it.
21122
21123 2003-04-01  Bruno Haible  <bruno@clisp.org>
21124
21125         * lib/pathname.h: New file, from GNU gettext.
21126         * lib/concatpath.c: New file, from GNU gettext.
21127
21128 2003-03-30  Bruno Haible  <bruno@clisp.org>
21129
21130         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21131
21132 2003-03-30  Bruno Haible  <bruno@clisp.org>
21133
21134         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21135         function chown() doesn't exist.
21136
21137 2003-03-28  Bruno Haible  <bruno@clisp.org>
21138
21139         * modules/copy-file: New file.
21140         * MODULES.html.sh (func_all_modules): Add it.
21141
21142 2003-03-28  Bruno Haible  <bruno@clisp.org>
21143
21144         * m4/copy-file.m4: New file.
21145
21146 2003-03-28  Bruno Haible  <bruno@clisp.org>
21147
21148         * lib/copy-file.h: New file, from GNU gettext.
21149         * lib/copy-file.c: New file, from GNU gettext.
21150
21151 2003-03-18  Jim Meyering  <jim@meyering.net>
21152
21153         * lib/quote.c (quote_n): Fix typo in comment.
21154
21155 2003-03-18  Bruno Haible  <bruno@clisp.org>
21156
21157         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21158         checking.
21159         * m4/onceonly_2_57.m4: Likewise.
21160
21161 2003-03-17  Bruno Haible  <bruno@clisp.org>
21162
21163         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21164         (m4_quote): Remove macro.
21165         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21166
21167 2003-03-14  Jim Meyering  <jim@meyering.net>
21168
21169         Merge changes from Coreutils.
21170         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21171         to be const, in order to avoid warnings.
21172         (obstack_room): Likewise.
21173         (obstack_empty_p): Likewise.
21174
21175 2003-03-14  Bruno Haible  <bruno@clisp.org>
21176
21177         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21178         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21179
21180 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21181
21182         Merge changes from Bison.
21183         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21184         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21185         when compiling Bison 1.875's `bitset bset = obstack_alloc
21186         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21187         * lib/hash.c: Include <stdbool.h> unconditionally.
21188
21189 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21190
21191         * m4/onceonly.m4 (m4_quote): New macro.
21192         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21193         Quote AC_FOREACH variable-expansions properly.
21194
21195 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21196
21197         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21198
21199 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21200
21201         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21202         Reported by Bruce Becker; see:
21203         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21204
21205 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21206             Bruno Haible  <bruno@clisp.org>
21207
21208         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21209         Reported by John Hughes, see
21210         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21211
21212 2003-02-20  Bruno Haible  <bruno@clisp.org>
21213
21214         * MODULES.html.sh (func_all_modules): Add poll.
21215
21216 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21217
21218         * modules/poll: New file.
21219
21220 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21221
21222         * lib/poll_.h: New file.
21223         * lib/poll.c: New file.
21224
21225 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21226
21227         * m4/poll.m4: New file.
21228
21229 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21230
21231         * modules/mathl: New file.
21232
21233 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21234
21235         * lib/mathl.h: New file.
21236         * lib/acosl.c: New file.
21237         * lib/asinl.c: New file.
21238         * lib/atanl.c: New file.
21239         * lib/ceill.c: New file.
21240         * lib/cosl.c: New file.
21241         * lib/expl.c: New file.
21242         * lib/floorl.c: New file.
21243         * lib/frexpl.c: New file.
21244         * lib/ldexpl.c: New file.
21245         * lib/logl.c: New file.
21246         * lib/sincosl.c: New file.
21247         * lib/sinl.c: New file.
21248         * lib/sqrtl.c: New file.
21249         * lib/tanl.c: New file.
21250         * lib/trigl.c: New file.
21251         * lib/trigl.h: New file.
21252
21253 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21254
21255         * m4/mathl.m4: New file.
21256
21257 2003-02-18  Bruno Haible  <bruno@clisp.org>
21258
21259         * MODULES.html.sh (func_all_modules): Add mathl.
21260
21261 2003-02-17  Bruno Haible  <bruno@clisp.org>
21262
21263         * modules/mkdtemp: New module.
21264         * MODULES.html.sh (func_all_modules): Add it.
21265
21266 2003-02-17  Bruno Haible  <bruno@clisp.org>
21267
21268         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21269
21270 2003-02-17  Bruno Haible  <bruno@clisp.org>
21271
21272         * lib/mkdtemp.h: New file, from GNU gettext.
21273         * lib/mkdtemp.c: New file, from GNU gettext.
21274
21275 2003-02-02  Jim Meyering  <jim@meyering.net>
21276
21277         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21278         e.g. glibc-2.2.93.
21279
21280 2003-01-31  Bruno Haible  <bruno@clisp.org>
21281
21282         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21283         'rpl_rename'.
21284         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21285         'rpl_strnlen'.
21286         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21287         'rpl_strtod'.
21288         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21289         'rpl_utime'.
21290
21291 2003-01-31  Bruno Haible  <bruno@clisp.org>
21292
21293         * lib/rename.c: #undef rename before defining rpl_rename.
21294         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21295
21296 2003-01-30  Bruno Haible  <bruno@clisp.org>
21297
21298         * modules/vasnprintf, modules/vasprintf: New modules.
21299         * MODULES.html.sh (func_all_modules): Add them.
21300
21301 2003-01-30  Bruno Haible  <bruno@clisp.org>
21302
21303         * m4/signed.m4: New file, from GNU gettext.
21304         * m4/longdouble.m4: New file, from GNU gettext.
21305         * m4/wchar_t.m4: New file, from GNU gettext.
21306         * m4/wint_t.m4: New file, from GNU gettext.
21307         * m4/vasnprintf.m4: New file.
21308         * m4/vasprintf.m4: New file.
21309
21310 2003-01-30  Bruno Haible  <bruno@clisp.org>
21311
21312         * lib/printf-args.h: New file, from GNU gettext.
21313         * lib/printf-args.c: New file, from GNU gettext.
21314         * lib/printf-parse.h: New file, from GNU gettext.
21315         * lib/printf-parse.c: New file, from GNU gettext.
21316         * lib/vasnprintf.h: New file, from GNU gettext.
21317         * lib/vasnprintf.c: New file, from GNU gettext.
21318         * lib/asnprintf.c: New file, from GNU gettext.
21319         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21320         * lib/vasprintf.c: New file, from GNU gettext.
21321         * lib/asprintf.c: New file, from GNU gettext.
21322
21323 2003-01-29  Bruno Haible  <bruno@clisp.org>
21324
21325         * modules/stpncpy: New module.
21326         * MODULES.html.sh (func_all_modules): Add it.
21327
21328 2003-01-29  Bruno Haible  <bruno@clisp.org>
21329
21330         * m4/stpncpy.m4: New file.
21331
21332 2003-01-29  Bruno Haible  <bruno@clisp.org>
21333
21334         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21335         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21336
21337 2003-01-28  Bruno Haible  <bruno@clisp.org>
21338
21339         * modules/c-ctype: New module.
21340         * MODULES.html.sh (func_all_modules): Add it.
21341
21342 2003-01-28  Bruno Haible  <bruno@clisp.org>
21343
21344         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21345         Paul Eggert.
21346         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21347         Paul Eggert.
21348
21349 2003-01-27  Bruno Haible  <bruno@clisp.org>
21350
21351         * modules/xsetenv: New module.
21352         * MODULES.html.sh (func_all_modules): Add it.
21353
21354 2003-01-27  Bruno Haible  <bruno@clisp.org>
21355
21356         * lib/xsetenv.h: New file, from GNU gettext.
21357         * lib/xsetenv.c: New file, from GNU gettext.
21358
21359 2003-01-23  Jim Meyering  <jim@meyering.net>
21360
21361         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21362         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21363
21364 2003-01-23  Bruno Haible  <bruno@clisp.org>
21365
21366         * modules/minmax: New module.
21367         * MODULES.html.sh (func_all_modules): Add it.
21368
21369 2003-01-23  Bruno Haible  <bruno@clisp.org>
21370
21371         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21372         Eggert.
21373
21374 2003-01-22  Bruno Haible  <bruno@clisp.org>
21375
21376         * modules/exit: New module.
21377         * MODULES.html.sh (func_all_modules): Add it.
21378
21379 2003-01-22  Bruno Haible  <bruno@clisp.org>
21380
21381         * lib/exit.h: New file, from GNU gettext.
21382
21383 2003-01-19  Bruno Haible  <bruno@clisp.org>
21384
21385         * gnulib-tool: Recognize option --extract-maintainer.
21386         (func_get_maintainer): New function.
21387         * modules/*: Add Maintainer entry.
21388
21389 2003-01-16  Jim Meyering  <jim@meyering.net>
21390
21391         * m4/regex.m4: The `regex' struct is both input and output.
21392         Initialize it before each use.  Patch by Tim Waugh.
21393
21394 2003-01-16  Bruno Haible  <bruno@clisp.org>
21395
21396         * MODULES.html.sh: Add a table of contents. Add the module name as
21397         leftmost column. Add hyperlinks.
21398
21399 2003-01-15  Bruno Haible  <bruno@clisp.org>
21400
21401         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21402
21403 2003-01-15  Bruno Haible  <bruno@clisp.org>
21404
21405         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21406         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21407         suffix.
21408
21409 2003-01-15  Bruno Haible  <bruno@clisp.org>
21410
21411         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21412
21413 2003-01-15  Bruno Haible  <bruno@clisp.org>
21414
21415         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21416         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21417
21418 2003-01-14  Jim Meyering  <jim@meyering.net>
21419
21420         * lib/same.c (same_name): Tweak a comment.
21421
21422 2003-01-14  Bruno Haible  <bruno@clisp.org>
21423
21424         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21425         when a string comparison is sufficient.
21426
21427 2003-01-14  Bruno Haible  <bruno@clisp.org>
21428
21429         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21430         'unsigned int'.
21431
21432 2003-01-14  Bruno Haible  <bruno@clisp.org>
21433
21434         * lib/hash-pjw.c: Add comment about low quality of this function.
21435
21436 2003-01-13  Bruno Haible  <bruno@clisp.org>
21437
21438         * modules/stpcpy: Distribute lib/stpcpy.h.
21439         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21440
21441 2003-01-13  Bruno Haible  <bruno@clisp.org>
21442
21443         * modules/*: Add a description.
21444         * modules/strpbrk: Fix Makefile.am snippet.
21445         * modules/strtoimax: Fix dependencies.
21446         * modules/strtoumax: Likewise.
21447
21448 2003-01-13  Bruno Haible  <bruno@clisp.org>
21449
21450         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21451         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21452         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21453
21454 2003-01-13  Bruno Haible  <bruno@clisp.org>
21455
21456         * gnulib-tool (func_create_testdir): Store config/* files in the main
21457         directory.
21458         * config.rpath: Move to ...
21459         * config/config.rpath: ... here.
21460         * modules/gettext: Contains config/config.rpath, not config.rpath.
21461         * modules/iconv: Likewise.
21462
21463 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21464
21465         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21466         to avoid collisions with libcurses and libreadline.
21467
21468         * m4/getstr.m4: Remove.
21469         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21470
21471 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21472
21473         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21474         to avoid collisions with libcurses and libreadline.
21475
21476         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21477         * lib/getstr.h, getstr.c: Remove.
21478         * lib/getline.c: Include "getline.h", to check interface.
21479         Move body of old getstr.c here: this defines MIN_CHUNK and
21480         declares getdelim2, which is renamed from getstr.
21481         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21482
21483         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21484         All uses changed.
21485         * lib/linebuffer.h: Likewise.
21486         (readline): Remove backward-compatibility macro.
21487
21488 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21489
21490         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21491         to avoid collisions with libcurses and libreadline.
21492         * getstr: Remove.
21493         * MODULES.html.sh: Remove getstr.
21494         * modules/getline: Depend on unlocked-io, not getstr.
21495
21496 2003-01-12  Jim Meyering  <jim@meyering.net>
21497
21498         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21499
21500 2003-01-10  Bruno Haible  <bruno@clisp.org>
21501
21502         * modules/alloca: Change Makefile.am requirements. Simplify Include
21503         requirements. Add lib/alloca_.h to file list.
21504
21505 2003-01-10  Bruno Haible  <bruno@clisp.org>
21506
21507         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21508
21509 2003-01-10  Bruno Haible  <bruno@clisp.org>
21510
21511         * lib/alloca_.h: New file.
21512         * lib/getdate.y: Unconditionally include alloca.h.
21513         * lib/makepath.c: Likewise.
21514         * lib/setenv.c: Likewise.
21515         * lib/userspec.c: Likewise.
21516
21517 2003-01-09  Karl Berry  <karl@gnu.org>
21518
21519         * MODULES.html.sh: include `dirname $0` in PATH, to find
21520         gnulib-tool.
21521
21522 2003-01-09  Bruno Haible  <bruno@clisp.org>
21523
21524         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21525         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21526
21527 2003-01-09  Bruno Haible  <bruno@clisp.org>
21528
21529         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21530
21531 2003-01-09  Bruno Haible  <bruno@clisp.org>
21532
21533         * lib/stdbool.h.in: New file.
21534
21535 2003-01-09  Bruno Haible  <bruno@clisp.org>
21536
21537         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21538         * MODULES.html.sh: Likewise.
21539
21540 2003-01-08  Jim Meyering  <jim@meyering.net>
21541
21542         * lib/full-write.c: Undefine and define-away `const' after inclusion
21543         of errno.h, not before.  Suggestion from Bruno Haible.
21544
21545 2003-01-08  Bruno Haible  <bruno@clisp.org>
21546
21547         * modules/full-read: Depend on full-write.
21548
21549 2003-01-08  Bruno Haible  <bruno@clisp.org>
21550
21551         * lib/safe-read.c: Include specification header first, to ensure its
21552         selfcontainedness.
21553         * lib/full-write.c: Likewise.
21554
21555 2003-01-07  Jim Meyering  <jim@meyering.net>
21556
21557         * lib/full-write.c: Rework so that it may serve to define full_read,
21558         too.
21559         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21560
21561 2003-01-07  Bruno Haible  <bruno@clisp.org>
21562
21563         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21564         <inttypes.h>.
21565         * lib/xstrtol.h: Likewise.
21566         * lib/xstrtoimax.c: Likewise.
21567         * lib/xstrtoumax.c: Likewise.
21568         * lib/human.h: Likewise.
21569
21570         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21571         on systems that have <inttypes.h> but not <stdint.h>.
21572
21573 2003-01-07  Bruno Haible  <bruno@clisp.org>
21574
21575         * MODULES.html.sh: Add copyright notice.
21576         (missed_files): Omit CVS directory entries.
21577         (func_module): Make it work with sed-3.02.
21578         * MODULES.txt: Remove file.
21579
21580 2003-01-06  Jim Meyering  <jim@meyering.net>
21581
21582         * lib/version-etc.c: Update year in translatable copyright string.
21583
21584 2003-01-03  Karl Berry  <karl@gnu.org>
21585
21586         * config/config.{guess,sub}: update from prep.
21587
21588 2003-01-02  Karl Berry  <karl@gnu.org>
21589
21590         * doc/COPYING.DOC: belatedly updated to 1.2.
21591
21592 2003-01-01  Karl Berry  <karl@gnu.org>
21593
21594         * gnulib-tool (func_verify_module): report module name $module in
21595         error message, not $1.
21596         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21597         be created, only if it doesn't exist.
21598         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21599
21600 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21601
21602         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21603
21604 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21605
21606         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21607         memcmp if strcoll doesn't work.
21608
21609 2002-12-31  Bruno Haible  <bruno@clisp.org>
21610
21611         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21612         nonempty.
21613
21614 2002-12-31  Bruno Haible  <bruno@clisp.org>
21615
21616         * lib/memcoll.c (STRCOLL): New macro.
21617         (memcoll): Use it.
21618
21619 2002-12-31  Bruno Haible  <bruno@clisp.org>
21620
21621         * lib/localcharset.h: New file.
21622         * lib/localcharset.c: Include it.
21623         * lib/unicodeio.c: Likewise.
21624
21625 2002-12-31  Bruno Haible  <bruno@clisp.org>
21626
21627         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21628         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21629
21630 2002-12-31  Bruno Haible  <bruno@clisp.org>
21631
21632         * lib/getline.h: Include <stddef.h>, for size_t.
21633
21634         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21635         * lib/unicodeio.c: Don't include <stddef.h>.
21636
21637 2002-12-31  Bruno Haible  <bruno@clisp.org>
21638
21639         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21640         HAVE_TM_ZONE.
21641
21642 2002-12-24  Karl Berry  <karl@gnu.org>
21643
21644         * config/config.guess: update from prep.
21645
21646 2002-12-24  Bruno Haible  <bruno@clisp.org>
21647
21648         General infrasructure.
21649         * m4/README: Rewritten.
21650         * m4/onceonly.m4: New file.
21651         * m4/onceonly_2_57.m4: New file.
21652
21653         Module atexit.
21654         * m4/atexit.m4: New file.
21655
21656         Module strtod.
21657         * m4/strtod.m4: New file.
21658
21659         Module strtol.
21660         * m4/strtol.m4: New file.
21661
21662         Module strtoul.
21663         * m4/strtoul.m4: New file.
21664
21665         Module memchr.
21666         * m4/memchr.m4: New file.
21667
21668         Module memcmp.
21669         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21670         (jm_FUNC_MEMCMP): Invoke it.
21671
21672         Module memcpy.
21673         * m4/memcpy.m4: New file.
21674
21675         Module memmove.
21676         * m4/memmove.m4: New file.
21677
21678         Module memset.
21679         * m4/memset.m4: New file.
21680
21681         Module strcspn.
21682         * m4/strcspn.m4: New file.
21683
21684         Module strpbrk.
21685         * m4/strpbrk.m4: New file.
21686
21687         Module strstr.
21688         * m4/strstr.m4: New file.
21689
21690         Module strerror.
21691         * m4/strerror.m4: New file.
21692
21693         Module mktime.
21694         * m4/mktime.m4: Renamed from jm-mktime.m4.
21695         (gl_PREREQ_MKTIME): New macro.
21696         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21697
21698         Module malloc.
21699         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21700         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21701         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21702
21703         Module realloc.
21704         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21705         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21706         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21707
21708         Module strftime.
21709         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21710         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21711         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21712         gl_TM_GMTOFF.
21713         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21714
21715         Module xalloc.
21716         * m4/xalloc.m4: New file.
21717
21718         Module alloca.
21719         * m4/alloca.m4: New file.
21720
21721         Module putenv.
21722         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21723         (jm_FUNC_PUTENV): Invoke it.
21724
21725         Module setenv.
21726         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21727         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21728         when invoked twice.
21729         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21730         gt_FUNC_SETENV.
21731
21732         Module memrchr.
21733         * m4/memrchr.m4: New file.
21734
21735         Module stpcpy.
21736         * m4/stpcpy.m4: New file.
21737
21738         Module strcase.
21739         * m4/strcase.m4: New file.
21740
21741         Module strdup.
21742         * m4/strdup.m4: New file.
21743
21744         Module strnlen.
21745         * m4/strnlen.m4: New file.
21746
21747         Module strndup.
21748         * m4/strndup.m4: New file.
21749
21750         Module xstrtod.
21751         * m4/xstrtod.m4: New file.
21752
21753         Module xstrtol.
21754         * m4/xstrtol.m4: New file.
21755
21756         Module getdate.
21757         * m4/getdate.m4: New file.
21758
21759         Module unlocked-io.
21760         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21761         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21762         * m4/jm-glibc-io.m4n: Remove file.
21763
21764         Module long-options.
21765         * m4/long-options.m4: New file.
21766
21767         Module md5.
21768         * m4/md5.m4: New file.
21769
21770         Module sha.
21771         * m4/sha.m4: New file.
21772
21773         Module getstr.
21774         * m4/getstr.m4: New file.
21775
21776         Module getline.
21777         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21778         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21779         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21780         simply getline. Infoke gl_PREREQ_GETLINE.
21781
21782         Module obstack.
21783         * m4/obstack.m4: New file.
21784
21785         Module hash.
21786         * m4/hash.m4: New file.
21787
21788         Module readtokens.
21789         * m4/readtokens.m4: New file.
21790
21791         Module strverscmp.
21792         * m4/strverscmp.m4: New file.
21793
21794         Module stdbool.
21795         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21796         OSF/1.
21797
21798         Module strtoll.
21799         * m4/strtoll.m4: New file.
21800
21801         Module strtoull.
21802         * m4/strtoull.m4: New file.
21803
21804         Module strtoimax.
21805         * m4/strtoimax.m4: New file.
21806
21807         Module strtoumax.
21808         * m4/strtoumax.m4: New file.
21809
21810         Module xstrtoimax.
21811         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21812         jm_AC_PREREQ_XSTRTOIMAX.
21813         Moved the strtol prerequisites to strtol.m4.
21814         Moved the strtoll prerequisites to strtoll.m4.
21815         Moved the strtoimax prerequisites to strtoimax.m4.
21816
21817         Module xstrtoumax.
21818         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21819         jm_AC_PREREQ_XSTRTOUMAX.
21820         Moved the strtoul prerequisites to strtoul.m4.
21821         Moved the strtoull prerequisites to strtoull.m4.
21822         Moved the strtoumax prerequisites to strtoumax.m4.
21823
21824         Module chown.
21825         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21826         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21827
21828         Module dup2.
21829         * m4/dup2.m4: New file.
21830
21831         Module ftruncate.
21832         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21833         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21834
21835         Module getgroups.
21836         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21837         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21838
21839         Module gettimeofday.
21840         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21841         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21842         gl_PREREQ_GETTIMEOFDAY.
21843
21844         Module mkdir.
21845         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21846         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21847
21848         Module mkstemp.
21849         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21850         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21851         jm_AC_TYPE_UINTMAX_T.
21852         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21853
21854         Module stat.
21855         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21856         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21857
21858         Module lstat.
21859         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21860         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21861
21862         Module timespec.
21863         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21864         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21865         * m4/st_mtim.m4: Indentation.
21866
21867         Module nanosleep.
21868         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21869         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21870         gl_PREREQ_NANOSLEEP.
21871
21872         Module regex.
21873         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21874         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21875         (gl_REGEX): New macro.
21876
21877         Module rename.
21878         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21879         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21880
21881         Module rmdir.
21882         * m4/rmdir.m4: New file.
21883
21884         Module utime.
21885         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21886         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21887         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21888
21889         Module dirname.
21890         * m4/dirname.m4: New file.
21891
21892         Module getopt.
21893         * m4/getopt.m4: New file.
21894
21895         Module unistd-safer.
21896         * m4/unistd-safer.m4: New file.
21897
21898         Module fnmatch.
21899         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21900         declaration.
21901         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21902         (gl_FUNC_FNMATCH_POSIX): New macro.
21903         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21904         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21905         simply fnmatch.
21906
21907         Module exclude.
21908         * m4/exclude.m4: New file.
21909
21910         Module human.
21911         * m4/human.m4: New file.
21912
21913         Module acl.
21914         * m4/acl.m4: Nop.
21915
21916         Module backupfile.
21917         * m4/backupfile.m4: New file.
21918         * m4/d-ino.m4: Indentation.
21919
21920         Module fsusage.
21921         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21922         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21923         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21924
21925         Module dirfd.
21926         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21927         requirements.
21928
21929         Module euidaccess.
21930         * m4/euidaccess.m4: New file.
21931
21932         Module file-type.
21933         * m4/file-type.m4: New file.
21934
21935         Module fileblocks.
21936         * m4/fileblocks.m4: New file.
21937
21938         Module filemode.
21939         * m4/filemode.m4: New file.
21940
21941         Module isdir.
21942         * m4/isdir.m4: New file.
21943
21944         Module lchown.
21945         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21946         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21947
21948         Module makepath.
21949         * m4/makepath.m4: New file.
21950
21951         Module modechange.
21952         * m4/modechange.m4: New file.
21953
21954         Module mountlist.
21955         * m4/mountlist.m4: New file.
21956         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21957         Indentation.
21958
21959         Module path-concat.
21960         * m4/path-concat.m4: New file.
21961
21962         Module pathmax.
21963         * m4/pathmax.m4: New file.
21964
21965         Module same.
21966         * m4/same.m4: New file.
21967
21968         Module save-cwd.
21969         * m4/save-cwd.m4: New file.
21970
21971         Module savedir.
21972         * m4/savedir.m4: New file.
21973
21974         Module xgetcwd.
21975         * m4/xgetcwd.m4: New file.
21976         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21977
21978         Module xreadlink.
21979         * m4/xreadlink.m4: New file.
21980
21981         Module safe-read.
21982         * m4/safe-read.m4: New file.
21983
21984         Module safe-write.
21985         * m4/safe-write.m4: New file.
21986
21987         Module closeout.
21988         * m4/closeout.m4: New file.
21989
21990         Module stdio-safer.
21991         * m4/stdio-safer.m4: New file.
21992
21993         Module getpass.
21994         * m4/getpass.m4: New file.
21995
21996         Module getugroups.
21997         * m4/getugroups.m4: New file.
21998
21999         Module group-member.
22000         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22001         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22002
22003         Module idcache.
22004         * m4/idcache.m4: New file.
22005
22006         Module userspec.
22007         * m4/userspec.m4: New file.
22008
22009         Module gettime.
22010         * m4/clock_time.m4: New file.
22011         * m4/gettime.m4: New file.
22012
22013         Module settime.
22014         * m4/settime.m4: New file.
22015
22016         Module posixtm.
22017         * m4/posixtm.m4: New file.
22018
22019         Module gethostname.
22020         * m4/gethostname.m4: New file.
22021
22022         Module canon-host.
22023         * m4/canon-host.m4: New file.
22024
22025         Module gettext.
22026         * m4/codeset.m4: New file, from gettext-0.11.5.
22027         * m4/gettext.m4: New file, from gettext-0.11.5.
22028         * m4/glibc21.m4: New file, from gettext-0.11.5.
22029         * m4/iconv.m4: New file, from gettext-0.11.5.
22030         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22031         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22032         * m4/inttypes.m4: New file, from gettext-0.11.5.
22033         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22034         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22035         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22036         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22037         * m4/lib-link.m4: New file, from gettext-0.11.5.
22038         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22039         * m4/progtest.m4: New file, from gettext-0.11.5.
22040         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22041         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22042         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22043
22044         Module localcharset.
22045         * m4/localcharset.m4: New file.
22046
22047         Module hard-locale.
22048         * m4/hard-locale.m4: New file.
22049
22050         Module mbswidth.
22051         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22052         onceonly macros.
22053         * m4/mbrtowc.m4: Add comment.
22054
22055         Module memcasecmp.
22056         * m4/memcasecmp.m4: New file.
22057
22058         Module memcoll.
22059         * m4/memcoll.m4: New file.
22060
22061         Module unicodeio.
22062         * m4/unicodeio.m4: New file.
22063
22064         Module rpmatch.
22065         * m4/rpmatch.m4: New file.
22066
22067         Module yesno.
22068         * m4/yesno.m4: New file.
22069
22070         Module exitfail.
22071         * m4/exitfail.m4: New file.
22072
22073         Module c-stack.
22074         * m4/c-stack.m4 (gl_C_STACK): New macro.
22075         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22076
22077         Module error.
22078         * m4/error.m4 (gl_ERROR): New macro.
22079         (jm_PREREQ_ERROR): Use onceonly macros.
22080
22081         Module fatal.
22082         * m4/fatal.m4: New file.
22083
22084         Module getloadavg.
22085         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22086         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22087
22088         Module getpagesize.
22089         * m4/getpagesize.m4: New file.
22090
22091         Module getusershell.
22092         * m4/getusershell.m4: New file.
22093
22094         Module physmem.
22095         * m4/physmem.m4: New file.
22096
22097         Module posixver.
22098         * m4/posixver.m4: New file.
22099
22100         Module quotearg.
22101         * m4/quotearg.m4: New file.
22102
22103         Module quote.
22104         * m4/quote.m4: New file.
22105
22106         Module readutmp.
22107         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22108
22109         Module sig2str.
22110         * m4/sig2str.m4: New file.
22111
22112         Other.
22113         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22114         ulonglong.m4.
22115         * m4/intmax_t.m4: New file.
22116         * m4/d-type.m4: Indentation.
22117         * m4/jm-macros.m4: Update.
22118         * m4/prereq.m4 (jm_PREREQ): Update.
22119         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22120         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22121         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22122         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22123         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22124         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22125         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22126         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22127         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22128         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22129         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22130         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22131         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22132         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22133         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22134         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22135         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22136         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22137         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22138
22139 2002-12-24  Bruno Haible  <bruno@clisp.org>
22140
22141         * MODULES.txt: Update according to m4/ changes.
22142
22143         Module gettext.
22144         * config.rpath: New file, from gettext-0.11.5.
22145
22146         * modules/*: New module descriptions.
22147         * gnulib-tool: New file.
22148         * MODULES.html.sh: New file.
22149
22150 2002-12-21  Karl Berry  <karl@gnu.org>
22151
22152         * doc/fdl.texi: update to version 1.2.
22153
22154 2002-12-19  Karl Berry  <karl@gnu.org>
22155
22156         * config/config.guess: update from prep.
22157
22158 2002-12-18  Bruno Haible  <bruno@clisp.org>
22159
22160         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22161         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22162
22163 2002-12-17  Bruno Haible  <bruno@clisp.org>
22164
22165         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22166         stdlib.h, string.h.
22167
22168 2002-12-17  Bruno Haible  <bruno@clisp.org>
22169
22170         * lib/canon-host.c (strdup): Remove unused declaration.
22171
22172         * lib/fsusage.c: Include full_read.h.
22173         (get_fs_usage): Use full_read instead of safe_read.
22174
22175         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22176
22177 2002-12-12  Karl Berry  <karl@gnu.org>
22178
22179         * config/config.guess: update from prep.
22180
22181 2002-12-11  Bruno Haible  <bruno@clisp.org>
22182
22183         * m4/setenv.m4: New file, from gettext-0.11.5.
22184
22185 2002-12-11  Bruno Haible  <bruno@clisp.org>
22186
22187         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22188         not unsetenv().
22189         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22190         modifications:
22191
22192         2002-12-11  Bruno Haible  <bruno@clisp.org>
22193
22194                 * setenv.c (alloca): Fall back to malloc.
22195                 (freea): New macro.
22196                 (setenv): Use freea() to free memory allocated with alloca().
22197
22198         2002-11-13  Bruno Haible  <bruno@clisp.org>
22199
22200                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22201                 function declarations.
22202                 * unsetenv.c (unsetenv): Likewise.
22203
22204         2002-03-04  Bruno Haible  <bruno@clisp.org>
22205
22206                 Portability to AIX 4.3.3.
22207                 * unsetenv.c: New file, extracted from setenv.c.
22208                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22209
22210         2001-12-20  Bruno Haible  <bruno@clisp.org>
22211
22212                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22213                 use malloc instead. For SunOS 4.
22214
22215         2001-12-11  Bruno Haible  <bruno@clisp.org>
22216
22217                 * setenv.c: Declare alloca.
22218                 (compar_fn_t): New typedef.
22219                 (KNOWN_VALUE, STORE_VALUE): Use it.
22220
22221         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22222         setenv.h.
22223
22224 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22225
22226         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22227         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22228         Choose values that are less likely to collide with system fnmatch
22229         options.
22230         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22231         defined (e.g., a pure POSIX system).
22232         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22233         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22234
22235 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22236
22237         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22238         a pain in practice to deal with generated m4 files.  This change
22239         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22240
22241         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22242         and jm-glibc-io.m4, as they are no longer a special case.
22243         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22244         kludge and the auto-generation stuff.  Check only whether the
22245         functions are declared, not whether they exist, since older hosts
22246         that don't declare the functions can't use the optimization anyway.
22247
22248 2002-12-06  Jim Meyering  <jim@meyering.net>
22249
22250         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22251
22252         Merge in changes from libc's misc/error.c, in preparation
22253         for the merge of gnulib's changes back into libc.
22254
22255         * lib/error.c (_): Define only if not already defined.
22256         Move definition to follow all #include directives.
22257         Include unlocked-io.h only if !_LIBC.
22258         [_LIBC]: Include <libio/libioP.h>.
22259         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22260         (fflush): Tweak definition to use INTUSE.
22261         (putc): Define.
22262
22263 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22264
22265         * lib/alloca.c [defined emacs]: Include "lisp.h".
22266         (xalloc_die) [defined emacs]: New macro.
22267         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22268         [! defined emacs]: Include <xalloc.h>.
22269         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22270         (pointer): Typedef to POINTER_TYPE *.
22271         (malloc): Remove decl; we now always use xmalloc.
22272         (alloca): Use old-style definition, since Emacs needs this.
22273         Check for arithmetic overflow when computing combined size.
22274
22275 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22276
22277         Do not generate unlocked-io.h automatically, since it's easier to
22278         maintain it by hand.
22279
22280         * lib/unlocked-io.h: New file, from GNU diffutils,
22281         but with proper copyright notice and attribution.
22282         * lib/gen-uio: Remove.
22283         * lib/Makefile.am: Add copyright notice.
22284         (libfetish_a_SOURCES): Add unlocked-io.h.
22285         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22286         (DISTCLEANFILES, io_functions): Remove macros.
22287         (EXTRA_DIST): Remove gen_uio.
22288         (unlocked-io.h): Remove rule.
22289
22290 2002-12-04  Jim Meyering  <jim@meyering.net>
22291
22292         Reflect the fact that stat.c and lstat.c are no longer generated.
22293         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22294         (DISTCLEANFILES): Likewise.
22295         (EXTRA_DIST): Likewise.
22296         (all_local): Don't depend on stat.c or lstat.c.
22297         (stat.c, lstat.c): Remove rules.
22298         (EXTRA_DIST): Remove xstat.in.
22299
22300         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22301         * lib/stat.c: New file.  Contents mostly from xstat.in.
22302         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22303         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22304
22305         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22306         too.
22307         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22308
22309 2002-12-03  Jim Meyering  <jim@meyering.net>
22310
22311         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22312         but not semantics, to minimize the differences between these two files.
22313         (safe_read): Change comment to mention SAFE_READ_ERROR.
22314
22315         * lib/safe-read.c (IS_EINTR): Define.
22316         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22317
22318 2002-12-02  Jim Meyering  <jim@meyering.net>
22319
22320         * lib/safe-read.c (EINTR): Define.
22321         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22322         (INT_MAX): Provide fallback.
22323         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22324
22325         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22326
22327 2002-12-02  Bruno Haible  <bruno@clisp.org>
22328
22329         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22330         Define, taken from safe-read.c.
22331         (INT_MAX): Provide fallback.
22332         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22333         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22334
22335         * lib/safe-read.c (EINTR): Remove definition.
22336         (safe_read): Don't use EINTR if it is absent.
22337
22338 2002-12-01  Jim Meyering  <jim@meyering.net>
22339
22340         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22341         zero.
22342         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22343
22344 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22345
22346         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22347         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22348         with `if (! (value < limit)) abort ();', for readability.
22349
22350 2002-11-26  Karl Berry  <karl@gnu.org>
22351
22352         * lib/strdup.c: copy from libc again, with jim's ok.
22353         * lib/.cppi-disable: re-add strdup.c
22354
22355 2002-11-25  Karl Berry  <karl@gnu.org>
22356
22357         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22358         instead of "strtol.c".
22359
22360 2002-11-25  Karl Berry  <karl@gnu.org>
22361
22362         * config/install-sh: update from automake for variable quoting, $0 in
22363         error msgs, etc.
22364
22365         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22366         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22367         entry.
22368
22369 2002-11-25  Jim Meyering  <jim@meyering.net>
22370
22371         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22372
22373 2002-11-24  Karl Berry  <karl@gnu.org>
22374
22375         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22376         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22377
22378 2002-11-24  Jim Meyering  <jim@meyering.net>
22379
22380         Update from coreutils:
22381
22382         * lib/mktime.c: Merge in changes from libc.
22383
22384         Avoid a link-time failure on some Linux systems.
22385         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22386         (otherwise).
22387         (__mon_yday): Declare with the STATIC attribute.
22388         (__mktime_internal): Likewise.
22389         Based on a report from Greg Schafer.
22390
22391 2002-11-23  Jim Meyering  <jim@meyering.net>
22392
22393         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22394         Use `unsigned', not `int', as type of index.
22395
22396         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22397
22398         * lib/fsusage.c: Remove unneeded parentheses around operands of
22399         `defined'.
22400
22401 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22402
22403         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22404         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22405         so that we can be included first.
22406         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22407         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22408         No need to include stddef.h or sys/types.h any more.
22409         Surround local include files with "", not "<>".
22410         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22411         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22412         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22413         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22414         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22415         (ISPRINT): Remove; no longer needed now that we assume C89.
22416
22417         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22418         Preserve errno.
22419
22420         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22421         quotearg_char): Use SIZE_MAX rather than
22422         (size_t) -1 when we are talking about "infinity".
22423
22424         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22425
22426 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22427
22428         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22429         hint that one should use `if (! x) abort ();' rather than `assert
22430         (x);', and anyway it's one less thing to worry about configuring.
22431         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22432         hash_rehash, hash_insert): Use abort rather than assert.
22433
22434 2002-11-22  Bruno Haible  <bruno@clisp.org>
22435
22436         * lib/safe-read.h: Assume C89. Add comments.
22437         (safe_read): Change return type to size_t.
22438         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22439         byte counts > SSIZE_MAX correctly.
22440         * lib/safe-write.h: New file.
22441         * lib/safe-write.c: New file.
22442         * lib/full-read.h: New file.
22443         * lib/full-read.c: New file.
22444         * lib/full-write.h: Assume C89. Add comments.
22445         * lib/full-write.c: Include safe-write.h.
22446         (full_write): Rewritten to use safe_write.
22447         Suggested by Jim Meyering and Paul Eggert.
22448
22449 2002-11-21  Jim Meyering  <jim@meyering.net>
22450
22451         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22452
22453         Merge in changes from the coreutils.
22454
22455         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22456         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22457         <stdint.h>.
22458         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22459         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22460         int.  Work more efficiently if X is the same width as uintmax_t.
22461         Do not compare X to -1, to avoid bogus compiler warning.
22462         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22463         Don't assume that f_frsize and f_bsize are the same type.
22464
22465         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22466         warning on FreeBSD.
22467
22468         * lib/makepath.c (make_path): Restore umask *before* creating the final
22469         component.
22470         (make_path): Minor reformatting.
22471
22472         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22473         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22474         HAVE_MALLOC/HAVE_REALLOC.
22475
22476         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22477         dummy ones.  At least on GNU/Linux systems, `auto' means something
22478         else.
22479         From Michael Stone.
22480
22481 2002-11-21  Bruno Haible  <bruno@clisp.org>
22482
22483         Remove case insensitive option matching.
22484         * lib/argmatch.h (argcasematch): Remove declaration.
22485         (ARGCASEMATCH): Remove macro.
22486         (__xargmatch_internal): Remove case_sensitive argument.
22487         (XARGMATCH): Update.
22488         (XARGCASEMATCH): Remove macro.
22489         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22490         case_sensitive argument.
22491         (argcasematch): Remove function.
22492         (__xargmatch_internal): Remove case_sensitive argument.
22493         (main): Use XARGMATCH instead of XARGCASEMATCH.
22494
22495         * lib/xmalloc.c: Change compile-time error message. Add comment about
22496         required autoconf version.
22497
22498 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22499
22500         Merge argmatch cleanups from Bison.  Assume C89.
22501
22502         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22503         Include stdlib.h, for EXIT_FAILURE.
22504         Always include <string.h>, since we assume C89.
22505         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22506         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22507         Include <stddef.h> instead, since it's all we need for size_t.
22508         (PARAMS): Remove.  All uses removed.
22509         (ARRAY_CARDINALITY): Do not bother to #undef.
22510         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22511         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22512         Remove unnecessary parentheses.
22513         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22514         Insert necessary parentheses.
22515         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22516         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22517
22518 2002-11-19  Bruno Haible  <bruno@clisp.org>
22519
22520         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22521         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22522
22523         * lib/mbswidth.h (PARAMS): Remove macro.
22524         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22525         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22526
22527         * lib/gcd.h (PARAMS): Remove macro.
22528         (gcd): Use ANSI C function declarations.
22529         * lib/gcd.c (gcd): Likewise.
22530
22531 2002-11-15  Bruno Haible  <bruno@clisp.org>
22532
22533         * lib/strcspn.c: Include <stddef.h>.
22534         (strcspn): Use ANSI C function declaration. Change return type to
22535         size_t. Use NULL.
22536         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22537         (strpbrk): Use NULL.
22538         * lib/strpbrk.h (PARAMS): Remove macro.
22539         (strpbrk): Use ANSI C function declaration.
22540         * lib/strstr.c: Don't include <sys/types.h>.
22541         * lib/strstr.h (PARAMS): Remove macro.
22542         (strstr): Use ANSI C function declarations.
22543
22544 2002-11-14  Karl Berry  <karl@gnu.org>
22545
22546         * config/mkinstalldirs: `do' on separate line, instead of
22547         `for var; do'.
22548
22549 2002-11-06  Bruno Haible  <bruno@clisp.org>
22550
22551         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22552         * lib/gcd.c (gcd): Likewise.
22553
22554 2002-11-05  Bruno Haible  <bruno@clisp.org>
22555
22556         * lib/gcd.h: New file, from gettext-0.11.5.
22557         * lib/gcd.c: New file, from gettext-0.11.5.
22558
22559 2002-11-05  Bruno Haible  <bruno@clisp.org>
22560
22561         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22562         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22563         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22564         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22565
22566         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22567         <libintl.h>.
22568         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22569         <libintl.h>.
22570
22571         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22572         * lib/human.c: Include gettext.h instead of <libintl.h>.
22573         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22574         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22575         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22576         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22577         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22578         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22579         (textdomain): Remove definition.
22580         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22581
22582         * lib/long-options.c: Remove include of <libintl.h> and definition of
22583         _.
22584         * lib/same.c: Remove include of <libintl.h> and definition of _.
22585
22586 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22587
22588         * lib/config.charset: A few additions for Solaris.
22589
22590 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22591
22592         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22593         * lib/localcharset.c (locale_charset): Declare as extern "C".
22594
22595 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22596
22597         * lib/config.charset: msdos in uk_UA uses CP1125.
22598
22599 2002-11-04  Bruno Haible  <bruno@clisp.org>
22600
22601         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22602         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22603         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22604         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22605         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22606
22607 2002-11-04  Bruno Haible  <bruno@clisp.org>
22608
22609         * lib/localcharset.c (locale_charset): Don't return an empty string.
22610
22611 2002-11-04  Bruno Haible  <bruno@clisp.org>
22612
22613         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22614         aliases.
22615
22616 2002-11-04  Bruno Haible  <bruno@clisp.org>
22617
22618         * lib/config.charset: Update for newest glibc. Add canonical names
22619         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22620
22621 2002-11-04  Bruno Haible  <bruno@clisp.org>
22622
22623         * lib/config.charset: Add support for NetBSD.
22624
22625 2002-11-04  Bruno Haible  <bruno@clisp.org>
22626
22627         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22628
22629 2002-11-01  Bruno Haible  <bruno@clisp.org>
22630
22631         * configure.in: Add AC_CONFIG_AUX_DIR call.
22632         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22633         test/Makefile.
22634         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22635
22636 2002-09-28  Karl Berry  <karl@gnu.org>
22637
22638         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22639         installed automake until the next release, since changes have been
22640         made.
22641
22642 2002-09-25  Karl Berry  <karl@gnu.org>
22643
22644         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22645         * lib/getopt*: copy from libc/posix.
22646         * lib/gettext.h: copy from gettext.
22647         * lib/.cppi-disable: add strdup.c, gettext.h.
22648
22649 2002-09-25  Karl Berry  <karl@gnu.org>
22650
22651         * config/srclist.txt: enable gettext.h check.
22652         * config/config.{guess,sub}: update from prep.
22653         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22654                 from automake 1.6.3.
22655         See srclist*.
22656
22657 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22658
22659         * regex.c (PATFETCH): Remove the translating fetch.
22660         (PATFETCH_RAW): Rename to PATFETCH.
22661         (set_image_of_range): New fun.
22662         (SET_RANGE_TABLE_WORK_AREA): Use it.
22663         (regex_compile): Don't translate the pattern chars so eagerly.
22664         Only do it when inserting an `exactn' bytecode or when handling
22665         a char-range.
22666         (mutually_exclusive_p): Avoid empty statement.
22667
22668 2002-07-06  Jim Meyering  <meyering@lucent.com>
22669
22670         * m4/README: Don't mention Makefile.am.in.
22671         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22672
22673 2002-07-01  Jim Meyering  <meyering@lucent.com>
22674
22675         * lib/c-stack.c: Include sys/time.h.
22676         From Volker Borchert.
22677
22678 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22679
22680         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22681
22682 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22683
22684         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22685         New macro.  Use it uniformly instead of
22686         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22687         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22688         reported by Vin Shelton.
22689
22690 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22691
22692         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22693         Do not assume SA_SIGINFO behavior.
22694         Bug reported by Jim Meyering on NetBSD 1.5.2.
22695
22696 2002-06-22  Jim Meyering  <meyering@lucent.com>
22697
22698         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22699         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22700
22701         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22702         now that configure.ac uses AC_GNU_SOURCE.
22703         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22704         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22705
22706         Update to latest tools.  Suggestions from Paul Eggert.
22707         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22708         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22709         * m4/fnmatch.m4: Likewise.
22710         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22711         to AC_HEADER_STDBOOL
22712
22713 2002-06-22  Jim Meyering  <meyering@lucent.com>
22714
22715         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22716         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22717
22718 2002-06-22  Jim Meyering  <meyering@lucent.com>
22719
22720         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22721
22722         * lib/exitfail.c, exitfail.h: Likewise.
22723         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22724
22725         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22726         of fnmatch.h.
22727         (EXTRA_DIST): Add fnmatch_loop.c.
22728         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22729
22730         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22731         * lib/fnmatch.c: Update from diffutils-2.8.2.
22732         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22733         * lib/fnmatch.h: Remove file.
22734
22735 2002-06-21  Jim Meyering  <meyering@lucent.com>
22736
22737         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22738         * m4/mbrtowc.m4: Likewise.
22739
22740         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22741         * m4/mbswidth.m4: Reflect name change:
22742         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22743         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22744
22745         * m4/lib-link.m4: Update from gettext-0.11.2.
22746         * m4/gettext.m4: Likewise.
22747
22748         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22749         From Alfred M. Szmidt.
22750
22751 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22752
22753         * lib/file-type.h: Report an error if neither S_ISREG nor
22754         S_IFREG is defined, instead of using a test specific to glibc
22755         2.2.  This should be safe, since POSIX requires S_ISREG and
22756         Unix Version 7 had S_IFREG.  We don't need to check for
22757         <sys/types.h> since we don't use any symbols that it defines.
22758
22759 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22760
22761         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22762         $@-t, so that each temporary file name is unique and valid in the first
22763         8 characters, for operation under DOS.
22764
22765 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22766
22767         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22768
22769 2002-06-15  Jim Meyering  <meyering@lucent.com>
22770
22771         Work even with DJGPP 2.03, which lacks support for symlinks.
22772         From Richard Dawe.
22773         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22774         is defined.
22775         * lib/lchown.c (S_ISLNK): Likewise.
22776
22777 2002-06-15  Jim Meyering  <meyering@lucent.com>
22778
22779         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22780         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22781         have been included before this file.
22782
22783 2002-06-14  Jim Meyering  <meyering@lucent.com>
22784
22785         * lib/file-type.h: Use the version from diffutils-2.8.2.
22786         * lib/file-type.c: Likewise.
22787
22788 2002-06-07  Jim Meyering  <meyering@lucent.com>
22789
22790         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22791         They're needed at least for NetBSD 1.5.2.
22792         ($statxfs_includes): Include those same headers.
22793         ($statxfs_includes): Include sys/vfs.h if available.
22794         ($statxfs_includes): Likewise for sys/statvfs.h.
22795         Check for the following members in both structs statfs and statvfs:
22796         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22797
22798 2002-06-01  Jim Meyering  <meyering@lucent.com>
22799
22800         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22801         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22802
22803 2002-05-28  Jim Meyering  <meyering@lucent.com>
22804
22805         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22806         Reported by Volker Borchert.
22807
22808 2002-05-27  Jim Meyering  <meyering@lucent.com>
22809
22810         Fix a problem seen only on nonconforming systems whereby ls.c's
22811         use of localtime, and then of gettimeofday would cause trouble:
22812         the localtime call used to initialize rpl_gettimeofday's save
22813         mechanism would clobber ls's current local time information so
22814         that in any long listing the first file would always be listed
22815         with date 1970-01-01.  Analysis by Volker Borchert.
22816
22817         * lib/gettimeofday.c (localtime): Undefine.
22818         (rpl_localtime): New function.
22819
22820 2002-05-27  Jim Meyering  <meyering@lucent.com>
22821
22822         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22823         localtime.
22824
22825         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22826         use the replacement function; it wouldn't resolve at link time.
22827         Reported by Volker Borchert.
22828
22829 2002-05-22  Jim Meyering  <meyering@lucent.com>
22830
22831         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22832         file-type.h.
22833         * lib/file-type.h: New file.
22834         * lib/file-type.c (file_type): New file/function.  Extracted from
22835         diffutils.
22836
22837 2002-04-30  Jim Meyering  <meyering@lucent.com>
22838
22839         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22840
22841 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22842
22843         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22844
22845 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22846
22847         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22848         Do not check for alloca.h (no longer used) or stdbool.h (was never
22849         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22850
22851 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22852
22853         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22854
22855 2002-04-29  Jim Meyering  <meyering@lucent.com>
22856
22857         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22858         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22859         Use AC_FUNC_STRNLEN here instead.
22860
22861         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22862         With autoconf-2.53a, it's part of AC_PROG_CC.
22863
22864 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22865
22866         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22867         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22868
22869 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22870
22871         * lib/sig2str.h, lib/sig2str.c: New files.
22872         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22873
22874 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22875
22876         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22877         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22878         of 127, since 64 is the largest conceivable number for ancient
22879         nonstandard hosts.
22880         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22881
22882 2002-04-28  Jim Meyering  <meyering@lucent.com>
22883
22884         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22885
22886 2002-04-24  Jim Meyering  <meyering@lucent.com>
22887
22888         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22889         (jm_PREREQ): Use it.
22890
22891         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22892         mach/mach.h fcntl.h.
22893         Check for this function: setlocale.
22894
22895 2002-04-24  Jim Meyering  <meyering@lucent.com>
22896
22897         * lib/gettext.h: New file, from Gettext.
22898         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22899         (libfetish_a_SOURCES): Add gettext.h.
22900
22901 2002-04-16  Jim Meyering  <meyering@lucent.com>
22902
22903         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22904         ut_pid, ut_id, ut_exit.
22905
22906 2002-04-16  Jim Meyering  <meyering@lucent.com>
22907
22908         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22909         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22910         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22911
22912 2002-04-12  Jim Meyering  <meyering@lucent.com>
22913
22914         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22915         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22916         existence of the getmntinfo function.  Needed for Darwin 5.3.
22917
22918         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22919         This is necessary at least on Darwin 5.3.
22920
22921         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22922         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22923         strnlen.o in the library, and that makes some versions of ranlib
22924         object.
22925
22926 2002-04-12  Jim Meyering  <meyering@lucent.com>
22927
22928         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22929
22930 2002-04-09  Jim Meyering  <meyering@lucent.com>
22931
22932         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22933         to be more precise.  Rather than saying we're checking whether the
22934         function `works', say what we're testing.
22935         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22936         Reported by Bruno Haible.
22937
22938 2002-03-10  Jim Meyering  <meyering@lucent.com>
22939
22940         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22941         Suggestion from Santiago Vila.
22942
22943 2002-03-08  Jim Meyering  <meyering@lucent.com>
22944
22945         * lib/rename.c: Mention that this wrapper is needed also on
22946         mips-dec-ultrix4.4 systems.
22947
22948 2002-03-02  Jim Meyering  <meyering@lucent.com>
22949
22950         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22951         not HAVE_CLOCK_SETTIME.
22952
22953 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22954
22955         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22956         Check for clock_settime.
22957
22958 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22959
22960         * lib/nanosleep.h: Rename to....
22961         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22962
22963         * lib/gettime.c: New file.
22964         * lib/settime.c: New file.
22965         * lib/stime.c: Remove.
22966
22967         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22968         timespec.h.  Remove nanosleep.h.
22969
22970 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22971
22972         * m4/acl.m4: New file.
22973         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22974         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22975
22976 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22977
22978         * lib/acl.c, lib/acl.h: New files.
22979         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22980
22981 2002-02-24  Jim Meyering  <meyering@lucent.com>
22982
22983         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22984         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22985         cause trouble.  Reported by Nelson Beebe.
22986
22987 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22988
22989         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22990         compilers that don't know that xalloc_die never returns.
22991
22992 2002-02-20  Jim Meyering  <meyering@lucent.com>
22993
22994         * lib/getdate.c: Regenerate using bison-1.33.
22995
22996 2002-02-17  Jim Meyering  <meyering@lucent.com>
22997
22998         * config/config.guess (main): Don't use `head -1'; it's no longer
22999         portable. Use `sed 1q' instead.
23000
23001 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23002
23003         * m4/codeset.m4: Upgrade to gettext-0.11.
23004         * m4/gettext.m4: Upgrade to gettext-0.11.
23005         * m4/glibc21.m4: Upgrade to gettext-0.11.
23006         * m4/iconv.m4: Upgrade to gettext-0.11.
23007         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23008         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23009         * m4/lib-ld.m4: New file, from gettext-0.11.
23010         * m4/lib-link.m4: New file, from gettext-0.11.
23011         * m4/lib-prefix.m4: New file, from gettext-0.11.
23012         * m4/progtest.m4: Upgrade to gettext-0.11.
23013
23014 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23015
23016         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23017         (jm_PREREQ): Use it.
23018
23019 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23020
23021         * lib/posixver.c, lib/posixver.h: New files.
23022         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23023
23024 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23025             Bruno Haible  <bruno@clisp.org>
23026
23027         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23028         (fwrite_success_callback): New declaration.
23029         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23030         print_unicode_char. Call failure callback instead of error.
23031         (fwrite_success_callback): New function.
23032         (exit_failure_callback): New function.
23033         (fallback_failure_callback): New function.
23034         (print_unicode_char): Call unicode_to_mb.
23035
23036 2002-01-26  Jim Meyering  <meyering@lucent.com>
23037
23038         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23039         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23040
23041 2002-01-26  Jim Meyering  <meyering@lucent.com>
23042
23043         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23044
23045 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23046
23047         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23048
23049 2002-01-22  Jim Meyering  <meyering@lucent.com>
23050
23051         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23052         Otherwise, some versions of automake would omit the rule that makes
23053         Makefile from Makefile.in.
23054
23055 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23056
23057         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23058         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23059         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23060         (memcoll): Set errno to zero if there is no error.
23061
23062         * lib/quotearg.c (quotearg_buffer_restyled):
23063         Fix bug with quoting buffers containing NUL when backslashing escapes.
23064         This bug was exposed by the other changes in this patch.
23065         (quotearg_n_options): New arg ARGSIZE.
23066         All callers changed.
23067         (quoting_options_from_style): New function.
23068         (quotearg_n_style): Use it.
23069         (quotearg_n_style_mem): New function.
23070
23071         * lib/quotearg.h (quotearg_n_style_mem): New function.
23072
23073 2002-01-19  Jim Meyering  <meyering@lucent.com>
23074
23075         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23076         Remove useless quotes: DF_PROG="df".
23077         * m4/strnlen.m4: New file.
23078
23079 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23080
23081         * lib/backupfile.c (ISDIGIT): Comment fix.
23082         * lib/getdate.y (ISDIGIT): Likewise.
23083         * lib/posixtm.c (ISDIGIT, year): Likewise.
23084         * lib/strverscmp.c (ISDIGIT): Likewise.
23085         * lib/userspec.c (ISDIGIT): Likewise.
23086
23087 2002-01-16  Jim Meyering  <meyering@lucent.com>
23088
23089         * lib/getdate.y: Add three semicolons, each just before a closing
23090         brace. Bison (as of version 1.31) no longer papers over that mistake.
23091
23092 2002-01-05  Jim Meyering  <meyering@lucent.com>
23093
23094         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23095
23096 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23097
23098         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23099         not silently exit merely because the output buffer happens to
23100         have nothing pending.
23101
23102 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23103
23104         See the big note in ../ChangeLog.
23105         * lib/human.c (suffixes): Prefer K to k for 1024.
23106         (generate_suffix_backwards): New function.
23107         (human_readable_inexact): Use it.
23108         * lib/xstrtol.c (__xstrtol): If there is no number but there
23109         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23110         Accept 'K' as well as 'k'.
23111
23112 2001-12-15  Jim Meyering  <meyering@lucent.com>
23113
23114         * lib/regex.h (__restrict_arr): Update from libc.
23115
23116         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23117         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23118         (STREQ): Define.
23119
23120 2001-12-14  Jim Meyering  <meyering@lucent.com>
23121
23122         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23123         Suggestion from Bruno Haible.
23124
23125 2001-12-10  Jim Meyering  <meyering@lucent.com>
23126
23127         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23128         xrealloc, Instead, include "xalloc.h".
23129         (initbuffer): Don't cast xmalloc return value to char*.
23130         (readline): Reword comment.
23131         Don't cast xrealloc return value to char*
23132         Return NULL, not 0.
23133
23134 2001-12-09  Jim Meyering  <meyering@lucent.com>
23135
23136         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23137         about `signed and unsigned type in conditional expression'.
23138         * lib/posixtm.c (posix_time_parse): Likewise.
23139
23140         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23141
23142         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23143         to avoid a pedantic warning.
23144
23145         * lib/getstr.c: Don't include assert.h.
23146         (getstr): Remove warning-evoking assertions.
23147         Return -1 if offset parameter is out of bounds.
23148         Change the type of a local from int to size_t.
23149
23150         * lib/strftime.c (my_strftime_localtime_r): Include this function
23151         definition in the `#if ! HAVE_TM_GMTOFF' block.
23152
23153         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23154         Include xalloc.h instead.
23155
23156 2001-12-02  Jim Meyering  <meyering@lucent.com>
23157
23158         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23159         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23160         included.
23161
23162         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23163         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23164
23165 2001-11-30  Akim Demaille  <akim@epita.fr>
23166
23167         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23168         before being defined.
23169
23170 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23171
23172         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23173         First arg is int, not unsigned.
23174         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23175         (SIZE_MAX, UINT_MAX): New macros.
23176         (quotearg_n_options): Abort if N is negative.
23177         Avoid overflow check on hosts where size_t is 64 bits and int
23178         is 32 bits, as overflow is impossible there.
23179         Fix off-by-one typo that caused unnecessary reallocation.
23180
23181 2001-11-27  Jim Meyering  <meyering@lucent.com>
23182
23183         * lib/tempname.c: Merge with version from libc.
23184         * lib/regex.c: Likewise.
23185
23186         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23187         systems for which STDC_HEADERS is 0, it was not included, resulting in
23188         a warning about an integer-to-pointer conversion problem with getenv.
23189         Reported by Volker Borchert.
23190
23191 2001-11-26  Jim Meyering  <meyering@lucent.com>
23192
23193         * lib/gtod.h: Remove file.
23194         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23195         * lib/gettimeofday.c: Don't include gtod.h.
23196         (GTOD_init): Remove function.
23197         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23198         Suggestion from Volker Borchert.
23199
23200 2001-11-23  Jim Meyering  <meyering@lucent.com>
23201
23202         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23203         it.
23204         * lib/hash.c (struct hash_table): Define it here instead.
23205
23206 2001-11-22  Jim Meyering  <meyering@lucent.com>
23207
23208         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23209
23210 2001-11-20  Jim Meyering  <meyering@lucent.com>
23211
23212         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23213         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23214
23215 2001-11-19  Jim Meyering  <meyering@lucent.com>
23216
23217         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23218         directory.  Use "conftestXXXXXX" as the template.
23219         Suggestion from Paul Eggert.
23220
23221         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23222         immediately, so the test doesn't mistakenly hit the max-open-files
23223         limit.
23224
23225 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23226
23227         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23228         (TEMPORARIES): New macro.
23229         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23230         removes an artificial limitation (e.g. HP-UX 10.20, where
23231         TMP_MAX is 17576).
23232
23233 2001-11-18  Jim Meyering  <meyering@lucent.com>
23234
23235         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23236
23237 2001-11-18  Jim Meyering  <meyering@lucent.com>
23238
23239         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23240         on SunOS 4.
23241
23242         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23243         files will be created before anything else.
23244
23245 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23246
23247         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23248         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23249
23250 2001-11-17  Jim Meyering  <meyering@lucent.com>
23251
23252         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23253         Prompted by a report from Bob Proulx.
23254
23255         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23256         Instead, require UTILS_FUNC_MKSTEMP.
23257
23258 2001-11-17  Jim Meyering  <meyering@lucent.com>
23259
23260         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23261         Now, that's done as part of AC_FUNC_STRTOD.
23262
23263 2001-11-17  Jim Meyering  <meyering@lucent.com>
23264
23265         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23266         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23267         rather than group writable.  Patch by Juan F. Codagnone.
23268
23269         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23270         xrealloc, Instead, include "xalloc.h".
23271
23272         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23273         Remove explicit declarations of xmalloc, xrealloc,
23274         and xstrdup.  Instead, include "xalloc.h".
23275
23276         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23277         unlocked-io.h.
23278         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23279         Likewise.
23280         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23281
23282         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23283         Reported by Padraig Brady.
23284
23285         * lib/mkstemp.c: #undef mkstemp.
23286         Include config.h.
23287         (rpl_mkstemp): Rename from mkstemp.
23288         Protoize.
23289
23290 2001-11-16  Jim Meyering  <meyering@lucent.com>
23291
23292         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23293         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23294         determine the amount of total physical memory, use pstat_getstatic.
23295         HPUX-11 doesn't define _SC_PHYS_PAGES.
23296         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23297         If sysconf couldn't be used to determine the amount of available
23298         physical memory, use both pstat_getstatic and pstat_getdynamic.
23299         Based on a patch from Bob Proulx.
23300
23301 2001-11-10  Jim Meyering  <meyering@lucent.com>
23302
23303         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23304         (jm_PREREQ): Use it.
23305
23306 2001-11-09  Jim Meyering  <meyering@lucent.com>
23307
23308         * m4/jm-macros.m4: Require autoconf-2.52f.
23309         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23310         Use these AC_-prefixed names, not the AM_-prefixed ones.
23311
23312         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23313
23314 2001-11-05  Jim Meyering  <meyering@lucent.com>
23315
23316         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23317
23318 2001-11-04  Jim Meyering  <meyering@lucent.com>
23319
23320         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23321         $DEFS.
23322
23323 2001-11-03  Jim Meyering  <meyering@lucent.com>
23324
23325         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23326         of AC_DEFUN.
23327
23328         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23329         know the name of the variable in the macro definition.
23330
23331 2001-11-03  Jim Meyering  <meyering@lucent.com>
23332
23333         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23334         in argmatch_to_argument call.
23335
23336         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23337         argument.
23338
23339         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23340         e.g., a fault due to an attempt to free a NULL pointer.
23341
23342 2001-11-01  Jim Meyering  <meyering@lucent.com>
23343
23344         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23345         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23346
23347 2001-11-01  Jim Meyering  <meyering@lucent.com>
23348
23349         * lib/dirfd.c, lib/dirfd.h: New files.
23350         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23351
23352         * lib/hash.c (hash_print) [TESTING]: Clean up.
23353
23354 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23355
23356         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23357         to avoid a warning if -Wall.
23358
23359 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23360
23361         * README: New file
23362         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23363         (per RMS's instructions, this is now the canonical source)
23364         * lgpl/, gpl/: New directories.
23365
23366 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23367
23368         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23369
23370 2001-10-21  Jim Meyering  <meyering@lucent.com>
23371
23372         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23373         this code would end up calling gettext even in packages built
23374         with --disable-nls.
23375         * lib/getopt.c (_): Likewise.
23376         * lib/regex.c (_): Likewise.
23377
23378 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23379
23380         * m4/error.m4 (jm_PREREQ_ERROR):
23381         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23382         AC_FUNC_STRERROR_R does that.
23383         Check for strerror declaration.
23384
23385         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23386         are supposed to have them these days.
23387         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23388         Merge changes from latest Autoconf CVS.
23389         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23390         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23391         POSIX decided to standardize on the int flavor of strerror_r.
23392
23393 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23394
23395         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23396         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23397         Use strerror_r that is only a macro, even if it is not a function.
23398         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23399         (private_strerror): Use prototypes, not old-style function definition.
23400         (print_errno_message): New function.
23401         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23402         char*-flavored one.
23403         (error_tail, error, error_at_line): Use it.
23404
23405 2001-10-11  Jim Meyering  <meyering@lucent.com>
23406
23407         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23408         and quote_n (1, ... to avoid clobbering a buffer.
23409
23410 2001-10-05  Jim Meyering  <meyering@lucent.com>
23411
23412         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23413         hash-pjw.h.
23414         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23415         * lib/hash-pjw.h: New file.
23416
23417 2001-09-30  Jim Meyering  <meyering@lucent.com>
23418
23419         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23420         `struct fsstat' has the `f_fstypename' member.
23421         Use that to define FS_TYPE, which is now used to make
23422         the getfsstat link test tighter.
23423
23424 2001-09-30  Jim Meyering  <meyering@lucent.com>
23425
23426         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23427         Include <sys/ucred.h>, for Apple Darwin.
23428         Include sys/mount.h and sys/fs_types.h only if available.
23429         (FS_TYPE): Define.
23430         (read_filesystem_list): Use FS_TYPE.
23431
23432 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23433
23434         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23435         a boolean context.
23436
23437 2001-09-29  Jim Meyering  <meyering@lucent.com>
23438
23439         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23440         [one-argument getmntent function]): Include stdio.h before mntent.h.
23441         SunOS 4.1.x needs it for the declaration of `FILE'.
23442         Patch by Volker Borchert.
23443
23444         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23445         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23446         sys/fs_types.h, and make the link-test for getfsstat guard #include
23447         directives with appropriate #if HAVE_*_H tests so that we can
23448         detect getfsstat on Apple Darwin1.3.7 systems.
23449         Reported by Nelson Beebe.
23450         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23451
23452 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23453
23454         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23455         #defines strtoimax.  Also treat the other strto* functions
23456         like strtoimax.
23457
23458         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23459         Check for strtoul and strtoumax,
23460         as those declarations are made even in the signed case.
23461         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23462         Likewise, for strtol and strtoimax.
23463
23464 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23465
23466         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23467         #defines strtoimax.  Also treat the other strto* functions
23468         like strtoimax.
23469
23470         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23471         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23472         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23473
23474 2001-09-26  Jim Meyering  <meyering@lucent.com>
23475
23476         Most macros in unlocked-io.h had the wrong number of arguments.
23477         * lib/gen-uio: New script.
23478         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23479         * lib/unlocked-io.hin: Remove file.
23480         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23481         rather than trying to embed it here.
23482         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23483         Reported by Padraig Brady.
23484
23485 2001-09-25  Volker Borchert  <bt@teknon.de>
23486
23487         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23488         `result'.
23489
23490 2001-09-24  Jim Meyering  <meyering@lucent.com>
23491
23492         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23493
23494 2001-09-23  Jim Meyering  <meyering@lucent.com>
23495
23496         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23497         instead of the mere test for existence of mntent.h.  The latter
23498         would get a false-positive on AIX 3.4 systems.
23499         In the outer getmntent if-block, don't die if neither of the getmntent
23500         tests succeeds.  Instead, just fall through and continue with the
23501         remaining tests.
23502
23503 2001-09-23  Jim Meyering  <meyering@lucent.com>
23504
23505         * lib/mountlist.c: Remove useless parentheses in #if directives.
23506         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23507         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23508
23509 2001-09-22  Jim Meyering  <meyering@lucent.com>
23510
23511         * m4/gettext.m4: New file.  From gettext.
23512         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23513         * m4/progtest.m4: Likewise
23514         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23515         * m4/glibc21.m4: Likewise.
23516
23517         * m4/libintl.m4: Remove.  No longer used.
23518
23519 2001-09-22  Jim Meyering  <meyering@lucent.com>
23520
23521         * lib/localcharset.c: Update from latest gettext.
23522         * lib/config.charset: Likewise.
23523
23524 2001-09-20  Jim Meyering  <meyering@lucent.com>
23525
23526         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23527         strtoimax.
23528         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23529         strtoumax.
23530
23531 2001-09-20  Jim Meyering  <meyering@lucent.com>
23532
23533         * lib/xstrtol.c (strtoimax): Guard declaration with
23534         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23535         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23536         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23537         (strtoumax): Likewise, for completeness (it wasn't necessary).
23538
23539 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23540
23541         * lib/strtoimax.c (HAVE_LONG_LONG):
23542         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23543         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23544         to work around bug in IBM C compiler.
23545
23546 2001-09-17  Jim Meyering  <meyering@lucent.com>
23547
23548         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23549         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23550         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23551         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23552         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23553         whenever the right hand side need not be expanded by the shell.
23554
23555 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23556
23557         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23558         library.  It's not correct, as some older glibcs are buggy.
23559         fnmatch wasn't fixed until glibc 2.2.
23560
23561         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23562         special shell magic here.
23563
23564 2001-09-16  Jim Meyering  <meyering@lucent.com>
23565
23566         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23567         * m4/jm-macros.m4: Require it.
23568
23569 2001-09-16  Jim Meyering  <meyering@lucent.com>
23570
23571         * lib/mkdir.c: New file.
23572
23573 2001-09-15  Jim Meyering  <meyering@lucent.com>
23574
23575         * m4/jm-macros.m4: Check for help2man.
23576
23577 2001-09-11  Jim Meyering  <meyering@lucent.com>
23578
23579         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23580         The body, by Paul Eggert, was moved here from configure.in.
23581         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23582
23583 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23584
23585         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23586         (jm_PREREQ): Use it.
23587
23588 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23589
23590         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23591         Use ssize_t, not int, to store result of readlink.
23592         Check for ssize_t overflow as well as size_t overflow,
23593         as POSIX says the result of readlink is implementation-defined
23594         when ssize_t overflows.
23595         Remove unnecessary cast to char*.
23596         Use free+malloc instead of realloc, as the storage doesn't need
23597         to be preserved and it's clearer and can be more efficient that way.
23598         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23599         * lib/xreadlink.h (xreadlink): Update prototype.
23600
23601 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23602
23603         * lib/xgetcwd.c: Revert some of the previous change; intead,
23604         fix the HAVE_GETCWD_NULL code to behave more like the
23605         !HAVE_GETCWD_NULL code used to.
23606
23607         Include "xalloc.h".
23608         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23609         invoke xalloc_die.
23610
23611 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23612
23613         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23614         sys/param.h, as pathmax.h includes them.
23615
23616 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23617
23618         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23619         (jm_PREREQ_XGETCWD): New macro.
23620
23621         * m4/getcwd.m4: New file.
23622
23623 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23624
23625         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23626         like the HAVE_GETCWD_NULL code.
23627         Include pathmax.h if not HAVE_GETCWD.
23628         Do not include xalloc.h.
23629         (INITIAL_BUFFER_SIZE): New symbol.
23630         Do not use xmalloc / xrealloc, since the caller is responsible for
23631         handling errors.  Preserve errno around `free' during failure.
23632         Do not overrun buffer when using getwd.
23633
23634 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23635
23636         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23637         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23638         getcwd (NULL, 0).
23639
23640 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23641
23642         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23643         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23644         spotted by Jim Meyering.
23645
23646 2001-09-03  Jim Meyering  <meyering@lucent.com>
23647
23648         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23649         failure.
23650
23651 2001-09-02  Jim Meyering  <meyering@lucent.com>
23652
23653         * lib/error.c: Update from GNU libc.
23654
23655 2001-09-01  Jim Meyering  <meyering@lucent.com>
23656
23657         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23658         Used by df.
23659
23660 2001-09-01  Jim Meyering  <meyering@lucent.com>
23661
23662         * lib/xreadlink.c: New file.
23663         * lib/xreadlink.h: New file.
23664         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23665         xreadlink.h.
23666
23667         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23668         doesn't conflict with sparc Solaris 7's definition in
23669         /usr/include/sys/int_types.h.
23670
23671         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23672         files.
23673         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23674         and strncasecmp as r-values.  Unixware didn't have declarations.
23675
23676 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23677
23678         * lib/xstrtol.h: Add copyright notice.
23679         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23680         LONGINT_INVALID_SUFFIX_CHAR.
23681
23682 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23683
23684         * lib/xstrtol.c (strtoimax): New decl.
23685
23686 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23687
23688         * lib/xgetcwd.c: Don't include pathmax.h.
23689         Include stdlib.h and unistd.h if available.
23690         Include xalloc.h.
23691         (xmalloc, xstrdup, free): Remove decls.
23692         (xgetcwd): Don't assume sizes fit in unsigned.
23693         Check for overflow when computing sizes.
23694         Simplify reallocation code.
23695
23696 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23697
23698         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23699         a directory's st_size can have an arbitrary value, so the old
23700         usage could waste an arbitrary amount of memory.  All uses
23701         changed.
23702         * lib/savedir.h: Update prototype.
23703
23704 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23705
23706         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23707
23708         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23709         old strtoimax.c.
23710
23711         Also, make the following further changes to make this file's
23712         configuration more similar to that of strtol.c:
23713         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23714         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23715         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23716         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23717         changed to signed values.
23718
23719         And make the following changes as well:
23720         Fix copyright notice, as 1999 was missing.
23721         (verify): New macro.
23722         (strtoimax): Check sizes at compile-time, not run-time.
23723         Prefer strtol to strtoll if both work.
23724         (main): Remove; it was not that useful and was a pain to maintain.
23725
23726         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23727
23728 2001-08-31  Jim Meyering  <meyering@lucent.com>
23729
23730         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23731         Use an initial, malloc'd, buffer of length 128 rather than
23732         a statically allocated one of length 1024.
23733
23734 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23735
23736         Simplify code, partly by assuming autoconf 2.52 semantics.
23737
23738         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23739
23740         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23741         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23742         All uses removed.
23743         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23744         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23745         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23746         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23747         jm_AC_HEADER_INTTYPES_H.
23748         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23749
23750         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23751
23752         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23753         Quote first arg of AC_DEFUN.
23754         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23755         since they are needed to parse the include file even if we need
23756         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23757         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23758         but with opposite signedness.
23759
23760 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23761
23762         Merge 'exclude' changes from tar 1.13.22.
23763         This fixes one or two unlikely storage allocation overflow bugs,
23764         but doesn't change user-visible behavior otherwise.
23765
23766 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23767
23768         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23769         (jm_PREREQ_EXCLUDE): New macro.
23770
23771 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23772
23773         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23774         tm to be declared.
23775
23776 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23777
23778         * lib/hash.c: Remove '2001' from copyright notice.
23779
23780 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23781
23782         * lib/full-write.h: New file.
23783         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23784         * lib/full-write.c: Correct credits, as cccp.c no longer
23785         exists and anyway it was so heavily changed from the old cccp
23786         code as to be unrecognizable.  Include full-write.h.
23787         (full_write) Return size_t, with short writes meaning failure.
23788         All callers changed.  This fixes a bug with large buffers
23789         on 64-bit hosts.
23790         * lib/utime.c: Include full-write.h.
23791
23792 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23793
23794         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23795         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23796         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23797         Include if available.
23798         (<xalloc.h>): Include
23799         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23800         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23801         collide with FNM macros.
23802         (struct patopts): New struct.
23803         (struct exclude): Use it, as exclude patterns now come with options.
23804         (new_exclude): Support above changes.
23805         (new_exclude, add_exclude_file):
23806         Initial size must now be a power of two to simplify overflow checking.
23807         (free_exclude, fnmatch_no_wildcards): New function.
23808         (excluded_filename): No longer requires options arg, as the options
23809         are determined by add_exclude.  Now returns bool, not int.
23810         (excluded_filename, add_exclude):
23811         Add support for the fancy new exclusion options.
23812         (add_exclude, add_exclude_file): Now takes int options arg.
23813         Check for arithmetic overflow when computing sizes.
23814         (add_exclude_file): xrealloc might modify errno, so don't
23815         realloc until after errno might be used.
23816
23817         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23818         New macros.
23819         (free_exclude): New decl.
23820         (add_exclude, add_exclude_file): Now takes int options arg.
23821         (excluded_filename): No longer requires options arg, as the options
23822         are determined by add_exclude.  Now returns bool, not int.
23823
23824 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23825
23826         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23827
23828 2001-08-27  Jim Meyering  <meyering@lucent.com>
23829
23830         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23831
23832         * lib/version-etc.c (N_): Remove definition.
23833         Revert most of last change.
23834         Instead, simply don't mark the `Copyright...' string for translation.
23835         Based on advice from Paul Eggert.
23836
23837         * lib/strtoxmax.c: Tweak comment.
23838
23839 2001-08-26  Jim Meyering  <meyering@lucent.com>
23840
23841         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23842
23843         * m4/xstrtoimax.m4: New file.
23844         * m4/xstrtoumax.m4: Add comments explaining why we
23845         AC_REPLACE_FUNCS(strtol).
23846
23847 2001-08-26  Jim Meyering  <meyering@lucent.com>
23848
23849         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23850         of copyright with `%s' so translators don't get an untranslated
23851         message in 2002.
23852         (COPYRIGHT_YEAR): Define.
23853         (version_etc): Use fprintf rather than fputs.
23854         Suggestion from Ulrich Drepper.
23855
23856         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23857
23858         * lib/strtoll.c: New file, from GNU libc.
23859         * lib/xstrtoimax.c: New file.
23860
23861         * lib/xstrtol.h: Add xstrtoimax.
23862         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23863         * lib/strtoimax.c: New file.  Likewise, but first define
23864         STRTOUXMAX_SIGNED.
23865
23866         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23867         ...
23868         * lib/strtoxmax.c: ... then renamed to this.
23869
23870 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23871
23872         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23873         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23874         (jm_AC_TYPE_INTMAX_T): New macro.
23875         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23876
23877         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23878
23879         * m4/longlong.m4: Renamed from ulonglong.m4.
23880         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23881         * m4/uintmax_t.m4: Removed.
23882
23883 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23884
23885         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23886         Port to Solaris 8, where 'sed' requires a space after the 'r'
23887         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23888         Redirect output to $tmp just once.
23889
23890 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23891
23892         * lib/addext.c (<errno.h>): Include.
23893         (errno): Declare if not defined.
23894         (addext): Work correctly when pathconf returns -1 and leaves
23895         errno alone because there is no limit.  Also, work even if
23896         pathconf returns a value greater than SIZE_MAX.
23897
23898 2001-08-12  Jim Meyering  <meyering@lucent.com>
23899
23900         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23901         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23902         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23903         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23904         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23905         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23906         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23907         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23908         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23909         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23910         utime.m4, utimes.m4, xstrtoumax.m4:
23911         Quote the first argument in each use of AC_DEFUN.
23912
23913 2001-08-12  Jim Meyering  <meyering@lucent.com>
23914
23915         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23916         Simply `return getcwd (NULL, 0);'.
23917         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23918         Use 1300 as initial value for length, not PATH_MAX.
23919
23920         * lib/pathmax.h: Clean up cpp syntax.
23921
23922 2001-08-12  Jim Meyering  <meyering@lucent.com>
23923
23924         * lib/gettimeofday.c: New file.
23925         * lib/gtod.h: New file.
23926         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23927
23928 2001-08-05  Jim Meyering  <meyering@lucent.com>
23929
23930         * m4/jm-macros.m4: Require autoconf-2.52.
23931
23932 2001-08-04  Jim Meyering  <meyering@lucent.com>
23933
23934         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23935         stmt, to get in sync with glibc.
23936
23937 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23938
23939         The following changes are from gettext 0.10.39 as maintained by
23940         Bruno Haible.
23941
23942         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23943         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23944         with inverted sense.  All uses changed.
23945
23946         * lib/mbswidth.c: Don't include <limits.h>.
23947         Include <stdlib.h> and <string.h> unconditionally.
23948         (iswcntrl, mbsinit, ISCNTRL): New macros.
23949         (mbsnwidth): Use K&R style function declarations.
23950         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23951         can optimize it when MB_CUR_MAX == 1.
23952         The width of control characters is zero, not 1.
23953
23954 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23955
23956         The following changes are from gettext 0.10.39 as maintained by
23957         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23958
23959         * m4/codeset.m4: Upgrade to serial AM1.
23960         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23961         all uses changed.  Quote first arg of AC_DEFUN.
23962         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23963
23964         * m4/iconv.m4: Upgrade to serial AM2.
23965         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23966         Add --with-libconv-prefix.
23967         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23968         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23969         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23970         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23971         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23972
23973         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23974         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23975         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23976         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23977         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23978         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23979         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23980         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23981         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23982
23983         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23984         string.h any more.
23985
23986         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23987         not the default value.
23988
23989         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23990         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23991         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23992         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23993         Also check for iswcntrl, used for wcwidth fallback.
23994         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23995         to Autoconf 2.13.
23996
23997 2001-08-03  Jim Meyering  <meyering@lucent.com>
23998
23999         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24000         as it was in the original.  Reported by Paul Eggert.
24001
24002 2001-07-16  Jim Meyering  <meyering@lucent.com>
24003
24004         * m4/gettimeofday.m4: New file.
24005         Prompted by a report from Bernhard Baehr.
24006
24007 2001-07-15  Jim Meyering  <meyering@lucent.com>
24008
24009         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24010         stuff. Now it's in ../Makefile.cfg.
24011
24012 2001-07-15  Jim Meyering  <meyering@lucent.com>
24013
24014         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24015         (BUILT_SOURCES): Add unlocked-io.h.
24016         (io_functions): Define.
24017         (unlocked-io.h): New rule.
24018         (DISTCLEANFILES): Add unlocked-io.h.
24019         (all-local): Depend on unlocked-io.h, to ensure it is created.
24020
24021         * lib/unlocked-io.hin: New file
24022
24023         * lib/regex.c: Update from glibc.
24024
24025 2001-07-05  Jim Meyering  <meyering@lucent.com>
24026
24027         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24028         recommendation.
24029         (libfetish_a_SOURCES): Put all .h files here instead.
24030         Remove a thus-exposed (better checks in automake) duplicate and
24031         two unnecessary .h files.
24032
24033 2001-07-04  Jim Meyering  <meyering@lucent.com>
24034
24035         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24036         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24037         distcheck failure.
24038
24039 2001-07-02  Jim Meyering  <meyering@lucent.com>
24040
24041         The following changes were prompted by suggestions from Bruno Haible.
24042
24043         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24044         is now generated.
24045         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24046         definition of EXTRA_DIST.
24047         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24048         ensure that the generated file is created/updated whenever the list
24049         of $(unlocked_functions) is changed.
24050         (jm-glibc-io.m4): New rule.
24051         (unlocked-io.h): New rule -- currently unused.
24052
24053 2001-06-24  Jim Meyering  <meyering@lucent.com>
24054
24055         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24056         unmatched right bracket, rather than kludging it with an extra,
24057         falsely-matching quote in a comment.  Patch by Akim Demaille.
24058
24059 2001-06-11  Jim Meyering  <meyering@lucent.com>
24060
24061         * lib/regex.c: Update from GNU libc.
24062
24063 2001-05-27  Jim Meyering  <meyering@lucent.com>
24064
24065         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24066         Check for ut_type in struct utmp.
24067
24068 2001-05-27  Jim Meyering  <meyering@lucent.com>
24069
24070         * lib/readutmp.h (UT_TYPE): Define.
24071
24072 2001-05-24  Jim Meyering  <meyering@lucent.com>
24073
24074         * lib/argmatch.c: Include "quote.h".
24075         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24076         quote function.  Reported by Göran Uddeborg.
24077
24078 2001-05-22  Jim Meyering  <meyering@lucent.com>
24079
24080         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24081         now that we use the package-supplied version unconditionally.
24082         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24083
24084 2001-05-21  Jim Meyering  <meyering@lucent.com>
24085
24086         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24087         shell syntax errors.
24088
24089 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24090
24091         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24092
24093 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24094
24095         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24096         Don't bother to check library strftime, since
24097         we'll be using our own my_strftime function anyway.
24098         Define my_strftime instead of strftime.
24099
24100 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24101
24102         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24103         which is not yet declared.
24104
24105 2001-05-15  Jim Meyering  <meyering@lucent.com>
24106
24107         * m4/regex.m4: Use proper quoting so brackets appear in the test
24108         program.
24109         Reported by, and with help from, Bruno Haible.
24110
24111 2001-05-13  Jim Meyering  <meyering@lucent.com>
24112
24113         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24114         undefined.
24115
24116 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24117
24118         dirname code cleanup.  base_name now behaves more compatibly
24119         with POSIX basename when given file names that have trailing
24120         slashes, and similarly for dir_name.  Add new primitives
24121         base_len and dir_len.  Put the directory-name-related decls
24122         into dirname.h.
24123
24124         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24125         * lib/backupfile.c (base_name): Likewise.
24126         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24127         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24128         * lib/makepath.c (strip_trailing_slashes): Likewise.
24129         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24130         ISSLASH): Likewise.
24131         * lib/rename.c (strip_trailing_slashes): Likewise.
24132         * lib/same.c (base_name): Likewise.
24133         * lib/stripslash.c (ISSLASH): Likewise.
24134
24135         * lib/addext.c: Include <dirname.h> after size_t is defined.
24136         * lib/backupfile.c: Likewise.
24137
24138         * lib/addext.c (addext): Use base_len to trim redundant
24139         trailing slashes instead of doing it ourselves.
24140         But do not trim the last slash if it is not redundant.
24141
24142         * lib/backupfile.c (find_backup_file_name,
24143         max_backup_version): Use base_len instead of rolling it ourselves.
24144         Handle the case of "" and (on DOS) "C:" correctly.
24145
24146         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24147         needed. Include <string.h>, <dirname.h>.
24148         (base_name): Allow file names ending in slashes, other than names
24149         that are all slashes.  In this case, return the basename followed
24150         by the slashes.  This is more general, and can be used in places
24151         where the original base_name purposely had an assertion failure.
24152         (base_len): New function.
24153
24154         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24155         Do not include <assert.h>; no longer needed.
24156         Include xalloc.h.
24157         (memrchr): Remove decl.
24158         (dir_name_r): Remove.
24159         (dir_len): Renamed from dirlen.  All callers changed.
24160         Rewrite in terms of base_name, for simplicity and consistency.
24161         (dir_name): Never return NULL.  All callers changed.
24162         Do not include <stdlib.h> in test program; no longer needed.
24163         return 0; is fine for test program.
24164
24165         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24166         New macros.
24167         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24168
24169         * lib/path-concat.c (path_concat): Use base_len to compute
24170         base length, not strlen; this means we cannot rely on memcpy
24171         to null-terminate.
24172
24173         * lib/same.c (STREQ): Remove.
24174         (same_name): Handle the case where the basename ends in trailing '/'.
24175
24176         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24177         a slash was stripped.  Do not strip the last slash after a
24178         file system prefix.
24179
24180 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24181
24182         * lib/Makefile.am (libfetish_a_SOURCES):
24183         Add strftime.c, since we now compile it on all hosts.
24184
24185         * lib/strftime.c (my_strftime):
24186         Define to nstrftime if emacs, but only if my_strftime is not defined.
24187         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24188         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24189         Add one more extra argument: a nanoseconds value.
24190         All uses changed.
24191         (ns): New macro.
24192         (my_strftime function): Add %N format.
24193         (emacs_strftimeu): Renamed from emacs_strftime,
24194         with extra ut argument.
24195
24196 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24197
24198         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24199
24200 2001-04-21  Jim Meyering  <meyering@lucent.com>
24201
24202         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24203         doesn't interfere.
24204
24205 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24206
24207         * m4/ftruncate.m4: Check for chsize.
24208         Link with ftruncate.o unconditionally if ftruncate is missing.
24209         This was required when cross-compiling to i586-mingw32msvc.
24210
24211 2001-04-08  Jim Meyering  <meyering@lucent.com>
24212
24213         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24214         recomputed; that's necessary when the offset spans a DST transition.
24215         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24216
24217 2001-04-02  Jim Meyering  <meyering@lucent.com>
24218
24219         * lib/regex.h, regex.c: Update from GNU libc.
24220
24221 2001-03-24  Jim Meyering  <meyering@lucent.com>
24222
24223         * m4/jm-macros.m4: Require autoconf-2.49d.
24224
24225 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24226
24227         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24228
24229 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24230
24231         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24232
24233 2001-03-17  Jim Meyering  <meyering@lucent.com>
24234
24235         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24236         now that the version in autoconf is equivalent.
24237         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24238
24239         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24240         Suggestion from Akim Demaille.
24241
24242         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24243         (jm_PREREQ_TEMPNAME): New function.
24244
24245 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24246
24247         * lib/tempname.c (uint64_t): Define to uintmax_t if
24248         not defined, and if UINT64_MAX is not defined.
24249         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24250         Reported by John David Anglin.
24251
24252 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24253
24254         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24255         resolve alias if codeset is empty.
24256         * lib/config.charset (BeOS): Use wildcard syntax.
24257
24258 2001-03-13  Jim Meyering  <meyering@lucent.com>
24259
24260         * lib/path-concat.c (path_concat)
24261         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24262         concatenating e.g., `C:' and `foo'.
24263         From Bruno Haible.
24264
24265 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24266
24267         * lib/localcharset.c (locale_charset): Don't use
24268         setlocale(LC_CTYPE,NULL). Don't return NULL.
24269         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24270
24271 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24272
24273         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24274         support for DOS/DJGPP.
24275
24276 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24277
24278         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24279         lacks mkstemp.  Compile our own tempname.c if we compile our own
24280         mkstemp.c, as mkstemp relies on tempname.
24281
24282 2001-03-01  Jim Meyering  <meyering@lucent.com>
24283
24284         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24285         AH_VERBATIM really does output its argument verbatim.
24286
24287 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24288
24289         * lib/Makefile.am (libfetish_a_SOURCES):
24290         Add dup-safer.c, fopen-safer.c.
24291         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24292
24293         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24294         * lib/unistd-safer.h: New files.
24295
24296 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24297
24298         The mkstemp replacement is taken from glibc 2.2.2, with some
24299         portability fixes for use outside glibc, as follows:
24300
24301         * lib/tempname.c (struct_stat64): New macro.
24302         (direxists, __gen_tempname): Use it.
24303         This avoids a portability problem with Solaris 8.
24304
24305         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24306         (<stddef.h>, <stdint.h>, <string.h>):
24307         Include only if STDC_HEADERS || _LIBC.
24308         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24309         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24310         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24311         (__set_errno): Define this macro if <errno.h> doesn't.
24312         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24313         Define these macros if <stdio.h> doesn't.
24314         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24315         Define these macros if <sys/stat.h>
24316         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24317         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24318         __xstat64): Define if not _LIBC.
24319         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24320         (__gen_tempname): Invoke gettimeofday only if
24321         HAVE_GETTIMEOFDAY || _LIBC;
24322         otherwise, fall back on plain "time".
24323         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24324
24325         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24326
24327         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24328
24329 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24330
24331         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24332
24333 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24334
24335         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24336         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24337         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24338         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24339
24340 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24341
24342         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24343         Remove workaround macros for hosts that have mbrtowc but not
24344         mbstate_t, as we now insist on proper declarations for both
24345         before using mbrtowc.
24346
24347 2001-02-17  Jim Meyering  <meyering@lucent.com>
24348
24349         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24350         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24351         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24352         UnixWare 7.1.1.
24353
24354         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24355         rather than AC_CACHE_VAL.
24356
24357 2001-02-17  Jim Meyering  <meyering@lucent.com>
24358
24359         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24360         around included file name.
24361
24362         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24363
24364         * lib/strftime.c: Update from GNU libc (the only changes were to
24365         comments).
24366
24367 2001-02-17  Jim Meyering  <meyering@lucent.com>
24368
24369         * lib/regex.c: Update from libc.
24370
24371 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24372
24373         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24374         clash.
24375
24376 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24377
24378         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24379         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24380         Reported by Mark Hounschell via Paul Eggert.
24381
24382 2001-02-07  Jim Meyering  <meyering@lucent.com>
24383
24384         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24385
24386 2001-02-05  Jim Meyering  <meyering@lucent.com>
24387
24388         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24389         it includes the patch required for `large file' support with at least
24390         HP-UX's 10.20 /bin/cc.
24391
24392 2001-02-03  Jim Meyering  <meyering@lucent.com>
24393
24394         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24395         AS_IF, now that it works once again (mysteriously).
24396         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24397
24398 2001-01-30  Jim Meyering  <meyering@lucent.com>
24399
24400         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24401         * m4/chown.m4: Rename conftestchown to conftest.chown.
24402         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24403         s/conftestdir2/conftest.d2/.
24404         * m4/utimes.m4: s/conftestdata/conftest.data/
24405         Inspired by Pavel Roskin's change in autoconf.
24406
24407 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24408
24409         * lib/config.charset: Update for FreeBSD 4.2.
24410
24411 2001-01-27  Jim Meyering  <meyering@lucent.com>
24412
24413         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24414         a use of AS_IF.
24415         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24416
24417 2001-01-26  Jim Meyering  <meyering@lucent.com>
24418
24419         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24420         quotearg.c includes it.
24421
24422 2001-01-26  Jim Meyering  <meyering@lucent.com>
24423
24424         * lib/quotearg.c: Include stddef.h.
24425         * lib/quote.c: Include stddef.h.
24426         Reported by Axel Kittenberger.
24427
24428         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24429         line in double quotes so that it evokes a better diagnostic.
24430         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24431         Reported by Axel Kittenberger.
24432
24433 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24434
24435         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24436         as if it was a `charset'.
24437
24438 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24439
24440         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24441         has const.
24442
24443 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24444
24445         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24446         to avoid a warning.  Add back 'const' to inptr.
24447
24448 2001-01-20  Jim Meyering  <meyering@lucent.com>
24449
24450         Be sure that headers are checked before used in code compiled
24451         for the type checks.
24452         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24453         In place of that, invoke jm_CHECK_ALL_TYPES.
24454         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24455         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24456         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24457         The check for ssize_t was mistakenly run before the test for unistd.h.
24458
24459         The configure-time check for stdbool.h was missing.
24460         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24461         (jm_PREREQ_HASH): New function.
24462
24463 2001-01-17  Jim Meyering  <meyering@lucent.com>
24464
24465         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24466         for autoconf-2.49c.
24467         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24468
24469 2001-01-16  Jim Meyering  <meyering@lucent.com>
24470
24471         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24472         From Bruno Haible.
24473
24474 2001-01-14  Jim Meyering  <meyering@lucent.com>
24475
24476         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24477         foo and bar.  Create conftestdir/ in the script, not in the C code.
24478         Remove directories in the script, not in the C code.
24479         Remove conftestdir{,2} before trying to create the directory.
24480         Make the entire configure script fail if the mkdir fails.
24481
24482 2001-01-14  Jim Meyering  <meyering@lucent.com>
24483
24484         * lib/rename.c: New file.  From Volker Borchert.
24485         Include stdlib.h, string.h or strings.h, and xalloc.h.
24486         Use strip_trailing_slashes rather than open-coding it.
24487
24488 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24489
24490         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24491
24492 2001-01-03  Jim Meyering  <meyering@lucent.com>
24493
24494         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24495         of local `inptr' to avoid warning with some system declarations of
24496         iconv.
24497
24498 2001-01-02  Volker Borchert  <bt@teknon.de>
24499
24500         * m4/rename.m4: New file.
24501         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24502
24503 2001-01-01  Jim Meyering  <meyering@lucent.com>
24504
24505         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24506         even on systems with utmpx.h.  It's necessary for the declaration of
24507         utmp's ut_user member.  Reported by Andreas Jaeger.
24508
24509         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24510         available. They are required for the declarations of getgrgid and
24511         getpwuid resp.
24512         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24513         Reported by Andreas Jaeger.
24514
24515 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24516
24517         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24518         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24519         so `make install' also works in VPATH builds.
24520
24521 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24522
24523         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24524         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24525         can be used in subdirectories.
24526
24527 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24528
24529         * lib/modechange.c: Do not assume that mode_t uses the
24530         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24531         the other-execute bit of FOO even if S_IXOTH != 1.
24532
24533         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24534         WOTH, XOTH, ALLM): New macros.
24535         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24536          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24537         Use them.
24538         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24539         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24540         (mode_compile):
24541         No need to use uintmax_t; unsigned long is long enough.
24542         Don't bother to get suffix since we don't use it.
24543
24544 2000-12-26  Jim Meyering  <meyering@lucent.com>
24545
24546         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24547         better with autoheader.
24548
24549 2000-12-24  Jim Meyering  <meyering@lucent.com>
24550
24551         * lib/hash.c (is_prime): Return explicit boolean values.
24552         (hash_get_first): Return NULL to appease Irix5.6's 89.
24553         Reported by Nelson Beebe.
24554
24555 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24556
24557         * lib/localcharset.c (locale_charset): Add support for Win32.
24558
24559 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24560
24561         * lib/physmem.h, lib/physmem.c: New files.
24562
24563         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24564         (noinst_HEADERS): Add physmem.h.
24565
24566         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24567         't' for compatibility with Solaris 8 sort.
24568
24569 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24570
24571         * lib/config.charset: Add support for BeOS.
24572
24573 2000-12-17  Jim Meyering  <meyering@lucent.com>
24574
24575         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24576         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24577
24578 2000-12-16  Jim Meyering  <meyering@lucent.com>
24579
24580         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24581         N and M) would have treated it like `chown N:N FILE'.
24582
24583         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24584
24585 2000-12-16  Jim Meyering  <meyering@lucent.com>
24586
24587         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24588         SHELLS_FILE to a file name that's useful on djgpp systems.
24589         Include stdlib.h.
24590         (ADDITIONAL_DEFAULT_SHELLS): Define.
24591         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24592         Based mostly on a patch from Prashant TR.
24593
24594 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24595
24596         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24597         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24598         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24599
24600 2000-12-08  Andreas Schwab  <schwab@suse.de>
24601
24602         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24603         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24604
24605 2000-12-07  Jim Meyering  <meyering@lucent.com>
24606
24607         * lib/stripslash.c (ISSLASH): Define.
24608         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24609         `/'.
24610         From Prashant TR.
24611
24612         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24613         (dir_name_r): Declare this function as static.
24614         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24615         manifest itself on a name containing a mix of slashes and
24616         backslashes.
24617         Make this function work with names starting with a DOS-style
24618         drive letter and colon prefix.
24619         (dir_name): Append `.' if necessary.
24620         Based mostly on patches from Prashant TR and Eli Zaretskii.
24621
24622         * lib/dirname.h (dir_name_r): Remove prototype.
24623
24624 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24625
24626         * m4/off_t-format.m4: Remove this file.
24627         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24628
24629 2000-12-06  Jim Meyering  <meyering@lucent.com>
24630
24631         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24632         replacement strtoull, we may well need the replacement strtoul, too.
24633         Check for declarations of strtoul and strtoull.
24634         Check for strtol.  Mainly as a cue to cause automake to include
24635         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24636         Check for limits.h -- strtol.c needs it.
24637
24638 2000-12-05  Jim Meyering  <meyering@lucent.com>
24639
24640         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24641
24642 2000-12-04  Jim Meyering  <meyering@lucent.com>
24643
24644         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24645         Also include memory.h, stdlib.h, unistd.h if appropriate.
24646         Reported by Andreas Jaeger (conflicting declaration of malloc).
24647
24648 2000-12-02  Jim Meyering  <meyering@lucent.com>
24649
24650         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24651         * m4/jm-macros.m4 (jm_MACROS): require it.
24652
24653 2000-12-02  Jim Meyering  <meyering@lucent.com>
24654
24655         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24656
24657 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24658
24659         * lib/memrchr.c: Include <config.h> before any system include file.
24660
24661 2000-11-30  Jim Meyering  <meyering@lucent.com>
24662
24663         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24664
24665 2000-11-30  Jim Meyering  <meyering@lucent.com>
24666
24667         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24668
24669 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24670
24671         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24672
24673 2000-11-26  Jim Meyering  <meyering@lucent.com>
24674
24675         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24676
24677 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24678
24679         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24680         size of (size_t) -1; it's not portable.
24681
24682 2000-11-17  Jim Meyering  <meyering@lucent.com>
24683
24684         * lib/strstr.c: Update from GNU libc.
24685
24686 2000-11-17  Akim Demaille  <akim@epita.fr>
24687
24688         * lib/obstack.h: Formatting changes.
24689         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24690         prevent type checking.
24691         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24692         cast the value to (void *): assigning a `foo *' to a `void *'
24693         variable is valid.
24694         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24695
24696 2000-11-16  Jim Meyering  <meyering@lucent.com>
24697
24698         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24699
24700 2000-11-11  Jim Meyering  <meyering@lucent.com>
24701
24702         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24703
24704 2000-11-10  Jim Meyering  <meyering@lucent.com>
24705
24706         * lib/obstack.h: Update from GNU libc.
24707         * lib/obstack.c: Likewise.
24708
24709 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24710
24711         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24712
24713 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24714
24715         * lib/getusershell.c (setusershell): Use rewind rather than
24716         fseek/fseeko, to avoid configuration hassles with fseeko.
24717         Don't bother opening SHELLS_FILE if shellstream is NULL;
24718         it's not necessary.
24719
24720 2000-11-05  Jim Meyering  <meyering@lucent.com>
24721
24722         * lib/makepath.h (make_dir): Declare.
24723         * lib/makepath.c (make_dir): Remove `static' attribute.
24724         Tweak a comment.
24725
24726 2000-11-04  Jim Meyering  <meyering@lucent.com>
24727
24728         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24729
24730 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24731
24732         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24733         last one in a bucket, advance to the next bucket.
24734
24735 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24736
24737         * lib/fnmatch.c: Do not comment out all the code if we are using
24738         the GNU C library, because in some cases we are replacing buggy
24739         code in the GNU C library itself.
24740
24741 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24742
24743         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24744         (regex_compile): Catch bogus \(\1\).
24745
24746 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24747
24748         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24749         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24750         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24751
24752 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24753
24754         * lib/error.h, getline.h, modechange.h:
24755         Remove "2000" from Copyright line, as the file hasn't been
24756         changed this year other than in the copyright notice.
24757
24758         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24759         was changed this year.
24760
24761 2000-10-29  Jim Meyering  <meyering@lucent.com>
24762
24763         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24764         renaming.
24765         * m4/ls-mntd-fs.m4: Likewise
24766
24767 2000-10-29  Jim Meyering  <meyering@lucent.com>
24768
24769         * lib/xstat.in: Fix grammar in comment.
24770
24771 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24772
24773         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24774         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24775         doesn't define __restrict_arr.
24776
24777 2000-10-28  Jim Meyering  <meyering@lucent.com>
24778
24779         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24780         (jm_PREREQ_MEMCHR): New function.
24781
24782 2000-10-28  Jim Meyering  <meyering@lucent.com>
24783
24784         * lib/memchr.c: Update from libc.
24785         Adjust for portability:
24786         [HAVE_STDLIB_H]: Include stdlib.h.
24787         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24788         Undef __memchr, too.
24789         [!weak_alias]: Define __memchr to memchr.
24790
24791         * lib/regex.c: Update from libc.
24792         * lib/regex.h: Likewise.
24793         * lib/getopt1.c: Likewise.
24794         * lib/memcmp.c: Likewise.
24795
24796         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24797         Avoid using fseek, when possible -- it's broken by design.
24798         Patch by Ulrich Drepper.
24799
24800 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24801
24802         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24803         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24804         Giving in to popular pressure to shut up the compiler with casts.
24805
24806 2000-10-26  Jim Meyering  <meyering@lucent.com>
24807
24808         * lib/strftime.c: Update from libc.
24809
24810 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24811
24812         * regex.c: More `unsigned char' -> `re_char' changes.
24813         Also change several `int' into `re_wchar_t'.
24814         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24815         (PUSH_FAILURE_POINTER): Don't cast any more.
24816         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24817         We want GCC to complain, since this piece of code makes
24818         re_match non-reentrant, which *should* be fixed.
24819         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24820         (EXTEND_BUFFER): Use RETALLOC.
24821         (SET_LIST_BIT): Don't cast.
24822         (re_wchar_t): New type.
24823         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24824         that those two functions will always properly return.
24825         (IMMEDIATE_QUIT_CHECK): Cast to void.
24826         (analyse_first): Use recursion rather than an explicit stack.
24827         (re_compile_fastmap): Can't fail anymore.
24828         (re_search_2): Don't check re_compile_fastmap for failure.
24829         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24830         Now also sets the new value (passed in a new argument).
24831         (re_match_2_internal): Use it.
24832         Also, use a new var `reg' of type size_t when looping through regs
24833         rather than reuse the inappropriate `mcnt'.
24834
24835 2000-10-25  Jim Meyering  <meyering@lucent.com>
24836
24837         * lib/obstack.c: Update from libc.
24838
24839 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24840
24841         * regex.c (regex_compile): Change the way of handling a range from
24842         a char less than 256 to a char not less than 256.
24843
24844 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24845
24846         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24847         NT-Emacs only.
24848         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24849         so that re_search functions only quit when callers expect them to.
24850
24851 2000-10-23  Jim Meyering  <meyering@lucent.com>
24852
24853         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24854         wrong.  That set_locale call must not have any side effects.
24855         From Paul Eggert.
24856
24857 2000-10-22  Jim Meyering  <meyering@lucent.com>
24858
24859         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24860         [CYCLIC]: Remove now-unused definition.
24861
24862         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24863         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24864         Suggestion from Ulrich Drepper.
24865
24866 2000-10-21  Jim Meyering  <meyering@lucent.com>
24867
24868         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24869         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24870         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24871
24872 2000-10-21  Jim Meyering  <meyering@lucent.com>
24873
24874         * lib/dirname.c (memrchr): Declare if necessary.
24875         (dir_name): Remove the restriction that there be no
24876         trailing slashes.  Now, this code skips past them, effectively
24877         ignoring them.
24878         [TEST_DIRNAME] (main): New unit tests.
24879
24880         * lib/memrchr.c: New file from GNU libc.
24881         Undef __memrchr, too.
24882         [!weak_alias]: Define __memrchr to memrchr.
24883         Guard weak_alias use with `#ifdef weak_alias'.
24884
24885 2000-10-21  Jim Meyering  <meyering@lucent.com>
24886
24887         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24888         (dir_name): Use dir_name_r.
24889         * lib/dirname.h (dir_name_r): Declare it.
24890
24891 2000-10-17  Jim Meyering  <meyering@lucent.com>
24892
24893         * lib/quote.h (PARAMS): Define and use.
24894         Reported by Akim Demaille.
24895
24896         * lib/getopt.c: Update from libc.
24897
24898 2000-10-16  Jim Meyering  <meyering@lucent.com>
24899
24900         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24901         setlocale.
24902         From Jan Fedak.
24903
24904 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24905
24906         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24907
24908 2000-09-25  Jim Meyering  <meyering@lucent.com>
24909
24910         * lib/md5.h (rol): Define (from GnuPG).
24911
24912         * lib/sha.c: Give credit (GnuPG) where due.
24913         (M): Use rol rather than open-coding it.
24914         Add a FIXME comment.
24915
24916 2000-09-21  Jim Meyering  <meyering@lucent.com>
24917
24918         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24919         Reported by Michael Stone.
24920
24921 2000-09-20  Jim Meyering  <meyering@lucent.com>
24922
24923         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24924         (noinst_HEADERS): Add sha.h.
24925         Based on code from Scott G. Miller and from GnuPG.
24926
24927 2000-09-18  Jim Meyering  <meyering@lucent.com>
24928
24929         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24930         LIBS. Otherwise, everyone ends up linking with -lelf for some
24931         configurations.
24932         Reported by Mike Stone.
24933
24934 2000-09-15  Jim Meyering  <meyering@lucent.com>
24935
24936         * lib/regex.c: Update from libc.
24937
24938 2000-09-10  Jim Meyering  <meyering@lucent.com>
24939
24940         * lib/getopt.c (_getopt_internal): Update from glibc.
24941
24942 2000-09-09  Jim Meyering  <meyering@lucent.com>
24943
24944         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24945         think it should be used as a general replacement for isascii.
24946         * lib/fnmatch.c: Likewise.
24947         * lib/mbswidth.c: Likewise
24948         * lib/regex.c: Likewise.
24949
24950         Don't use atoi.
24951         * lib/userspec.c: Include sys/param.h and limits.h.
24952         Include xstrtol.h.
24953         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24954         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24955         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24956         UID, GID.  Check range.
24957
24958 2000-09-06  Jim Meyering  <meyering@lucent.com>
24959
24960         * lib/getopt.c (_getopt_internal): Update from glibc.
24961
24962 2000-08-30  Jim Meyering  <meyering@lucent.com>
24963
24964         * lib/strftime.c: Merge in changes from GNU libc.
24965
24966 2000-08-26  Jim Meyering  <meyering@lucent.com>
24967
24968         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24969         * m4/fpending.m4: New file.
24970
24971 2000-08-26  Jim Meyering  <meyering@lucent.com>
24972
24973         * lib/closeout.c: Include "__fpending.h".
24974         (close_stdout_status): Return right away if there's nothing to flush.
24975
24976         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24977         * lib/__fpending.c: New file.
24978         * lib/__fpending.h: New file.
24979
24980 2000-08-20  Jim Meyering  <meyering@lucent.com>
24981
24982         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24983         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24984         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24985
24986 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24987
24988         Improve fileutils installation on systems where running
24989         programs (like install) can't be unlinked.
24990         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24991         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24992
24993 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24994
24995         Standardize on "memory exhausted" instead of "Memory exhausted"
24996         or "virtual memory exhausted".
24997         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24998         "virtual memory exhausted".
24999         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25000         our own message.
25001         * lib/userspec.c (parse_user_spec): Likewise.
25002         * lib/bumpalloc.h: comment fix
25003         * lib/same.c, userspec.c: Include xalloc.h.
25004
25005         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25006         not char *const and pointing to a constant array.
25007         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25008         (xrealloc): Comment fix.
25009
25010         * lib/userspec.c (parse_user_spec):
25011         Don't translate a message until just before returning,
25012         to avoid unnecessary translation.
25013
25014 2000-08-07  Jim Meyering  <meyering@lucent.com>
25015
25016         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25017         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25018         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25019         getgroups.c, gethostname.c, getopt.h, group-member.c,
25020         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25021         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25022         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25023         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25024         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25025         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25026         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25027         yesno.c: Back out Copyright date changes for each file with no change
25028         this year.  This eases coordination with other programs using the same
25029         source code modules.  From Paul Eggert.
25030
25031 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25032
25033         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25034         not char, for compatibility with glibc 2.1.3 strftime.c.
25035
25036 2000-08-03  Greg McGary  <greg@mcgary.org>
25037
25038         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25039         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25040         (EXTEND_BUFFER): Use them.
25041
25042 2000-08-01  Jim Meyering  <meyering@lucent.com>
25043
25044         * lib/dirname.c (ISSLASH): Define.
25045         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25046         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25047         both `\' and `/' may be use as path separators.
25048         Based on a patch from Prashant TR.
25049
25050 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25051
25052         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25053         slot vector a constant, since it might get modified.
25054
25055 2000-07-31  Jim Meyering  <meyering@lucent.com>
25056
25057         * lib/xmalloc.c: Use `virtual memory exhausted', not
25058         `Memory exhausted'.
25059         * lib/obstack.c (print_and_abort): Likewise.
25060
25061 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25062
25063         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25064         buffer, so that the caller can always quote one small
25065         component of a "memory exhausted" message in slot 0.
25066         From a suggestion by Jim Meyering.
25067
25068 2000-07-30  Jim Meyering  <meyering@lucent.com>
25069
25070         * lib/makepath.c (make_path): Quote the other instance, too.
25071
25072         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25073         (STATIC_BUF_SIZE): Define.
25074         (quotearg_n_options): Use only statically allocated storage when
25075         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25076         than STATIC_BUF_SIZE.
25077
25078 2000-07-29  Jim Meyering  <meyering@lucent.com>
25079
25080         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25081         * lib/dirname.c (dir_name): Likewise.
25082
25083         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25084         `/'.
25085
25086         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25087         (dir_name): Assert that there are no trailing slashes.
25088
25089 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25090
25091         * lib/mbswidth.h (mbswidth): Add a flags argument.
25092         (mbswidth): New declaration.
25093         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25094         * lib/mbswidth.c (mbswidth): Add a flags argument.
25095         (mbsnwidth): New function.
25096
25097 2000-07-24  Jim Meyering  <meyering@lucent.com>
25098
25099         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25100
25101 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25102
25103         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25104
25105 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25106
25107         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25108         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25109         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25110         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25111         invoke multibyte primitives.
25112
25113 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25114
25115         * lib/quotearg.c:
25116         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25117         so that mbstate_t is always defined.
25118
25119         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25120         be 1 in at least one GCC installation, and this configuration
25121         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25122         performance on hosts that have mbrtowc but have only unibyte
25123         locales, but I assume these hosts are rare.
25124
25125 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25126
25127         * lib/mbswidth.c (_XOPEN_SOURCE):
25128         Don't define; this causes problems on Solaris 7.
25129         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25130
25131 2000-07-23  Jim Meyering  <meyering@lucent.com>
25132
25133         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25134         too: getgrgid, getpwuid, getuid.
25135
25136 2000-07-23  Jim Meyering  <meyering@lucent.com>
25137
25138         * lib/basename.c (base_name): Add an assertion.
25139
25140 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25141
25142         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25143         shadow its mbsinit function.
25144
25145 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25146
25147         * lib/mbswidth.h: New file.
25148         * lib/mbswidth.c: New file.
25149         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25150         (noinst_HEADERS): Add mbswidth.h.
25151
25152 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25153
25154         * lib/config.charset: Add support for FreeBSD. Improve support for
25155         HP-UX and IRIX 6.
25156
25157 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25158
25159         * m4/mbswidth.m4: New file.
25160         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25161
25162 2000-07-15  Jim Meyering  <meyering@lucent.com>
25163
25164         * lib/makepath.c: Include quote.h.
25165         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25166         corresponding argument in a `quote (...)' call.
25167         Give better diagnostics.
25168
25169         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25170         (noinst_HEADERS): Add quote.h.
25171
25172         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25173         from tar's src/misc.c.
25174         * lib/quote.h: New file.  Prototypes for same.
25175
25176 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25177
25178         From a suggestion by Bruno Haible.
25179         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25180         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25181         to decide whether to define the BeOS workaround macro;
25182         this adjusts to the change to AC_MBSTATE_T.
25183
25184 2000-07-14  Jim Meyering  <meyering@lucent.com>
25185
25186         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25187         jm_AC_TYPE_UINTMAX_T.
25188
25189 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25190
25191         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25192
25193         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25194         quotearg_buffer_restyled): Add support for
25195         clocale_quoting_style.  Undo previous change to
25196         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25197         and "{RIGHT QUOTATION MARK}" msgids.
25198
25199 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25200
25201         From a suggestion by Bruno Haible.
25202         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25203         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25204         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25205         and mbstate_t, to a single-part test that simply defines mbstate_t.
25206         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25207         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25208
25209 2000-07-10  Jim Meyering  <meyering@lucent.com>
25210
25211         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25212
25213         * m4/gnu-source.m4: Output to confdefs.h directly.
25214         Suggestion from Akim Demaille.
25215
25216 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25217
25218         The old behavior of quoting `like this' doesn't look good with
25219         newer, ISO-style fonts.  See:
25220         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25221
25222         Instead, quote "like this" by default.  Let the translator
25223         tailor the locale-specific quoting behavior by providing
25224         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25225
25226         * lib/quotearg.c (N_): New macro.
25227         (gettext_default): New function.
25228         (quotearg_buffer_restyled): Use
25229         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25230         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25231
25232 2000-07-09  Jim Meyering  <meyering@lucent.com>
25233
25234         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25235         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25236
25237         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25238         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25239
25240 2000-07-09  Jim Meyering  <meyering@lucent.com>
25241
25242         * lib/Most files: Update copyright dates to include 2000.
25243
25244 2000-07-08  Jim Meyering  <meyering@lucent.com>
25245
25246         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25247         if not defined.
25248         (xgethostname): Remove now-unnecessary #ifdef.
25249         Move declaration of `err' into loop where it's used.
25250
25251 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25252         and Bruno Haible  <haible@clisp.cons.org>
25253
25254         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25255         only if the test for an object-type mbstate_t fails.  This
25256         prevents us from mistakenly reporting that mbstate_t is a
25257         system object type after we "#define mbstate_t int" to work
25258         around its lack.
25259
25260 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25261         and Bruno Haible  <haible@clisp.cons.org>
25262
25263         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25264
25265 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25266
25267         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25268         to strerror_r.
25269         Include <ctype.h> for use of isalpha.
25270
25271 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25272
25273         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25274         by allocating a larger buffer. Test the gethostname return value for
25275         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25276         returns an error and ENAMETOOLONG isn't defined.
25277
25278 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25279
25280         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25281         dimension.
25282
25283 2000-07-04  Jim Meyering  <meyering@lucent.com>
25284
25285         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25286         of the deprecated AC_CHECKING.
25287
25288 2000-07-04  Jim Meyering  <meyering@lucent.com>
25289
25290         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25291         Reported by Bruno Haible.
25292
25293 2000-07-04  Jim Meyering  <meyering@lucent.com>
25294
25295         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25296         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25297         lacks mbrtowc.
25298
25299 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25300
25301         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25302         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25303
25304 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25305         and Bruno Haible  <haible@clisp.cons.org>
25306
25307         * lib/quotearg.c (mbrtowc):
25308         Assign to *pwc, and return 1 only if result is nonzero.
25309         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25310
25311 2000-07-03  Jim Meyering  <meyering@lucent.com>
25312
25313         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25314
25315 2000-07-03  Jim Meyering  <meyering@lucent.com>
25316
25317         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25318         This is necessary to get a definition of e.g., UTMP_FILE on
25319         HP-UX 10.20.
25320         From Bob Proulx.
25321
25322 2000-07-02  Jim Meyering  <meyering@lucent.com>
25323
25324         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25325
25326         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25327         AC_LIBOBJ(function_name).
25328         * m4/chown.m4: Likewise.
25329         * m4/fnmatch.m4: Likewise.
25330         * m4/ftruncate.m4: Likewise.
25331         * m4/getgroups.m4: Likewise.
25332         * m4/getline.m4: Likewise.
25333         * m4/group-member.m4: Likewise.
25334         * m4/jm-macros.m4: Likewise.
25335         * m4/lstat.m4: Likewise.
25336         * m4/malloc.m4: Likewise.
25337         * m4/memcmp.m4: Likewise.
25338         * m4/nanosleep.m4: Likewise.
25339         * m4/putenv.m4: Likewise.
25340         * m4/realloc.m4: Likewise.
25341         * m4/regex.m4: Likewise.
25342         * m4/stat.m4: Likewise.
25343         * m4/strftime.m4: Likewise.
25344
25345 2000-07-02  Jim Meyering  <meyering@lucent.com>
25346
25347         * lib/quotearg.c (mbstate_t): Don't define here.
25348
25349 2000-07-02  Jim Meyering  <meyering@lucent.com>
25350
25351         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25352
25353 2000-07-01  Jim Meyering  <meyering@lucent.com>
25354
25355         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25356
25357 2000-07-01  Jim Meyering  <meyering@lucent.com>
25358
25359         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25360         problem.
25361
25362 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25363
25364         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25365         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25366
25367 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25368
25369         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25370         per change in ../m4/ls-mntd-fs.m4.
25371         (read_filesystem_list): Ignore symbolic links.
25372
25373 2000-06-29  Jim Meyering  <meyering@lucent.com>
25374
25375         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25376         for declaration of strcmp.
25377
25378         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25379
25380         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25381         Avoid warning by casting result to `char *' to remove `const'.
25382
25383 2000-06-28  Jim Meyering  <meyering@lucent.com>
25384
25385         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25386         included by quotearg.c, for which we perform this test.  From
25387         Bruno Haible.
25388
25389 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25390
25391         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25392         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25393         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25394
25395 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25396
25397         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25398
25399 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25400
25401         savedir now sets errno on failure and invokes xmalloc to get memory.
25402         Fix a couple of other minor bugs while we're at it.
25403
25404         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25405         (NAMLEN): Remove macro.
25406         (malloc, realloc): Remove decls.
25407         (stpcpy): Likewise.
25408         ("xalloc.h"): Include.
25409         (NAME_SIZE_DEFAULT): New macro.
25410         (savedir): Use xmalloc / xrealloc to allocate memory.
25411         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25412         Skip "" directory entries.
25413         Use strlen to calculate directory entry length, since the old method
25414         is rarely used these days and isn't worth supporting.
25415         Don't use a pointer after freeing it.
25416         Check for integer overflow when calculating allocation size.
25417         Use memcpy to copy entries, instead of stpcpy.
25418         Set errno properly when returning NULL.
25419         Check for readdir error.
25420
25421 2000-06-26  Jim Meyering  <meyering@lucent.com>
25422
25423         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25424
25425 2000-06-25  Jim Meyering  <meyering@lucent.com>
25426
25427         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25428         Linux header bug when _XOPEN_SOURCE is defined to 500.
25429
25430 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25431
25432         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25433         deficiency.
25434
25435 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25436
25437         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25438         Include xalloc.h.
25439         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25440
25441 2000-06-24  Jim Meyering  <meyering@lucent.com>
25442
25443         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25444         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25445         for which strerror does return char*, but which lacks a conveniently
25446         accessible declaration of the function.  If the compile-test says
25447         strerror_r doesn't work, then resort to a `run'-test that works on
25448         BeOS and segfaults on DEC Unix.
25449
25450 2000-06-24  Jim Meyering  <meyering@lucent.com>
25451
25452         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25453
25454 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25455
25456         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25457         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25458
25459 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25460
25461         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25462         (mbrtowc, mbstate_t): Define substitutes if
25463         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25464         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25465         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25466
25467 2000-06-23  Jim Meyering  <meyering@lucent.com>
25468
25469         * m4/afs.m4: Add missing AC_MSG_RESULT.
25470         Reported by Bruno Haible.
25471
25472         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25473         Suggestion from Bruno Haible.
25474
25475 2000-06-23  Jim Meyering  <meyering@lucent.com>
25476
25477         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25478
25479 2000-06-21  Jim Meyering  <meyering@lucent.com>
25480
25481         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25482
25483 2000-06-21  Jim Meyering  <meyering@lucent.com>
25484
25485         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25486         (noinst_HEADERS): Add getstr.h.
25487
25488         * lib/getline.c (getstr): Move into a separate file.
25489         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25490         the following changes: new parameter, delim2; both delim[12]
25491         parameters have type `int', not `char'.  The latter would lose
25492         with 8-bit delimiters.
25493         * lib/getstr.h: New file.
25494
25495 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25496
25497         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25498         than 1024, return a memory chunk of least possible size, instead
25499         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25500         Use free/xmalloc instead of xrealloc to avoid copying for very long
25501         paths.
25502
25503 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25504
25505         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25506         the empty string.
25507
25508 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25509
25510         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25511         address, not strdup.  Include <stdlib.h> and don't declare free().
25512
25513 2000-06-19  Jim Meyering  <meyering@lucent.com>
25514
25515         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25516
25517 2000-06-18  Jim Meyering  <meyering@lucent.com>
25518
25519         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25520
25521         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25522         `checking whether...' message to be consistent with that of the
25523         lstat test.
25524
25525 2000-06-18  Jim Meyering  <meyering@lucent.com>
25526
25527         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25528         Besides, these days every porting target provides a mkdir function.
25529
25530         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25531         needed. (this snippet comes from src/system.h).
25532
25533 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25534
25535         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25536
25537 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25538
25539         * lib/human.c (adjust_value): New function.
25540         (human_readable_inexact): Apply rounding style even when
25541         printing approximate values.
25542
25543 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25544
25545         * lib/human.c (human_readable_inexact): Allow an input block
25546         size that is not a multiple of the output block size, and vice versa.
25547         Reported by Piergiorgio Sartor.
25548
25549 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25550
25551         * lib/getdate.y (get_date): Apply relative times after time
25552         zone indicator, not before.  Reported by Todd A. Jacobs.
25553
25554 2000-06-13  Jim Meyering  <meyering@lucent.com>
25555
25556         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25557
25558         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25559
25560 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25561
25562         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25563
25564 2000-06-12  Jim Meyering  <meyering@lucent.com>
25565
25566         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25567         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25568         optional argument.
25569         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25570         the optional argument, `lib'.
25571
25572 2000-06-08  Jim Meyering  <meyering@lucent.com>
25573
25574         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25575
25576 2000-06-04  Paul Eggert  <eggert@twinsun.com>