Update
[pspp] / ChangeLog
1 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2
3         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require
4         openat-die
5         * modules/openat (Files): Remove openat-die.c
6         (Depends-on): Add openat-die
7         * modules/openat-die: New module.
8
9 2007-05-06  Bruno Haible  <bruno@clisp.org>
10
11         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
12         Update with info about Cygwin.
13         * doc/functions/fprintf.texi: Update.
14         * doc/functions/printf.texi: Update.
15         * doc/functions/snprintf.texi: Update.
16         * doc/functions/sprintf.texi: Update.
17         * doc/functions/vfprintf.texi: Update.
18         * doc/functions/vprintf.texi: Update.
19         * doc/functions/vsnprintf.texi: Update.
20         * doc/functions/vsprintf.texi: Update.
21         Reported by Eric Blake.
22
23 2007-05-06  Bruno Haible  <bruno@clisp.org>
24
25         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
26         padding ourselves for the floating-point directives.
27         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
28         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
29         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
30         gl_PRINTF_FLAG_ZERO and test its result. Invoke
31         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
32         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
33         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
34         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
35         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
36         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
37         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
38         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
39         * tests/test-snprintf-posix.h (test_function): Also check the width
40         and some flags in the %f directive.
41         * tests/test-sprintf-posix.h (test_function): Likewise.
42         * tests/test-vasnprintf-posix.c (test_function): Likewise.
43         * tests/test-vasprintf-posix.c (test_function): Likewise.
44         * doc/functions/fprintf.texi: Update.
45         * doc/functions/printf.texi: Update.
46         * doc/functions/snprintf.texi: Update.
47         * doc/functions/sprintf.texi: Update.
48         * doc/functions/vfprintf.texi: Update.
49         * doc/functions/vprintf.texi: Update.
50         * doc/functions/vsnprintf.texi: Update.
51         * doc/functions/vsprintf.texi: Update.
52
53 2007-05-06  Bruno Haible  <bruno@clisp.org>
54
55         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
56         pass the ' flag character to sprintf or snprintf.
57         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
58         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
59         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
60         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
61         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
62         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
63         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
64         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
65         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
66         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
67         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
68         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
69         * tests/test-snprintf-posix.h (test_function): Also check the grouping
70         flag.
71         * tests/test-sprintf-posix.h (test_function): Likewise.
72         * tests/test-vasnprintf-posix.c (test_function): Likewise.
73         * tests/test-vasprintf-posix.c (test_function): Likewise.
74         * doc/functions/fprintf.texi: Update.
75         * doc/functions/printf.texi: Update.
76         * doc/functions/snprintf.texi: Update.
77         * doc/functions/sprintf.texi: Update.
78         * doc/functions/vfprintf.texi: Update.
79         * doc/functions/vprintf.texi: Update.
80         * doc/functions/vsnprintf.texi: Update.
81         * doc/functions/vsprintf.texi: Update.
82
83 2007-05-01  Bruno Haible  <bruno@clisp.org>
84
85         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
86
87 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
88
89         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
90         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
91
92 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
93
94         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
95         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
96         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
97
98 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
99
100         * lib/argp-help.c (struct hol_entry): New member `ord'.
101         (HOL_ENTRY_PTRCMP): Use ord for comparison
102         (hol_sort): Initialize ord.
103
104 2007-05-01  Bruno Haible  <bruno@clisp.org>
105
106         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
107         Reported by Eric Blake.
108         * doc/gnulib.texi (Function Substitutes): Update.
109
110 2007-05-01  Bruno Haible  <bruno@clisp.org>
111
112         * doc/functions.texi: Remove file, now redundant through
113         doc/functions/*.texi.
114
115 2007-05-01  Bruno Haible  <bruno@clisp.org>
116
117         * modules/argp (Depends-on): Add sleep.
118
119 2007-05-01  Bruno Haible  <bruno@clisp.org>
120
121         * modules/sleep-tests: New file.
122         * tests/test-sleep.c: New file.
123
124         * modules/sleep: New file.
125         * lib/sleep.c: New file.
126         * m4/sleep.m4: New file.
127         * lib/unistd_.h (sleep): New declaration.
128         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
129         HAVE_SLEEP.
130         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
131         * doc/functions/sleep.texi: Document the sleep module.
132
133 2007-05-01  Bruno Haible  <bruno@clisp.org>
134
135         * lib/sigprocmask.h: Remove file.
136         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
137         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
138         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
139         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
140         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
141         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
142         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
143         HAVE_SIGSET_T as a shell variable.
144         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
145         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
146         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
147         (Depends-on): Add signal. Remove verify.
148         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
149         (Include): Mention <signal.h> instead of sigprocmask.h.
150         * NEWS: Mention the change.
151         * lib/fatal-signal.c: Don't include sigprocmask.h.
152
153 2007-05-01  Bruno Haible  <bruno@clisp.org>
154
155         * modules/signal: New file.
156         * lib/signal_.h: New file.
157         * m4/signal_h.m4: New file.
158
159 2007-05-01  Bruno Haible  <bruno@clisp.org>
160
161         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
162         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
163         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
164         HAVE_WCTYPE_CTMP_BUG into wctype.h.
165
166 2007-05-01  Bruno Haible  <bruno@clisp.org>
167
168         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
169         configure time.
170         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
171         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
172         * modules/sys_stat (Makefile.am): Substitute their values into
173         sys/stat.h.
174
175 2007-05-01  Bruno Haible  <bruno@clisp.org>
176
177         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
178         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
179         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
180
181 2007-05-01  Bruno Haible  <bruno@clisp.org>
182
183         * doc/header/assert.texi: Undo last change: don't mention the gnulib
184         'assert' module here.
185
186 2007-05-01  Bruno Haible  <bruno@clisp.org>
187
188         * doc/functions/*.texi: New files.
189         * doc/functions/google-ranking.txt: New file.
190         * doc/gnulib.texi (Function Substitutes): New chapter.
191         (ctime, inet_ntoa): Remove sections.
192         * doc/ctime.texi: Remove file.
193         * doc/inet_ntoa.texi: Remove file.
194         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
195         dependencies.
196         (%.info): New rule, specifying a --reference-limit.
197
198 2007-05-01  Bruno Haible  <bruno@clisp.org>
199
200         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
201
202 2007-05-01  Bruno Haible  <bruno@clisp.org>
203
204         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
205         the portability of 'mkdir' to mingw systems.
206
207 2007-05-01  Bruno Haible  <bruno@clisp.org>
208
209         * doc/headers/google-ranking.txt: New file.
210
211 2007-04-30  Eric Blake  <ebb9@byu.net>
212
213         Prefer fseeko to fseek.
214         * modules/getpass (Depends-on): Add fseeko.
215         * lib/getpass.c (getpass): Use fseeko, not fseek.
216
217 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
218
219         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
220         assumes the sorting is stable, while most qsort implementations
221         are not.  Use argument addresses to ensure they never compare as
222         equal.
223
224         * tests/test-argp-2.sh (usage-indent test): Fix output
225         (func_compare): Restore diff options
226         * tests/test-argp.c: Restore #include "progname.h"
227
228 2007-04-29  Bruno Haible  <bruno@clisp.org>
229
230         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
231         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
232         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
233         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
234         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
235         (configure.ac): Define CHECK_SNPRINTF_POSIX.
236         (TESTS, check_PROGRAMS): Add test-snprintf.
237         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
238         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
239         (TESTS, check_PROGRAMS): Add test-vsnprintf.
240         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
241         assertions that fail on HP-UX, OSF/1, or IRIX.
242         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
243
244 2007-04-29  Bruno Haible  <bruno@clisp.org>
245
246         * MODULES.html.sh (posix_functions): Remove 'contents'.
247
248 2007-04-29  Karl Berry  <karl@gnu.org>
249
250         * config/srclist.txt (gendocs_template_min): new entry.
251
252 2007-04-29  Bruno Haible  <bruno@clisp.org>
253
254         Work around fpurge bug on BSD systems.
255         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
256         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
257         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
258         fpurge to rpl_fpurge if the system already has this function.
259         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
260         the case where the system already has this function. Correct invariants
261         on BSD systems.
262         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
263         BSD systems.
264
265 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
266
267         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
268         proposed by Sven Verdoolaege.
269
270         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
271         options.
272         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
273         (usage and help tests): Update
274
275 2007-04-29  Bruno Haible  <bruno@clisp.org>
276
277         * tests/test-fflush.c (main): Use a file of size 17, not 10.
278         Print more information in case of failure. Disable a test on BeOS.
279
280 2007-04-29  Bruno Haible  <bruno@clisp.org>
281
282         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
283         This helps debugging on systems on which no gdb is available.
284
285 2007-04-29  Bruno Haible  <bruno@clisp.org>
286
287         * lib/freading.h: Improve comments.
288         * lib/fwriting.h: Likewise.
289         * tests/test-freading.c (main): Don't check freading immediately after
290         repositioning. Needed for glibc.
291
292 2007-04-29  Bruno Haible  <bruno@clisp.org>
293
294         * lib/freading.c (freading): Trivial simplification.
295
296 2007-04-28  Bruno Haible  <bruno@clisp.org>
297
298         * tests/test-fwriting.c (main): Also test the interaction between
299         fflush and fwriting.
300         * modules/fwriting-tests (Depends-on): Add fflush.
301
302         * tests/test-freading.c (main): Also test the interaction between
303         fflush and freading.
304         * modules/freading-tests (Depends-on): Add fflush.
305
306 2007-04-28  Bruno Haible  <bruno@clisp.org>
307
308         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
309         fseeko and ftello.
310         Suggested by Eric Blake.
311
312 2007-04-28  Jim Meyering  <jim@meyering.net>
313
314         Avoid false-negative in gl_STDINT_H's C99 conformance test.
315         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
316         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
317
318 2007-04-27  Eric Blake  <ebb9@byu.net>
319
320         * doc/headers/assert.texi (assert.h): Document assert module use.
321
322 2007-04-27  Bruno Haible  <bruno@clisp.org>
323
324         * doc/headers/*.texi: New files.
325         * doc/gnulib.texi (Header File Substitutes): New chapter.
326         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
327         dependencies.
328         (standards.info ,standards.html, standards.dvi): Update dependencies.
329         (mostlyclean, clean): New targets.
330
331 2007-04-27  Bruno Haible  <bruno@clisp.org>
332
333         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
334         * modules/sysexits (Files, Makefile.am): Update.
335
336         * lib/sys_socket_.h: Renamed from lib/socket_.h.
337         * modules/sys_socket (Files, Makefile.am): Update.
338
339         * lib/sys_stat_.h: Renamed from lib/stat_.h.
340         * modules/sys_stat (Files, Makefile.am): Update.
341
342 2007-04-27  Eric Blake  <ebb9@byu.net>
343
344         * lib/freading.h: Improve comments.
345         * lib/fwriting.h: Likewise.
346         * lib/fflush.c: Likewise.
347
348         Fix closein for mingw.
349         * modules/closein-tests: Add tests for closein.
350         * tests/test-closein.c: New file.
351         * tests/test-closein.sh: Likewise.
352         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
353         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
354
355 2007-04-27  Bruno Haible  <bruno@clisp.org>
356
357         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
358         version is < 6.
359         * lib/math_.h [__DECC]: Likewise.
360         * lib/stdio_.h [__DECC]: Likewise.
361         * lib/stdlib_.h [__DECC]: Likewise.
362         * lib/string_.h [__DECC]: Likewise.
363         * lib/time_.h [__DECC]: Likewise.
364         * lib/wchar_.h [__DECC]: Likewise.
365         * lib/wctype_.h [__DECC]: Likewise.
366
367 2007-04-27  Bruno Haible  <bruno@clisp.org>
368
369         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
370
371 2007-04-27  Bruno Haible  <bruno@clisp.org>
372
373         * lib/fflush.c: Add comments.
374         * modules/fpurge-tests (Depends-on): Add fflush.
375         * modules/freadable-tests (Depends-on): Likewise.
376         * modules/fwritable-tests (Depends-on): Likewise.
377
378 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
379
380         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
381         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
382         Report by Bruno Haible <bruno@clisp.org>.
383
384 2007-04-26  Eric Blake  <ebb9@byu.net>
385
386         Fix fflush on mingw.
387         * modules/fflush (Depends-on): Add freading.
388         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
389         but unread data.
390
391 2007-04-26  Eric Blake  <ebb9@byu.net>
392         and Bruno Haible  <bruno@clisp.org>
393
394         Implement freading and fwriting.
395         * lib/freading.c: New file.
396         * lib/freading.h: Likewise.
397         * m4/freading.m4: Likewise.
398         * modules/freading: Likewise.
399         * modules/freading-tests: Likewise.
400         * tests/test-freading.c: Likewise.
401         * lib/fwriting.c: New file.
402         * lib/fwriting.h: Likewise.
403         * m4/fwriting.m4: Likewise.
404         * modules/fwriting: Likewise.
405         * modules/fwriting-tests: Likewise.
406         * tests/test-fwriting.c: Likewise.
407         * MODULES.html.sh (File stream based Input/Output): Mention them.
408
409 2007-04-26  Bruno Haible  <bruno@clisp.org>
410
411         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
412         'long' when we assume it.
413         Suggested by Eric Blake.
414
415 2007-04-26  Bruno Haible  <bruno@clisp.org>
416
417         Ensure fseeko, ftello are declared on glibc systems.
418         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
419         * modules/fseeko (configure.ac-early): Likewise.
420         * modules/ftello (configure.ac-early): Likewise.
421         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
422         AC_FUNC_FSEEKO for this.
423         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
424         (gl_CHECK_FSEEKO): Remove macro.
425
426 2007-04-26  Bruno Haible  <bruno@clisp.org>
427
428         * tests/test-fflush.c (main): Also check the ftell result after
429         fflush and fseek/fseeko.
430         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
431         file descriptor position cache in the stream.
432         * lib/fseeko.c (rpl_fseeko): Likewise.
433
434 2007-04-26  Bruno Haible  <bruno@clisp.org>
435
436         * modules/fflush-tests (Depends-on): Add fseeko.
437
438 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
439             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
440
441         * lib/argz_.h: ensure error_t definition is obtained in same
442         mechanism system argz.h would have.
443         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
444         argz facilities are known bad.  Err on the side of caution if
445         cross-compiling.
446
447 2007-04-25  Eric Blake  <ebb9@byu.net>
448
449         * lib/fpurge.c (includes): Use stdlib.h for free.
450         * tests/test-fflush.c (main): Also test fflush-fseeko.
451
452 2007-04-25  Bruno Haible  <bruno@clisp.org>
453
454         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
455         * lib/fseeko.c: New file.
456         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
457         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
458         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
459         gl_FUNC_FSEEKO.
460         (gl_FUNC_FSEEKO): Invoke it.
461         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
462         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
463         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
464
465 2007-04-25  Bruno Haible  <bruno@clisp.org>
466
467         * modules/fflush (Depends-on): Add ftello.
468
469 2007-04-25  Bruno Haible  <bruno@clisp.org>
470
471         * modules/ftello-tests: New file.
472         * tests/test-ftello.c: New file.
473
474         * modules/ftello: New file.
475         * m4/ftello.m4: New file.
476         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
477         HAVE_FTELLO.
478         * lib/stdio_.h (ftello): New declaration.
479         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
480         HAVE_FTELLO.
481
482 2007-04-25  Bruno Haible  <bruno@clisp.org>
483
484         * modules/fseeko-tests: New file.
485         * tests/test-fseeko.c: New file.
486
487         * modules/fseeko: New file.
488         * m4/fseeko.m4: New file.
489         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
490         HAVE_FSEEKO.
491         * lib/stdio_.h (fseeko): New declaration.
492         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
493         HAVE_FSEEKO.
494
495 2007-04-25  Bruno Haible  <bruno@clisp.org>
496
497         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
498
499 2007-04-25  Bruno Haible  <bruno@clisp.org>
500
501         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
502         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
503         * tests/test-unistd.c: Likewise.
504         * tests/test-fcntl.c: Likewise.
505
506 2007-04-23  Eric Blake  <ebb9@byu.net>
507
508         * lib/fflush.c: Fix missing include.
509         Reported by Bruno Haible.
510
511 2007-04-23  Bruno Haible  <bruno@clisp.org>
512
513         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
514         Reported by Eric Blake.
515
516 2007-04-23  Bruno Haible  <bruno@clisp.org>
517
518         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
519
520 2007-04-23  Bruno Haible  <bruno@clisp.org>
521
522         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
523
524 2007-04-23  Bruno Haible  <bruno@clisp.org>
525
526         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
527         Needed on HP-UX 11.
528
529 2007-04-16  Eric Blake  <ebb9@byu.net>
530
531         Make fflush rely on fpurge.
532         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
533         open coding all variants.
534         * modules/fflush (Depends-on): Add fpurge and unistd.
535         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
536         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
537
538         Fix --with-tests compilation on cygwin.
539         * modules/argmatch-tests (Makefile.am): List gnulib library first
540         in LDADD.
541         * modules/argp-tests (Makefile.am): Likewise.
542         * modules/array-list-tests (Makefile.am): Likewise.
543         * modules/array-oset-tests (Makefile.am): Likewise.
544         * modules/avltree-list-tests (Makefile.am): Likewise.
545         * modules/avltree-oset-tests (Makefile.am): Likewise.
546         * modules/avltreehash-list-tests (Makefile.am): Likewise.
547         * modules/carray-list-tests (Makefile.am): Likewise.
548         * modules/dirname-tests (Makefile.am): Likewise.
549         * modules/frexp-tests (Makefile.am): Likewise.
550         * modules/isnanl-tests (Makefile.am): Likewise.
551         * modules/linked-list-tests (Makefile.am): Likewise.
552         * modules/linkedhash-list-tests (Makefile.am): Likewise.
553         * modules/lock-tests (Makefile.am): Likewise.
554         * modules/rbtree-list-tests (Makefile.am): Likewise.
555         * modules/rbtree-oset-tests (Makefile.am): Likewise.
556         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
557         * modules/tls-tests (Makefile.am): Likewise.
558         * modules/tsearch-tests (Makefile.am): Likewise.
559         * modules/xvasprintf-tests (Makefile.am): Likewise.
560
561         Fix fpurge for cygwin.
562         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
563         value.
564         * modules/fpurge-tests (Depends-on): Clean up trash.
565
566 2007-04-16  Simon Josefsson  <simon@josefsson.org>
567
568         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
569
570         * m4/autobuild.m4: Re-indent.
571
572 2007-04-13  Bruno Haible  <bruno@clisp.org>
573
574         * modules/fpurge-tests: New file.
575         * tests/test-fpurge.c: New file.
576
577         * modules/fpurge: New file.
578         * lib/fpurge.h: New file.
579         * lib/fpurge.c: New file.
580         * m4/fpurge.m4: New file.
581
582 2007-04-13  Bruno Haible  <bruno@clisp.org>
583
584         * modules/fbufmode-tests: New file.
585         * tests/test-fbufmode.c: New file.
586
587         * modules/fbufmode: New file.
588         * lib/fbufmode.h: New file.
589         * lib/fbufmode.c: New file.
590         * m4/fbufmode.m4: New file.
591
592 2007-04-13  Bruno Haible  <bruno@clisp.org>
593
594         * modules/fwritable-tests: New file.
595         * tests/test-fwritable.c: New file.
596
597         * modules/fwritable: New file.
598         * lib/fwritable.h: New file.
599         * lib/fwritable.c: New file.
600         * m4/fwritable.m4: New file.
601
602 2007-04-13  Bruno Haible  <bruno@clisp.org>
603
604         * modules/freadable-tests: New file.
605         * tests/test-freadable.c: New file.
606
607         * modules/freadable: New file.
608         * lib/freadable.h: New file.
609         * lib/freadable.c: New file.
610         * m4/freadable.m4: New file.
611
612 2007-04-13  Bruno Haible  <bruno@clisp.org>
613
614         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
615         MOSTLYCLEANFILES.
616
617 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
618
619         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
620         gzip bootstrap.conf to avoid dragging in i18n machinery.
621         (gnulib_tool_option): Use it.
622
623 2007-04-13  Bruno Haible  <bruno@clisp.org>
624
625         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
626         %F directives.
627         * tests/test-vasprintf-posix.c (test_function): Likewise.
628         * tests/test-snprintf-posix.h (test_function): Likewise.
629         * tests/test-sprintf-posix.h (test_function): Likewise.
630         * tests/test-fprintf-posix.h (test_function): Likewise.
631         * tests/test-printf-posix.h (test_function): Likewise.
632         * tests/test-fprintf-posix.out: Likewise.
633
634 2007-04-13  Bruno Haible  <bruno@clisp.org>
635
636         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
637         * modules/tls-tests (configure.ac): Likewise.
638         Reported by Arto C. Nirkko <anirkko@insel.ch>.
639
640 2007-04-13  Bruno Haible  <bruno@clisp.org>
641
642         * lib/tls.c (glthread_tls_get): Fix return type.
643         Patch by Arto C. Nirkko <anirkko@insel.ch>.
644
645 2007-04-12  Eric Blake  <ebb9@byu.net>
646
647         * modules/gettime (Depends-on): Remove gettime.
648         Reported by Dmitry V. Levin.
649
650 2007-04-12  Bruno Haible  <bruno@clisp.org>
651
652         * modules/fflush (Include): Mention <stdio.h>.
653         * modules/strtoimax (Include): Mention <inttypes.h>.
654         * modules/strtoumax (Include): Likewise.
655
656 2007-04-12  Eric Blake  <ebb9@byu.net>
657
658         * .cvsignore: New file.
659         * .gitignore: Likewise.
660
661 2007-04-12  Bruno Haible  <bruno@clisp.org>
662
663         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
664         not before, since $(LDADD) often contains libgnu.a.
665         * modules/striconv-tests (test_striconv_LDADD): Likewise.
666         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
667         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
668         Needed on Cygwin.
669
670 2007-04-12  Eric Blake  <ebb9@byu.net>
671
672         Work around glibc's failure to flush stdin on fclose.
673         * lib/closein.c (close_stdin): Flush stdin before closing.
674
675         Work around glibc's failure to reset seekable stdin on exit.
676         * modules/closein: New module.
677         * lib/closein.c: New file.
678         * lib/closein.h: Likewise.
679         * m4/closein.m4: Likewise.
680         * MODULES.html.sh (File stream based Input/Output): Document it.
681
682 2007-04-12  Simon Josefsson  <simon@josefsson.org>
683
684         * gnulib-tool: Rename generated 'autobuild' script to
685         'do-autobuild' in --create-megatestdir output.
686
687         * doc/gnulib.texi (Build robot for gnulib): Fix.
688
689 2007-04-12  Simon Josefsson  <simon@josefsson.org>
690
691         * modules/sysexits (Depends-on): Add absolute-header.
692
693 2007-04-12  Eric Blake  <ebb9@byu.net>
694
695         No need to preserve errno on success.
696         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
697         Reported by Bruno Haible.
698
699 2007-04-12  Simon Josefsson  <simon@josefsson.org>
700
701         * MODULES.html.sh (Support for maintaining and releasing
702         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
703
704 2007-04-12  Simon Josefsson  <simon@josefsson.org>
705
706         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
707
708 2007-04-12  Simon Josefsson  <simon@josefsson.org>
709
710         * modules/autobuild: New module.
711
712         * m4/autobuild.m4: New file.
713
714 2007-04-11  Bruno Haible  <bruno@clisp.org>
715
716         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
717         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
718         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
719         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
720         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
721         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
722         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
723         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
724         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
725         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
726         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
727         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
728         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
729         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
730         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
731         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
732         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
733         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
734         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
735         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
736         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
737         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
738         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
739         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
740         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
741         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
742         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
743         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
744         Reported by Eric Blake.
745
746 2007-04-11  Bruno Haible  <bruno@clisp.org>
747
748         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
749
750 2007-04-10  Bruno Haible  <bruno@clisp.org>
751
752         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
753         for NaN and Infinity. Needed on FreeBSD 6.1.
754         * tests/test-vasnprintf-posix.c (test_function): Undo last change
755         regarding results for "%010a" of Infinity and NaN.
756         * tests/test-vasprintf-posix.c (test_function): Likewise.
757         * tests/test-snprintf-posix.h (test_function): Likewise.
758         * tests/test-sprintf-posix.h (test_function): Likewise.
759         * tests/test-fprintf-posix.h (test_function): Likewise.
760         * tests/test-printf-posix.h (test_function): Likewise.
761         * tests/test-fprintf-posix.out: Likewise.
762
763 2007-04-10  Bruno Haible  <bruno@clisp.org>
764
765         * modules/locale-tests: New file.
766         * tests/test-locale.c: New file.
767
768         * modules/locale: New file.
769         * lib/locale_.h: New file.
770         * m4/locale_h.m4: New file.
771
772 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
773             Bruno Haible  <bruno@clisp.org>
774
775         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
776         be determined, test for availability of the copysignf, copysign,
777         copysignl functions.
778         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
779         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
780         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
781
782 2007-04-09  Eric Blake  <ebb9@byu.net>
783
784         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
785         * modules/stdio (Makefile.am): Support fflush.
786         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
787         * modules/fflush: New file.
788         * lib/fflush.c: Likewise.
789         * m4/fflush.m4: Likewise.
790         * modules/fflush-tests: New test.
791         * tests/test-fflush.c: Likewise.
792         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
793
794 2007-04-06  Bruno Haible  <bruno@clisp.org>
795
796         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
797         (VASNPRINTF): Use signbit for faster determination whether to print a
798         minus sign.
799         * modules/vasnprintf (Files): Remove lib/float+.h.
800         * modules/fprintf-posix (Depends-on): Add signbit.
801         * modules/snprintf-posix (Depends-on): Likewise.
802         * modules/sprintf-posix (Depends-on): Likewise.
803         * modules/vasnprintf-posix (Depends-on): Likewise.
804         * modules/vasprintf-posix (Depends-on): Likewise.
805         * modules/vfprintf-posix (Depends-on): Likewise.
806         * modules/vsnprintf-posix (Depends-on): Likewise.
807         * modules/vsprintf-posix (Depends-on): Likewise.
808
809 2007-04-06  Bruno Haible  <bruno@clisp.org>
810
811         * tests/test-frexp.c (main): Test also the sign bit of zero results.
812         * tests/test-frexpl.c (main): Likewise.
813         * tests/test-ldexpl.c (main): Likewise.
814         * modules/frexp-tests (Depends-on): Add signbit.
815         * modules/frexpl-tests (Depdends-on): Likewise.
816         * modules/ldexpl-tests (Depdends-on): Likewise.
817
818 2007-04-06  Bruno Haible  <bruno@clisp.org>
819
820         * modules/signbit-tests: New file.
821         * tests/test-signbit.c: New file.
822
823         * modules/signbit: New file.
824         * lib/signbitf.c: New file.
825         * lib/signbitd.c: New file.
826         * lib/signbitl.c: New file.
827         * m4/signbit.m4: New file.
828         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
829         (signbit): New macro.
830         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
831         REPLACE_SIGNBIT.
832         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
833         REPLACE_FREXPL into math.h.
834
835 2007-04-06  Bruno Haible  <bruno@clisp.org>
836
837         * modules/isnanf-nolibm-tests: New file.
838         * tests/test-isnanf.c: New file.
839
840         * modules/isnanf-nolibm: New file.
841         * lib/isnanf.h: New file.
842         * lib/isnanf.c: New file.
843         * lib/isnan.c: Consider the USE_FLOAT macro.
844         * m4/isnanf.m4: New file.
845
846 2007-04-06  Bruno Haible  <bruno@clisp.org>
847
848         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
849         (Link): New section.
850
851         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
852
853 2007-04-06  Bruno Haible  <bruno@clisp.org>
854
855         Assume the 'long double' type.
856         * m4/longdouble.m4: Remove file.
857         * config/srclist.txt: Don't mention longdouble.m4.
858         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
859         * lib/float+.h: Likewise.
860         * lib/frexp.c: Likewise.
861         * lib/printf-args.h: Likewise.
862         * lib/printf-args.c: Likewise.
863         * lib/printf-frexp.c: Likewise.
864         * lib/printf-parse.c: Likewise.
865         * lib/vasnprintf.c: Likewise.
866         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
867         * m4/intl.m4: Likewise.
868         * m4/isnanl.m4: Likewise.
869         * m4/printf.m4: Likewise.
870         * m4/printf-frexpl.m4: Likewise.
871         * m4/vasnprintf.m4: Likewise.
872         * modules/allocsa (Files): Remove m4/longdouble.m4.
873         * modules/gettext (Files): Likewise.
874         * modules/relocatable-prog-wrapper (Files): Likewise.
875         * modules/vasnprintf (Files): Likewise.
876         * modules/isnanl (Files): Likewise.
877         (Include): Simplify.
878         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
879         (Include): Simplify.
880         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
881         (Include): Simplify.
882         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
883         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
884         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
885         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
886         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
887         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
888         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
889         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
890         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
891         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
892         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
893         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
894         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
895         * tests/test-isnanl.c: Likewise.
896         * tests/test-snprintf-posix.h: Likewise.
897         * tests/test-sprintf-posix.h: Likewise.
898         * tests/test-vasnprintf-posix.c: Likewise.
899         * tests/test-vasnprintf-posix2.c: Likewise.
900         * tests/test-vasprintf-posix.c: Likewise.
901
902 2007-04-06  Bruno Haible  <bruno@clisp.org>
903
904         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
905         * lib/math_.h [__DECC]: Include the overridden include file through
906         #include_next, outside the double-inclusion guard.
907         * lib/stdio_.h [__DECC]: Likewise.
908         * lib/stdlib_.h [__DECC]: Likewise.
909         * lib/string_.h [__DECC]: Likewise.
910         * lib/time_.h [__DECC]: Likewise.
911         * lib/wchar_.h [__DECC]: Likewise.
912         * lib/wctype_.h [__DECC]: Likewise.
913         * lib/inttypes_.h [__DECC]: Likewise.
914         Reported by Albert Chin <china@thewrittenword.com> in
915         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
916
917 2007-04-04  Eric Blake  <ebb9@byu.net>
918
919         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
920         1.5.x.
921
922 2007-04-04  Bruno Haible  <bruno@clisp.org>
923
924         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
925         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
926
927 2007-04-04  Bruno Haible  <bruno@clisp.org>
928
929         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
930         results for "%010a" of Infinity and NaN.
931         * tests/test-vasprintf-posix.c (test_function): Likewise.
932         * tests/test-snprintf-posix.h (test_function): Likewise.
933         * tests/test-sprintf-posix.h (test_function): Likewise.
934         * tests/test-fprintf-posix.h (test_function): Remove these tests.
935         * tests/test-printf-posix.h (test_function): Likewise.
936         * tests/test-fprintf-posix.out: Update.
937         Needed for FreeBSD 6.1.
938
939 2007-04-04  Bruno Haible  <bruno@clisp.org>
940
941         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
942         directly used by the gnulib modules nor by gnulib-tool.
943
944 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
945
946         * DEPENDENCIES: Give overall description of version dependency
947         desirability.  Use more-typical names for apps.
948         Add shell, coreutils, diffutils, grep, tar, gzip.
949
950 2007-04-04  Simon Josefsson  <simon@josefsson.org>
951
952         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
953
954 2007-04-04  Karl Berry  <karl@gnu.org>
955
956         * MODULES.html.sh (func_module): missing '.
957
958 2007-04-03  Bruno Haible  <bruno@clisp.org>
959
960         * modules/argmatch-tests (Makefile.am): New variable
961         test_argmatch_LDADD.
962         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
963         * modules/array-list-tests (Makefile.am): New variable
964         test_array_list_LDADD.
965         * modules/array-oset-tests (Makefile.am): New variable
966         test_array_oset_LDADD.
967         * modules/avltree-list-tests (Makefile.am): New variable
968         test_avltree_list_LDADD.
969         * modules/avltree-oset-tests (Makefile.am): New variable
970         test_avltree_oset_LDADD.
971         * modules/avltreehash-list-tests (Makefile.am): New variable
972         test_avltreehash_list_LDADD.
973         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
974         test_canonicalize_lgpl_LDADD.
975         * modules/carray-list-tests (Makefile.am): New variable
976         test_carray_list_LDADD.
977         * modules/dirname-tests (Makefile.am): New variable
978         test_dirname_LDADD.
979         * modules/linked-list-tests (Makefile.am): New variable
980         test_linked_list_LDADD.
981         * modules/linkedhash-list-tests (Makefile.am): New variable
982         test_linkedhash_list_LDADD.
983         * modules/rbtree-list-tests (Makefile.am): New variable
984         test_rbtree_list_LDADD.
985         * modules/rbtree-oset-tests (Makefile.am): New variable
986         test_rbtree_oset_LDADD.
987         * modules/rbtreehash-list-tests (Makefile.am): New variable
988         test_rbtreehash_list_LDADD.
989         * modules/xvasprintf-tests (Makefile.am): New variable
990         test_xvasprintf_LDADD.
991         Reported by Eric Blake.
992
993 2007-04-03  Eric Blake  <ebb9@byu.net>
994
995         * DEPENDENCIES: Weaken m4 requirements.
996
997 2007-04-03  Bruno Haible  <bruno@clisp.org>
998
999         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
1000         * modules/isnanl-tests (configure.ac): Likewise.
1001
1002 2007-04-03  Ben Pfaff  <blp@gnu.org>
1003
1004         * modules/iconv_open: Add $(srcdir)/ to source directory
1005         references in Makefile fragments that call gperf, to fix VPATH
1006         builds.
1007
1008 2007-04-03  Bruno Haible  <bruno@clisp.org>
1009
1010         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
1011         * lib/ldexpl.c: Undo last change.
1012
1013 2007-04-03  Bruno Haible  <bruno@clisp.org>
1014
1015         * modules/printf-frexpl (Depends-on): Undo last change.
1016         (Files): Add m4/ldexpl.m4.
1017
1018 2007-04-03  Bruno Haible  <bruno@clisp.org>
1019
1020         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
1021         * modules/isnanl (Link): New section.
1022
1023         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
1024         * modules/frexp (Link): New section.
1025
1026         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
1027         * modules/frexpl (Link): New section.
1028
1029         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
1030         * modules/ldexpl (Link): New section.
1031
1032 2007-04-03  Bruno Haible  <bruno@clisp.org>
1033
1034         * modules/TEMPLATE-EXTENDED: New file.
1035         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
1036
1037 2007-04-03  Bruno Haible  <bruno@clisp.org>
1038
1039         * DEPENDENCIES: New file.
1040         Suggested by Simon Josefsson.
1041
1042 2007-04-03  Bruno Haible  <bruno@clisp.org>
1043
1044         * doc/gnulib.texi: Escape @.
1045
1046 2007-04-03  James Youngman  <jay@gnu.org>
1047         and Paul Eggert  <eggert@cs.ucla.edu>
1048
1049         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
1050         birthtime on all systems that have birthtime, not just those which
1051         use st_birthtimensec rather than st_birthtim.  Putting zero in
1052         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
1053         that the birth time is not available for files on an NFS mount.
1054
1055 2007-04-03  Simon Josefsson  <simon@josefsson.org>
1056
1057         * modules/memxor: Move back from crypto/, suggested by Bruno.
1058         * modules/crypto/hmac-sha1: Fix memxor dependency.
1059
1060         * modules/crypto/gc: Moved from ../.
1061
1062 2007-04-02  Eric Blake  <ebb9@byu.net>
1063
1064         * lib/ldexpl.c (includes): Avoid libm.
1065
1066         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
1067
1068 2007-04-02  Bruno Haible  <bruno@clisp.org>
1069
1070         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
1071         on IRIX.
1072
1073 2007-04-02  Bruno Haible  <bruno@clisp.org>
1074
1075         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
1076         x86 or x86_64 platforms running MacOS X.
1077         Reported by Ryan Schmidt <@ryandesign.com>.
1078
1079 2007-04-02  Bruno Haible  <bruno@clisp.org>
1080
1081         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
1082         i386.
1083
1084 2007-04-01  Simon Josefsson  <simon@josefsson.org>
1085
1086         * modules/crypto/arcfour: Moved from ../.
1087         * modules/crypto/arcfour-tests: Moved from ../.
1088         * modules/crypto/arctwo: Moved from ../.
1089         * modules/crypto/arctwo-tests: Moved from ../.
1090         * modules/crypto/des: Moved from ../.
1091         * modules/crypto/des-tests: Moved from ../.
1092         * modules/crypto/gc-arcfour: Moved from ../.
1093         * modules/crypto/gc-arcfour-tests: Moved from ../.
1094         * modules/crypto/gc-arctwo: Moved from ../.
1095         * modules/crypto/gc-arctwo-tests: Moved from ../.
1096         * modules/crypto/gc-des: Moved from ../.
1097         * modules/crypto/gc-des-tests: Moved from ../.
1098         * modules/crypto/gc-hmac-md5: Moved from ../.
1099         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
1100         * modules/crypto/gc-hmac-sha1: Moved from ../.
1101         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
1102         * modules/crypto/gc-md2: Moved from ../.
1103         * modules/crypto/gc-md2-tests: Moved from ../.
1104         * modules/crypto/gc-md4: Moved from ../.
1105         * modules/crypto/gc-md4-tests: Moved from ../.
1106         * modules/crypto/gc-md5: Moved from ../.
1107         * modules/crypto/gc-md5-tests: Moved from ../.
1108         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
1109         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
1110         * modules/crypto/gc-random: Moved from ../.
1111         * modules/crypto/gc-rijndael: Moved from ../.
1112         * modules/crypto/gc-rijndael-tests: Moved from ../.
1113         * modules/crypto/gc-sha1: Moved from ../.
1114         * modules/crypto/gc-sha1-tests: Moved from ../.
1115         * modules/crypto/gc-tests: Moved from ../.
1116         * modules/crypto/hmac-md5: Moved from ../.
1117         * modules/crypto/hmac-md5-tests: Moved from ../.
1118         * modules/crypto/hmac-sha1: Moved from ../.
1119         * modules/crypto/hmac-sha1-tests: Moved from ../.
1120         * modules/crypto/md2: Moved from ../.
1121         * modules/crypto/md2-tests: Moved from ../.
1122         * modules/crypto/md4: Moved from ../.
1123         * modules/crypto/md4-tests: Moved from ../.
1124         * modules/crypto/md5: Moved from ../.
1125         * modules/crypto/md5-tests: Moved from ../.
1126         * modules/crypto/memxor: Moved from ../.
1127         * modules/crypto/rijndael: Moved from ../.
1128         * modules/crypto/rijndael-tests: Moved from ../.
1129         * modules/crypto/sha1: Moved from ../.
1130
1131 2007-03-30  James Youngman  <jay@gnu.org>
1132
1133         * tests/test-stat-time.c (prepare_test): use chmod() rather than
1134         rename() to change the ctime of a file (because ctime is unaffected
1135         by rename on jfs2 on AIX 5.1).
1136         (main): Start by doing cleanup, in case a previous run failed leaving
1137         test files behind.
1138
1139 2007-03-31  Bruno Haible  <bruno@clisp.org>
1140
1141         Support old proprietary implementations of iconv.
1142         * modules/iconv_open: New file.
1143         * lib/iconv_.h: New file.
1144         * m4/iconv_h.m4: New file.
1145         * lib/iconv_open.c: New file.
1146         * lib/iconv_open-aix.gperf: New file.
1147         * lib/iconv_open-hpux.gperf: New file.
1148         * lib/iconv_open-irix.gperf: New file.
1149         * lib/iconv_open-osf.gperf: New file.
1150         * m4/iconv_open.m4: New file.
1151         * modules/linebreak (Depends-on): Add iconv_open.
1152         * modules/striconv (Depends-on): Likewise.
1153         * modules/striconveh (Depends-on): Likewise.
1154         * modules/unicodeio (Depends-on): Likewise.
1155         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
1156         (iconv_t)(-1).
1157         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
1158         conversion if cd is (iconv_t)(-1).
1159         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
1160         is not possible.
1161
1162 2007-03-31  Bruno Haible  <bruno@clisp.org>
1163
1164         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
1165         work on Solaris either. Protect also second use of "autodetect_jp".
1166
1167 2007-03-31  Bruno Haible  <bruno@clisp.org>
1168
1169         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
1170         the function is not present.
1171
1172 2007-03-31  Bruno Haible  <bruno@clisp.org>
1173
1174         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
1175         the function is not present.
1176
1177 2007-03-31  Bruno Haible  <bruno@clisp.org>
1178
1179         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
1180         a bug in HP-UX iconv_open().
1181
1182 2007-03-31  Bruno Haible  <bruno@clisp.org>
1183
1184         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
1185         (Mathematics <math.h>): New section, add fpieee.
1186         (Input/output <stdio.h>): Add fseterr.
1187         (Mathematics <math.h>): New section, add printf-frexp.
1188         (Container data structures): Add sublist.
1189         (Core language properties): Add fpucw, inline.
1190         (Functions for greatest-width integer types <inttypes.h>): Add
1191         imaxabs, imaxdiv, inttypes.
1192         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
1193         isnanl-nolibm, ldexp.
1194         (Mathematics <math.h>): New section, add printf-frexpl.
1195         (Support for systems lacking POSIX:2001): Add fprintf-posix,
1196         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
1197         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
1198         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
1199         (Unicode string functions): Add unistr/u*-mbtoucr.
1200         (Java): Add javacomp-script, javaexec-script.
1201         (C#): Add csharpcomp-script, csharpexec-script.
1202         (Support for building libraries and executables): Add havelib,
1203         relocatable-*.
1204         (Support for maintaining and releasing projects): Renamed from
1205         'Support for maintaining and release projects'. Add announce-gen.
1206
1207 2007-03-31  Bruno Haible  <bruno@clisp.org>
1208
1209         * README: Talk primarily about git.
1210         (git and CVS): Renamed from CVS.
1211         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
1212         gnulib is available through git.
1213         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
1214
1215 2007-03-30  Bruno Haible  <bruno@clisp.org>
1216
1217         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
1218         * lib/poll_.h: Likewise.
1219         * lib/stat_.h: Likewise.
1220         * lib/sys_time_.h: Likewise.
1221         * lib/sysexit_.h: Likewise.
1222         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
1223         * lib/stdbool_.h: Likewise.
1224         * lib/byteswap_.h: Add double-inclusion guard.
1225
1226 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
1227
1228         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
1229
1230 2007-03-30  Karl Berry  <karl@gnu.org>
1231
1232         * config/srclist-update: double space after USA in the license
1233         substitution, since that's how it's usually (?) written.
1234
1235 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
1236
1237         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
1238         reported by Bruno Haible.
1239
1240 2007-03-29  Bruno Haible  <bruno@clisp.org>
1241
1242         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
1243         a bug in AIX iconv().
1244
1245 2007-03-29  Bruno Haible  <bruno@clisp.org>
1246
1247         * modules/ldexpl-tests: New file.
1248         * tests/test-ldexpl.c: New file.
1249
1250 2007-03-29  Bruno Haible  <bruno@clisp.org>
1251
1252         * lib/ldexpl.c: Include fpucw.h.
1253         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
1254         multiplication.
1255         * modules/ldexpl (Depends-on): Add fpucw.
1256
1257 2007-03-29  Bruno Haible  <bruno@clisp.org>
1258
1259         * modules/ldexpl: New file.
1260         * m4/ldexpl.m4: New file.
1261         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
1262         set.
1263         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
1264         REPLACE_LDEXPL.
1265         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
1266         REPLACE_LDEXPL.
1267         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1268         gl_FUNC_LDEXPL_WORKS.
1269         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
1270         * modules/mathl (Files): Remove lib/ldexpl.c.
1271         (Depends-on): Add ldexpl.
1272
1273 2007-03-29  Bruno Haible  <bruno@clisp.org>
1274
1275         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
1276
1277 2007-03-29  Bruno Haible  <bruno@clisp.org>
1278
1279         * tests/test-striconveh.c (main): Don't assume that a direct conversion
1280         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
1281         and possibly also HP-UX.
1282         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
1283         work on AIX, IRIX, HP-UX, OSF/1.
1284         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
1285         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
1286         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
1287         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
1288         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
1289         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
1290
1291 2007-03-29  Bruno Haible  <bruno@clisp.org>
1292
1293         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
1294
1295 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
1296
1297         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
1298         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
1299
1300 2007-03-29  Eric Blake  <ebb9@byu.net>
1301
1302         * lib/acl-internal.h: Remove redundant include.
1303         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
1304         Cygwin when a file is locked.
1305
1306 2007-03-29  Bruno Haible  <bruno@clisp.org>
1307
1308         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
1309         file.
1310         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
1311
1312 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
1313
1314         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
1315         try to remove a parent directory if the child couldn't be removed
1316         (except for the first rmdir, which could fail because the child
1317         doesn't exist).  Problem reported by Jeff Blaine in
1318         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
1319
1320 2007-03-28  Bruno Haible  <bruno@clisp.org>
1321
1322         * lib/striconveh.c (utf8conv_carefully): New function.
1323         (mem_cd_iconveh_internal): Invoke it.
1324
1325 2007-03-28  Bruno Haible  <bruno@clisp.org>
1326
1327         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
1328         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
1329         input.
1330         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
1331         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
1332         unistr/u8-uctomb.
1333
1334 2007-03-28  Bruno Haible  <bruno@clisp.org>
1335
1336         * modules/unistr/u8-mbtoucr: New file.
1337         * lib/unistr/u8-mbtoucr.c: New file.
1338         * modules/unistr/u16-mbtoucr: New file.
1339         * lib/unistr/u16-mbtoucr.c: New file.
1340         * modules/unistr/u16-mbtoucr: New file.
1341         * lib/unistr/u16-mbtoucr.c: New file.
1342         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
1343
1344 2007-03-27  Simon Josefsson  <simon@josefsson.org>
1345             Bruno Haible  <bruno@clisp.org>
1346
1347         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
1348         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
1349         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
1350
1351         * m4/stdio_h.m4: Add stubs for vasprintf too.
1352
1353         * modules/stdio: Support vasprintf in sed command.
1354
1355         * modules/vasprintf: Depend on stdio for prototypes.  Remove
1356         vasprintf.h.  Add stdio module indicator.
1357
1358         * lib/stdio_.h: Declare asprintf and vasprintf, based on
1359         vasprintf.h.
1360
1361         * lib/vasprintf.h: File removed.
1362
1363         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
1364         * lib/vasprintf.c: Ditto.
1365         * lib/xvasprintf.c: Ditto.
1366         * tests/test-vasprintf-posix.c: Ditto.
1367         * tests/test-vasprintf.c: Ditto.
1368
1369 2007-03-27  Bruno Haible  <bruno@clisp.org>
1370
1371         Make vasnprintf multithread-safe.
1372         * lib/vasnprintf.c (decimal_point_char): New function.
1373         (VASNPRINTF): Use it.
1374         Suggested by Simon Josefsson.
1375
1376 2007-03-27  Eric Blake  <ebb9@byu.net>
1377
1378         Support sub-second birthtime on cygwin.
1379         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
1380         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
1381         (get_stat_birthtime): Also work with st_birthtim.
1382
1383 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
1384
1385         * lib/stat-time.h (USE_BIRTHTIME): Remove.
1386         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
1387         (get_stat_birthtime_ns): Do not try to use "spare" fields.
1388         (get_stat_birthtime_ns): Simplify compile-time tests.
1389         (get_stat_birthtime): Change the API to look like
1390         get_stat_mtime etc., except return a negative tv_nsec on error.
1391         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
1392         Don't check for "spare" fields.
1393         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
1394         or for struct stat.st_birthtime, as these tests aren't used.
1395         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
1396
1397 2007-03-27  Bruno Haible  <bruno@clisp.org>
1398
1399         * lib/stat-time.h: Include <sys/stat.h>.
1400
1401 2007-03-27  James Youngman  <jay@gnu.org>
1402
1403         * lib/stat-time.h (get_stat_birthtime): New function for
1404           retrieving st_birthtime as provided by UFS2 (hence *BSD).
1405         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
1406           and its variants.
1407         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
1408         * modules/stat-time-test: New file.
1409         * tests/test-stat-time.c: New test, devised by Bruno Haible.
1410
1411 2007-03-26  Bruno Haible  <bruno@clisp.org>
1412
1413         Better support of signalling NaNs.
1414         * lib/atanl.c: Include isnanl.h.
1415         (atanl): Perform test for NaN at the beginning of the function and
1416         through a call to isnanl.
1417         * lib/cosl.c: Include isnanl.h.
1418         (cosl): Perform test for NaN at the beginning of the function and
1419         through a call to isnanl.
1420         * lib/ldexpl.c: Include isnanl.h.
1421         (ldexpl): Perform test for NaN through a call to isnanl.
1422         * lib/logl.c: Include isnanl.h.
1423         (logl): Perform test for NaN at the beginning of the function and
1424         through a call to isnanl.
1425         * lib/sinl.c: Include isnanl.h.
1426         (sinl): Perform test for NaN at the beginning of the function and
1427         through a call to isnanl.
1428         * lib/sqrtl.c: Include isnanl.h.
1429         (sqrtl): Perform test for NaN at the beginning of the function and
1430         through a call to isnanl.
1431         * lib/tanl.c: Include isnanl.h.
1432         (tanl): Perform test for NaN at the beginning of the function and
1433         through a call to isnanl.
1434         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
1435         * modules/mathl (Depends-on): Add isnanl.
1436
1437 2007-03-26  Eric Blake  <ebb9@byu.net>
1438
1439         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
1440         regression in logic sense of previous patch.
1441
1442 2007-03-26  Bruno Haible  <bruno@clisp.org>
1443
1444         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
1445         unportable shell command "if ! ...".
1446         Reported by Ralf Wildenhues.
1447
1448 2007-03-25  Bruno Haible  <bruno@clisp.org>
1449
1450         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
1451         <sysexits.h> file, and only add EX_CONFIG.
1452         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
1453         absolute file name and whether it is sufficient. Substitute also
1454         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
1455         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
1456         ABSOLUTE_SYSEXITS_H into sysexits.h.
1457
1458 2007-03-25  Bruno Haible  <bruno@clisp.org>
1459
1460         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
1461         hints is NULL.
1462
1463 2007-03-25  Bruno Haible  <bruno@clisp.org>
1464
1465         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
1466         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
1467
1468 2007-03-25  Bruno Haible  <bruno@clisp.org>
1469
1470         * lib/vasnprintf.c: Include langinfo.h.
1471         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
1472         multithread-safe.
1473         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
1474         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
1475         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1476         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1477         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1478         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1479         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1480         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
1481         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1482         Reported by Simon Josefsson.
1483
1484 2007-03-25  Bruno Haible  <bruno@clisp.org>
1485
1486         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
1487         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
1488         * modules/vasnprintf (Depends-on): Add stdint.
1489
1490 2007-03-25  Bruno Haible  <bruno@clisp.org>
1491
1492         * modules/fpieee: New file.
1493         * m4/fpieee.m4: New file.
1494         * modules/isnan-nolibm (Depends-on): Add fpieee.
1495         * modules/isnanl-nolibm (Depends-on): Add fpieee.
1496         * modules/isnanl (Depends-on): Add fpieee.
1497
1498 2007-03-25  Bruno Haible  <bruno@clisp.org>
1499
1500         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
1501
1502 2007-03-25  Bruno Haible  <bruno@clisp.org>
1503
1504         Avoid test failures on IRIX 6.5.
1505         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
1506         (main): Use it.
1507         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
1508         macros.
1509         (main): Use them.
1510
1511 2007-03-25  Bruno Haible  <bruno@clisp.org>
1512
1513         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
1514         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
1515         exists but doesn't work.
1516         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
1517         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
1518         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
1519         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
1520
1521 2007-03-25  Bruno Haible  <bruno@clisp.org>
1522
1523         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
1524         returns inf. Needed on IRIX 6.5.
1525
1526 2007-03-25  Bruno Haible  <bruno@clisp.org>
1527
1528         * tests/test-frexpl.c: Include isnanl-nolibm.h.
1529         (main): Use isnanl instead of x != x idiom.
1530         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
1531
1532         * tests/test-frexp.c: Include isnan.h.
1533         (main): Use isnan instead of x != x idiom.
1534         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
1535
1536 2007-03-25  Bruno Haible  <bruno@clisp.org>
1537
1538         * tests/test-frexp.c (NaN): New function/macro.
1539         (main): Use it instead of 0.0 / 0.0.
1540         * tests/test-isnan.c (NaN): New function/macro.
1541         (main): Use it instead of 0.0 / 0.0.
1542         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
1543         (test_function): Use it instead of 0.0 / 0.0.
1544         * tests/test-vasprintf-posix.c (NaN): New function/macro.
1545         (test_function): Use it instead of 0.0 / 0.0.
1546         * tests/test-snprintf-posix.h (NaN): New function/macro.
1547         (test_function): Use it instead of 0.0 / 0.0.
1548         * tests/test-sprintf-posix.h (NaN): New function/macro.
1549         (test_function): Use it instead of 0.0 / 0.0.
1550         * tests/test-fprintf-posix.h (NaN): New function/macro.
1551         (test_function): Use it instead of 0.0 / 0.0.
1552         * tests/test-printf-posix.h (NaN): New function/macro.
1553         (test_function): Use it instead of 0.0 / 0.0.
1554
1555         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
1556
1557 2007-03-25  Bruno Haible  <bruno@clisp.org>
1558
1559         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
1560
1561 2007-03-25  Bruno Haible  <bruno@clisp.org>
1562
1563         * lib/regexec.c (merge_state_with_log): Make static.
1564
1565 2007-03-25  Bruno Haible  <bruno@clisp.org>
1566
1567         * lib/trigl.c (kernel_rem_pio2): Make static.
1568
1569 2007-03-25  Bruno Haible  <bruno@clisp.org>
1570
1571         * lib/sincosl.c (sincosl_table): Make static.
1572
1573 2007-03-25  Bruno Haible  <bruno@clisp.org>
1574
1575         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
1576         if the compiler does not support C99.
1577
1578 2007-03-25  Bruno Haible  <bruno@clisp.org>
1579
1580         * modules/time (Makefile.am): Ensure all rule action lines start with a
1581         tab.
1582
1583 2007-03-24  Bruno Haible  <bruno@clisp.org>
1584
1585         * modules/tsearch-tests: New file.
1586         * tests/test-tsearch.sh: New file.
1587         * tests/test-tsearch.c: New file, mostly copied from glibc.
1588
1589         * modules/search-tests: New file.
1590         * tests/test-search.c: New file.
1591
1592         * modules/search: New file.
1593         * lib/search_.h: New file, incorporating lib/tsearch.h.
1594         * m4/search_h.m4: New file.
1595         * lib/tsearch.h: Remove file.
1596         * lib/tsearch.c: Include search.h instead of tsearch.h.
1597         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
1598         HAVE_TSEARCH.
1599         * modules/tsearch (Files): Remove lib/tsearch.h.
1600         (Depends-on): Add search.
1601         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
1602         (Include): Change tsearch.h into search.h.
1603
1604 2007-03-24  Bruno Haible  <bruno@clisp.org>
1605
1606         * modules/fpucw: New file.
1607         * lib/fpucw.h: New file.
1608         * lib/frexp.c: Include fpucw.h.
1609         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1610         (FUNC): Use them.
1611         * lib/printf-frexp.c: Include fpucw.h.
1612         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1613         (FUNC): Use them.
1614         * lib/vasnprintf.c: Include fpucw.h.
1615         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
1616         'long double' calculations.
1617         * tests/test-frexpl.c: Include fpucw.h.
1618         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1619         * tests/test-printf-frexpl.c: Include fpucw.h.
1620         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1621         * modules/frexpl (Depends-on): Add fpucw.
1622         * modules/printf-frexpl (Depends-on): Likewise.
1623         * modules/fprintf-posix (Depends-on): Likewise.
1624         * modules/snprintf-posix (Depends-on): Likewise.
1625         * modules/sprintf-posix (Depends-on): Likewise.
1626         * modules/vasnprintf-posix (Depends-on): Likewise.
1627         * modules/vasprintf-posix (Depends-on): Likewise.
1628         * modules/vfprintf-posix (Depends-on): Likewise.
1629         * modules/vsnprintf-posix (Depends-on): Likewise.
1630         * modules/vsprintf-posix (Depends-on): Likewise.
1631         * modules/frexpl-tests (Depends-on): Likewise.
1632         * modules/printf-frexpl-tests (Depends-on): Likewise.
1633
1634 2007-03-24  Bruno Haible  <bruno@clisp.org>
1635
1636         * lib/float+.h: New file.
1637         * lib/isnan.c: Include float+.h.
1638         (SIZE): New macro.
1639         (FUNC): Compare only SIZE bytes of the value.
1640         * lib/vasnprintf.c: Include float+.h.
1641         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
1642         SIZEOF_LDBL or SIZEOF_DBL bytes.
1643         * modules/isnan-nolibm (Files): Add lib/float+.h.
1644         * modules/isnanl-nolibm (Files): Add lib/float+.h.
1645         * modules/isnanl (Files): Add lib/float+.h.
1646         * modules/vasnprintf (Files): Add lib/float+.h.
1647
1648 2007-03-24  Bruno Haible  <bruno@clisp.org>
1649
1650         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
1651         include isnanl-nolibm.h.
1652
1653 2007-03-24  Bruno Haible  <bruno@clisp.org>
1654
1655         * tests/test-read-file.c (main): Don't produce spurious output for
1656         expected situations. Make the test fail if it encountered unexpected
1657         results.
1658
1659 2007-03-24  Bruno Haible  <bruno@clisp.org>
1660
1661         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
1662         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
1663
1664 2007-03-24  Bruno Haible  <bruno@clisp.org>
1665
1666         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
1667
1668 2007-03-24  Bruno Haible  <bruno@clisp.org>
1669
1670         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
1671         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
1672
1673         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
1674         * modules/utf8-ucs4: Turn into a symbolic link to module
1675         unistr/u8-mbtouc.
1676
1677         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
1678         utf8-ucs4-unsafe.
1679         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
1680         unistr/u8-mbtouc-unsafe.
1681
1682         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
1683         * modules/utf16-ucs4: Turn into a symbolic link to module
1684         unistr/u16-mbtouc.
1685
1686         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
1687         utf16-ucs4-unsafe.
1688         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
1689         unistr/u16-mbtouc-unsafe.
1690
1691         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
1692         * modules/ucs4-utf8: Turn into a symbolic link to module
1693         unistr/u8-ubtomb.
1694
1695         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
1696         * modules/ucs4-utf16: Turn into a symbolic link to module
1697         unistr/u16-ubtomb.
1698
1699 2007-03-24  Bruno Haible  <bruno@clisp.org>
1700
1701         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
1702         Enable the function only if HAVE_INLINE.
1703         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
1704         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1705         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
1706         Enable the function only if HAVE_INLINE.
1707         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
1708         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1709         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
1710         Enable the function only if HAVE_INLINE.
1711         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
1712         Enable the function only if HAVE_INLINE.
1713         * modules/utf8-ucs4: Update.
1714         * modules/utf8-ucs4-unsafe: Update.
1715         * modules/utf16-ucs4: Update.
1716         * modules/utf16-ucs4-unsafe: Update.
1717         * modules/ucs4-utf8: Update.
1718         * modules/ucs4-utf16: Update.
1719
1720 2007-03-24  Bruno Haible  <bruno@clisp.org>
1721
1722         * lib/utf8-ucs4.h: Remove file.
1723         * lib/utf8-ucs4-unsafe.h: Remove file.
1724         * lib/utf16-ucs4.h: Remove file.
1725         * lib/utf16-ucs4-unsafe.h: Remove file.
1726         * lib/ucs4-utf8.h: Remove file.
1727         * lib/ucs4-utf16.h: Remove file.
1728         * lib/unistr.h: Include their previous contents.
1729         * m4/utf-ucs4.m4: Remove file.
1730         * m4/ucs4-utf.m4: Remove file.
1731         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
1732         (Depends-on): Add unistr/base.
1733         (configure.ac): Remove gl_UTF_UCS4.
1734         (Makefile.am): Update.
1735         (Include): Change to unistr.h.
1736         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
1737         (Depends-on): Add unistr/base.
1738         (configure.ac): Remove gl_UTF_UCS4.
1739         (Makefile.am): Update.
1740         (Include): Change to unistr.h.
1741         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
1742         (Depends-on): Add unistr/base.
1743         (configure.ac): Remove gl_UTF_UCS4.
1744         (Makefile.am): Update.
1745         (Include): Change to unistr.h.
1746         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
1747         (Depends-on): Add unistr/base.
1748         (configure.ac): Remove gl_UTF_UCS4.
1749         (Makefile.am): Update.
1750         (Include): Change to unistr.h.
1751         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
1752         (Depends-on): Add unistr/base.
1753         (configure.ac): Remove gl_UCS4_UTF.
1754         (Makefile.am): Update.
1755         (Include): Change to unistr.h.
1756         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
1757         (Depends-on): Add unistr/base.
1758         (configure.ac): Remove gl_UCS4_UTF.
1759         (Makefile.am): Update.
1760         (Include): Change to unistr.h.
1761         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
1762         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
1763         utf8-ucs4-unsafe.h.
1764         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
1765         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
1766         utf16-ucs4-unsafe.h.
1767         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
1768         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
1769         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
1770         * lib/unistr/u8-strchr.c: Likewise.
1771         * lib/unistr/u8-strrchr.c: Likewise.
1772         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
1773         * lib/unistr/u16-strchr.c: Likewise.
1774         * lib/unistr/u16-strrchr.c: Likewise.
1775         * lib/striconveh.c: Update.
1776         * lib/linebreak.c: Update.
1777
1778 2007-03-24  Bruno Haible  <bruno@clisp.org>
1779
1780         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
1781         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
1782
1783 2007-03-22  Bruno Haible  <bruno@clisp.org>
1784
1785         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
1786
1787 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
1788
1789         * MODULES.html.sh (File system functions): New module write-any-file.
1790         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
1791         * m4/write-any-file.m4: New files.
1792
1793 2007-03-23  Eric Blake  <ebb9@byu.net>
1794
1795         * gnulib-tool: Rearrange space-tab sequences, since some editors
1796         like to eat them.
1797
1798 2007-03-23  Eric Blake  <ebb9@byu.net>
1799
1800         * lib/version-etc.c (version_etc_va): Update license wording to
1801         be more concise.  Recommended by Richard Stallman.
1802
1803 2007-03-22  Bruno Haible  <bruno@clisp.org>
1804
1805         * lib/poll.c (MSG_PEEK): New fallback definition.
1806
1807 2007-03-22  Bruno Haible  <bruno@clisp.org>
1808
1809         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
1810         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
1811         (main): Update.
1812         Fixes a compilation error on BeOS.
1813
1814 2007-03-22  Bruno Haible  <bruno@clisp.org>
1815
1816         * modules/frexpl-tests: New file.
1817         * tests/test-frexpl.c: New file.
1818
1819         * modules/frexpl: New file.
1820         * m4/frexpl.m4: New file.
1821         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
1822         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
1823         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
1824         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
1825         (Depends-on): Add frexpl. Remove isnanl-nolibm.
1826         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
1827
1828 2007-03-22  Bruno Haible  <bruno@clisp.org>
1829
1830         * lib/frexpl.c: Share code with lib/frexp.c.
1831         * modules/mathl (Files): Add lib/frexp.c.
1832         (Depends-on): Add isnanl-nolibm.
1833
1834 2007-03-22  Bruno Haible  <bruno@clisp.org>
1835
1836         * modules/printf-frexp (Files): Add m4/frexp.m4.
1837         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
1838         only if the found frexp function actually works.
1839
1840 2007-03-22  Bruno Haible  <bruno@clisp.org>
1841
1842         * lib/frexp.c: Remove older implementation that uses divisions.
1843
1844 2007-03-21  Bruno Haible  <bruno@clisp.org>
1845
1846         * modules/frexp-tests: New file.
1847         * tests/test-frexp.c: New file.
1848
1849         * modules/frexp: New file.
1850         * lib/frexp.c: New file.
1851         * m4/frexp.m4: New file.
1852         * lib/math_.h (frexp): New declaration.
1853         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
1854         REPLACE_FREXP.
1855         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
1856
1857 2007-03-21  Bruno Haible  <bruno@clisp.org>
1858
1859         * modules/isnanl-tests: New file.
1860         * tests/test-isnanl.c: New file.
1861
1862         * modules/isnanl: New file.
1863         * lib/isnanl.h: New file.
1864         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
1865         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
1866         gl_FUNC_ISNANL_WORKS.
1867         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
1868         New macros.
1869
1870 2007-03-21  Bruno Haible  <bruno@clisp.org>
1871
1872         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
1873         lib/isnanl.h.
1874         (Include): Update.
1875         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
1876         * lib/vasnprintf.c: Update.
1877         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
1878         tests/test-isnanl.h, remove tests/test-isnanl.c.
1879         (Makefile.am): Update.
1880         * tests/test-isnanl-nolibm.c: New file.
1881         * tests/test-isnanl.h: New file.
1882         * tests/test-isnanl.c: Remove file.
1883
1884 2007-03-21  Jim Meyering  <jim@meyering.net>
1885
1886         When trying to open ".", treat ESTALE like EACCES.
1887         * lib/savewd.c (savewd_save): Resort to forking not just upon
1888         failure with EACCES, but also when errno is ESTALE.
1889
1890 2007-03-20  Bruno Haible  <bruno@clisp.org>
1891
1892         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
1893         Needed on AIX 5.1. Reported by Matthew Woehlke.
1894
1895 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1896
1897         Suggestions by Bruno Haible:
1898         * lib/acl-internal.h: Include "gettext.h" rather than rolling
1899         our own.
1900         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
1901         * modules/acl (Depends-on): Add gettext.
1902
1903 2007-03-19  Bruno Haible  <bruno@clisp.org>
1904
1905         * modules/iconvme: Remove file.
1906         * lib/iconvme.h: Remove file.
1907         * lib/iconvme.c: Remove file.
1908         * m4/iconvme.m4: Remove file.
1909
1910 2007-03-19  Bruno Haible  <bruno@clisp.org>
1911
1912         * doc/relocatable-maint.texi: Break long shell script line.
1913         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1914
1915 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1916
1917         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
1918         handle file_has_acl.
1919         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
1920         * lib/acl.c: Move header inclusions and related macro defns into
1921         lib/acl-internal.h.
1922         (S_ISLNK): Remove defn, since that's now done for us.
1923         (file_has_acl): Move to lib/file-has-acl.c.
1924         Call acl_trivial if available.  This is the crucial part of the fix.
1925         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
1926         shared within the library.  Rewrite a bit, partly to make it compatible
1927         with the GNU coding style.
1928         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
1929         Remove unnecessary double-quotes.
1930         Don't test for acl_to_text; the build will catch that.
1931         Replace acl_entries if it doesn't exist and it is needed.
1932         Check for -lsec and acl_trivial (as used on Solaris 10).
1933         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
1934         lib/file-has-acl.c.
1935         (Depends-on): Add sys_stat, for S_ISLNK.
1936
1937 2007-03-19  Ben Pfaff  <blp@gnu.org>
1938
1939         * doc/gnulib.texi: Fix typos.
1940         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1941
1942 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1943
1944         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
1945         If size is zero here, buf must be zero.
1946
1947 2007-03-19  Simon Josefsson  <simon@josefsson.org>
1948
1949         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
1950         <bruno@clisp.org>.
1951
1952 2007-03-18  Bruno Haible  <bruno@clisp.org>
1953
1954         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
1955         Suggested by Eric Blake.
1956
1957 2007-03-18  Ben Pfaff  <blp@gnu.org>
1958
1959         * doc/relocatable.texi: Recommend using as prefix a directory
1960         that does not exist and will never be created.  Based on
1961         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
1962         and others.
1963
1964 2007-03-17  Bruno Haible  <bruno@clisp.org>
1965
1966         * lib/fchownat.c: Include lchown.h.
1967
1968 2007-03-17  Bruno Haible  <bruno@clisp.org>
1969
1970         Fix endless loop when the given allocated size was > INT_MAX.
1971         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
1972         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
1973         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
1974         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
1975         * lib/sprintf.c (sprintf): Likewise.
1976
1977 2007-03-17  Bruno Haible  <bruno@clisp.org>
1978
1979         * tests/test-argp-2.sh (func_compare): Output a context diff.
1980
1981 2007-03-17  Bruno Haible  <bruno@clisp.org>
1982
1983         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
1984         locale's decimal-point character.
1985
1986 2007-03-17  Bruno Haible  <bruno@clisp.org>
1987
1988         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
1989         before comparing it. Needed because on some platforms (e.g. x86) a
1990         'long double' occupies less bytes than sizeof (long double).
1991
1992 2007-03-17  Bruno Haible  <bruno@clisp.org>
1993
1994         * tests/test-crc.c (main): Make printf statements 64-bit clean.
1995         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
1996         * tests/test-getaddrinfo.c (simple): Likewise.
1997         * tests/test-read-file.c (main): Likewise.
1998
1999 2007-03-17  Bruno Haible  <bruno@clisp.org>
2000
2001         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
2002
2003 2007-03-17  Bruno Haible  <bruno@clisp.org>
2004
2005         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
2006         unused variable.
2007
2008 2007-03-17  Bruno Haible  <bruno@clisp.org>
2009
2010         * tests/test-c-strcasecmp.c: Include c-strcase.h.
2011         * tests/test-c-strncasecmp.c: Likewise.
2012
2013 2007-03-17  Bruno Haible  <bruno@clisp.org>
2014
2015         * modules/stdlib (Depends-on): Add unistd.
2016         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
2017         Needed for MacOS X 10.3.
2018
2019 2007-03-17  Bruno Haible  <bruno@clisp.org>
2020
2021         * lib/unistr/u-strdup.h: Include <stdlib.h>.
2022
2023 2007-03-17  Bruno Haible  <bruno@clisp.org>
2024
2025         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
2026
2027 2007-03-17  Bruno Haible  <bruno@clisp.org>
2028
2029         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
2030         to reflect files copied from gnulib (with or without modifications).
2031         Suggested by Jim Meyering.
2032
2033 2007-03-17  Eric Blake  <ebb9@byu.net>
2034
2035         * NEWS: Document stdlib change from 2007-02-18.
2036
2037 2007-03-17  Jim Meyering  <jim@meyering.net>
2038
2039         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
2040         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
2041         someone uses a name containing shell meta-characters.
2042         Reported by Alfred M. Szmidt.
2043
2044         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
2045
2046 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
2047
2048         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
2049         and copy gettext configuration files only if configure.ac contains
2050         a use of AM_GNU_GETTEXT_VERSION.
2051
2052 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
2053
2054         * build-aux/bootstrap (gnulib_name): New variable.
2055         (gnulib_tool_options): Use it.
2056
2057 2007-03-13  Simon Josefsson  <simon@josefsson.org>
2058
2059         * tests/test-des.c: Use new namespace.
2060
2061 2007-03-15  Bruno Haible  <bruno@clisp.org>
2062
2063         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
2064         Reported by James Youngman <jay@gnu.org>.
2065
2066 2007-03-15  Bruno Haible  <bruno@clisp.org>
2067
2068         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
2069         declared prototype. Needed with cc on OSF/1 5.1.
2070
2071 2007-03-15  Bruno Haible  <bruno@clisp.org>
2072
2073         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
2074         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
2075         (struct gl_list_implementation): Add dispose_fn argument to the
2076         'create_empty', 'create' methods.
2077         (struct gl_list_impl_base): Add field 'dispose_fn'.
2078         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
2079         argument.
2080         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
2081         dispose_fn argument.
2082         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
2083         dispose_fn on the dropped values.
2084         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
2085         dispose_fn argument.
2086         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
2087         dropped values.
2088         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
2089         (gl_tree_remove_node): Call dispose_fn on the dropped value.
2090         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
2091         (gl_tree_remove_node): Call dispose_fn on the dropped value.
2092         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
2093         argument.
2094         (gl_tree_list_free): Call dispose_fn on the dropped values.
2095         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
2096         the dropped values.
2097         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2098         Add dispose_fn argument.
2099         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
2100         Call dispose_fn on the dropped values.
2101         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
2102         Add dispose_fn argument.
2103         (gl_sublist_create): Initialize the 'dispose_fn' field.
2104         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
2105         * tests/test-array_list.c (main): Update.
2106         * tests/test-carray_list.c (main): Update.
2107         * tests/test-avltree_list.c (main): Update.
2108         * tests/test-rbtree_list.c (main): Update.
2109         * tests/test-avltreehash_list.c (main): Update.
2110         * tests/test-rbtreehash_list.c (main): Update.
2111         * tests/test-linked_list.c (main): Update.
2112         * tests/test-linkedhash_list.c (main): Update.
2113         * tests/test-array_oset.c (main): Update.
2114
2115 2007-03-15  Bruno Haible  <bruno@clisp.org>
2116
2117         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
2118         (gl_oset_create_empty): Add dispose_fn argument.
2119         (struct gl_oset_implementation): Add dispose_fn argument to
2120         'create_empty' method.
2121         (struct gl_oset_impl_base): Add dispose_fn field.
2122         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
2123         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
2124         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
2125         values.
2126         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
2127         (gl_tree_oset_free): Call dispose_fn on the dropped values.
2128         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
2129         dropped value.
2130         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
2131         dropped value.
2132         * tests/test-array_oset.c (main): Update.
2133         * tests/test-avltree_oset.c (main): Update.
2134         * tests/test-rbtree_oset.c (main): Update.
2135         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
2136
2137 2007-03-13  Bruno Haible  <bruno@clisp.org>
2138
2139         * tests/test-stdbool.c (i): Update after last patch.
2140
2141 2007-03-12  Bruno Haible  <bruno@clisp.org>
2142
2143         * lib/quotearg.c: Include <wctype.h> early, before the definition of
2144         the iswprint macro. Needed on Solaris 2.5.1.
2145
2146 2007-03-12  Bruno Haible  <bruno@clisp.org>
2147
2148         * tests/test-printf-frexp.c (main): Declare x as volatile.
2149
2150 2007-03-12  Simon Josefsson  <simon@josefsson.org>
2151
2152         * doc/gnulib.texi (Build robot for gnulib): New section.
2153
2154 2007-03-12  Jim Meyering  <jim@meyering.net>
2155
2156         * build-aux/bootstrap: New file.
2157         * build-aux/bootstrap.conf: New file, from coreutils.
2158
2159 2007-03-11  Bruno Haible  <bruno@clisp.org>
2160
2161         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
2162
2163 2007-03-12  Simon Josefsson  <simon@josefsson.org>
2164
2165         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
2166         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
2167         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
2168
2169 2007-03-11  Bruno Haible  <bruno@clisp.org>
2170
2171         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
2172         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
2173
2174 2007-03-11  Bruno Haible  <bruno@clisp.org>
2175
2176         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
2177         formula. Needed for SunPRO C 5.0.
2178
2179 2007-03-11  Bruno Haible  <bruno@clisp.org>
2180
2181         * modules/long-options (Depends-on): Add getopt.
2182
2183 2007-03-11  Bruno Haible  <bruno@clisp.org>
2184
2185         * modules/modechange (Depends-on): Add stdbool.
2186
2187 2007-03-11  Bruno Haible  <bruno@clisp.org>
2188
2189         * modules/i-ring (Depends-on): Add stdbool.
2190
2191 2007-03-11  Bruno Haible  <bruno@clisp.org>
2192
2193         * modules/gc-des (Depends-on): Add stdbool.
2194
2195 2007-03-11  Bruno Haible  <bruno@clisp.org>
2196
2197         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
2198
2199 2007-03-11  Bruno Haible  <bruno@clisp.org>
2200
2201         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
2202
2203 2007-03-11  Bruno Haible  <bruno@clisp.org>
2204
2205         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
2206
2207 2007-03-11  Bruno Haible  <bruno@clisp.org>
2208
2209         * lib/vasnprintf.c (sprintf): Undefine.
2210
2211 2007-03-11  Bruno Haible  <bruno@clisp.org>
2212
2213         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
2214         initializers in SunPRO C and Compaq C compilers.
2215
2216 2007-03-11  Bruno Haible  <bruno@clisp.org>
2217
2218         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
2219         decrementing code ANSI C compliant.
2220
2221 2007-03-11  Bruno Haible  <bruno@clisp.org>
2222
2223         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
2224         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
2225
2226 2007-03-11  Bruno Haible  <bruno@clisp.org>
2227
2228         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
2229         <stdbool.h> substitute doesn't pass.
2230
2231 2007-03-11  Bruno Haible  <bruno@clisp.org>
2232
2233         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
2234
2235 2007-03-11  Bruno Haible  <bruno@clisp.org>
2236
2237         * gnulib-tool (func_create_megatestdir): Create also an autobuild
2238         script, for submission to autobuild.josefsson.org.
2239
2240 2007-03-10  Bruno Haible  <bruno@clisp.org>
2241
2242         * modules/canonicalize-lgpl-tests: New file.
2243         * tests/test-canonicalize-lgpl.sh: New file.
2244         * tests/test-canonicalize-lgpl.c: New file.
2245
2246         * modules/c-strcase-tests: New file.
2247         * tests/test-c-strcase.sh: New file.
2248         * tests/test-c-strcasecmp.c: New file.
2249         * tests/test-c-strncasecmp.c: New file.
2250
2251         * modules/atexit-tests: New file.
2252         * tests/test-atexit.sh: New file.
2253         * tests/test-atexit.c: New file.
2254
2255 2007-03-10  Bruno Haible  <bruno@clisp.org>
2256
2257         * tests/test-binary-io.sh: Use temporary filenames that are not so
2258         likely to clash with those of other tests (in a parallel make).
2259         * tests/test-binary-io.c: Likewise.
2260
2261 2007-03-10  Bruno Haible  <bruno@clisp.org>
2262
2263         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
2264         fallback; use #error instead.
2265         Suggested by Simon Josefsson.
2266
2267 2007-03-10  Bruno Haible  <bruno@clisp.org>
2268
2269         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
2270         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
2271         first and the last.
2272
2273 2007-03-10  Bruno Haible  <bruno@clisp.org>
2274
2275         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
2276
2277 2007-03-10  Bruno Haible  <bruno@clisp.org>
2278
2279         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
2280         "make distcheck".
2281         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
2282         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
2283         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
2284
2285 2007-03-10  Bruno Haible  <bruno@clisp.org>
2286
2287         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
2288         variable.
2289         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
2290         variable.
2291
2292 2007-03-09  Eric Blake  <ebb9@byu.net>
2293         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
2294
2295         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
2296         types are not being provided by gnulib.
2297         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
2298         types are supported.
2299
2300 2007-03-10  Bruno Haible  <bruno@clisp.org>
2301
2302         * lib/stdio_.h (__attribute__): New macro.
2303         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
2304         vsprintf): Specify __attribute__ __format__ for GCC.
2305         Suggested by Eric Blake.
2306
2307 2007-03-09  Bruno Haible  <bruno@clisp.org>
2308
2309         * modules/printf-posix-tests: New file.
2310         * tests/test-printf-posix.sh: New file.
2311         * tests/test-printf-posix.c: New file.
2312
2313         * modules/printf-posix: New file.
2314         * lib/printf.c: New file.
2315         * m4/printf-posix-rpl.m4: New file.
2316         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
2317         REPLACE_PRINTF.
2318         * lib/stdio_.h (printf): New declaration.
2319         (format, __format__, ____printf____, ____scanf____, ____strftime____,
2320         ____strfmon____): New macros.
2321         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
2322         REPLACE_PRINTF.
2323
2324 2007-03-09  Bruno Haible  <bruno@clisp.org>
2325
2326         * tests/test-vasnprintf-posix2.sh: New file.
2327         * tests/test-vasnprintf-posix2.c: New file.
2328         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
2329         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
2330         (Makefile.am): Activate test-vasnprintf-posix2.sh.
2331
2332         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
2333         a locale dependent decimal point, rather than always '.'.
2334
2335 2007-03-09  Eric Blake  <ebb9@byu.net>
2336
2337         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
2338         spite of platforms like Tandem/NSK that define it to -1.
2339
2340 2007-03-08  Bruno Haible  <bruno@clisp.org>
2341
2342         * modules/vprintf-posix-tests: New file.
2343         * tests/test-vprintf-posix.sh: New file.
2344         * tests/test-vprintf-posix.c: New file.
2345         * tests/test-printf-posix.h: New file.
2346
2347         * modules/vprintf-posix: New file.
2348         * lib/vprintf.c: New file.
2349         * m4/vprintf-posix.m4: New file.
2350         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
2351         REPLACE_VPRINTF.
2352         * lib/stdio_.h (vprintf): New declaration.
2353         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
2354         REPLACE_VPRINTF.
2355
2356 2007-03-08  Bruno Haible  <bruno@clisp.org>
2357
2358         * modules/fprintf-posix-tests: New file.
2359         * tests/test-fprintf-posix.sh: New file.
2360         * tests/test-fprintf-posix.c: New file.
2361
2362         * modules/fprintf-posix: New file.
2363         * lib/fprintf.c: New file.
2364         * m4/fprintf-posix.m4: New file.
2365         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
2366         REPLACE_FPRINTF.
2367         * lib/stdio_.h (fprintf): New declaration.
2368         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
2369         REPLACE_FPRINTF.
2370
2371 2007-03-08  Bruno Haible  <bruno@clisp.org>
2372
2373         * modules/vfprintf-posix-tests: New file.
2374         * tests/test-vfprintf-posix.sh: New file.
2375         * tests/test-vfprintf-posix.c: New file.
2376         * tests/test-fprintf-posix.h: New file.
2377         * tests/test-fprintf-posix.out: New file.
2378
2379         * modules/vfprintf-posix: New file.
2380         * lib/vfprintf.c: New file.
2381         * m4/vfprintf-posix.m4: New file.
2382         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
2383         REPLACE_VFPRINTF.
2384         * lib/stdio_.h (vfprintf): New declaration.
2385         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
2386         REPLACE_VFPRINTF.
2387
2388 2007-03-08  Bruno Haible  <bruno@clisp.org>
2389
2390         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
2391
2392 2007-03-08  Bruno Haible  <bruno@clisp.org>
2393
2394         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
2395         instead of 'expr' invocations.
2396         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2397         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2398         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2399         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2400         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2401         Suggested by Paul Eggert.
2402
2403 2007-03-08  Bruno Haible  <bruno@clisp.org>
2404
2405         * modules/fseterr-tests: New file.
2406         * tests/test-fseterr.c: New file.
2407
2408         * modules/fseterr: New file.
2409         * lib/fseterr.h: New file.
2410         * lib/fseterr.c: New file.
2411
2412 2007-03-08  Bruno Haible  <bruno@clisp.org>
2413
2414         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
2415         * lib/getopt_.h: Likewise.
2416         * lib/mbswidth.h: Likewise.
2417         * lib/setenv.h: Likewise.
2418         * lib/vasnprintf.h: Likewise.
2419         * lib/vasprintf.h: Likewise.
2420         * lib/verror.h: Likewise.
2421         * lib/xsetenv.h: Likewise.
2422         * lib/xvasprintf.h: Likewise.
2423
2424 2007-03-08  Jim Meyering  <jim@meyering.net>
2425
2426         * users.txt: Add parted.
2427
2428         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
2429
2430 2007-03-07  Bruno Haible  <bruno@clisp.org>
2431
2432         * m4/printf.m4: Make the shell script snippets copy&pastable.
2433
2434 2007-03-02  Bruno Haible  <bruno@clisp.org>
2435
2436         * lib/netinet_in_.h: New file.
2437         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
2438         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
2439         * modules/netinet_in (Files): Add lib/netinet_in_.h.
2440         (Depends-on): Add absolute-header.
2441         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
2442         into netinet/in.h.
2443
2444 2007-03-03  Bruno Haible  <bruno@clisp.org>
2445
2446         * lib/sys_select_.h: New file.
2447         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
2448         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
2449         * modules/sys_select (Files): Add lib/sys_select_.h.
2450         (Depends-on): Add absolute-header.
2451         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
2452         into sys/select.h.
2453
2454 2007-03-02  Bruno Haible  <bruno@clisp.org>
2455
2456         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
2457         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
2458         values.
2459         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
2460         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
2461         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
2462         * modules/sys_socket (Depends-on): Add absolute-header.
2463         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
2464         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
2465         (Include): Remove requirement of inclusion of <sys/types.h>.
2466
2467 2007-03-02  Bruno Haible  <bruno@clisp.org>
2468
2469         * lib/byteswap_.h (bswap_32): Fix formula.
2470
2471 2007-03-06  Bruno Haible  <bruno@clisp.org>
2472
2473         * modules/sprintf-posix-tests: New file.
2474         * tests/test-sprintf-posix.c: New file.
2475
2476         * modules/sprintf-posix: New file.
2477         * lib/sprintf.c: New file.
2478         * m4/sprintf-posix.m4: New file.
2479         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
2480         REPLACE_SPRINTF.
2481         * lib/stdio_.h (sprintf): New declaration.
2482         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
2483         REPLACE_SPRINTF.
2484
2485 2007-03-06  Bruno Haible  <bruno@clisp.org>
2486
2487         * modules/vsprintf-posix-tests: New file.
2488         * tests/test-vsprintf-posix.c: New file.
2489         * tests/test-sprintf-posix.h: New file.
2490
2491         * modules/vsprintf-posix: New file.
2492         * lib/vsprintf.c: New file.
2493         * m4/vsprintf-posix.m4: New file.
2494         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
2495         REPLACE_VSPRINTF.
2496         * lib/stdio_.h (vsprintf): New declaration.
2497         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
2498         REPLACE_VSPRINTF.
2499
2500 2007-03-06  Bruno Haible  <bruno@clisp.org>
2501
2502         * modules/vsnprintf (Depend-on): Remove minmax.
2503
2504 2007-03-06  Bruno Haible  <bruno@clisp.org>
2505
2506         * modules/snprintf-posix-tests: New file.
2507         * tests/test-snprintf-posix.c: New file.
2508
2509         * modules/snprintf-posix: New file.
2510         * m4/snprintf-posix.m4: New file.
2511         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
2512         gl_FUNC_SNPRINTF.
2513         (gl_FUNC_SNPRINTF): Invoke it.
2514         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
2515         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
2516         is set.
2517         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
2518
2519 2007-03-06  Bruno Haible  <bruno@clisp.org>
2520
2521         * modules/vsnprintf-posix-tests: New file.
2522         * tests/test-vsnprintf-posix.c: New file.
2523         * tests/test-snprintf-posix.h: New file.
2524
2525         * modules/vsnprintf-posix: New file.
2526         * m4/vsnprintf-posix.m4: New file.
2527         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
2528         gl_FUNC_VSNPRINTF.
2529         (gl_FUNC_VSNPRINTF): Invoke it.
2530         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
2531         * lib/stdio_.h (vsnprintf): Define as a replacement if
2532         REPLACE_VSNPRINTF is set.
2533         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
2534
2535 2007-03-06  Bruno Haible  <bruno@clisp.org>
2536
2537         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
2538         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
2539
2540 2007-03-06  Bruno Haible  <bruno@clisp.org>
2541
2542         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
2543         (asinl): Declare also if HAVE_DECL_ASINL is set.
2544         (atanl): Declare also if HAVE_DECL_ATANL is set.
2545         (ceill): Declare also if HAVE_DECL_CEILL is set.
2546         (cosl): Declare also if HAVE_DECL_COSL is set.
2547         (expl): Declare also if HAVE_DECL_EXPL is set.
2548         (floorl): Declare also if HAVE_DECL_FLOORL is set.
2549         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
2550         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
2551         (logl): Declare also if HAVE_DECL_LOGL is set.
2552         (sinl): Declare also if HAVE_DECL_SINL is set.
2553         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
2554         (tanl): Declare also if HAVE_DECL_TANL is set.
2555         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
2556         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
2557         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
2558         declaration of frexpl, ldexpl.
2559         * modules/printf-frexpl (Depends-on): Add math.
2560         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
2561
2562 2007-03-05  Bruno Haible  <bruno@clisp.org>
2563
2564         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
2565         frexpl and ldexpl are declared.
2566         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
2567
2568 2007-03-05  Bruno Haible  <bruno@clisp.org>
2569
2570         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
2571         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
2572
2573 2007-03-05  Bruno Haible  <bruno@clisp.org>
2574
2575         * lib/stdio_.h: Include <stddef.h>.
2576
2577 2007-03-05  Bruno Haible  <bruno@clisp.org>
2578
2579         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
2580
2581 2007-03-05  Bruno Haible  <bruno@clisp.org>
2582
2583         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
2584         NetBSD 4, from Ralf Wildenhues.
2585
2586 2007-03-04  Bruno Haible  <bruno@clisp.org>
2587
2588         * lib/vasprintf.h: Update #if logic for the case when the functions
2589         exist but are overridden.
2590
2591 2007-03-04  Bruno Haible  <bruno@clisp.org>
2592
2593         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
2594         implementations: glibc-2.4 and MacOS X 10.3.
2595         * tests/test-vasnprintf-posix.c (test_function): Test also the case
2596         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
2597         * tests/test-vasprintf-posix.c (test_function): Likewise.
2598
2599 2007-03-04  Bruno Haible  <bruno@clisp.org>
2600
2601         * modules/vasprintf-posix-tests: New file.
2602         * tests/test-vasprintf-posix.c: New file.
2603
2604         * modules/vasprintf-posix: New file.
2605         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
2606         defined.
2607         * m4/vasprintf-posix.m4: New file.
2608         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
2609         gl_FUNC_VASPRINTF.
2610         (gl_FUNC_VASPRINTF): Invoke it.
2611         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
2612         here.
2613         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
2614
2615 2007-03-04  Bruno Haible  <bruno@clisp.org>
2616
2617         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
2618         REPLACE_GETTIMEOFDAY.
2619         * modules/sys_time (Makefile.am): Likewise.
2620         * m4/sys_time_h.m4: Likewise.
2621         * m4/gettimeofday.m4: Likewise.
2622
2623 2007-03-04  Bruno Haible  <bruno@clisp.org>
2624
2625         * modules/vasnprintf-posix-tests: New file.
2626         * tests/test-vasnprintf-posix.c: New file.
2627
2628         * modules/vasnprintf-posix: New file.
2629         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
2630         printf-frexpl.h.
2631         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
2632         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
2633         REPLACE_VASNPRINTF is defined.
2634         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
2635         gl_FUNC_VASNPRINTF.
2636         (gl_FUNC_VASNPRINTF): Invoke it.
2637         * m4/vasnprintf-posix.m4: New file.
2638         * m4/printf.m4: New file.
2639
2640 2007-03-04  Bruno Haible  <bruno@clisp.org>
2641
2642         Compile progreloc.c only if --enable-relocatable is specified.
2643         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
2644         if --enable-relocatable was specified.
2645         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
2646         lib_SOURCES.
2647
2648 2007-03-04  Jim Meyering  <jim@meyering.net>
2649
2650         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
2651         Use it consistently, rather than enumerating errno constants.
2652
2653 2007-03-04  Bruno Haible  <bruno@clisp.org>
2654
2655         * modules/xvasprintf-tests: New file.
2656         * tests/test-xvasprintf.c: New file.
2657
2658         * modules/vasprintf-tests: New file.
2659         * tests/test-vasprintf.c: New file.
2660
2661         * modules/vasnprintf-tests: New file.
2662         * tests/test-vasnprintf.c: New file.
2663
2664         * modules/vsnprintf-tests: New file.
2665         * tests/test-vsnprintf.c: New file.
2666
2667         * modules/snprintf-tests: New file.
2668         * tests/test-snprintf.c: New file.
2669
2670 2007-03-04  Bruno Haible  <bruno@clisp.org>
2671
2672         Compile relocatable.c only if --enable-relocatable is specified.
2673         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
2674         gl_RELOCATABLE_LIBRARY.
2675         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
2676         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
2677         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
2678         gl_RELOCATABLE_LIBRARY.
2679         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
2680         (Makefile.am): Remove lib_SOURCES.
2681         * modules/relocatable-lib-lgpl (configure.ac): Invoke
2682         gl_RELOCATABLE_LIBRARY.
2683         (Makefile.am): Remove lib_SOURCES.
2684         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
2685         always.
2686         * modules/relocatable-prog-wrapper (configure.ac): Invoke
2687         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
2688
2689 2007-03-04  Bruno Haible  <bruno@clisp.org>
2690
2691         * modules/argmatch-tests: New file.
2692         * tests/test-argmatch.c: New file.
2693
2694         * tests/test-allocsa.c (main): Halve the number of loop runs.
2695
2696         * modules/alloca-opt-tests: New file.
2697         * tests/test-alloca-opt.c: New file.
2698
2699 2007-03-04  Jim Meyering  <jim@meyering.net>
2700
2701         Work around difference between Linux ACLs and Solaris 10 ZFS.
2702         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
2703         for EINVAL.
2704
2705 2007-03-03  Bruno Haible  <bruno@clisp.org>
2706
2707         * modules/relocatable-prog (Depends-on): Add back progreloc's
2708         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
2709
2710 2007-03-03  Bruno Haible  <bruno@clisp.org>
2711
2712         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
2713         * modules/relocatable-lib: New file.
2714
2715 2007-03-03  Bruno Haible  <bruno@clisp.org>
2716
2717         * modules/relocatable-prog: Renamed from modules/relocatable.
2718         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
2719
2720 2007-03-03  Bruno Haible  <bruno@clisp.org>
2721
2722         * modules/relocatable-script (Files): Add doc/relocatable.texi,
2723         m4/relocatable-lib.m4.
2724         (Depends-on): Remove 'relocatable'.
2725         (configure.ac): Add gl_RELOCATABLE_NOP.
2726
2727 2007-03-03  Bruno Haible  <bruno@clisp.org>
2728
2729         * modules/relocatable-prog-wrapper: New file.
2730         * modules/relocatable (Depends-on): Add it. Remove all other
2731         dependencies except progname.
2732         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
2733
2734         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
2735         (gl_FUNC_STRERROR): Nop.
2736         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
2737
2738         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
2739         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
2740
2741         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
2742         (gl_FUNC_READLINK): Update.
2743
2744         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
2745
2746 2007-03-03  Bruno Haible  <bruno@clisp.org>
2747
2748         * lib/xreadlink.c: Include <unistd.h> unconditionally.
2749         * modules/xreadlink (Depends-on): Add unistd.
2750         * modules/xreadlink-with-size (Depends-on): Likewise.
2751
2752 2007-03-03  Bruno Haible  <bruno@clisp.org>
2753
2754         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
2755         extracted from gt_FUNC_SETENV.
2756         (gt_FUNC_SETENV): Remove macro.
2757         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
2758         remove gt_FUNC_SETENV.
2759
2760 2007-03-03  Bruno Haible  <bruno@clisp.org>
2761
2762         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
2763         ENABLE_RELOCATABLE here.
2764         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
2765
2766 2007-03-03  Bruno Haible  <bruno@clisp.org>
2767
2768         * modules/rbtreehash-list-tests (Depends-on): Add progname.
2769         * tests/test-rbtreehash_list.c: Include progname.h.
2770         (main): Call set_program_name.
2771
2772         * modules/rbtree-oset-tests (Depends-on): Add progname.
2773         * tests/test-rbtree_oset.c: Include progname.h.
2774         (main): Call set_program_name.
2775
2776         * modules/rbtree-list-tests (Depends-on): Add progname.
2777         * tests/test-rbtree_list.c: Include progname.h.
2778         (main): Call set_program_name.
2779
2780         * modules/linked-list-tests (Depends-on): Add progname.
2781         * tests/test-linked_list.c: Include progname.h.
2782         (main): Call set_program_name.
2783
2784 2007-03-03  Bruno Haible  <bruno@clisp.org>
2785
2786         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
2787         All uses of __restrict changed to _Restrict_.
2788         * lib/glob_.h (__restrict): Remove macro.
2789
2790 2007-03-02  Bruno Haible  <bruno@clisp.org>
2791
2792         * modules/gettext (configure.ac): Require gettext infrastructure
2793         from version 0.16.1.
2794
2795 2007-03-02  Bruno Haible  <bruno@clisp.org>
2796
2797         * modules/linkedhash-list-tests (Depends-on): Add progname.
2798         * tests/test-linkedhash_list.c: Include progname.h.
2799         (main): Call set_program_name.
2800
2801         * modules/carray-list-tests (Depends-on): Add progname.
2802         * tests/test-carray_list.c: Include progname.h.
2803         (main): Call set_program_name.
2804
2805         * modules/avltreehash-list-tests (Depends-on): Add progname.
2806         * tests/test-avltreehash_list.c: Include progname.h.
2807         (main): Call set_program_name.
2808
2809         * modules/avltree-oset-tests (Depends-on): Add progname.
2810         * tests/test-avltree_oset.c: Include progname.h.
2811         (main): Call set_program_name.
2812
2813         * modules/avltree-list-tests (Depends-on): Add progname.
2814         * tests/test-avltree_list.c: Include progname.h.
2815         (main): Call set_program_name.
2816
2817         * modules/array-oset-tests (Depends-on): Add progname.
2818         * tests/test-array_oset.c: Include progname.h.
2819         (main): Call set_program_name.
2820
2821         * modules/array-list-tests (Depends-on): Add progname.
2822         * tests/test-array_list.c: Include progname.h.
2823         (main): Call set_program_name.
2824
2825         * modules/argp-tests (Depends-on): Add progname.
2826         * tests/test-argp.c: Include argp.h first. Include progname.h.
2827         (main): Call set_program_name.
2828
2829 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
2830
2831         * doc/gnulib-tool.texi (Initial import): Reword description of
2832         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
2833         limited effect even if defined after the first system include.
2834
2835 2007-03-01  Bruno Haible  <bruno@clisp.org>
2836
2837         * build-aux/config.libpath: Update to libtool-1.5.22.
2838         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
2839
2840 2007-03-01  Bruno Haible  <bruno@clisp.org>
2841
2842         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
2843         foo_CFLAGS.
2844         Reported by Ralf Wildenhues.
2845
2846 2007-03-01  Bruno Haible  <bruno@clisp.org>
2847
2848         * build-aux/install-reloc: Remove object files left over by some
2849         compilers.
2850         Reported by Ralf Wildenhues.
2851
2852 2007-03-01  Bruno Haible  <bruno@clisp.org>
2853
2854         * build-aux/install-reloc: Break long lines.
2855
2856 2007-03-01  Bruno Haible  <bruno@clisp.org>
2857
2858         * doc/relocatable.texi: Document that it may not work on OpenBSD.
2859         Reported by Ralf Wildenhues.
2860
2861 2007-03-01  Bruno Haible  <bruno@clisp.org>
2862
2863         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
2864         include ordering constraints.
2865
2866 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
2867
2868         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
2869         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
2870         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
2871         as another example.
2872         * lib/time_.h: Fix misspelling.
2873         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2874         Require gl_HEADER_TIME_H_DEFAULTS.
2875         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
2876         * m4/time_r.m4 (gl_TIME_R): Likewise.
2877         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
2878
2879 2007-03-01  Bruno Haible  <bruno@clisp.org>
2880
2881         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
2882         * m4/utimens.m4 (gl_UTIMENS): Likewise.
2883
2884 2007-03-01  Jim Meyering  <jim@meyering.net>
2885
2886         * modules/xreadlink (Maintainer): Add my name.
2887         * modules/xreadlink-with-size (Depends-on): Alphabetize.
2888
2889 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
2890             Bruno Haible  <bruno@clisp.org>
2891
2892         * build-aux/install-reloc: Compile also c-ctype.c.
2893         * build-aux/relocatable.sh.in: New file.
2894         * doc/relocatable.texi: New file.
2895         * doc/relocatable-maint.texi: New file.
2896         * doc/gnulib.texi: Include relocatable-maint.texi.
2897         * lib/progreloc.c: Include unistd.h unconditionally.
2898         * lib/relocwrapper.c: Include unistd.h unconditionally.
2899         Include c-ctype.h.
2900         (add_dotbin): Use c_tolower.
2901         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
2902         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
2903         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
2904         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
2905         to m4/relocatable-lib.m4.
2906         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
2907         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
2908         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
2909         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
2910         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
2911         * modules/relocatable: New file.
2912         * modules/relocatable-lib: New file.
2913         * modules/relocatable-script: New file.
2914
2915 2007-02-28  Bruno Haible  <bruno@clisp.org>
2916
2917         Import --enable-relocatable infrastructure.
2918         * build-aux/config.libpath: New file, from GNU gettext.
2919         * build-aux/install-reloc: New file, from GNU gettext.
2920         * build-aux/reloc-ldflags: New file, from GNU gettext.
2921         * lib/relocatable.h: New file, from GNU gettext.
2922         * lib/relocatable.c: New file, from GNU gettext.
2923         * lib/relocwrapper.c: New file, from GNU gettext.
2924         * m4/relocatable.m4: New file, from GNU gettext.
2925
2926 2007-02-28  Bruno Haible  <bruno@clisp.org>
2927
2928         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
2929
2930         * modules/xreadlink: New file, from GNU gettext with modifications.
2931         * lib/xreadlink.c: New file, from GNU gettext.
2932         * lib/xreadlink.h: Add comments.
2933         (xreadlink): New declaration.
2934
2935         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
2936         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
2937         lib/xreadlink-with-size.c.
2938         (configure.ac): Remove gl_XREADLINK invocation.
2939         (Makefile.am): Augment lib_SOURCES.
2940         * m4/xreadlink.m4: Remove file.
2941         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
2942         (xreadlink_with_size): Renamed from xreadink.
2943         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
2944         * modules/canonicalize (Depends-on): Replace xreadlink with
2945         xreadlink-with-size.
2946         * lib/canonicalize.c (canonicalize_filename_mode): Update.
2947
2948 2007-02-25  Jim Meyering  <jim@meyering.net>
2949
2950         * build-aux/announce-gen: When complaining about excess arguments,
2951         list them.
2952
2953 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
2954
2955         * README: Document signed integer overflow situation more
2956         accurately.
2957
2958 2007-02-25  Bruno Haible  <bruno@clisp.org>
2959
2960         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
2961         'a' or 'A' conversion.
2962
2963 2007-02-25  Bruno Haible  <bruno@clisp.org>
2964
2965         * modules/filename: Renamed from modules/pathname.
2966         (Files): Replace lib/pathname.h with lib/filename.h. Replace
2967         lib/concatpath.c with lib/concat-filename.c.
2968         (Makefile.am): Update.
2969         (Include): Replace pathname.h with filename.h.
2970         * lib/filename.h: Renamed from lib/pathname.h.
2971         (concatenated_filename): Renamed from concatenated_pathname.
2972         * lib/concat-filename.c: Renamed from lib/concatpath.c.
2973         (concatenated_filename): Renamed from concatenated_pathname.
2974         * lib/findprog.c: Include filename.h instead of pathname.h.
2975         (find_in_path): Update.
2976         * lib/javacomp.c: Include filename.h instead of pathname.h.
2977         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
2978         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
2979         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
2980         is_oldgcj_14_13_usable, is_javac_usable): Update.
2981         * lib/javaexec.c: Include filename.h instead of pathname.h.
2982         (execute_java_class): Update.
2983         * modules/findprog: Update.
2984         * modules/javacomp: Update.
2985         * modules/javaexec: Update.
2986         * MODULES.html.sh (File system functions): Add 'filename', remove
2987         'pathname'.
2988
2989 2007-02-25  Bruno Haible  <bruno@clisp.org>
2990
2991         * modules/printf-frexpl-tests: New file.
2992         * tests/test-printf-frexpl.c: New file.
2993
2994         * modules/printf-frexpl: New file.
2995         * lib/printf-frexpl.h: New file.
2996         * lib/printf-frexpl.c: New file.
2997         * m4/printf-frexpl.m4: New file.
2998
2999 2007-02-25  Bruno Haible  <bruno@clisp.org>
3000
3001         * modules/printf-frexp-tests: New file.
3002         * tests/test-printf-frexp.c: New file.
3003
3004         * modules/printf-frexp: New file.
3005         * lib/printf-frexp.h: New file.
3006         * lib/printf-frexp.c: New file.
3007         * m4/printf-frexp.m4: New file.
3008
3009 2007-02-25  Bruno Haible  <bruno@clisp.org>
3010
3011         Assume automake >= 1.10 for the tests.
3012         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
3013         * modules/arctwo-tests: Likewise.
3014         * modules/argp-tests: Likewise.
3015         * modules/avltree-list-tests: Likewise.
3016         * modules/avltree-oset-tests: Likewise.
3017         * modules/avltreehash-list-tests: Likewise.
3018         * modules/carray-list-tests: Likewise.
3019         * modules/crc-tests: Likewise.
3020         * modules/des-tests: Likewise.
3021         * modules/gc-arcfour-tests: Likewise.
3022         * modules/gc-arctwo-tests: Likewise.
3023         * modules/gc-des-tests: Likewise.
3024         * modules/gc-hmac-md5-tests: Likewise.
3025         * modules/gc-hmac-sha1-tests: Likewise.
3026         * modules/gc-md2-tests: Likewise.
3027         * modules/gc-md4-tests: Likewise.
3028         * modules/gc-md5-tests: Likewise.
3029         * modules/gc-pbkdf2-sha1-tests: Likewise.
3030         * modules/gc-rijndael-tests: Likewise.
3031         * modules/gc-sha1-tests: Likewise.
3032         * modules/gc-tests: Likewise.
3033         * modules/getaddrinfo-tests: Likewise.
3034         * modules/hmac-md5-tests: Likewise.
3035         * modules/hmac-sha1-tests: Likewise.
3036         * modules/linked-list-tests: Likewise.
3037         * modules/linkedhash-list-tests: Likewise.
3038         * modules/lock-tests: Likewise.
3039         * modules/md2-tests: Likewise.
3040         * modules/md4-tests: Likewise.
3041         * modules/md5-tests: Likewise.
3042         * modules/rbtree-list-tests: Likewise.
3043         * modules/rbtree-oset-tests: Likewise.
3044         * modules/rbtreehash-list-tests: Likewise.
3045         * modules/read-file-tests: Likewise.
3046         * modules/rijndael-tests: Likewise.
3047         * modules/stdint-tests: Likewise.
3048         * modules/tls-tests: Likewise.
3049
3050 2007-02-24  Bruno Haible  <bruno@clisp.org>
3051
3052         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
3053         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
3054         function; instead check whether isnan with a double argument links.
3055         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
3056         function; instead check whether isnan with a 'long double' argument
3057         links.
3058         Reported by Eric Blake <ebb9@byu.net>.
3059
3060 2007-02-24  Bruno Haible  <bruno@clisp.org>
3061
3062         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
3063         defined.
3064         * lib/isnanl.c: Remove all code. Just include isnan.c.
3065         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
3066
3067 2007-02-25  Jim Meyering  <jim@meyering.net>
3068
3069         Avoid conflicting types for 'unsetenv' on FreeBSD.
3070         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
3071         conflicting with FreeBSD's (5.0 and 6.1) function declaration
3072         in stdlib.h.
3073
3074 2007-02-24  Bruno Haible  <bruno@clisp.org>
3075
3076         * modules/isnanl-nolibm-tests: New file.
3077         * tests/test-isnanl.c: New file.
3078
3079         * modules/isnanl-nolibm: New file.
3080         * lib/isnanl.h: New file.
3081         * lib/isnanl.c: New file.
3082         * m4/isnanl.m4: New file.
3083
3084 2007-02-24  Bruno Haible  <bruno@clisp.org>
3085
3086         * modules/isnan-nolibm-tests: New file.
3087         * tests/test-isnan.c: New file.
3088
3089         * modules/isnan-nolibm: New file.
3090         * lib/isnan.h: New file.
3091         * lib/isnan.c: New file.
3092         * m4/isnan.m4: New file.
3093
3094 2007-02-24  Bruno Haible  <bruno@clisp.org>
3095
3096         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
3097         assume that an exponent fits in 20 bits.
3098
3099 2007-02-24  Jim Meyering  <jim@meyering.net>
3100
3101         * m4/regex.m4: Update the description of the configure-time option,
3102         --without-included-regex, to state accurately what the defaults are,
3103         and perhaps to give people an idea why using this option is risky.
3104
3105 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
3106
3107         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
3108         loops on small arguments.  This attempts to avoid the problem
3109         Bruno Haible reported for AIX 4.3.2 in
3110         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
3111
3112 2007-02-23  Bruno Haible  <bruno@clisp.org>
3113
3114         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
3115         Needed for help2man.
3116
3117 2007-02-23  Karl Berry  <karl@gnu.org>
3118
3119         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
3120         exists, foo.h should be cvs-ignored, not committed.
3121
3122 2007-02-23  Eric Blake  <ebb9@byu.net>
3123
3124         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
3125         * lib/stat-time.h (includes): Likewise.
3126         * lib/utimecmp.c (includes): Likewise.
3127         * lib/utimens.h (includes): Likewise.
3128         * lib/getdate.y (includes): Also include "timespec.h" for use
3129         internal to the module.
3130         * modules/utimens (Depends-on): Revert yesterday's patch.
3131         * modules/nanosleep (Depends-on): Add missing dependency.
3132
3133 2007-02-22  Bruno Haible  <bruno@clisp.org>
3134
3135         * lib/glob.c: Don't include getlogin_r.h.
3136
3137 2007-02-22  Jim Meyering  <jim@meyering.net>
3138
3139         * modules/utimens (Depends-on): Add timespec, required for
3140         utimens.h's inclusion of timespec.h.
3141
3142 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
3143
3144         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
3145         long unreadable paths in GNU/Linux.  Problem reported by Andreas
3146         Schwab in
3147         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
3148         I'll try to think of a better way to fix the Solaris problem.
3149
3150         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
3151         like glibc; on Solaris 10, it fails with errno == EINVAL.
3152         POSIX says the behavior is unspecified if the first argument is NULL,
3153         so play it safe and never pass NULL to the system getcwd.
3154
3155 2007-02-21  Jim Meyering  <jim@meyering.net>
3156
3157         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
3158         of gettimeofday.  It would conflict with the one now always
3159         provided via sys_time_.h.  Reported by Matthew Woehlke, as
3160         an IRIX 6.5 build failure.
3161
3162 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
3163
3164         Minor fixups to port to Solaris 10 with Sun C 5.8.
3165         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
3166         * modules/getcwd (Depends-on): Add dirfd.
3167         * lib/putenv.c (putenv): #undef it.
3168         (rpl_putenv): New decl.
3169         (malloc, free): Include <stdlib.h> rather than prototyping separately.
3170
3171 2007-02-20  Bruno Haible  <bruno@clisp.org>
3172
3173         * modules/stdio-tests: New file.
3174         * tests/test-stdio.c: New file.
3175
3176         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
3177         (Depends-on): Add stdio.
3178         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
3179         (Include): Use <stdio.h> instead of vsnprintf.h.
3180         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
3181         HAVE_DECL_VSNPRINTF.
3182         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
3183
3184         * modules/snprintf (Files): Remove lib/snprintf.h.
3185         (Depends-on): Add stdio.
3186         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
3187         (Include): Use <stdio.h> instead of snprintf.h.
3188         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
3189         HAVE_DECL_SNPRINTF.
3190         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
3191         * lib/getaddrinfo.c: Likewise.
3192
3193         * modules/stdio: New file.
3194         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
3195         * lib/snprintf.h: Remove file.
3196         * lib/vsnprintf.h: Remove file.
3197         * lib/.cppi-disable: Remove snprintf.h.
3198         * m4/stdio_h.m4: New file.
3199         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
3200
3201 2007-02-20  Jim Meyering  <jim@meyering.net>
3202
3203         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
3204         used by e.g., mingw.  From Bruno Haible.
3205
3206 2007-02-19  Bruno Haible  <bruno@clisp.org>
3207
3208         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
3209         warnings.
3210         Reported by Ben Pfaff <blp@cs.stanford.edu>.
3211
3212 2007-02-19  Bruno Haible  <bruno@clisp.org>
3213
3214         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
3215         from mingw users.
3216
3217 2007-02-19  Bruno Haible  <bruno@clisp.org>
3218
3219         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
3220         warnings.
3221         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
3222
3223 2007-02-19  Jim Meyering  <jim@meyering.net>
3224
3225         Don't use FD after a successful "fdopendir (fd)".
3226         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
3227         Reset it by calling dirfd on the just-obtained DIR*.
3228
3229         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
3230         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
3231
3232 2007-02-18  Bruno Haible  <bruno@clisp.org>
3233
3234         * lib/readlink.c: Include <unistd.h>.
3235         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
3236         HAVE_READLINK.
3237         * modules/readlink (Depends-on): Add unistd.
3238         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3239         (Include): Add <unistd.h>.
3240
3241         * lib/getlogin_r.h: Remove file.
3242         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
3243         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
3244         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
3245         HAVE_DECL_GETLOGIN_R.
3246         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
3247         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3248         (Include): Use <unistd.h> instead of getlogin_r.h.
3249
3250         * lib/getcwd.h: Remove file.
3251         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
3252         * lib/xgetcwd.c: Likewise.
3253         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
3254         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
3255         * modules/getcwd (Files): Remove lib/getcwd.h.
3256         (Depends-on): Add unistd.
3257         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3258         (Include): Use <unistd.h> instad of getcwd.h.
3259
3260         * lib/ftruncate.c: Include <unistd.h> first.
3261         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
3262         Set HAVE_FTRUNCATE.
3263         * modules/ftruncate (Depends-on): Add unistd.
3264         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3265
3266         * lib/fchdir.c: Include <unistd.h> first.
3267         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
3268         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
3269         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
3270         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3271         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
3272
3273         * lib/dup2.c: Include <unistd.h> first.
3274         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
3275         HAVE_DUP2.
3276         * modules/dup2 (Depends-on): Add unistd.
3277         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3278
3279         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
3280         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
3281         REPLACE_CHOWN. Don't define chown as a macro here.
3282         * modules/chown (Depends-on): Add unistd.
3283         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3284
3285         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
3286         Add definition for GL_LINK_WARNING.
3287         (chown, dup2): New declarations.
3288         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
3289         link warning.
3290         (ftruncate): New declaration.
3291         (getcwd): New declaration, taken from old getcwd.h.
3292         (getlogin_r): New declaration, taken from old getlogin_r.h.
3293         (readlink): New declaration.
3294         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
3295         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
3296         (gl_PREREQ_UNISTD): Remove macro.
3297         (gl_UNISTD_MODULE_INDICATOR): New macro.
3298         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
3299         many new variables. Don't set UNISTD_H.
3300         * modules/unistd (Description): Change.
3301         (Depends-on): Add link-warning.
3302         (configure.ac): Update.
3303         (Makefile.am): Create unistd.h always. Substitute many new variables
3304         into it.
3305
3306 2007-02-18  Bruno Haible  <bruno@clisp.org>
3307
3308         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
3309         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
3310         HAVE_GETSUBOPT.
3311         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
3312         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
3313         * lib/getsubopt.h: Remove file.
3314         * modules/getsubopt (Files): Remove lib/getsubopt.h.
3315         (Depends-on): Add stdlib.
3316         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
3317         (Includes): Use <stdlib.h> instead of getsubopt.h.
3318         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
3319         Set HAVE_GETSUBOPT.
3320         * lib/getsubopt.c: Don't include getsubopt.h.
3321
3322 2007-02-18  Bruno Haible  <bruno@clisp.org>
3323
3324         * modules/fchdir (Depends-on): Add dup2.
3325
3326 2007-02-18  Bruno Haible  <bruno@clisp.org>
3327
3328         * lib/stdlib_.h: Handle glibc's special invocation convention
3329         specially.
3330
3331 2007-02-18  Bruno Haible  <bruno@clisp.org>
3332
3333         * modules/stdlib-tests: New file.
3334         * tests/test-stdlib.c: New file.
3335
3336         * modules/mkstemp (Files): Remove lib/mkstemp.h.
3337         (Depends-on): Add stdlib.
3338         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
3339         (Includes): Use <stdlib.h> instead of mkstemp.h.
3340         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
3341         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
3342         * lib/mkstemp.c: Don't include mkstemp.h.
3343         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
3344         * lib/stdlib--.h: Don't include mkstemp.h.
3345
3346         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
3347         (Depends-on): Add stdlib.
3348         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
3349         (Includes): Use <stdlib.h> instead of mkdtemp.h.
3350         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
3351         HAVE_MKDTEMP.
3352         * lib/mkdtemp.c: Don't include mkdtemp.h.
3353         * lib/clean-temp.c: Don't include mkdtemp.h.
3354
3355         * modules/exit (Files): Remove lib/exit.h.
3356         (Depends-on): Add stdlib.
3357         (Makefile.am): Remove lib_SOURCES.
3358         (Include): Use <stdlib.h> instead of exit.h.
3359         * lib/argmatch.c: Don't include exit.h.
3360         * lib/execute.c: Likewise.
3361         * lib/pagealign_alloc.c: Likewise.
3362         * lib/pipe.c: Likewise.
3363         * lib/wait-process.c: Likewise.
3364         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
3365         * lib/exitfail.c: Likewise.
3366         * lib/savewd.c: Likewise.
3367         * lib/xsetenv.c: Likewise.
3368
3369         * modules/stdlib: New file.
3370         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
3371         and extra comments about mkstemp().
3372         * lib/exit.h: Remove file.
3373         * lib/mkdtemp.h: Remove file.
3374         * lib/mkstemp.h: Remove file.
3375         * m4/stdlib_h.m4: New file.
3376         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
3377
3378 2007-02-18  Bruno Haible  <bruno@clisp.org>
3379
3380         * modules/math-tests: New file.
3381         * tests/test-math.c: New file.
3382
3383         * modules/math: New file.
3384         * modules/mathl (Files): Remove lib/mathl.h.
3385         (Depends-on): Add math.
3386         (Makefile.am): Don't mention mathl.h.
3387         (Include): Use <math.h> instead of mathl.h.
3388         * lib/math_.h: New file.
3389         * lib/mathl.h: Remove file.
3390         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
3391         mathl.h.
3392         * lib/asinl.c: Likewise.
3393         * lib/atanl.c: Likewise.
3394         * lib/ceill.c: Likewise.
3395         * lib/cosl.c: Likewise.
3396         * lib/expl.c: Likewise.
3397         * lib/floorl.c: Likewise.
3398         * lib/frexpl.c: Likewise.
3399         * lib/ldexpl.c: Likewise.
3400         * lib/logl.c: Likewise.
3401         * lib/sincosl.c: Likewise.
3402         * lib/sinl.c: Likewise.
3403         * lib/sqrtl.c: Likewise.
3404         * lib/tanl.c: Likewise.
3405         * lib/trigl.c: Likewise.
3406         * m4/math_h.m4: New file.
3407         * MODULES.html.sh (Mathematics): Add math.
3408
3409 2007-02-17  Bruno Haible  <bruno@clisp.org>
3410
3411         * modules/wctype-tests: New file.
3412         * tests/test-wctype.c: New file.
3413
3414         * modules/wchar-tests: New file.
3415         * tests/test-wchar.c: New file.
3416
3417         * modules/unistd-tests: New file.
3418         * tests/test-unistd.c: New file.
3419
3420         * modules/time-tests: New file.
3421         * tests/test-time.c: New file.
3422
3423         * modules/sysexits-tests: New file.
3424         * tests/test-sysexits.c: New file.
3425
3426         * modules/sys_time-tests: New file.
3427         * tests/test-sys_time.c: New file.
3428
3429         * modules/sys_stat-tests: New file.
3430         * tests/test-sys_stat.c: New file.
3431
3432         * modules/sys_socket-tests: New file.
3433         * tests/test-sys_socket.c: New file.
3434
3435         * modules/sys_select-tests: New file.
3436         * tests/test-sys_select.c: New file.
3437
3438         * modules/string-tests: New file.
3439         * tests/test-string.c: New file.
3440
3441         * modules/stdbool-tests: New file.
3442         * tests/test-stdbool.c: New file.
3443
3444         * modules/netinet_in-tests: New file.
3445         * tests/test-netinet_in.c: New file.
3446
3447         * modules/inttypes-tests: New file.
3448         * tests/test-inttypes.c: New file.
3449
3450         * modules/fcntl-tests: New file.
3451         * tests/test-fcntl.c: New file.
3452
3453         * modules/byteswap-tests: New file.
3454         * tests/test-byteswap.c: New file.
3455
3456         * modules/arpa_inet-tests: New file.
3457         * tests/test-arpa_inet.c: New file.
3458
3459 2007-02-17  Bruno Haible  <bruno@clisp.org>
3460
3461         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
3462         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
3463         if the corresponding module is not enabled. Emit link warnings if
3464         the function is used nevertheless.
3465         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
3466         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
3467         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
3468         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
3469         * modules/inttypes (Depends-on): Add link-warning.
3470         (Makefile.am): Copy the contents of build-aux/link-warning.h into
3471         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
3472         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
3473         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
3474         * modules/imaxdiv (configure.ac): Likewise.
3475         * modules/strtoimax (configure.ac): Likewise.
3476         * modules/strtoumax (configure.ac): Likewise.
3477
3478 2007-02-17  Bruno Haible  <bruno@clisp.org>
3479
3480         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
3481         gl_STRING_MODULE_INDICATOR_DEFAULTS.
3482         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
3483         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
3484
3485 2007-02-17  Bruno Haible  <bruno@clisp.org>
3486
3487         * modules/link-warning: New file.
3488         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
3489         * lib/string_.h (GL_LINK_WARNING): Remove definition.
3490         * modules/string (Depends-on): Add link-warning.
3491         (Makefile.am): Copy the contents of build-aux/link-warning.h into
3492         string.h.
3493         * MODULES.html.sh (Support for building libraries and executables): Add
3494         link-warning.
3495
3496 2007-02-17  Bruno Haible  <bruno@clisp.org>
3497
3498         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
3499         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
3500         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
3501         long lines.
3502
3503 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
3504             Bruno Haible  <bruno@clisp.org>
3505
3506         * modules/tmpfile: New file.
3507         * lib/tmpfile.c: New file.
3508         * m4/tmpfile.m4: New file.
3509         * MODULES.html.sh (func_all_modules): New section "Input/output".
3510
3511 2007-02-15  Bruno Haible  <bruno@clisp.org>
3512
3513         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
3514         (supports_delete_on_close): New function.
3515         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
3516
3517 2007-02-14  Bruno Haible  <bruno@clisp.org>
3518
3519         * modules/mbspcasecmp-tests: New file.
3520         * tests/test-mbspcasecmp.sh: New file.
3521         * tests/test-mbspcasecmp.c: New file.
3522
3523         New module mbspcasecmp.
3524         * modules/mbspcasecmp: New file.
3525         * lib/mbspcasecmp.c: New file.
3526         * lib/string_.h (strncasecmp): Change warning message.
3527         (mbspcasecmp): New declaration.
3528         * m4/mbspcasecmp.m4: New file.
3529         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3530         GNULIB_MBSPCASECMP.
3531         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
3532         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
3533
3534 2007-02-14  Bruno Haible  <bruno@clisp.org>
3535
3536         * modules/mbsncasecmp-tests: New file.
3537         * tests/test-mbsncasecmp.sh: New file.
3538         * tests/test-mbsncasecmp.c: New file.
3539
3540         New module mbsncasecmp.
3541         * modules/mbsncasecmp: New file.
3542         * lib/mbsncasecmp.c: New file.
3543         * lib/string_.h (mbsncasecmp): New declaration.
3544         * m4/mbsncasecmp.m4: New file.
3545         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3546         GNULIB_MBSNCASECMP.
3547         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
3548         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
3549
3550 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
3551
3552         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
3553         Verify that it doesn't overlap with our flags.
3554         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
3555         do not have the desired effect in multibyte locales; instead, use
3556         mbscasecmp.
3557         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
3558         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
3559         we don't require GNU fnmatch ourselves (if our users require it, they
3560         should do so explicitly).
3561
3562         Fix regex code so it doesn't rely on strcasecmp.
3563         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
3564         Otherwise, include gnulib's langinfo.h.
3565         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
3566         undesirable behavior in non-C locales.  Instead, rely on localecharset.
3567         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
3568         * modules/regex (FILES): Remove m4/codeset.m4.
3569         (Depends-on): Add localcharset.  Remove strcase.
3570
3571 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3572
3573         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
3574         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
3575
3576 2007-02-13  Bruno Haible  <bruno@clisp.org>
3577
3578         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
3579         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3580
3581 2007-02-12  Bruno Haible  <bruno@clisp.org>
3582
3583         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3584         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
3585         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
3586         time warning rather than a link error.
3587
3588 2007-02-12  Bruno Haible  <bruno@clisp.org>
3589
3590         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
3591         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
3592         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3593
3594 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3595
3596         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
3597         args, not 2.
3598
3599 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3600
3601         New module 'time', so that apps can include <time.h> as per
3602         POSIX and GNU instead of separate include files like time_r.h
3603         and timegm.h.  This implementation tries out a simpler approach
3604         for replacing decls in standard include files (as compared to
3605         the string module), somewhat as an experiment.
3606
3607         * config/srclist.txt: Comment out mktime.c for now.
3608         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
3609         since it doesn't apply any more.  Use generic wording instead.
3610         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
3611         'time'.
3612         * lib/time_.h, m4/time_h.m4, modules/time: New files.
3613         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
3614         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
3615         Don't include <sys/types.h>; no longer needed since we assume C89.
3616         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
3617         * lib/strftime.c: Likewise.
3618         * lib/time_r.c: Likewise.
3619         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
3620         * lib/nanosleep.c: Include <time.h> first, to check interface.
3621         * lib/strptime.c: Likewise.
3622         * lib/time_r.c: Likewise.
3623         * lib/timegm.c: Likewise.
3624         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
3625         needed.
3626         * lib/timegm.c: Don't include timegm.h; no longer needed.
3627         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
3628         time.h now handles any problems in that area.
3629         (struct timespec, nanosleep): Remove; time.h now arranges for these.
3630         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
3631         that time.h defines struct timespec.
3632         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
3633         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
3634         handles that.
3635         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
3636         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
3637         needed.  Set REPLACE_LOCALTIME.
3638         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
3639         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
3640         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
3641         nanosleep; time_h.m4 now does that.  Don't require
3642         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
3643         module handles this now.
3644         * modules/getdate (Depends-on): Remove timespec.  Add time.
3645         * modules/nanosleep (Depends-on): Likewise.
3646         * modules/stat-time (Depends-on): Likewise.
3647         * modules/nanosleep (Include): Include time.h, not timespec.h.
3648         * modules/strptime (Files): Remove lib/strptime.h.
3649         (Depends-on): Add extensions, time.
3650         (Include): Include time.h, not strptime.h.
3651         * modules/time_r (Files): Remove lib/time_r.h.
3652         (Depends-on): Add time.
3653         (Include): Include time.h, not time_r.h.
3654         * modules/timegm: Likewise.
3655         * modules/timespec (Description): Now does timespec-related decls
3656         of our own, instead of struct timespec itself.
3657         (Depends-on): Add time; remove extensions.
3658         (Maintainer): Add self.
3659         * modules/utimecmp (Depends-on): Add time; remove timespec.
3660         * modules/utimens (Depends-on): Likewise.
3661         * modules/xnanosleep (Depends-on): Likewise.
3662
3663 2007-02-11  Bruno Haible  <bruno@clisp.org>
3664
3665         * lib/c-strstr.c: Include allocsa.h.
3666         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3667         * lib/c-strcasestr.c: Include allocsa.h.
3668         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3669         * lib/strcasestr.c: Include allocsa.h.
3670         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3671         * lib/mbsstr.c: Include allocsa.h.
3672         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3673         allocsa/freesa instead of malloc/free.
3674         * lib/mbscasestr.c: Include allocsa.h.
3675         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3676         allocsa/freesa instead of malloc/free.
3677         * modules/c-strstr (Depends-on): Add allocsa.
3678         * modules/c-strcasestr (Depends-on): Likewise.
3679         * modules/strcasestr (Depends-on): Likewise.
3680         * modules/mbsstr (Depends-on): Likewise.
3681         * modules/mbscasestr (Depends-on): Likewise.
3682
3683 2007-02-11  Bruno Haible  <bruno@clisp.org>
3684
3685         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
3686
3687         * modules/mbsspn-tests: New file.
3688         * tests/test-mbsspn.sh: New file.
3689         * tests/test-mbsspn.c: New file.
3690
3691 2007-02-11  Bruno Haible  <bruno@clisp.org>
3692
3693         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
3694
3695         * modules/mbspbrk-tests: New file.
3696         * tests/test-mbspbrk.sh: New file.
3697         * tests/test-mbspbrk.c: New file.
3698
3699 2007-02-11  Bruno Haible  <bruno@clisp.org>
3700
3701         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
3702         unneeded cast.
3703
3704         * modules/mbscspn-tests: New file.
3705         * tests/test-mbscspn.sh: New file.
3706         * tests/test-mbscspn.c: New file.
3707
3708 2007-02-11  Bruno Haible  <bruno@clisp.org>
3709
3710         * modules/mbscasecmp-tests: New file.
3711         * tests/test-mbscasecmp.sh: New file.
3712         * tests/test-mbscasecmp.c: New file.
3713
3714 2007-02-11  Bruno Haible  <bruno@clisp.org>
3715
3716         Ensure O(n) worst-case complexity of mbscasestr.
3717         * lib/mbscasestr.c: Include stdbool.h.
3718         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3719         functions.
3720         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
3721         the bookkeeping indicates that it's worth it.
3722         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
3723
3724         * modules/mbscasestr-tests: New file.
3725         * tests/test-mbscasestr1.c: New file.
3726         * tests/test-mbscasestr2.sh: New file.
3727         * tests/test-mbscasestr2.c: New file.
3728         * tests/test-mbscasestr3.sh: New file.
3729         * tests/test-mbscasestr3.c: New file.
3730         * tests/test-mbscasestr4.sh: New file.
3731         * tests/test-mbscasestr4.c: New file.
3732         * m4/locale-tr.m4: New file.
3733
3734 2007-02-11  Bruno Haible  <bruno@clisp.org>
3735
3736         Ensure O(n) worst-case complexity of mbsstr.
3737         * lib/mbsstr.c: Include stdbool.h.
3738         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3739         functions.
3740         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
3741         bookkeeping indicates that it's worth it.
3742         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
3743
3744         * modules/mbsstr-tests: New file.
3745         * tests/test-mbsstr1.c: New file.
3746         * tests/test-mbsstr2.sh: New file.
3747         * tests/test-mbsstr2.c: New file.
3748         * tests/test-mbsstr3.sh: New file.
3749         * tests/test-mbsstr3.c: New file.
3750         * m4/locale-fr.m4: New file.
3751
3752 2007-02-11  Bruno Haible  <bruno@clisp.org>
3753
3754         * lib/mbsrchr.c (mbsrchr): Fix bug.
3755
3756         * modules/mbsrchr-tests: New file.
3757         * tests/test-mbsrchr.sh: New file.
3758         * tests/test-mbsrchr.c: New file.
3759
3760 2007-02-11  Bruno Haible  <bruno@clisp.org>
3761
3762         * lib/mbschr.c (mbschr): Fix bug.
3763
3764         * modules/mbschr-tests: New file.
3765         * tests/test-mbschr.sh: New file.
3766         * tests/test-mbschr.c: New file.
3767         * m4/locale-zh.m4: New file.
3768
3769 2007-02-11  Bruno Haible  <bruno@clisp.org>
3770
3771         Support for copying multibyte string iterators.
3772         * lib/mbiter.h: Include <string.h>.
3773         (mbiter_multi_copy): New function.
3774         (mbi_copy): New macro.
3775         * lib/mbuiter.h: Include <string.h>.
3776         (mbuiter_multi_copy): New function.
3777         (mbui_copy): New macro.
3778
3779 2007-02-11  Bruno Haible  <bruno@clisp.org>
3780
3781         New module mbslen.
3782         * modules/mbslen: New file.
3783         * lib/mbslen.c: New file.
3784         * lib/string_.h (mbslen): New declaration.
3785         * m4/mbslen.m4: New file.
3786         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3787         GNULIB_MBSLEN.
3788         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
3789         * MODULES.html.sh (Internationalization functions): Add mbslen.
3790
3791 2007-02-11  Bruno Haible  <bruno@clisp.org>
3792
3793         Ensure O(n) worst-case complexity of strcasestr substitute.
3794         * lib/strcasestr.c: Include stdbool.h.
3795         (knuth_morris_pratt): New function.
3796         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3797         bookkeeping indicates that it's worth it.
3798         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
3799
3800         * modules/strcasestr-tests: New file.
3801         * tests/test-strcasestr.c: New file.
3802
3803 2007-02-11  Bruno Haible  <bruno@clisp.org>
3804
3805         Ensure O(n) worst-case complexity of c_strcasestr.
3806         * lib/c-strcasestr.c: Include stdbool.h, string.h.
3807         (knuth_morris_pratt): New function.
3808         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
3809         the bookkeeping indicates that it's worth it.
3810         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
3811
3812         * modules/c-strcasestr-tests: New file.
3813         * tests/test-c-strcasestr.c: New file.
3814
3815 2007-02-11  Bruno Haible  <bruno@clisp.org>
3816
3817         Ensure O(n) worst-case complexity of c_strstr.
3818         * lib/c-strstr.c: Include stdbool.h, string.h.
3819         (knuth_morris_pratt): New function.
3820         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3821         bookkeeping indicates that it's worth it.
3822         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
3823
3824         * lib/c-strstr.c: Complete rewrite for maintainability.
3825
3826         * modules/c-strstr-tests: New file.
3827         * tests/test-c-strstr.c: New file.
3828
3829 2007-02-11  Bruno Haible  <bruno@clisp.org>
3830
3831         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
3832         5.2.1 and earlier, whereby \055 was treated just like the range
3833         delimiter '-'.
3834         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
3835
3836 2007-02-08  Bruno Haible  <bruno@clisp.org>
3837
3838         * modules/regex (Depends-on): Add stdbool.
3839         Reported by Dalibor Topic <robilad@kaffe.org>.
3840
3841 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
3842
3843         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
3844         Prefer returning from main to exiting from it.
3845         Remove unnecessary parens after sizeof.
3846
3847 2007-02-05  Bruno Haible  <bruno@clisp.org>
3848
3849         New module mbssep.
3850         * modules/mbssep: New file.
3851         * lib/mbssep.c: New file.
3852         * lib/string_.h (strsep): Add a conditional link warning.
3853         (mbssep): New declaration.
3854         * m4/mbssep.m4: New file.
3855         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3856         GNULIB_MBSSEP.
3857         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
3858         * MODULES.html.sh (Internationalization functions): Add mbssep.
3859
3860 2007-02-05  Bruno Haible  <bruno@clisp.org>
3861
3862         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
3863         Optimize search in case of 1 delimiter.
3864
3865 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3866
3867         * lib/acl.h: Include sys/types.h before sys/acl.h.
3868
3869 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3870
3871         Merge upstream fix for glibc bugzilla #3957:
3872
3873         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
3874
3875         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
3876         bit for RE_HAT_LISTS_NOT_NEWLINE.
3877         (build_charclass_op): Remove bogus comment.
3878
3879 2007-02-05  Simon Josefsson  <simon@josefsson.org>
3880
3881         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
3882
3883 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3884
3885         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
3886         * lib/memmem.c [!defined _LIBC]: Include config.h.
3887
3888 2007-02-04  Bruno Haible  <bruno@clisp.org>
3889
3890         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
3891         warning message.
3892
3893 2007-02-04  Bruno Haible  <bruno@clisp.org>
3894
3895         New module mbstok_r.
3896         * modules/mbstok_r: New file.
3897         * lib/mbstok_r.c: New file.
3898         * lib/string_.h (strtok_r): Change argument names to match the
3899         comments. Add a conditional link warning.
3900         (mbstok_r): New declaration.
3901         * m4/mbstok_r.m4: New file.
3902         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3903         GNULIB_MBSTOK_R.
3904         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
3905         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
3906
3907 2007-02-04  Bruno Haible  <bruno@clisp.org>
3908
3909         New module mbsspn.
3910         * modules/mbsspn: New file.
3911         * lib/mbsspn.c: New file.
3912         * lib/string_.h (strspn): Add a conditional link warning.
3913         (mbsspn): New declaration.
3914         * m4/mbsspn.m4: New file.
3915         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3916         GNULIB_MBSSPN.
3917         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
3918         * MODULES.html.sh (Internationalization functions): Add mbsspn.
3919
3920 2007-02-04  Bruno Haible  <bruno@clisp.org>
3921
3922         New module mbspbrk.
3923         * modules/mbspbrk: New file.
3924         * lib/mbspbrk.c: New file.
3925         * lib/string_.h (strpbrk): Add a conditional link warning.
3926         (mbspbrk): New declaration.
3927         * m4/mbspbrk.m4: New file.
3928         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3929         GNULIB_MBSPBRK.
3930         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
3931         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
3932
3933 2007-02-04  Bruno Haible  <bruno@clisp.org>
3934
3935         New module mbscspn.
3936         * modules/mbscspn: New file.
3937         * lib/mbscspn.c: New file.
3938         * lib/string_.h (strcspn): Add a conditional link warning.
3939         (mbscspn): New declaration.
3940         * m4/mbscspn.m4: New file.
3941         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3942         GNULIB_MBSCSPN.
3943         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
3944         * MODULES.html.sh (Internationalization functions): Add mbscspn.
3945
3946 2007-02-04  Bruno Haible  <bruno@clisp.org>
3947
3948         New module mbscasestr, reduced goal of strcasestr.
3949         * modules/mbscasestr: New file.
3950         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
3951         (mbscasestr): Renamed from strcasestr.
3952         * lib/strcasestr.c: Don't include mbuiter.h.
3953         (strcasestr): Remove support for multibyte locales.
3954         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
3955         Change the conditional link warning.
3956         (mbscasestr): New declaration.
3957         * m4/mbscasestr.m4: New file.
3958         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
3959         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
3960         REPLACE_STRCASESTR.
3961         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
3962         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3963         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3964         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
3965         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
3966         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3967         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
3968         (Depends-on): Remove mbuiter.
3969         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
3970
3971 2007-02-04  Bruno Haible  <bruno@clisp.org>
3972
3973         Simplify handling of strncasecmp.
3974         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
3975         the conditional link warning.
3976         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3977         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
3978         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
3979         * modules/strcase (configure.ac): Don't invoke
3980         gl_STRING_MODULE_INDICATOR.
3981         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
3982
3983 2007-02-04  Bruno Haible  <bruno@clisp.org>
3984
3985         New module mbscasecmp, reduced goal of strcasecmp.
3986         * modules/mbscasecmp: New file.
3987         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
3988         (mbscasecmp): Renamed from strcasecmp.
3989         * lib/strcasecmp.c: Don't include mbuiter.h.
3990         (strcasecmp): Remove support for multibyte locales.
3991         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
3992         Change the conditional link warning.
3993         (mbscasecmp): New declaration.
3994         * m4/mbscasecmp.m4: New file.
3995         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
3996         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
3997         REPLACE_STRCASECMP.
3998         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
3999         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4000         GNULIB_MBSCASECMP.
4001         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
4002         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
4003         * modules/strcase (Files): Remove m4/mbrtowc.m4.
4004         (Depends-on): Remove mbuiter.
4005         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
4006
4007 2007-02-04  Bruno Haible  <bruno@clisp.org>
4008
4009         New module mbsstr. Remove module strstr.
4010         * modules/mbsstr: New file.
4011         * modules/strstr: Remove file.
4012         * lib/mbsstr.c: Renamed from lib/strstr.c.
4013         (mbsstr): Renamed from strstr.
4014         * lib/string_.h (strstr): Remove declaration. Change the conditional
4015         link warning.
4016         (mbsstr): New declaration.
4017         * m4/mbsstr.m4: New file.
4018         * m4/strstr.m4: Remove file.
4019         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
4020         REPLACE_STRSTR.
4021         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
4022         Don't initialize GNULIB_STRSTR.
4023         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
4024         substitute GNULIB_STRSTR and REPLACE_STRSTR.
4025         * MODULES.html.sh (Internationalization functions): Add mbsstr.
4026         (Support for systems lacking ANSI C 89): Remove strstr.
4027
4028 2007-02-04  Bruno Haible  <bruno@clisp.org>
4029
4030         New module mbsrchr.
4031         * modules/mbsrchr: New file.
4032         * lib/mbsrchr.c: New file.
4033         * lib/string_.h (strrchr): Add a conditional link warning.
4034         (mbsrchr): New declaration.
4035         * m4/mbsrchr.m4: New file.
4036         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4037         GNULIB_MBSRCHR.
4038         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
4039         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
4040
4041 2007-02-04  Bruno Haible  <bruno@clisp.org>
4042
4043         New module mbschr.
4044         * modules/mbschr: New file.
4045         * lib/mbschr.c: New file.
4046         * lib/string_.h (strchr): Add a conditional link warning.
4047         (mbschr): New declaration.
4048         * m4/mbschr.m4: New file.
4049         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4050         GNULIB_MBSCHR.
4051         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
4052         * MODULES.html.sh (Internationalization functions): Add mbschr.
4053
4054 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
4055
4056         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
4057
4058         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
4059
4060 2007-02-04  Bruno Haible  <bruno@clisp.org>
4061
4062         New module description section 'configure.ac-early'.
4063         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
4064         (func_get_autoconf_early_snippet): New function.
4065         (func_import, func_create_testdir): Use it. Remove special cases for
4066         modules 'extensions' and 'lock'.
4067         * modules/extensions (configure.ac-early): Require
4068         gl_USE_SYSTEM_EXTENSIONS.
4069         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
4070
4071 2007-02-04  Bruno Haible  <bruno@clisp.org>
4072
4073         Make use of gcj-4.3's -fsource and -ftarget option.
4074         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
4075         and if so try the options -fsource and -ftarget.
4076         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
4077         source_version, ftarget_option, target_version arguments.
4078         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
4079         (is_envjavac_oldgcj_14_14_usable): Renamed from
4080         is_envjavac_gcj_14_14_usable.
4081         (is_envjavac_oldgcj_14_13_usable): Renamed from
4082         is_envjavac_gcj_14_13_usable.
4083         (is_gcj_present): Update.
4084         (is_gcj_43, is_gcj43_usable): New functions.
4085         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
4086         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
4087         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
4088         try the options -fsource and -ftarget.
4089
4090 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
4091
4092         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
4093         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
4094         larger value.
4095
4096 2007-02-03  Jim Meyering  <jim@meyering.net>
4097
4098         Give tools a better chance to allocate space for very large buffers.
4099         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
4100
4101         Make pwd and readlink work also when run with an unreadable parent dir
4102         on systems with openat support.
4103         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
4104         provided getcwd function, even when we have openat support.
4105         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
4106
4107 2007-02-02  Bruno Haible  <bruno@clisp.org>
4108
4109         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
4110         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
4111         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
4112         portability problems if one of these functions is only used on specific
4113         platforms.
4114         Reported by Paul Eggert.
4115
4116 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
4117
4118         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
4119         is causing more trouble than it's curing.
4120         * lib/regex_internal.h (__mempcpy): Remove.
4121         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
4122         (and make the code a tad smaller to boot).
4123         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
4124
4125 2007-02-02  Jim Meyering  <jim@meyering.net>
4126
4127         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
4128         section, not in the Makefile.am: one.
4129
4130 2007-02-02  Eric Blake  <ebb9@byu.net>
4131
4132         * lib/strchrnul.c: Always include config.h first.
4133
4134         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
4135         gnulib strstr is not necessary here.
4136
4137 2007-02-02  Simon Josefsson  <simon@josefsson.org>
4138
4139         * m4/socklen.m4: Fix typo.
4140
4141 2007-02-02  Eric Blake  <ebb9@byu.net>
4142
4143         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
4144         * modules/netinet_in (Makefile.am): Likewise.
4145
4146 2007-02-01  Bruno Haible  <bruno@clisp.org>
4147
4148         * lib/string_.h (GL_LINK_WARNING): New macro.
4149         (strcasecmp, strstr, strcasestr): If provided by the system,
4150         conditionally define as a macro that leads to a warning instead of to
4151         an error.
4152         (strncasecmp): Conditionally define as a macro that leads to a warning.
4153
4154 2007-02-01  Karl Berry  <karl@gnu.org>
4155
4156         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
4157
4158 2007-02-01  Bruno Haible  <bruno@clisp.org>
4159
4160         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
4161         renamings.
4162
4163 2007-02-01  Eric Blake  <ebb9@byu.net>
4164
4165         * modules/regex (Depends-on): Revert dependence on mempcpy.
4166         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
4167         module's definition of mempcpy.
4168         Reported by Paul Eggert.
4169
4170 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
4171
4172         * lib/string_.h: If the gnulib module XYZ is not present, undefine
4173         the symbol XYZ before redefining it.  This fixes a problem with
4174         programs that don't use XYZ, when compiled on systems that define
4175         XYZ to something else.
4176
4177 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
4178
4179         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
4180         occurs when "mkdir -m foo" creates a setgid directory that is (1)
4181         writeable to group or other and (2) is intended to have a special
4182         mode bit that is set or cleared.  In such a case, the directory
4183         should be neither group- nor other-writeable until the special
4184         mode bits are right.
4185
4186 2007-01-31  Eric Blake  <ebb9@byu.net>
4187
4188         * modules/mountlist (Depends-on): Add strstr.
4189
4190         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
4191         bug.
4192         * modules/string (Makefile.am): Remove redundant replacement.
4193         * modules/regex (Depends-on): Add mempcpy.
4194
4195 2007-01-31  Bruno Haible  <bruno@clisp.org>
4196
4197         New module description field 'Link'.
4198         * gnulib-tool (func_usage): Document --extract-link-directive.
4199         (sed_extract_prog): Recognize 'Link' directive.
4200         (func_get_link_directive): New function.
4201         (func_import): Show summary of link directives.
4202         Handle --extract-link-directive option.
4203         * modules/acl (Link): New section.
4204         * modules/clock-time (Link): New section.
4205         * modules/euidaccess (Link): New section.
4206         * modules/gettext (Link): New section.
4207         * modules/iconv (Link): New section.
4208         * modules/lock (Link): New section.
4209         * modules/nanosleep (Link): New section.
4210         * modules/readline (Link): New section.
4211
4212 2007-01-27  Bruno Haible  <bruno@clisp.org>
4213
4214         Enforce the use of gnulib modules for unportable <string.h> functions.
4215         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
4216         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
4217         (gl_HEADER_STRING_H_BODY): Require it.
4218         * lib/string_.h: If the gnulib module XYZ is not present, redefine
4219         the symbol XYZ to one that gives a link error.
4220         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
4221         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
4222         * modules/mempcpy (configure.ac): Likewise.
4223         * modules/memrchr (configure.ac): Likewise.
4224         * modules/stpcpy (configure.ac): Likewise.
4225         * modules/stpncpy (configure.ac): Likewise.
4226         * modules/strcase (configure.ac): Likewise.
4227         * modules/strcasestr (configure.ac): Likewise.
4228         * modules/strchrnul (configure.ac): Likewise.
4229         * modules/strdup (configure.ac): Likewise.
4230         * modules/strndup (configure.ac): Likewise.
4231         * modules/strnlen (configure.ac): Likewise.
4232         * modules/strpbrk (configure.ac): Likewise.
4233         * modules/strsep (configure.ac): Likewise.
4234         * modules/strstr (configure.ac): Likewise.
4235         * modules/strtok_r (configure.ac): Likewise.
4236
4237 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
4238
4239         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
4240
4241 2007-01-30  Jim Meyering  <jim@meyering.net>
4242
4243         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
4244
4245 2007-01-29  Bruno Haible  <bruno@clisp.org>
4246
4247         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
4248         * lib/execute.c: Likewise.
4249         * lib/pipe.c: Likewise.
4250         * lib/printf-args.h: Likewise.
4251         * lib/printf-args.c: Likewise.
4252         * lib/printf-parse.c: Likewise.
4253         * lib/vasnprintf.c: Likewise.
4254
4255 2007-01-29  Eric Blake  <ebb9@byu.net>
4256
4257         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
4258         declaration.
4259
4260 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
4261
4262         * lib/strptime.h (strptime): Use 'restrict' for args where
4263         POSIX requires this.
4264         * lib/strptime.c (strptime): Likewise.
4265         Change license notice from LGPL to GPL, since gnulib-tool will
4266         change this as needed.
4267         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
4268         defined.
4269         Include "strptime.h" first, to check interface.
4270         Do not #undef _LIBC and _NL_CURRENT.
4271         Do not include <stdlib.h>; no longer needed.
4272         Include "time_r.h" and declare ptime_locale_status
4273         only if _LIBC is not defined.
4274         (__P): Remove unused macro.
4275         (match_string): Bring back glibc version, but use it only if _LIBC
4276         is defined.
4277         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
4278         Remove unnecessary assertion and abort() call.
4279         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
4280         * m4/strptime.m4: Fix serial number comment.
4281         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
4282         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
4283         (Depends-on): Add time_r.
4284
4285 2007-01-29  Bruno Haible  <bruno@clisp.org>
4286
4287         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4288         strptime.
4289         * modules/strptime (Depends-on): Add stdbool.
4290         * lib/strptime.h: Include <time.h> always. Add comments.
4291
4292 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
4293
4294         * modules/strptime: New file.
4295         * lib/strptime.h: New file.
4296         * lib/strptime.c: New file.
4297         * m4/strptime.m4: New file.
4298
4299 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
4300
4301         * MODULES.html.sh: New module mpsort.
4302         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
4303
4304         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
4305         a circularity problem with HP-UX ia64 reported by Bob Proulx in
4306         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
4307         All uses changed.
4308         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
4309         All uses changed.
4310         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
4311         to _Restrict_.
4312         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
4313         the parameter matches the prototype.
4314
4315 2007-01-28  Jim Meyering  <jim@meyering.net>
4316
4317         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
4318         sys/time.h here, reverting that part of the previous patch:
4319         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
4320
4321 2007-01-28  Bruno Haible  <bruno@clisp.org>
4322
4323         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
4324         value of $(SYS_TIME_H).
4325         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
4326         remove it conditionally, too. [added by Jim Meyering]
4327         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
4328         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4329         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
4330         GETTIMEOFDAY_REPLACEMENT to 1.
4331
4332 2007-01-28  Bruno Haible  <bruno@clisp.org>
4333
4334         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
4335         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
4336         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
4337         Set UNISTD_H instead of UNISTD_H2.
4338         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
4339
4340 2007-01-28  Bruno Haible  <bruno@clisp.org>
4341
4342         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
4343         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
4344
4345 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4346
4347         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
4348         (func_create_testdir): Ensure C locale for `grep' and `tr'
4349         character ranges.
4350         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
4351         ACLOCAL_AMFLAGS parsing state machine.
4352
4353 2007-01-27  Bruno Haible  <bruno@clisp.org>
4354
4355         * modules/unistr/base: Update.
4356
4357 2007-01-27  Bruno Haible  <bruno@clisp.org>
4358
4359         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
4360         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
4361         * modules/unistr/u32-mbtouc-unsafe: Renamed from
4362         modules/unistr/u32-mbtouc.
4363         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
4364         * lib/unistr.h: Update.
4365         * lib/linebreak.c: Update.
4366         * modules/unistr/u32-mbtouc: Renamed from
4367         modules/unistr/u32-mbtouc-safe.
4368         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
4369         * lib/unistr.h: Update.
4370         * lib/unistr/u32-to-u8.c: Update.
4371         * lib/unistr/u32-to-u16.c: Update.
4372
4373 2007-01-27  Bruno Haible  <bruno@clisp.org>
4374
4375         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
4376         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
4377         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
4378         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
4379         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
4380         * modules/unistr/u16-mbtouc-unsafe: Renamed from
4381         modules/unistr/u16-mbtouc.
4382         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
4383         * lib/unistr.h: Update.
4384         * lib/linebreak.c: Update.
4385         * modules/linebreak: Update.
4386         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
4387         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
4388         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
4389         * modules/unistr/u16-mbtouc: Renamed from
4390         modules/unistr/u16-mbtouc-safe.
4391         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
4392         * lib/unistr.h: Update.
4393         * lib/unistr/u16-to-u8.c: Update.
4394         * modules/unistr/u16-to-u8: Update.
4395         * lib/unistr/u16-to-u32.c: Update.
4396         * modules/unistr/u16-to-u32: Update.
4397
4398 2007-01-27  Bruno Haible  <bruno@clisp.org>
4399
4400         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
4401         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
4402         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
4403         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
4404         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
4405         * modules/unistr/u8-mbtouc-unsafe: Renamed from
4406         modules/unistr/u8-mbtouc.
4407         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
4408         * lib/unistr.h: Update.
4409         * lib/striconveh.c: Update.
4410         * modules/striconveh: Update.
4411         * lib/linebreak.c: Update.
4412         * modules/linebreak: Update.
4413         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
4414         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
4415         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
4416         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
4417         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
4418         * lib/unistr.h: Update.
4419         * lib/striconveh.c: Update.
4420         * modules/striconveh: Update.
4421         * lib/unistr/u8-to-u16.c: Update.
4422         * modules/unistr/u8-to-u16: Update.
4423         * lib/unistr/u8-to-u32.c: Update.
4424         * modules/unistr/u8-to-u32: Update.
4425
4426 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4427
4428         Sync from Libtool.
4429         * lib/argz.c: Do not include strings.h nor memory.h, include
4430         string.h unconditionally.  Patch by Simon Josefsson.
4431
4432 2007-01-27  Bruno Haible  <bruno@clisp.org>
4433
4434         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
4435         from gl_HEADER_STRING_H_BODY.
4436         (gl_HEADER_STRING_H_BODY): Require it.
4437         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
4438         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
4439         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
4440         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
4441         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
4442         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
4443         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
4444         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
4445         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
4446         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
4447         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
4448         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
4449         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
4450         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
4451         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4452
4453 2007-01-27  Bruno Haible  <bruno@clisp.org>
4454
4455         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
4456         check_PROGRAMS into noinst_PROGRAMS.
4457         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
4458         check_PROGRAMS in this case.
4459         (func_import): Set for_test to false.
4460         (func_create_testdir): Set for_test to true.
4461
4462 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4463             Bruno Haible  <bruno@clisp.org>
4464
4465         * modules/strcasestr (Files): Remove lib/strcasestr.h.
4466         (Depends-on): Add string.
4467         (Includes): Use <string.h> instead of strcasestr.h.
4468         * modules/string (Makefile.am): Also substitute the value of
4469         REPLACE_STRCASESTR.
4470         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
4471         assume strcasestr is declared in <string.h> not <strings.h>. Also
4472         set REPLACE_STRCASESTR.
4473         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
4474         REPLACE_STRCASESTR.
4475         * lib/strcasestr.h: Remove file.
4476         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
4477         * lib/string_.h (strcasestr): New declaration.
4478
4479 2007-01-27  Bruno Haible  <bruno@clisp.org>
4480
4481         * lib/string_.h: Use 'extern'.
4482
4483 2007-01-27  Jim Meyering  <jim@meyering.net>
4484
4485         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
4486         of set-but-not-used local, "q".
4487
4488         * lib/mempcpy.c: Include <config.h> before <string.h>.
4489         This fixes a compilation error on HP-UX, due to the system's
4490         "restrict"-using mempcpy prototype.
4491
4492 2007-01-26  Bruno Haible  <bruno@clisp.org>
4493
4494         Small optimization.
4495         * lib/javacomp.c: Include c-strstr.h.
4496          (is_envjavac_gcj): Use c_strstr instead of strstr.
4497         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
4498
4499 2007-01-26  Bruno Haible  <bruno@clisp.org>
4500
4501         * MODULES.html.sh (Unicode string functions): Add the new modules.
4502
4503         * modules/uniconv/u32-strconv-to-locale: New file.
4504         * lib/uniconv/u32-strconv-to-locale.c: New file.
4505
4506         * modules/uniconv/u16-strconv-to-locale: New file.
4507         * lib/uniconv/u16-strconv-to-locale.c: New file.
4508
4509         * modules/uniconv/u8-strconv-to-locale: New file.
4510         * lib/uniconv/u8-strconv-to-locale.c: New file.
4511
4512         * modules/uniconv/u32-strconv-from-locale: New file.
4513         * lib/uniconv/u32-strconv-from-locale.c: New file.
4514
4515         * modules/uniconv/u16-strconv-from-locale: New file.
4516         * lib/uniconv/u16-strconv-from-locale.c: New file.
4517
4518         * modules/uniconv/u8-strconv-from-locale: New file.
4519         * lib/uniconv/u8-strconv-from-locale.c: New file.
4520
4521         * modules/uniconv/u32-strconv-to-enc: New file.
4522         * lib/uniconv/u32-strconv-to-enc.c: New file.
4523         * modules/uniconv/u32-strconv-to-enc-tests: New file.
4524         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
4525
4526         * modules/uniconv/u16-strconv-to-enc: New file.
4527         * lib/uniconv/u16-strconv-to-enc.c: New file.
4528         * lib/uniconv/u-strconv-to-enc.h: New file.
4529         * modules/uniconv/u16-strconv-to-enc-tests: New file.
4530         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
4531
4532         * modules/uniconv/u8-strconv-to-enc: New file.
4533         * lib/uniconv/u8-strconv-to-enc.c: New file.
4534         * modules/uniconv/u8-strconv-to-enc-tests: New file.
4535         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
4536
4537         * modules/uniconv/u32-strconv-from-enc: New file.
4538         * lib/uniconv/u32-strconv-from-enc.c: New file.
4539         * modules/uniconv/u32-strconv-from-enc-tests: New file.
4540         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
4541
4542         * modules/uniconv/u16-strconv-from-enc: New file.
4543         * lib/uniconv/u16-strconv-from-enc.c: New file.
4544         * modules/uniconv/u16-strconv-from-enc-tests: New file.
4545         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
4546
4547         * modules/uniconv/u8-strconv-from-enc: New file.
4548         * lib/uniconv/u8-strconv-from-enc.c: New file.
4549         * lib/uniconv/u-strconv-from-enc.h: New file.
4550         * modules/uniconv/u8-strconv-from-enc-tests: New file.
4551         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
4552
4553         * modules/uniconv/u32-conv-from-enc: New file.
4554         * lib/uniconv/u32-conv-from-enc.c: New file.
4555         * modules/uniconv/u32-conv-from-enc-tests: New file.
4556         * tests/uniconv/test-u32-conv-from-enc.c: New file.
4557
4558         * modules/uniconv/u16-conv-from-enc: New file.
4559         * lib/uniconv/u16-conv-from-enc.c: New file.
4560         * lib/uniconv/u-conv-from-enc.h: New file.
4561         * modules/uniconv/u16-conv-from-enc-tests: New file.
4562         * tests/uniconv/test-u16-conv-from-enc.c: New file.
4563
4564         * modules/uniconv/u8-conv-from-enc: New file.
4565         * lib/uniconv/u8-conv-from-enc.c: New file.
4566         * modules/uniconv/u8-conv-from-enc-tests: New file.
4567         * tests/uniconv/test-u8-conv-from-enc.c: New file.
4568
4569         * modules/uniconv/base: New file.
4570         * lib/uniconv.h: New file.
4571
4572 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
4573
4574         * doc/gnulib-tool.texi (Initial import): Update to match current
4575         behavior with strdup module.
4576         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
4577         * lib/memmem.h: Remove; all uses removed.  This is now done
4578         by <string.h>.
4579         * lib/mempcpy.h: Likewise.
4580         * lib/memrchr.h: Likewise.
4581         * lib/stpcpy.h: Likewise.
4582         * lib/stpncpy.h: Likewise.
4583         * lib/strcase.h: Likewise.
4584         * lib/strchrnul.h: Likewise.
4585         * lib/strdup.h: Likewise.
4586         * lib/strndup.h: Likewise.
4587         * lib/strnlen.h: Likewise.
4588         * lib/strpbrk.h: Likewise.
4589         * lib/strsep.h: Likewise.
4590         * lib/strstr.h: Likewise.
4591         * lib/strtok_r.h: Likewise.
4592         * lib/string_.h: New file.
4593         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
4594         Rely on <string.h> instead.
4595         * lib/canon-host.c: Likewise.
4596         * lib/chdir-long.c: Likewise.
4597         * lib/concatpath.c: Likewise.
4598         * lib/exclude.c: Likewise.
4599         * lib/fchdir.c: Likewise.
4600         * lib/getaddrinfo.c: Likewise.
4601         * lib/getcwd.c: Likewise.
4602         * lib/getsubopt.c: Likewise.
4603         * lib/glob.c: Likewise.
4604         * lib/hard-locale.c: Likewise.
4605         * lib/iconvme.c: Likewise.
4606         * lib/javacomp.c: Likewise.
4607         * lib/mempcpy.c: Likewise.
4608         * lib/memrchr.c: Likewise.
4609         * lib/regex_internal.h: Likewise.
4610         * lib/stpncpy.c: Likewise.
4611         * lib/strcasecmp.c: Likewise.
4612         * lib/strchrnul.c: Likewise.
4613         * lib/strdup.c: Likewise.
4614         * lib/striconv.c: Likewise.
4615         * lib/striconveh.c: Likewise.
4616         * lib/striconveha.c: Likewise.
4617         * lib/strncasecmp.c: Likewise.
4618         * lib/strndup.c: Likewise.
4619         * lib/strnlen.c: Likewise.
4620         * lib/strsep.c: Likewise.
4621         * lib/strstr.c: Likewise.
4622         * lib/strtok_r.c: Likewise.
4623         * lib/userspec.c: Likewise.
4624         * lib/w32spawn.h: Likewise.
4625         * lib/xstrndup.c: Likewise.
4626         * lib/mountlist.c (strstr): Remove decl.
4627         * m4/string_h.m4: New file.
4628         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
4629         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
4630         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
4631         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
4632         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
4633         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
4634         Set REPLACE_STRCASECMP if necessary.
4635         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
4636         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
4637         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
4638         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
4639         HAVE_DECL_STRDUP if necessary.
4640         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
4641         since gl_FUNC_STRNDUP does that now.
4642         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
4643         Check for decl here...
4644         (gl_PREREQ_STRNLEN): ... not here.
4645         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
4646         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
4647         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
4648         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
4649         necessary.
4650         * modules/string: New file.
4651         * modules/memmem (Files): Remove special-purpose include file.
4652         (Depends-on): Add string.
4653         (Include): Include <string.h>, not the removed file.
4654         * modules/mempcpy: Likewise.
4655         * modules/memrchr: Likewise.
4656         * modules/stpcpy: Likewise.
4657         * modules/stpncpy: Likewise.
4658         * modules/strcase: Likewise.
4659         * modules/strchrnul: Likewise.
4660         * modules/strdup: Likewise.
4661         * modules/strndup: Likewise.
4662         * modules/strnlen: Likewise.
4663         * modules/strpbrk: Likewise.
4664         * modules/strsep: Likewise.
4665         * modules/strstr: Likewise.
4666         * modules/strtok_r: Likewise.
4667         * tests/test-dirname.c: Don't include "strdup.h", since
4668         <string.h> now suffices.
4669         * tests/test-memmem.c: Don't include "memmem.h", since
4670         <string.h> now suffices.
4671
4672 2007-01-25  Bruno Haible  <bruno@clisp.org>
4673
4674         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
4675         *resultp is 0.
4676
4677         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
4678         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
4679         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
4680         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
4681
4682         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
4683         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
4684         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
4685         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
4686         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
4687         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
4688
4689 2007-01-24  Bruno Haible  <bruno@clisp.org>
4690
4691         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
4692         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
4693         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
4694         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
4695         gl_FUNC_FTS_CORE.
4696         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
4697         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
4698         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
4699         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
4700         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
4701         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
4702         gl_FUNC_FCHOWNAT.
4703         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
4704         gl_FUNC_STRFTIME.
4705         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
4706         Reported by Ralf Wildenhues.
4707
4708 2007-01-24  Bruno Haible  <bruno@clisp.org>
4709
4710         Drop AC_REQUIRE calls that are redundant with the module dependencies.
4711         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
4712         gl_GETADDRINFO.
4713         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
4714         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
4715         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
4716
4717 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
4718
4719         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
4720         Don't use 'exit'; just return from 'main'.
4721         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
4722
4723         * lib/fnmatch_.h: Readjust white space and comments to match
4724         glibc, to avoid spurious diffs.
4725
4726 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4727
4728         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
4729         2004-12-01 change by Jakub Jelinek, since this code won't compile
4730         if !LIBC.  Problem reported by Bob Proulx.
4731
4732 2007-01-23  Bruno Haible  <bruno@clisp.org>
4733
4734         * lib/striconveh.c: Include c-strcaseeq.h.
4735         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
4736         * modules/striconveh (Depends-on): Add c-strcaseeq.
4737
4738 2007-01-23  Bruno Haible  <bruno@clisp.org>
4739
4740         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
4741
4742         * modules/c-strcaseeq: New file.
4743         * lib/c-strcaseeq.h: New file.
4744
4745         * modules/streq: New file.
4746         * lib/streq.h: New file.
4747
4748 2007-01-23  Bruno Haible  <bruno@clisp.org>
4749
4750         * modules/striconveha-tests: New file.
4751         * tests/test-striconveha.c: New file.
4752
4753         * lib/striconveha.h: Include <stdbool.h>.
4754         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
4755         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
4756         (mem_iconveha_notranslit): Renamed from mem_iconveha.
4757         (mem_iconveha): New function.
4758         (str_iconveha_notranslit): Renamed from str_iconveha.
4759         (str_iconveha): New function.
4760         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
4761         c-strcase.
4762
4763 2007-01-23  Bruno Haible  <bruno@clisp.org>
4764
4765         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
4766         encodings without forgiving before trying any encoding with handler.
4767         (str_iconveha): Try all encodings without forgiving before trying any
4768         encoding with handler.
4769
4770 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4771
4772         Import the following changes from libc.
4773
4774         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
4775
4776         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
4777
4778         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4779
4780         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
4781         normal_bracket label.
4782
4783         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
4784
4785         [BZ #361]
4786         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
4787         to normal_bracket after fetching the next character.
4788
4789 2007-01-22  Bruno Haible  <bruno@clisp.org>
4790
4791         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
4792         argument.
4793         * lib/striconveh.c (iconv_carefully_1): New function.
4794         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
4795         argument.
4796         (str_cd_iconveh): Update.
4797         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
4798         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
4799         * tests/test-striconveh.c (MAGIC): New macro.
4800         (new_offsets): New function.
4801         (main): Test call with and without offsets.
4802
4803 2007-01-22  Bruno Haible  <bruno@clisp.org>
4804
4805         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
4806         * modules/sys_select (Makefile.am): Likewise.
4807         * modules/sys_socket (Makefile.am): Likewise.
4808         * modules/sys_time (Makefile.am): Likewise.
4809
4810 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
4811
4812         * modules/gettimeofday (License): Change from GPL to LGPL, since
4813         gettimeofday is a library function.
4814
4815 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4816
4817         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
4818
4819 2007-01-21  Bruno Haible  <bruno@clisp.org>
4820
4821         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
4822
4823 2007-01-21  Bruno Haible  <bruno@clisp.org>
4824
4825         * modules/striconveha: New file.
4826         * lib/striconveha.h: New file.
4827         * lib/striconveha.c: New file.
4828         * MODULES.html.sh (Internationalization functions): Add striconveha.
4829         * lib/striconv.c (str_iconv): Optimize the case of an empty input
4830         string.
4831         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
4832
4833 2007-01-21  Bruno Haible  <bruno@clisp.org>
4834
4835         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
4836         * lib/striconveh.c (str_iconveh): Likewise.
4837
4838 2007-01-21  Bruno Haible  <bruno@clisp.org>
4839
4840         * lib/striconveh.h (mem_iconveh): New declaration.
4841         * lib/striconveh.c (mem_iconveh): New function.
4842         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
4843
4844 2007-01-21  Bruno Haible  <bruno@clisp.org>
4845
4846         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
4847
4848         * lib/striconveh.h (mem_cd_iconveh): Change specification.
4849         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
4850         original result buffer.
4851         (str_cd_iconveh): Update.
4852         * tests/test-striconveh.c (main): Update.
4853
4854         * lib/striconv.h (mem_cd_iconv): Change specification.
4855         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
4856         result buffer.
4857         (str_cd_iconv): Update.
4858         * tests/test-striconv.c (main): Update.
4859
4860 2007-01-21  Bruno Haible  <bruno@clisp.org>
4861
4862         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
4863
4864 2007-01-20  Jim Meyering  <jim@meyering.net>
4865
4866         * lib/userspec.c (parse_with_separator): If a user or group string
4867         starts with "+", skip the corresponding name-to-ID look-up, since
4868         such a look-up must fail: user and group names may not include "+".
4869
4870 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
4871
4872         * lib/poll.c: Include sys/time.h and time.h unconditionally,
4873         since we now assume the sys_time module.
4874         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
4875         check for sys/time.h; no longer needed.
4876         * modules/poll (Depends-on): Depend on sys_time.
4877
4878 2007-01-18  Bruno Haible  <bruno@clisp.org>
4879
4880         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
4881         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4882
4883         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
4884         gettimeofday.
4885
4886         * tests/test-gettimeofday.c: Include <time.h>.
4887         (dummy): Remove variable.
4888
4889         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
4890         gl_HEADER_SYS_TIME_H.
4891         (gl_HEADER_SYS_TIME_H): New macro.
4892
4893         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
4894         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4895         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
4896         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
4897         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4898         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
4899         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
4900         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4901         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
4902         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
4903         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4904
4905         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
4906         last change; it caused a compilation error when cross-compiling to
4907         Cygwin.
4908
4909 2007-01-18  Jim Meyering  <jim@meyering.net>
4910
4911         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
4912         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
4913         than the race-prone "test -d sys || mkdir sys".
4914         (configure.ac): Use AC_PROG_MKDIR_P.
4915         * modules/sys_select: Likewise.
4916         * modules/sys_socket: Likewise.
4917         * modules/sys_time: Likewise.
4918
4919 2007-01-18  Eric Blake  <ebb9@byu.net>
4920
4921         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
4922         replace gettimeofday.
4923         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
4924         name, to avoid infinite recursion.
4925
4926 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
4927
4928         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
4929         module sys_time.
4930         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
4931         assume timespec.h defines struct timeval.
4932         * lib/settime.c: Likewise.
4933         * lib/utimens.c: Likewise.
4934         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
4935         since we now assume the gettimeofday module.
4936         * lib/tempname.c (__gen_tempname): Likewise.
4937         * lib/gettimeofday.h: Remove.
4938         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
4939         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
4940         Include <time.h>, for 'time()'.
4941         (localtime_buffer_addr): Also use this workaround if
4942         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
4943         to simplify the uses.  All uses changed.
4944         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
4945         that #undef is inside {}, and 'const' follows type name consistently.
4946         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
4947         (gettimeofday): Do not use the maximum possible value for
4948         tv->tv_usec, since that might break usages other than ls.c.
4949         Instead, we'll leave ls.c alone.  This undoes today's patch
4950         by Bruno.  Add a compile-time warning for 1s-clock resolution;
4951         we've never observed the problem but might as well keep the
4952         canary.
4953         * lib/nanosleep.c: Include timespec.h first, for interface check.
4954         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
4955         now assume the sys_time module.
4956         * lib/tempname.c: Likewise.
4957         * lib/timespec.h: Likewise.
4958         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
4959         needed.
4960         * lib/strftime.c: Likewise.
4961         * lib/timespec.h: Likewise.
4962         * lib/posixtm.c: Include posixtm.h first, for interface check.
4963         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
4964         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
4965         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
4966         * lib/sys_time_.h: New file.
4967         * lib/timespec.h (struct timespec): Use long int, not long.
4968         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4969         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
4970         Remove obsolescent call to AC_HEADER_TIME.
4971         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
4972         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
4973         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4974         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
4975         Likewise.
4976         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
4977         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
4978         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
4979         into the sys_time module.  Check for gettimeofday just once.
4980         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
4981         for gettimeofday signature to just check the signature.  Merely
4982         compile it, since linking doesn't test signature.  Improve test for
4983         whether gettimeofday.o is actually needed.
4984         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
4985         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
4986         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
4987         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4988         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
4989         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
4990         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
4991         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
4992         than worrying about sys/time.h.
4993         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4994         Don't bother worrying about TIME_WITH_SYS_TIME.
4995         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
4996         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
4997         * m4/sys_time_h.m4: New file.
4998         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
4999         Don't include sys/time.h.  Return from main rather than exiting.
5000         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
5001         all uses changed.
5002         * modules/gethrxtime (Depends-on): Add sys_time.
5003         * modules/gettime (Depends-on): Likewise.
5004         * modules/gettimeofday (Depends-on): Likewise.
5005         * modules/nanosleep (Depends-on): Likewise.
5006         * modules/settime (Depends-on): Likewise.
5007         * modules/tempname (Depends-on): Likewise.
5008         * modules/utimens (Depends-on): Likewise.
5009         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
5010         (Include:) Change back to <sys/time.h>.
5011         (Maintainer:) Add self.
5012         * modules/sys_time: New file.
5013         * modules/tempname (Depends-on): Add gettimeofday.
5014         * tests/test-gettimeofday.c: Include <sys/time.h>
5015         rather than gettimeofday.h.
5016
5017 2007-01-17  Bruno Haible  <bruno@clisp.org>
5018
5019         * gnulib-tool (func_get_license): Revert last patch. Instead, let
5020         the license default to GPL.
5021         (func_create_testdir): Don't complain if a module is LGPL and its
5022         tests module depends on GPLed modules.
5023
5024 2007-01-17  Bruno Haible  <bruno@clisp.org>
5025
5026         * lib/gettimeofday.c (gettimeofday): Add code for the case
5027         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
5028         maximum possible value for tv->tv_usec, rather than the minimum one.
5029
5030 2005-10-08  Martin Lambers  <marlam@marlam.de>
5031 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5032 2007-01-16  Bruno Haible  <bruno@clisp.org>
5033
5034         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
5035         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
5036         gl_FUNC_GETTIMEOFDAY.
5037         (Include): Add gettimeofday.h.
5038         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
5039         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
5040         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
5041         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
5042         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
5043         * lib/gettimeofday.h: New file.
5044         * lib/gettimeofday.c: Include <sys/timeb.h>.
5045         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
5046         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5047         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
5048         fall back on time().
5049
5050         * tests/test-gettimeofday.c: New file.
5051         * modules/gettimeofday-tests: New file.
5052
5053 2007-01-16  Eric Blake  <ebb9@byu.net>
5054
5055         * modules/fnmatch (Depends-on): Depend on wchar.
5056         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
5057         * m4/fnmatch.m4: Likewise.
5058         * modules/mbchar (Makefile.am): Assume <wchar.h>.
5059         * m4/mbchar.m4: Likewise.
5060         * modules/mbswidth (Depends-on): Depend on wchar.
5061         * lib/mbswidth.c: Assume <wchar.h>.
5062         * m4/mbswidth.m4: Likewise.
5063         * modules/quotearg (Depends-on): Depend on wchar.
5064         * lib/quotearg.c: Assume <wchar.h>.
5065         * m4/quotearg.m4: Likewise.
5066         * modules/regex (Depends-on): Depend on wchar.
5067         * lib/regex_internal.h: Assume <wchar.h>.
5068         * m4/regex.m4: Likewise.
5069         * modules/stdint (Depends-on): Depend on wchar.
5070         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
5071         * m4/stdint.m4: Likewise.
5072         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
5073         * modules/strftime (Depends-on): Depend on wchar.
5074         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
5075         * modules/strtol (Depends-on): Depend on wchar.
5076         * lib/strtol.c: Assume <wchar.h>.
5077         * modules/wcwidth (Depends-on): Depend on wchar.
5078         * lib/wcwidth.h: Assume <wchar.h>.
5079         * m4/wcwidth.m4: Likewise.
5080
5081 2007-01-16  Bruno Haible  <bruno@clisp.org>
5082
5083         * modules/csharpexec-script: New, created from...
5084         * modules/csharpexec: ... this.
5085
5086 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
5087
5088         * modules/javaexec-script: New, created from...
5089         * modules/javaexec: ... this.
5090
5091 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5092
5093         * modules/poll (Dependencies): Add sys_select.
5094
5095 2007-01-15  Jim Meyering  <jim@meyering.net>
5096
5097         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
5098         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
5099         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
5100         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
5101
5102 2007-01-15  Bruno Haible  <bruno@clisp.org>
5103
5104         * modules/striconveh: New file.
5105         * lib/striconveh.h: New file.
5106         * lib/striconveh.c: New file.
5107         * MODULES.html.sh (Internationalization functions): Add striconveh.
5108
5109         * modules/striconveh-tests: New file.
5110         * tests/test-striconveh.c: New file.
5111
5112 2007-01-15  Bruno Haible  <bruno@clisp.org>
5113
5114         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
5115         not from GNU libiconv or GNU libc.
5116
5117 2007-01-15  Bruno Haible  <bruno@clisp.org>
5118
5119         * doc/gnulib-intro.texi (Copyright): Explain the different license
5120         terms for module descriptions, autoconf macros, tests, documentation.
5121
5122 2007-01-14  Bruno Haible  <bruno@clisp.org>
5123
5124         * modules/striconv-tests: New file.
5125         * tests/test-striconv.c: New file.
5126
5127 2007-01-14  Bruno Haible  <bruno@clisp.org>
5128
5129         * modules/iconv-tests: New file.
5130         * tests/test-iconv.c: New file.
5131
5132 2007-01-14  Bruno Haible  <bruno@clisp.org>
5133
5134         * gnulib-tool (func_get_license): For test modules, use the license of
5135         the main module.
5136
5137 2007-01-14  Bruno Haible  <bruno@clisp.org>
5138
5139         * modules/iconv (Include): Clarify that <iconv.h> can only be included
5140         if iconv is found to exist.
5141
5142 2007-01-14  Bruno Haible  <bruno@clisp.org>
5143
5144         * modules/c-ctype-tests: New file.
5145         * tests/test-c-ctype.c: New file.
5146
5147 2007-01-14  Bruno Haible  <bruno@clisp.org>
5148
5149         * modules/binary-io-tests: New file.
5150         * tests/test-binary-io.sh: New file.
5151         * tests/test-binary-io.c: New file.
5152
5153 2007-01-14  Bruno Haible  <bruno@clisp.org>
5154
5155         * modules/array-oset-tests: New file.
5156         * tests/test-array_oset.c: New file.
5157
5158 2007-01-14  Bruno Haible  <bruno@clisp.org>
5159
5160         * modules/array-list-tests: New file.
5161         * tests/test-array_list.c: New file.
5162
5163 2007-01-14  Bruno Haible  <bruno@clisp.org>
5164
5165         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
5166         and make.
5167         Reported by Simon Josefsson in
5168         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
5169
5170 2007-01-14  Bruno Haible  <bruno@clisp.org>
5171
5172         * modules/allocsa-tests: New file.
5173         * tests/test-allocsa.c: New file.
5174
5175 2007-01-14  Bruno Haible  <bruno@clisp.org>
5176
5177         * modules/fchdir (Depends-on): Add absolute-header.
5178         * modules/unistd (Depends-on): Likewise.
5179
5180 2006-12-30  Bruno Haible  <bruno@clisp.org>
5181
5182         * modules/fchdir: New file.
5183         * modules/unistd (Files): Add lib/unistd_.h.
5184         (Makefile.am): Generate unistd.h from unistd_.h.
5185         * lib/fchdir.c: New file.
5186         * lib/dirent_.h: New file.
5187         * lib/unistd_.h: New file.
5188         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
5189         * m4/fchdir.m4: New file.
5190         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
5191         (gl_HEADER_UNISTD): Invoke it.
5192         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
5193         function.
5194         * lib/backupfile.c (opendir, closedir): Undefine.
5195         * lib/chown.c (open, close): Undefine.
5196         * lib/clean-temp.c (open, close): Undefine.
5197         * lib/copy-file.c (open, close): Undefine.
5198         * lib/execute.c (open, close): Undefine.
5199         * lib/fsusage.c (open, close): Undefine.
5200         * lib/gc-gnulib.c (open, close): Undefine.
5201         * lib/getcwd.c (opendir, closedir): Undefine.
5202         * lib/glob.c (opendir, closedir): Undefine.
5203         * lib/javacomp.c (open, close): Undefine.
5204         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
5205         * lib/openat-proc.c (open, close): Undefine.
5206         * lib/pagealign_alloc.c (open, close): Undefine.
5207         * lib/pipe.c (open, close): Undefine.
5208         * lib/progreloc.c (open, close): Undefine.
5209         * lib/savedir.c (opendir, closedir): Undefine.
5210         * lib/utime.c (open, close): Undefine.
5211         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
5212
5213 2007-01-10  Bruno Haible  <bruno@clisp.org>
5214
5215         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
5216
5217 2007-01-12  Eric Blake  <ebb9@byu.net>
5218
5219         Provide a robust <wchar.h>.  Further simplifications are now
5220         possible in other modules, but not included here.
5221         * modules/wchar: New module.
5222         * m4/wchar.m4: New file.
5223         * lib/wchar_.h: Likewise.
5224         * modules/mbchar (Depends-on): Depend on wchar, as the first use
5225         of the new module.
5226         * MODULES.html.sh (Extended multibyte and wide character utilities):
5227         New section.
5228
5229 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
5230
5231         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
5232         to a reasonable default for memory allocation.
5233         (xreadlink): Don't allocate a huge buffer, to work around a buggy
5234         file system that reports garbage st_size values for symlinks.
5235         Problem reported by Liyang Hu.
5236
5237 2007-01-11  Simon Josefsson  <simon@josefsson.org>
5238
5239         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
5240         Emacs .#* auto-save files).
5241
5242 2007-01-11  Bruno Haible  <bruno@clisp.org>
5243
5244         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
5245         directory.
5246
5247 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5248
5249         Use @...@ consistently in lib/wctype_.h.
5250         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
5251         on it being set to 1 or 0.
5252         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
5253         go back to AC_SUBSTing it.
5254         * modules/wctype (Makefile.am): Undo previous change.
5255
5256 2007-01-10  Eric Blake  <ebb9@byu.net>
5257
5258         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
5259         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
5260         * modules/wctype (Makefile.am): Likewise.
5261         Reported by Chris McGuire.
5262
5263 2007-01-10  Jim Meyering  <jim@meyering.net>
5264
5265         fts.c: a small readability/maintainability improvement
5266         * lib/fts.c (fts_read): Make this code slightly more readable and
5267         maintainable by hoisting the "sp->fts_cur = p" assignments to
5268         immediately follow the statements that set P.  Derived from
5269         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
5270
5271 2007-01-10  Eric Blake  <ebb9@byu.net>
5272
5273         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
5274         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
5275         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5276         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
5277         Reported by Chris McGuire.
5278
5279 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5280
5281         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
5282         in sed script.
5283
5284 2007-01-09  Bruno Haible  <bruno@clisp.org>
5285
5286         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
5287         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
5288         variables.
5289         (func_module): Use them.
5290
5291 2007-01-09  Bruno Haible  <bruno@clisp.org>
5292
5293         * modules/unistr/base: New file.
5294         * lib/unistr.h: New file.
5295
5296         * modules/unistr/u8-to-u16: New file.
5297         * lib/unistr/u8-to-u16.c: New file.
5298
5299         * modules/unistr/u8-to-u32: New file.
5300         * lib/unistr/u8-to-u32.c: New file.
5301
5302         * modules/unistr/u16-to-u8: New file.
5303         * lib/unistr/u16-to-u8.c: New file.
5304
5305         * modules/unistr/u16-to-u32: New file.
5306         * lib/unistr/u16-to-u32.c: New file.
5307
5308         * modules/unistr/u32-to-u8: New file.
5309         * lib/unistr/u32-to-u8.c: New file.
5310
5311         * modules/unistr/u32-to-u16: New file.
5312         * lib/unistr/u32-to-u16.c: New file.
5313
5314         * modules/unistr/u8-check: New file.
5315         * modules/unistr/u16-check: New file.
5316         * modules/unistr/u32-check: New file.
5317         * lib/unistr/u8-check.c: New file.
5318         * lib/unistr/u16-check.c: New file.
5319         * lib/unistr/u32-check.c: New file.
5320
5321         * modules/unistr/u8-chr: New file.
5322         * modules/unistr/u16-chr: New file.
5323         * modules/unistr/u32-chr: New file.
5324         * lib/unistr/u8-chr.c: New file.
5325         * lib/unistr/u16-chr.c: New file.
5326         * lib/unistr/u32-chr.c: New file.
5327
5328         * modules/unistr/u8-cmp: New file.
5329         * modules/unistr/u16-cmp: New file.
5330         * modules/unistr/u32-cmp: New file.
5331         * lib/unistr/u8-cmp.c: New file.
5332         * lib/unistr/u16-cmp.c: New file.
5333         * lib/unistr/u32-cmp.c: New file.
5334
5335         * modules/unistr/u8-cpy: New file.
5336         * modules/unistr/u16-cpy: New file.
5337         * modules/unistr/u32-cpy: New file.
5338         * lib/unistr/u8-cpy.c: New file.
5339         * lib/unistr/u16-cpy.c: New file.
5340         * lib/unistr/u32-cpy.c: New file.
5341         * lib/unistr/u-cpy.h: New file.
5342
5343         * modules/unistr/u8-cpy-alloc: New file.
5344         * modules/unistr/u16-cpy-alloc: New file.
5345         * modules/unistr/u32-cpy-alloc: New file.
5346         * lib/unistr/u8-cpy-alloc.c: New file.
5347         * lib/unistr/u16-cpy-alloc.c: New file.
5348         * lib/unistr/u32-cpy-alloc.c: New file.
5349         * lib/unistr/u-cpy-alloc.h: New file.
5350
5351         * modules/unistr/u8-endswith: New file.
5352         * modules/unistr/u16-endswith: New file.
5353         * modules/unistr/u32-endswith: New file.
5354         * lib/unistr/u8-endswith.c: New file.
5355         * lib/unistr/u16-endswith.c: New file.
5356         * lib/unistr/u32-endswith.c: New file.
5357         * lib/unistr/u-endswith.h: New file.
5358
5359         * modules/unistr/u8-mblen: New file.
5360         * modules/unistr/u16-mblen: New file.
5361         * modules/unistr/u32-mblen: New file.
5362         * lib/unistr/u8-mblen.c: New file.
5363         * lib/unistr/u16-mblen.c: New file.
5364         * lib/unistr/u32-mblen.c: New file.
5365
5366         * modules/unistr/u8-mbtouc: New file.
5367         * modules/unistr/u16-mbtouc: New file.
5368         * modules/unistr/u32-mbtouc: New file.
5369         * lib/unistr/u8-mbtouc.c: New file.
5370         * lib/unistr/u16-mbtouc.c: New file.
5371         * lib/unistr/u32-mbtouc.c: New file.
5372
5373         * modules/unistr/u8-mbtouc-safe: New file.
5374         * modules/unistr/u16-mbtouc-safe: New file.
5375         * modules/unistr/u32-mbtouc-safe: New file.
5376         * lib/unistr/u8-mbtouc-safe.c: New file.
5377         * lib/unistr/u16-mbtouc-safe.c: New file.
5378         * lib/unistr/u32-mbtouc-safe.c: New file.
5379
5380         * modules/unistr/u8-move: New file.
5381         * modules/unistr/u16-move: New file.
5382         * modules/unistr/u32-move: New file.
5383         * lib/unistr/u8-move.c: New file.
5384         * lib/unistr/u16-move.c: New file.
5385         * lib/unistr/u32-move.c: New file.
5386         * lib/unistr/u-move.h: New file.
5387
5388         * modules/unistr/u8-next: New file.
5389         * modules/unistr/u16-next: New file.
5390         * modules/unistr/u32-next: New file.
5391         * lib/unistr/u8-next.c: New file.
5392         * lib/unistr/u16-next.c: New file.
5393         * lib/unistr/u32-next.c: New file.
5394
5395         * modules/unistr/u8-prev: New file.
5396         * modules/unistr/u16-prev: New file.
5397         * modules/unistr/u32-prev: New file.
5398         * lib/unistr/u8-prev.c: New file.
5399         * lib/unistr/u16-prev.c: New file.
5400         * lib/unistr/u32-prev.c: New file.
5401
5402         * modules/unistr/u8-set: New file.
5403         * modules/unistr/u16-set: New file.
5404         * modules/unistr/u32-set: New file.
5405         * lib/unistr/u8-set.c: New file.
5406         * lib/unistr/u16-set.c: New file.
5407         * lib/unistr/u32-set.c: New file.
5408         * lib/unistr/u-set.h: New file.
5409
5410         * modules/unistr/u8-startswith: New file.
5411         * modules/unistr/u16-startswith: New file.
5412         * modules/unistr/u32-startswith: New file.
5413         * lib/unistr/u8-startswith.c: New file.
5414         * lib/unistr/u16-startswith.c: New file.
5415         * lib/unistr/u32-startswith.c: New file.
5416         * lib/unistr/u-startswith.h: New file.
5417
5418         * modules/unistr/u8-stpcpy: New file.
5419         * modules/unistr/u16-stpcpy: New file.
5420         * modules/unistr/u32-stpcpy: New file.
5421         * lib/unistr/u8-stpcpy.c: New file.
5422         * lib/unistr/u16-stpcpy.c: New file.
5423         * lib/unistr/u32-stpcpy.c: New file.
5424         * lib/unistr/u-stpcpy.h: New file.
5425
5426         * modules/unistr/u8-stpncpy: New file.
5427         * modules/unistr/u16-stpncpy: New file.
5428         * modules/unistr/u32-stpncpy: New file.
5429         * lib/unistr/u8-stpncpy.c: New file.
5430         * lib/unistr/u16-stpncpy.c: New file.
5431         * lib/unistr/u32-stpncpy.c: New file.
5432         * lib/unistr/u-stpncpy.h: New file.
5433
5434         * modules/unistr/u8-strcat: New file.
5435         * modules/unistr/u16-strcat: New file.
5436         * modules/unistr/u32-strcat: New file.
5437         * lib/unistr/u8-strcat.c: New file.
5438         * lib/unistr/u16-strcat.c: New file.
5439         * lib/unistr/u32-strcat.c: New file.
5440         * lib/unistr/u-strcat.h: New file.
5441
5442         * modules/unistr/u8-strchr: New file.
5443         * modules/unistr/u16-strchr: New file.
5444         * modules/unistr/u32-strchr: New file.
5445         * lib/unistr/u8-strchr.c: New file.
5446         * lib/unistr/u16-strchr.c: New file.
5447         * lib/unistr/u32-strchr.c: New file.
5448
5449         * modules/unistr/u8-strcmp: New file.
5450         * modules/unistr/u16-strcmp: New file.
5451         * modules/unistr/u32-strcmp: New file.
5452         * lib/unistr/u8-strcmp.c: New file.
5453         * lib/unistr/u16-strcmp.c: New file.
5454         * lib/unistr/u32-strcmp.c: New file.
5455
5456         * modules/unistr/u8-strcpy: New file.
5457         * modules/unistr/u16-strcpy: New file.
5458         * modules/unistr/u32-strcpy: New file.
5459         * lib/unistr/u8-strcpy.c: New file.
5460         * lib/unistr/u16-strcpy.c: New file.
5461         * lib/unistr/u32-strcpy.c: New file.
5462         * lib/unistr/u-strcpy.h: New file.
5463
5464         * modules/unistr/u8-strcspn: New file.
5465         * modules/unistr/u16-strcspn: New file.
5466         * modules/unistr/u32-strcspn: New file.
5467         * lib/unistr/u8-strcspn.c: New file.
5468         * lib/unistr/u16-strcspn.c: New file.
5469         * lib/unistr/u32-strcspn.c: New file.
5470         * lib/unistr/u-strcspn.h: New file.
5471
5472         * modules/unistr/u8-strdup: New file.
5473         * modules/unistr/u16-strdup: New file.
5474         * modules/unistr/u32-strdup: New file.
5475         * lib/unistr/u8-strdup.c: New file.
5476         * lib/unistr/u16-strdup.c: New file.
5477         * lib/unistr/u32-strdup.c: New file.
5478         * lib/unistr/u-strdup.h: New file.
5479
5480         * modules/unistr/u8-strlen: New file.
5481         * modules/unistr/u16-strlen: New file.
5482         * modules/unistr/u32-strlen: New file.
5483         * lib/unistr/u8-strlen.c: New file.
5484         * lib/unistr/u16-strlen.c: New file.
5485         * lib/unistr/u32-strlen.c: New file.
5486         * lib/unistr/u-strlen.h: New file.
5487
5488         * modules/unistr/u8-strmblen: New file.
5489         * modules/unistr/u16-strmblen: New file.
5490         * modules/unistr/u32-strmblen: New file.
5491         * lib/unistr/u8-strmblen.c: New file.
5492         * lib/unistr/u16-strmblen.c: New file.
5493         * lib/unistr/u32-strmblen.c: New file.
5494
5495         * modules/unistr/u8-strmbtouc: New file.
5496         * modules/unistr/u16-strmbtouc: New file.
5497         * modules/unistr/u32-strmbtouc: New file.
5498         * lib/unistr/u8-strmbtouc.c: New file.
5499         * lib/unistr/u16-strmbtouc.c: New file.
5500         * lib/unistr/u32-strmbtouc.c: New file.
5501
5502         * modules/unistr/u8-strncat: New file.
5503         * modules/unistr/u16-strncat: New file.
5504         * modules/unistr/u32-strncat: New file.
5505         * lib/unistr/u8-strncat.c: New file.
5506         * lib/unistr/u16-strncat.c: New file.
5507         * lib/unistr/u32-strncat.c: New file.
5508         * lib/unistr/u-strncat.h: New file.
5509
5510         * modules/unistr/u8-strncmp: New file.
5511         * modules/unistr/u16-strncmp: New file.
5512         * modules/unistr/u32-strncmp: New file.
5513         * lib/unistr/u8-strncmp.c: New file.
5514         * lib/unistr/u16-strncmp.c: New file.
5515         * lib/unistr/u32-strncmp.c: New file.
5516
5517         * modules/unistr/u8-strncpy: New file.
5518         * modules/unistr/u16-strncpy: New file.
5519         * modules/unistr/u32-strncpy: New file.
5520         * lib/unistr/u8-strncpy.c: New file.
5521         * lib/unistr/u16-strncpy.c: New file.
5522         * lib/unistr/u32-strncpy.c: New file.
5523         * lib/unistr/u-strncpy.h: New file.
5524
5525         * modules/unistr/u8-strnlen: New file.
5526         * modules/unistr/u16-strnlen: New file.
5527         * modules/unistr/u32-strnlen: New file.
5528         * lib/unistr/u8-strnlen.c: New file.
5529         * lib/unistr/u16-strnlen.c: New file.
5530         * lib/unistr/u32-strnlen.c: New file.
5531         * lib/unistr/u-strnlen.h: New file.
5532
5533         * modules/unistr/u8-strpbrk: New file.
5534         * modules/unistr/u16-strpbrk: New file.
5535         * modules/unistr/u32-strpbrk: New file.
5536         * lib/unistr/u8-strpbrk.c: New file.
5537         * lib/unistr/u16-strpbrk.c: New file.
5538         * lib/unistr/u32-strpbrk.c: New file.
5539         * lib/unistr/u-strpbrk.h: New file.
5540
5541         * modules/unistr/u8-strrchr: New file.
5542         * modules/unistr/u16-strrchr: New file.
5543         * modules/unistr/u32-strrchr: New file.
5544         * lib/unistr/u8-strrchr.c: New file.
5545         * lib/unistr/u16-strrchr.c: New file.
5546         * lib/unistr/u32-strrchr.c: New file.
5547
5548         * modules/unistr/u8-strspn: New file.
5549         * modules/unistr/u16-strspn: New file.
5550         * modules/unistr/u32-strspn: New file.
5551         * lib/unistr/u8-strspn.c: New file.
5552         * lib/unistr/u16-strspn.c: New file.
5553         * lib/unistr/u32-strspn.c: New file.
5554         * lib/unistr/u-strspn.h: New file.
5555
5556         * modules/unistr/u8-strstr: New file.
5557         * modules/unistr/u16-strstr: New file.
5558         * modules/unistr/u32-strstr: New file.
5559         * lib/unistr/u8-strstr.c: New file.
5560         * lib/unistr/u16-strstr.c: New file.
5561         * lib/unistr/u32-strstr.c: New file.
5562         * lib/unistr/u-strstr.h: New file.
5563
5564         * modules/unistr/u8-strtok: New file.
5565         * modules/unistr/u16-strtok: New file.
5566         * modules/unistr/u32-strtok: New file.
5567         * lib/unistr/u8-strtok.c: New file.
5568         * lib/unistr/u16-strtok.c: New file.
5569         * lib/unistr/u32-strtok.c: New file.
5570         * lib/unistr/u-strtok.h: New file.
5571
5572         * modules/unistr/u8-uctomb: New file.
5573         * modules/unistr/u16-uctomb: New file.
5574         * modules/unistr/u32-uctomb: New file.
5575         * lib/unistr/u8-uctomb.c: New file.
5576         * lib/unistr/u16-uctomb.c: New file.
5577         * lib/unistr/u32-uctomb.c: New file.
5578
5579         * MODULES.html.sh (Unicode string functions): Add the new modules.
5580
5581 2007-01-08  Bruno Haible  <bruno@clisp.org>
5582
5583         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
5584         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
5585         subdirectories.
5586
5587 2007-01-08  Karl Berry  <karl@gnu.org>
5588
5589         * doc/error.texi: mention that main() fns must set program_name
5590         when progname is used.
5591
5592 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
5593
5594         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
5595         WCTYPE_H is empty, for the benefit of builds from non-distclean
5596         directories.  Problem reported by Eric Blake in
5597         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
5598
5599 2007-01-08  Bruno Haible  <bruno@clisp.org>
5600
5601         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
5602         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
5603         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
5604         PROVIDE_CANONICALIZE_FILENAME_MODE.
5605         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
5606
5607 2007-01-08  Bruno Haible  <bruno@clisp.org>
5608
5609         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
5610         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
5611         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
5612         * lib/fts.c: Likewise.
5613         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
5614
5615 2006-12-25  Bruno Haible  <bruno@clisp.org>
5616
5617         * modules/utf8-ucs4-safe: New file.
5618         * lib/utf8-ucs4-safe.h: New file.
5619         * lib/unistr/utf8-ucs4-safe.c: New file.
5620
5621         * modules/utf16-ucs4-safe: New file.
5622         * lib/utf16-ucs4-safe.h: New file.
5623         * lib/unistr/utf16-ucs4-safe.c: New file.
5624
5625         * MODULES.html.sh (Unicode string functions): Add the new modules.
5626
5627 2007-01-08  Bruno Haible  <bruno@clisp.org>
5628
5629         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
5630         (Depends-on): Add unitypes.
5631         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5632         (u8_mbtouc_aux): Move out to separate file.
5633         (u8_mbtouc): Use ucs4_t, uint8_t types.
5634         * lib/unistr/utf8-ucs4.c: New file.
5635
5636         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
5637         (Depends-on): Add unitypes.
5638         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5639         (u16_mbtouc_aux): Move out to separate file.
5640         (u16_mbtouc): Use ucs4_t, uint16_t types.
5641         * lib/unistr/utf16-ucs4.c: New file.
5642
5643         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
5644         (Depends-on): Add unitypes.
5645         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
5646         (u8_uctomb_aux): Move out to separate file.
5647         (u8_uctomb): Use ucs4_t, uint8_t types.
5648         * lib/unistr/ucs4-utf8.c: New file.
5649
5650         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
5651         (Depends-on): Add unitypes.
5652         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
5653         (u16_uctomb_aux): Move out to separate file.
5654         (u16_uctomb): Use ucs4_t, uint16_t types.
5655         * lib/unistr/ucs4-utf16.c: New file.
5656
5657 2006-12-25  Bruno Haible  <bruno@clisp.org>
5658
5659         * modules/unitypes: New file.
5660         * lib/unitypes.h: New file.
5661         * MODULES.html.sh (func_all_modules): New section "Unicode string
5662         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
5663         this section. Add unitypes.
5664
5665 2007-01-08  Bruno Haible  <bruno@clisp.org>
5666
5667         Avoid variable names that conflict with those from libtool.
5668         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
5669         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
5670         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
5671         library_names_spec to acl_library_names_spec, hardcode_* to
5672         acl_hardcode_*.
5673         Reported by Ralf Wildenhues.
5674
5675 2007-01-08  Bruno Haible  <bruno@clisp.org>
5676
5677         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
5678         definition.
5679         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
5680         definition.
5681         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
5682         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
5683         definition.
5684         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
5685         definition.
5686         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
5687         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
5688         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
5689         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
5690         definition.
5691         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
5692         definition.
5693         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
5694         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
5695         GC_USE_<algorithm>.
5696         * lib/gc-libgcrypt.c: Likewise.
5697         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
5698         * modules/gc-arctwo (configure.ac): Likewise.
5699         * modules/gc-des (configure.ac): Likewise.
5700         * modules/gc-hmac-md5 (configure.ac): Likewise.
5701         * modules/gc-hmac-sha1 (configure.ac): Likewise.
5702         * modules/gc-md2 (configure.ac): Likewise.
5703         * modules/gc-md4 (configure.ac): Likewise.
5704         * modules/gc-md5 (configure.ac): Likewise.
5705         * modules/gc-random (configure.ac): Likewise.
5706         * modules/gc-rijndael (configure.ac): Likewise.
5707         * modules/gc-sha1 (configure.ac): Likewise.
5708
5709 2007-01-08  Bruno Haible  <bruno@clisp.org>
5710
5711         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
5712         macro definition.
5713         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
5714         definition.
5715         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
5716         definition.
5717         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
5718         * modules/fcntl-safer (configure.ac): Likewise.
5719         * modules/fopen-safer (configure.ac): Likewise.
5720         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
5721         GNULIB_FWRITEERROR macro definition.
5722
5723 2007-01-08  Bruno Haible  <bruno@clisp.org>
5724
5725         * m4/gnulib-common.m4: New file.
5726         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
5727         (func_get_filelist): Add m4/gnulib-common.m4.
5728
5729 2007-01-08  Bruno Haible  <bruno@clisp.org>
5730
5731         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
5732         command.
5733
5734 2007-01-08  Jim Meyering  <jim@meyering.net>
5735
5736         Use a more robust test for a "can't happen" condition.
5737         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
5738         narrowed the st_size value.  Presuming the "can't happen" condition
5739         is true, that narrowing could conceivably convert an invalid st_size
5740         value into a valid one.  Instead, use a change based on Matthew
5741         Woehlke's original patch.
5742
5743         Slight readability improvement: use an assert-like macro
5744         in place of literal "abort ()" uses.
5745         * lib/fts.c (fts_assert): Define.
5746         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
5747         Use this macro instead of a bare 'abort'.
5748
5749 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
5750
5751         Don't worry about using IRIX 5.3's wctype.h broken definitions;
5752         simply work around them.
5753         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
5754         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
5755         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
5756         declaring.
5757         Don't bother to define as macros, since the standard doesn't require it.
5758         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
5759         longer worry about IRIX 5.3.
5760         (HAVE_WCTYPE_CTMP_BUG): Remove.
5761
5762 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
5763
5764         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
5765         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
5766         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
5767         Problems reported by Georg Schwarz for IRIX 5.3.
5768
5769         * gnulib-tool (autoconf_minversion): Take the maximum version number
5770         found, not the minimum.  Problem reported by James Youngman.
5771
5772 2007-01-03  Karl Berry  <karl@gnu.org>
5773
5774         * doc/error.texi: new file, explaining interaction with progname.
5775         * doc/gnulib.texi: include it.  Update copyright.
5776
5777 2007-01-03  Simon Josefsson  <simon@josefsson.org>
5778
5779         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
5780         AC_CANONICAL_HOST, to improve autobuild outputs.
5781
5782 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
5783             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5784
5785         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
5786         sockets, server sockets, and other file descriptors.  Count errors
5787         to compute the return value.  Reorder the code a bit to be easier
5788         to follow.  Don't set event bits that were not requested (except
5789         POLLERR and POLLHUP).
5790
5791 2007-01-01  Bruno Haible  <bruno@clisp.org>
5792
5793         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
5794
5795 2007-01-03  Jim Meyering  <jim@meyering.net>
5796
5797         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
5798
5799 2007-01-02  Bruno Haible  <bruno@clisp.org>
5800
5801         * modules/settime (Include): Require timespec.h.
5802         * modules/nanosleep (Include): Likewise.
5803
5804 2007-01-01  Bruno Haible  <bruno@clisp.org>
5805
5806         * gnulib-tool (func_emit_copyright_notice): Bump year.
5807         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
5808
5809 2007-01-01  Bruno Haible  <bruno@clisp.org>
5810
5811         Improve support for OpenBSD.
5812         * build-aux/config.rpath (libname_spec): Export.
5813         (library_names_spec): New variable. Export.
5814         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
5815         library_names_spec from the config.rpath output. Locate shared library
5816         through the name pattern in library_names_spec.
5817
5818 2007-01-01  Eric Blake  <ebb9@byu.net>
5819
5820         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
5821
5822 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
5823
5824         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
5825         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
5826         assume the C locale, and avoid an "eval" that could cause trouble.
5827         Problem with SORT reported by Bob Proulx.
5828
5829         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
5830         Define.  Trivial patch from Henning Nielsen Lund, originally
5831         sent to bug-grep@gnu.org today.
5832
5833 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
5834
5835         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
5836         struct stat.  Problem reported by Henning Nielsen Lund.
5837         * lib/acl.c: Include acl.h first, to check interface.  Don't
5838         bother to include sys/types.h and sys/stat.h again.
5839
5840 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
5841
5842         Import the following change from libc; problem reported by
5843         Sven Verdoolaege.
5844
5845         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
5846
5847         [BZ #1373]
5848         * lib/argp.h: Remove __NTH for __argp_usage inline function.
5849
5850 2006-12-28  Jim Meyering  <jim@meyering.net>
5851
5852         * build-aux/announce-gen: Do not assume that the package
5853         builds any of tar.gz, tar.bz2, and .xdelta files.
5854         Suggestion from Simon Josefsson.
5855
5856 2006-12-28  Simon Josefsson  <simon@josefsson.org>
5857
5858         * modules/announce-gen: New file.
5859
5860 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
5861
5862         * lib/mbchar.h: Just include <wctype.h>; the wctype module
5863         handles its gotchas now.
5864         * lib/mbswidth.c: Likewise.
5865         * lib/wcwidth.h: Likewise.
5866         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
5867         and iswcntrl; the wctype module does this stuff now.
5868         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5869         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5870         * modules/mbchar (Depends-on): Add wctype.
5871         * modules/mbswidth (Depends-on): Likewise.
5872         * modules/wcwidth (Depends-on): Likewise.
5873
5874 2006-12-27  Eric Blake  <ebb9@byu.net>
5875
5876         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
5877         module uses more than what <wctype.h> is required to provide.
5878
5879 2006-12-26  Eric Blake  <ebb9@byu.net>
5880
5881         * gnulib-tool (sed_extract_prog): Avoid space-tab.
5882
5883 2006-12-26  Eric Blake  <ebb9@byu.net>
5884
5885         * modules/absolute-header: New module.
5886         * modules/fcntl (Depends-on): Depend on it.
5887         * modules/inttypes (Depends-on): Likewise.
5888         * modules/stdint (Depends-on): Likewise.
5889         * modules/sys_stat (Depends-on): Likewise.
5890         * modules/wctype (Depends-on): Likewise.
5891         * MODULES.html.sh (Support for building libraries and
5892         executables): Document it.
5893
5894 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
5895
5896         * gnulib-tool (SED): Remove, undoing previous change.
5897         The problem was that it broke coreutils on Solaris, because
5898         "sed --posix" leaked into a makefile.
5899         (sed): New alias, if 'alias' and GNU sed.
5900
5901 2006-12-24  Jim Meyering  <jim@meyering.net>
5902
5903         Work around an fchownat bug in glibc-2.4:
5904         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
5905         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
5906         in spite of the -P option.
5907         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
5908         New macros.
5909         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
5910         * modules/openat (Files): Add lib/fchownat.c.
5911         * lib/openat.c (fchownat): Don't define here.  Move to...
5912         * lib/fchownat.c: ...this new file.
5913
5914 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
5915
5916         Fix bug reported by Bruno Haible in
5917         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
5918         where quotearg.c didn't compile on Mac OS X 10.2 because it
5919         lacks <wchar.h> and wint_t.
5920         * lib/wctype_.h (__wctype_wint_t): New type.
5921         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
5922         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
5923         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
5924         Arg is now of type __wctype_wint_t, not wint_t.
5925         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
5926         substitute HAVE_WINT_T.
5927         * modules/wctype (Files): Add m4/wint_t.m4.
5928         (wctype.h): Substitute HAVE_WINT_T.
5929
5930 2006-12-23  Bruno Haible  <bruno@clisp.org>
5931
5932         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
5933
5934 2006-12-23  Bruno Haible  <bruno@clisp.org>
5935
5936         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
5937         S_ISLNK.
5938         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
5939         mingw.
5940
5941 2006-12-22  Bruno Haible  <bruno@clisp.org>
5942
5943         * lib/copy-file.c: Include acl.h.
5944         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
5945         Close the file descriptors only after being done with copy_acl.
5946         * modules/copy-file (Depends-on): Add acl.
5947
5948 2006-12-22  Bruno Haible  <bruno@clisp.org>
5949
5950         * gnulib-tool (SED): New variable.
5951         Use $SED instead of sed everywhere.
5952
5953 2006-12-22  Bruno Haible  <bruno@clisp.org>
5954
5955         * modules/no-c++: New file.
5956         * m4/no-c++.m4: New file.
5957         * MODULES.html.sh (Support for building libraries and executables):
5958         Add no-c++.
5959
5960 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
5961
5962         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5963         Include <limits.h>, and use its INT_MAX to rewrite the
5964         j loop so that it does not overflow 'int'.  Problem reported by
5965         Ralf Wildenhues in
5966         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
5967         Play it safe by shifting left by 1 rather than multiplying by 2,
5968         as GCC is less likely to optimize this away when the value
5969         is signed (when it assumes overflow leads to undefined behavior).
5970         Also, don't assume time_t uses two's complement.
5971
5972 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
5973
5974         * MODULES.html.sh: New module wctype.
5975         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
5976         * lib/fnmatch.c: Don't bother to include <wchar.h> before
5977         <wctype.h>, since the new wctype module should fix this.
5978         * lib/quotearg.c: Include <wctype.h> unconditionally, since
5979         the wctype module should arrange for it.
5980         * lib/regex_internal.h: Likewise.
5981         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
5982         since the wctype module should handle this now.
5983         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
5984         * modules/fnmatch (Depends-on): Add wctype.
5985         * modules/quotearg (Depends-on): Likewise.
5986         * modules/regex (Depends-on): Likewise.
5987
5988 2006-12-19  Bruno Haible  <bruno@clisp.org>
5989
5990         * lib/strdup.h [C++]: Wrap definitions in extern "C".
5991         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
5992
5993 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5994
5995         * modules/savewd (Depends-on): Fix dependency on fcntl.
5996
5997 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5998
5999         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
6000         conforms to C99, rather than relying on the user's environment
6001         setting of STDINT_H.
6002
6003 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
6004         and Eric Blake  <ebb9@byu.net>
6005
6006         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
6007         This is more consistent with the other defines here.
6008         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
6009         Port to z/OS.  Problem reported by Paul Gilmartin.
6010         Change local vars to use gl_ prefix rather than ac_.
6011         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
6012         with other defines.
6013         * modules/double-slash-root: New module.
6014         * modules/dirname (Files): Remove m4/double-slash-root.m4.
6015         (Depends-on): Add double-slash-root.
6016         * MODULES.html.sh (File system functions): Mention new module.
6017
6018 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
6019
6020         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
6021         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
6022         This is for the benefit of gzip, which doesn't do i18n.
6023
6024 2006-12-12  Jim Meyering  <jim@meyering.net>
6025
6026         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
6027         Reported by Andreas Schwab <schwab@suse.de>.
6028
6029 2006-12-12  Bruno Haible  <bruno@clisp.org>
6030
6031         Merge these changes.
6032         2006-09-05  Bruno Haible  <bruno@clisp.org>
6033         * lib/iconvme.c (iconv_string): No need to save and restore errno when
6034         iconv_alloc succeeded.
6035         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
6036         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
6037         test for " && dest " at the end - dest is always != NULL there. Call
6038         iconv with 4xNULL arguments initially, to reset the state. Call iconv
6039         with 2xNULL arguments, also to flush the state storage. Handle the
6040         IRIX iconv behaviour. Realloc the final result, to throw away unused
6041         memory.
6042
6043 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
6044
6045         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
6046         and fchmodat unconditionally, since glibc 2.4 has them.
6047         Problem reported by Arkadiusz Miskiewicz.
6048
6049 2006-12-10  Bruno Haible  <bruno@clisp.org>
6050
6051         * gnulib-tool (func_import): Show the include files only for those
6052         modules that are copied and specified.
6053         Reported by Karl Berry.
6054
6055 2006-12-08  Jim Meyering  <jim@meyering.net>
6056
6057         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
6058         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
6059
6060         * build-aux/announce-gen: Add two new options, both optional:
6061         --bootstrap-tools=TOOL_LIST
6062               a comma-separated list of tools, e.g.,
6063               autoconf,automake,bison,gnulib
6064         --gnulib-snapshot-date=DATE
6065               if gnulib is in the bootstrap tool list,
6066               then report this as the snapshot date.
6067               If not specified, use the current date/time.
6068               If you specify a date here, be sure it's UTC.
6069
6070 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6071
6072         * tests/test-argp-2.sh: Fix test to match actual output.
6073         (func_compare): Fix sed script to be portable.
6074
6075 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
6076
6077         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
6078         workaround for this case.  It is not autoconfigured now; offhand
6079         it's hard to see how to autoconfigure it.
6080
6081 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
6082
6083         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
6084         a directory that is about to be chowned.  Such a directory's
6085         initial file permissions should permit the owner only and this
6086         should not be changed until after the chown, since the group and
6087         other bits would be incorrect if they granted permission before
6088         the chown.
6089
6090         Fix porting problem for iswctype reported by Georg Schwarz in:
6091         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
6092         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
6093         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
6094         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
6095         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
6096
6097 2006-12-03  Jim Meyering  <jim@meyering.net>
6098
6099         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
6100         p->fts_statp may not yet be defined.
6101         (fts_read): Instead, set it in the caller, once p->fts_statp is
6102         sure to be defined, and corresponds to a top-level directory.
6103         This bug made du -x fail.  Here's the coreutils test case:
6104         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
6105         Reported by Mike Frysinger.
6106
6107 2006-12-01  Jim Meyering  <jim@meyering.net>
6108
6109         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
6110         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
6111         Reported by Simon Josefsson.
6112
6113 2006-11-30  Jim Meyering  <jim@meyering.net>
6114
6115         * m4/warning.m4: Use the all-permissive copyright notice
6116         recommended by RMS (rather than LGPL).
6117         * m4/vararrays.m4: Likewise.
6118         * m4/flexmember.m4: Likewise.
6119
6120 2006-11-29  Bruno Haible  <bruno@clisp.org>
6121
6122         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6123         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
6124         using +=.
6125         Reported by Simon Josefsson <simon@josefsson.org>.
6126
6127 2006-11-28  James Youngman <jay@gnu.org>
6128
6129         * README: Advise users that they might find the bug-gnulib@gnu.org
6130         and autotools-announce@gnu.org mailing lists useful.
6131
6132 2006-11-28  Bruno Haible  <bruno@clisp.org>
6133
6134         * m4/ptrdiff_max.m4: Remove file.
6135
6136 2006-11-21  Bruno Haible  <bruno@clisp.org>
6137
6138         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
6139         _AC_COMPUTE_INT.
6140         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6141         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
6142         _AC_COMPUTE_INT.
6143         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6144         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
6145         _AC_COMPUTE_INT.
6146         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6147
6148 2006-11-28  Jim Meyering  <jim@meyering.net>
6149
6150         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
6151         warning from "gcc -Wshadow" about shadowing the builtin.
6152
6153 2006-11-27  Bruno Haible  <bruno@clisp.org>
6154
6155         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
6156         _AC_COMPUTE_INT.
6157         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6158
6159 2006-11-27  Bruno Haible  <bruno@clisp.org>
6160             Paul Eggert  <eggert@cs.ucla.edu>
6161
6162         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
6163
6164 2006-11-26  Bruno Haible  <bruno@clisp.org>
6165
6166         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6167         noinst_LTLIBRARIES.
6168
6169 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
6170             Bruno Haible  <bruno@clisp.org>
6171
6172         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
6173         if compiling with "gcc -ansi".
6174
6175 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
6176
6177         Fix some incompatibilities with gcc -ansi -pedantic.
6178         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
6179         if compiling pedantically with GCC, unless it's C99 or later.
6180         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
6181         it mishandles gcc -ansi -pedantic as well.
6182         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
6183         if gcc -pedantic.
6184         * lib/regexec.c (check_node_accept_bytes): Don't use auto
6185         initializers for struct if -pedantic, unless it's C99 or later.
6186
6187 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
6188
6189         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
6190         Don't close an fd more than once. Identical atimes indicate
6191         success, not failure.
6192
6193 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
6194
6195         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
6196
6197 2006-11-23  Jim Meyering  <jim@meyering.net>
6198
6199         * build-aux/announce-gen: New file.  From coreutils.
6200
6201 2006-11-22  Jim Meyering  <jim@meyering.net>
6202
6203         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
6204         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
6205         (fts_read): Use a temporary to narrow the overused st_size member
6206         before using it in a switch statement.  Reported by Matthew Woehlke.
6207
6208         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
6209         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
6210
6211 2006-11-20  Bruno Haible  <bruno@clisp.org>
6212
6213         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
6214         changequote instead of pairs of brackets.
6215         Reported by Andreas Schwab <schwab@suse.de>.
6216
6217 2006-11-21  Jim Meyering  <jim@meyering.net>
6218
6219         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
6220         so as to remain compatible with older compilers.
6221         Patch from Michael Deutschmann.
6222
6223 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
6224
6225         * MODULES.html.sh (File system functions): Add openat.
6226
6227         * lib/openat.h (rpl_fstatat): New macro, if
6228         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
6229         (fstatat): Define to rpl_fstatat under the same conditions,
6230         unless COMPILING_FSTATAT.
6231         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
6232         seems to have the bug.
6233         * lib/fstatat.c: New file.
6234         * modules/openat (Files): Add it.
6235
6236 2006-11-20  Bruno Haible  <bruno@clisp.org>
6237
6238         * Makefile: New file.
6239
6240 2006-11-20  Jim Meyering  <jim@meyering.net>
6241
6242         The beginnings of syntax-related checks for gnulib.
6243         * lib/Makefile: New file.
6244         * lib/t-idcache: New script.  Ensure that the two halves of
6245         idcache.c stay in sync.
6246
6247         * lib/idcache.c: Adjust comments in user- and group- portions to
6248         be more accurate, and to be consistent with one another.
6249
6250 2006-11-20  Jim Meyering  <jim@meyering.net>
6251
6252         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
6253         continue using the flexible array member (thus, this module performs
6254         half as many malloc calls), with the addition that...
6255         (getgroup, getuser): Consistently record a non-match via an empty
6256         "name" string, and map an empty string match to a NULL return value.
6257         * modules/idcache (Depends-on): Re-add flexmember.
6258
6259         * lib/idcache.c (getuser): Remove all uses of the register keyword.
6260         (getuidbyname, getgroup, getgidbyname): Likewise.
6261
6262         Use cleaner syntax: NULL rather than 0.
6263         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
6264
6265 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
6266
6267         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
6268         It mishandled the case where the group was missing.
6269         Problem reported by Greg Schafer.
6270         * modules/idcache: Likewise.
6271
6272 2006-11-18  Jim Meyering  <jim@meyering.net>
6273
6274         * check-module (%exempt_header): Add exception for some
6275         conditionally-included headers.
6276
6277         * modules/i-ring (Depends-on): Add verify.
6278         (License): Change to LGPL.
6279
6280 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
6281
6282         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
6283         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
6284         and inttostr.h.  Use snprintf rather than uinttostr, so that
6285         LGPLed code doesn't depend on GPLed.
6286
6287 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
6288
6289         * modules/inline (License): Change from GPL to LGPL.
6290
6291 2006-11-17  Jim Meyering  <jim@meyering.net>
6292
6293         * modules/d-type (License): Switch to LGPL.
6294
6295 2006-11-15  Bruno Haible  <bruno@clisp.org>
6296
6297         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
6298
6299 2006-11-15  Eric Blake  <ebb9@byu.net>
6300
6301         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
6302         the module dependency.
6303
6304 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6305             Bruno Haible  <bruno@clisp.org>
6306
6307         * gnulib-tool (func_create_testdir): Add license consistency check.
6308
6309 2006-11-15  Eric Blake  <ebb9@byu.net>
6310
6311         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
6312         random "(cached)" in configure output.
6313
6314 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6315
6316         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
6317         test for conforming inttypes.h is both announced and cached.
6318
6319         * MODULES.html.sh (seen_modules, seen_files): New variables.
6320         (func_module): Rewrite to use a few less gnulib-tool and sed
6321         invocations.  Avoid a couple of quadratic algorithms for ...
6322         (missed_modules, missed_files): ... these, with ...
6323         (func_append, func_tmpdir): ... these new functions, from
6324         gnulib-tool.  Analogously, install traps for cleanup.
6325
6326         * tests/test-gc.c (main): Remove unused variables.
6327         * tests/test-read-file.c: Include stdlib.h, for 'free'.
6328
6329 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
6330
6331         * modules/inttostr (License): Change to LGPL.
6332
6333 2006-11-14  Eric Blake  <ebb9@byu.net>
6334
6335         * modules/tempname (License): Change to LGPL.
6336
6337 2006-11-14  Eric Blake  <ebb9@byu.net>
6338
6339         * doc/functions.texi (Function Portability): *printf functions on
6340         Cygwin now understand all POSIX size specifiers.
6341
6342 2006-11-14  Bruno Haible  <bruno@clisp.org>
6343
6344         * modules/c-ctype (License): Change to LGPL.
6345
6346 2006-11-12  Bruno Haible  <bruno@clisp.org>
6347
6348         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
6349         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
6350         for GNOME libraries, for which the include files are installed in
6351         subdirectories of $prefix/include.
6352
6353 2006-11-12  Bruno Haible  <bruno@clisp.org>
6354
6355         * m4/lib-link.m4: Require at least autoconf-2.54.
6356         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
6357         name to underscores for the --with option.
6358
6359 2006-11-13  Bruno Haible  <bruno@clisp.org>
6360
6361         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
6362         the tests directory.
6363         Reported by Ralf Wildenhues.
6364
6365 2006-11-13  Bruno Haible  <bruno@clisp.org>
6366
6367         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
6368         (func_emit_initmacro_end): Undo the override here.
6369         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
6370         Works around the famous automake error in coreutils.
6371
6372 2006-11-13  Eric Blake  <ebb9@byu.net>
6373
6374         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
6375         element, not its node.
6376
6377 2006-11-12  Bruno Haible  <bruno@clisp.org>
6378
6379         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
6380         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
6381
6382 2006-11-12  Bruno Haible  <bruno@clisp.org>
6383
6384         * gnulib-tool: New option --local-symlink.
6385         (func_usage): Document it.
6386         (lsymbolic): New variable.
6387         (func_import, func_create_testdir): If --symlink was not specified,
6388         test whether --local-symlink was specified and the file comes from
6389         the local_gnulib_dir.
6390
6391 2006-11-12  Bruno Haible  <bruno@clisp.org>
6392
6393         * gnulib-tool (func_ln): New function.
6394         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
6395
6396 2006-11-12  Bruno Haible  <bruno@clisp.org>
6397
6398         Finish support for source files in subdirectories.
6399         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
6400         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
6401         AUTOMAKE_OPTIONS.
6402         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
6403
6404 2006-11-12  Bruno Haible  <bruno@clisp.org>
6405
6406         * gnulib-tool (func_get_automake_snippet): Synthesize also an
6407         EXTRA_lib_SOURCES augmentation.
6408         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
6409
6410 2006-11-12  Jim Meyering  <jim@meyering.net>
6411
6412         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
6413         file descriptors.  This also averts a failure on systems with
6414         native openat support when a traversed directory lacks "x" access.
6415         * lib/fts_.h: Include "i-ring.h"
6416         (struct FTS) [fts_fd_ring]: New member.
6417         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
6418         (FCHDIR): Add parentheses.
6419         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
6420         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
6421         When descending, rather than simply closing the previous
6422         fts_cwd_fd value, push that file descriptor onto the ring.
6423         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
6424         (fts_open): Initialize the new fd_ring member.
6425         (fts_close): Clear the ring.
6426         (fts_safe_changedir): When possible, use our new fd_ring to skip
6427         the diropen and fstat and dev/ino comparison that would normally
6428         accompany a virtual `chdir ("..")'.
6429
6430         * modules/fts (Depends-on): Add i-ring.
6431         * modules/i-ring: New module.
6432         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
6433         * m4/i-ring.m4: New file.
6434
6435 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6436
6437         * gnulib-tool (func_create_testdir): Fix replacement of
6438         `build-aux' in configure.ac.  Run autotools in gltests
6439         subdirectory.
6440         (func_create_testdir, func_create_megatestdir, test): There is
6441         no need for '--force' in most autotool invocations in a new
6442         tree.  Actually fail the whole test if any of the tools, or the
6443         configure or make stages fail.
6444
6445         Sync from Automake.
6446         * build-aux/gnupload: Revert last change.  Add pointer to upload
6447         instructions of the GNU Maintenance Instructions.
6448         Suggestion by Karl Berry.
6449
6450 2006-11-10  Jim Meyering  <jim@meyering.net>
6451
6452         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
6453
6454 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
6455
6456         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
6457         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
6458         (bind_textdomain_codeset) [! ENABLE_NLS]:
6459         Evaluate all the arguments.  That way, callers get compatible behavior
6460         if the arguments have side effects.  Also, it avoids some GCC
6461         diagnostics in some cases; Joel E. Denny reported problems when Bison
6462         was configured with --enable-gcc-warnigs.
6463
6464 2006-11-10  Jim Meyering  <jim@meyering.net>
6465
6466         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
6467         relevant options in CFLAGS (like -O, -fno-inline) are taken into
6468         account.
6469
6470 2006-11-10  Jim Meyering  <jim@meyering.net>
6471
6472         * modules/inline: New file/module.
6473         * modules/xalloc (Files): Remove m4/inline.m4.
6474         (Depends-on): Add inline, instead.
6475         * modules/oset: Likewise.
6476         * modules/list: Likewise.
6477
6478 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
6479
6480         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
6481         Problem reported by Matthew Woehlke.
6482
6483 2006-11-09  Bruno Haible  <bruno@clisp.org>
6484
6485         * lib/tempname.c (gen_tempname): Remove variant that invokes
6486         __gen_tempname.
6487         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
6488         __gen_tempname.
6489
6490 2006-11-08  Bruno Haible  <bruno@clisp.org>
6491
6492         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
6493         to 'yes' instead of 'cross-compiling'.
6494
6495 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
6496
6497         * lib/quotearg.h (quotearg_free): New decl.
6498         * lib/quotearg.c (quotearg_free): New function.
6499         (slot0, nslots, slotvec0, slotvec):
6500         Now file-scope so that quotearg_free can get at them.
6501
6502 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6503
6504         Sync from Automake.
6505         * build-aux/gnupload: Add missing 'gnu' to example URL.
6506         Report by Karl Berry.
6507
6508 2006-11-08  Bruno Haible  <bruno@clisp.org>
6509
6510         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
6511         Suggested by Paul Eggert.
6512
6513 2006-11-08  Jim Meyering  <jim@meyering.net>
6514
6515         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
6516         It's already included if !_LIBC.
6517         (fts_safe_changedir): Add a comment.
6518
6519 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6520
6521         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
6522         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
6523         Matthew Woehlke.
6524
6525         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
6526         definitions up, to avoid colliding with change below.
6527         (static_inline) [HAVE_INLINE]: New macro.
6528         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
6529         Provide extern decls when !HAVE_INLINE.  Do not define unless
6530         static_inline is defined, either by us or by xmalloc.c.  Use
6531         static_inline rather than static inline.
6532         (XCALLOC): Optimize sizeof(T) = 1 case.
6533         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
6534
6535 2006-11-07  Bruno Haible  <bruno@clisp.org>
6536
6537         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
6538         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
6539         AC_C_INLINE.
6540         * modules/xalloc (Files): Add m4/inline.m4.
6541
6542 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6543
6544         * README: Fix typo.
6545         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
6546         (Miscellanous Notes): ...from this.
6547
6548 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6549
6550         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
6551         Mention that offsetof should be used instead of sizeof.
6552         From Bruno Haible.
6553
6554 2006-11-07  Bruno Haible  <bruno@clisp.org>
6555
6556         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
6557
6558 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6559
6560         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6561         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
6562         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6563         (gl_tree_add_before, gl_tree_add_after):
6564         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
6565         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
6566         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
6567         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
6568         (gl_linked_add_after, gl_linked_add_at): Likewise.
6569         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
6570         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6571         (gl_tree_add_before, gl_tree_add_after): Likewise.
6572         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
6573         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
6574         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
6575
6576 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6577
6578         * lib/gl_oset.h: Use C comment style, not C++ comment style.
6579
6580 2006-11-06  Bruno Haible  <bruno@clisp.org>
6581
6582         * m4/inline.m4: New file.
6583         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
6584         * modules/list (Files): Add m4/inline.m4.
6585         * modules/oset (Files): Likewise.
6586
6587 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6588
6589         * lib/idcache.c: Include <stddef.h>, for offsetof.
6590         (struct userid.name): Change from char * to a flexible array member.
6591         All uses changed.
6592         * modules/idcache (Depends-on): Add flexmember.
6593
6594         * MODULES.html.sh (Core language properties): New module flexmember.
6595         * modules/flexmember, m4/flexmember.m4: New files.
6596
6597         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
6598         inline functions that are identical with the old xnmalloc_inline,
6599         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
6600         that we can avoid some unnecessary integer multiplications and
6601         divisions in the common case where the element size is known at
6602         compile time.
6603         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
6604         needed.
6605         (xnboundedmalloc): Remove.
6606         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
6607         arguments, for consistency with rest of this header.
6608         (xcharalloc): Rewrite using XNMALLOC.
6609         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
6610         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
6611         versions have been moved to lib/xalloc.h and renamed to be the
6612         non-*_inline versions.
6613         (xmalloc, xrealloc): Implement without reference to the xnmalloc
6614         and xnrealloc functions, since those functions are now inline and
6615         now call us.
6616         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
6617         renaming described above.
6618         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
6619         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
6620         captures the dependency in AC_C_INLINE.
6621
6622         New module canonicalize-lgpl, proposed by Charles Wilson in
6623         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
6624         with a few small changes afterwards.
6625         * MODULES.html.sh (File system functions): New module
6626         canonicalize-lgpl.
6627         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
6628         and canonicalize_file_name.
6629         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
6630         * modules/canonicalize-lgpl: New files.
6631
6632 2006-11-05  Bruno Haible  <bruno@clisp.org>
6633
6634         * gnulib-tool (func_import, func_create_testdir): Create directories
6635         also for files in subdirectories of lib/.
6636
6637 2006-11-05  Bruno Haible  <bruno@clisp.org>
6638
6639         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
6640         ANSI C compliant.
6641
6642 2006-11-03  Bruno Haible  <bruno@clisp.org>
6643
6644         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6645         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
6646         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
6647         (xnboundedmalloc): New inline function.
6648         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
6649         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
6650         xmalloc.
6651         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
6652         xmalloc.
6653         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
6654         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
6655         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
6656         xmalloc.
6657         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6658         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
6659         xmalloc.
6660         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
6661         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6662         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
6663         xmalloc.
6664         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6665         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
6666         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6667         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
6668         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
6669         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
6670         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
6671
6672 2006-11-03  Bruno Haible  <bruno@clisp.org>
6673
6674         * lib/c-ctype.h [C++]: Define functions without name mangling.
6675         * lib/fwriteerror.h [C++]: Likewise.
6676         * lib/gcd.h [C++]: Likewise.
6677         * lib/linebreak.h [C++]: Likewise.
6678
6679 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
6680
6681         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
6682         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
6683         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
6684         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6685         Check for functions and headers just once.
6686         Check for declaration of canonicalize_file_name.
6687         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
6688
6689 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6690
6691         * gnulib-tool (func_import): Fix typo in actioncmd.
6692
6693 2006-11-02  Bruno Haible  <bruno@clisp.org>
6694
6695         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
6696         newline sequence in the Makefile.am snippet as a space, like "make"
6697         does.
6698         Reported by Roger Persson <perrog@gmail.com>.
6699
6700 2006-11-01  Bruno Haible  <bruno@clisp.org>
6701
6702         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
6703         already declared in <string.h>.
6704         * lib/strcase.h (strncasecmp): Don't declare it if yes.
6705
6706 2006-11-01  Bruno Haible  <bruno@clisp.org>
6707
6708         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
6709         * lib/strcase.h: Include <string.h>.
6710         (strcasecmp): Define to rpl_strcasecmp here.
6711
6712 2006-11-01  Bruno Haible  <bruno@clisp.org>
6713
6714         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
6715
6716 2006-11-01  Eric Blake  <ebb9@byu.net>
6717
6718         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
6719
6720         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
6721
6722 2006-10-29  Bruno Haible  <bruno@clisp.org>
6723
6724         Make it compile in C++ mode.
6725         * lib/full-write.c (full_rw): Add a cast.
6726
6727 2006-11-01  Bruno Haible  <bruno@clisp.org>
6728
6729         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
6730         be POSIX compliant.
6731         Reported by Roger Persson <perrog@gmail.com>.
6732
6733 2006-11-01  Eric Blake  <ebb9@byu.net>
6734
6735         * lib/getopt_.h: Fix comments.
6736
6737 2006-10-31  Eric Blake  <ebb9@byu.net>
6738
6739         * modules/tmpdir (Depends-on): Add sys_stat.
6740         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
6741         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
6742         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
6743         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
6744         tempname.
6745
6746 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
6747
6748         Avoid some C++ diagnostics reported by Bruno Haible.
6749         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
6750         xmalloc.
6751         (quotearg_alloc): Use xcharalloc rather than xmalloc.
6752         (struct slotvec): Move to top level.
6753         (quotearg_n_options): Rewrite to avoid xmalloc.
6754         * lib/xalloc.h (xcharalloc): New function.
6755         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
6756         [defined __cplusplus]: Add function template that provides result
6757         type propagation.  This part of the change is from Bruno Haible.
6758
6759 2006-10-29  Bruno Haible  <bruno@clisp.org>
6760
6761         Make it compile in C++ mode.
6762         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
6763         * lib/strnlen1.c (strnlen1): Cast memchr result.
6764         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
6765         * lib/clean-temp.c (string_equals, string_hash): Add casts.
6766         (create_temp_dir): Rename local variable 'template'.
6767         (compile_csharp_using_sscli): Add cast.
6768         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
6769         * lib/findprog.c (find_in_path): Likewise.
6770         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
6771         * lib/wait-process.c (register_slave_subprocess): Likewise.
6772
6773 2006-10-22  Bruno Haible  <bruno@clisp.org>
6774
6775         * modules/tsearch: New file.
6776         * lib/tsearch.h: New file.
6777         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
6778         * m4/tsearch.m4: New file.
6779         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
6780
6781 2006-10-29  Eric Blake  <ebb9@byu.net>
6782
6783         * lib/arcfour.c: Assume config.h.
6784         * lib/arctwo.c: Likewise.
6785         * lib/base64.c: Likewise.
6786         * lib/check-version.c: Likewise.
6787         * lib/crc.c: Likewise.
6788         * lib/des.c: Likewise.
6789         * lib/gc-gnulib.c: Likewise.
6790         * lib/gc-libgcrypt.c: Likewise.
6791         * lib/gc-pbkdf2-sha1.c: Likewise.
6792         * lib/getaddrinfo.c: Likewise.
6793         * lib/getdelim.c: Likewise.
6794         * lib/getline.c: Likewise.
6795         * lib/hmac-md5.c: Likewise.
6796         * lib/hmac-sha1.c: Likewise.
6797         * lib/iconvme.c: Likewise.
6798         * lib/md2.c: Likewise.
6799         * lib/md4.c: Likewise.
6800         * lib/memxor.c: Likewise.
6801         * lib/read-file.c: Likewise.
6802         * lib/readline.c: Likewise.
6803         * lib/rijndael-alg-fst.c: Likewise.
6804         * lib/rijndael-api-fst.c: Likewise.
6805         * lib/xgetdomainname.c: Likewise.
6806
6807 2006-10-28  Eric Blake  <ebb9@byu.net>
6808
6809         * lib/xstrndup.c: Assume config.h.
6810
6811 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6812
6813         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
6814         stat-macros.h is now for our own macros, whereas stat_h is for
6815         macros in the <sys/stat.h> name space.
6816         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
6817         (STAT_MACROS_H): Remove.
6818         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
6819         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
6820         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
6821         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
6822         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
6823         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
6824         Move these macros to ...
6825         * lib/stat_.h: here.  Don't include stat-macros.h.
6826         * lib/canonicalize.c: Don't include stat-macros.h.
6827         * lib/chown.c: Likewise.
6828         * lib/euidaccess.c: Likewise.
6829         * lib/file-type.c: Likewise.
6830         * lib/filemode.c: Likewise.
6831         * lib/glob.c: Likewise.
6832         * lib/isapipe.c: Likewise.
6833         * lib/lchown.c: Likewise.
6834         * lib/lstat.c: Likewise.
6835         * lib/mkdir-p.c: Likewise.
6836         * lib/rmdir.c: Likewise.
6837         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
6838         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
6839         unless mkdir isn't declared, to speed up 'configure'.
6840         Always create sys/stat.h, since it's unlikely any real sys/stat.h
6841         would define all the S_* symbols.
6842         * modules/canonicalize (Depends-on):
6843         Depend on sys_stat, not stat-macros.
6844         * modules/chown: Likewise.
6845         * modules/euidaccess: Likewise.
6846         * modules/filemode: Likewise.
6847         * modules/file-type: Likewise.
6848         * modules/glob: Likewise.
6849         * modules/isapipe: Likewise.
6850         * modules/lchown: Likewise.
6851         * modules/lstat: Likewise.
6852         * modules/mkancesdirs: Likewise.
6853         * modules/rmdir: Likewise.
6854         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
6855         * modules/modechange: Likewise.
6856         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
6857         (configure.ac): Remove gl_STAT_MACROS.
6858         * modules/sys_stat (Depends-on): Remove stat-macros.
6859
6860 2006-10-27  Bruno Haible  <bruno@clisp.org>
6861
6862         * m4/signed.m4: Remove file.
6863         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
6864         invocation.
6865         * modules/vasnprintf (Files): Remove m4/signed.m4.
6866
6867 2006-10-27  Bruno Haible  <bruno@clisp.org>
6868
6869         Update to GNU gettext 0.16.
6870         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
6871         m4/inttypes-h.m4, m4/signed.m4.
6872         * m4/gettext.m4: Update to GNU gettext 0.16.
6873         * m4/intl.m4: New file, from GNU gettext.
6874         * m4/intldir.m4: New file, from GNU gettext.
6875         * config/srclist.txt: Update
6876
6877 2006-10-27  Eric Blake  <ebb9@byu.net>
6878
6879         * MODULES.html.sh: Document tempname.
6880         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
6881         dependencies.
6882         (Files): Move lib/tempname.c...
6883         * modules/tempname: ...to this new module.
6884         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
6885         (gl_PREREQ_TEMPNAME): Move...
6886         * m4/tempname.m4: ...to this new file.
6887         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
6888         * modules/sys_stat (Depends-on): Add stat-macros.
6889         * lib/stat_.h (includes): Pick up stat macros.
6890         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
6891         if stat macros are broken.
6892         * lib/tempname.c (includes): No need to include "stat-macros.h".
6893         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
6894         (direxists, __path_search) [!_LIBC]: Don't compile these in
6895         gnulib; the tmpdir module covers that.
6896         * lib/tempname.h: New file.
6897
6898 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
6899
6900         * COPYING: Explain how gnulib-tool converts licence headers.
6901         Almost all wording by Eric Blake.
6902
6903 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
6904
6905         * lib/mbchar.h (is_basic_table): Make read-only.
6906         * lib/mbchar.c (is_basic_table): Likewise.
6907         Reported by John Darrington.
6908
6909 2006-10-25  Bruno Haible  <bruno@clisp.org>
6910
6911         * lib/progname.h (set_program_name): Undefine before defining.
6912
6913 2006-10-25  Bruno Haible  <bruno@clisp.org>
6914
6915         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
6916         false for non-gcc C++ compilers.
6917         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
6918
6919 2006-10-24  Bruno Haible  <bruno@clisp.org>
6920
6921         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
6922         iconv implementations like Irix iconv.
6923
6924 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6925
6926         * modules/vararrays: New file.
6927         * m4/vararrays.m4: New file, taken from diffutils.
6928         * MODULES.html.sh: New module vararrays.
6929
6930 2006-10-24  Karl Berry  <karl@gnu.org>
6931
6932         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
6933         Don't call GNU Unix.
6934
6935 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6936
6937         * users.txt: Add Libtool.
6938
6939         Sync from Libtool:
6940
6941         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6942
6943         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
6944         to gnulib's policy of including config.h unconditionally.
6945
6946 2006-10-24  Bruno Haible  <bruno@clisp.org>
6947
6948         * modules/wcwidth (Files): Add m4/wint_t.m4.
6949         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
6950         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
6951
6952 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6953
6954         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
6955         to pacify GCC with some -W flags enabled.  Problem reported by
6956         Bruno Haible.
6957
6958 2006-10-24  Jim Meyering  <jim@meyering.net>
6959
6960         * MODULES.html.sh: Remove uinttostr.  It's not a module.
6961         Reported by Karl Berry.
6962
6963 2006-10-23  Bruno Haible  <bruno@clisp.org>
6964
6965         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
6966
6967 2006-10-24  Bruno Haible  <bruno@clisp.org>
6968
6969         * lib/gl_list.h: Use C comment style, not C++ comment style.
6970
6971 2006-10-23  Eric Blake  <ebb9@byu.net>
6972
6973         * lib/getaddrinfo.c (includes): Add missing include.
6974
6975 2006-10-23  Bruno Haible  <bruno@clisp.org>
6976             Paul Eggert  <eggert@cs.ucla.edu>
6977
6978         Ability to rename obstack_free.
6979         * lib/obstack.h (__obstack_free): New macro. Declare instead of
6980         obstack_free.
6981         (obstack_free): Invoke the __obstack_free macro.
6982         * lib/obstack.c (obstack_free): Use __obstack_free macro.
6983
6984 2006-10-23  Bruno Haible  <bruno@clisp.org>
6985             Paul Eggert  <eggert@cs.ucla.edu>
6986
6987         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
6988         __argc, __argv from the declaration. (They are defined as macros on
6989         mingw.)
6990
6991 2006-10-22  Bruno Haible  <bruno@clisp.org>
6992
6993         * doc/gnulib-intro.texi: New file.
6994         * doc/gnulib.texi: Include it.
6995
6996 2006-10-21  Bruno Haible  <bruno@clisp.org>
6997
6998         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
6999         "Introduction", "Miscellanous Notes", "Particular Modules".
7000
7001 2006-10-21  Bruno Haible  <bruno@clisp.org>
7002
7003         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7004         Change mostlyclean-local rule to avoid sh syntax error from bash
7005         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
7006
7007 2006-10-23  Jim Meyering  <jim@meyering.net>
7008
7009         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
7010         in place of snprintf.
7011
7012         * modules/inttostr (Files): Add lib/uinttostr.c.
7013         * lib/uinttostr.c (inttostr): New file/function.
7014         * lib/inttostr.h (uinttostr): Declare.
7015         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
7016         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7017         Add uinttostr.
7018         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
7019
7020 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
7021
7022         * lib/canonicalize.c (ELOOP): Define if not already defined.
7023         Problem reported by Bruno Haible in
7024         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
7025
7026 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
7027
7028         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
7029         Problem reported by Perry Smith and Ville Laurikari.
7030
7031         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
7032         uses.
7033
7034 2006-10-19  Bruno Haible  <bruno@clisp.org>
7035
7036         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
7037         for mingw.
7038
7039 2006-10-19  Bruno Haible  <bruno@clisp.org>
7040
7041         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
7042         Needed for mingw.
7043
7044 2006-10-19  Bruno Haible  <bruno@clisp.org>
7045
7046         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
7047
7048 2006-10-19  Bruno Haible  <bruno@clisp.org>
7049
7050         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
7051         it.
7052
7053 2006-10-19  Bruno Haible  <bruno@clisp.org>
7054
7055         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
7056         invocation.
7057
7058 2006-10-19  Bruno Haible  <bruno@clisp.org>
7059
7060         * gnulib-tool (func_create_testdir): Don't include ftruncate and
7061         mountlist by default.
7062
7063 2006-10-16  Bruno Haible  <bruno@clisp.org>
7064
7065         * lib/c-strstr.c: Include c-strstr.h.
7066
7067 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7068
7069         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
7070         in a slash.
7071
7072 2006-10-18  Bruno Haible  <bruno@clisp.org>
7073
7074         * lib/lock.h [C++]: Wrap definitions in extern "C".
7075
7076 2006-10-18  Bruno Haible  <bruno@clisp.org>
7077
7078         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
7079         gl_LIBOBJS list.
7080
7081 2006-10-18  Bruno Haible  <bruno@clisp.org>
7082
7083         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
7084
7085 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
7086
7087         * lib/xstrtol.h: Include gettext.h.
7088         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
7089         Problem reported by Eric Blake.
7090         * modules/xstrtol (Depends-on): Add gettext-h.
7091
7092 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
7093
7094         * lib/strftime.c (advance): New macro.
7095         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
7096         incomplete type, so you can't add 0 to it.  Problem and patch
7097         reported by Eelco Dolstra for dietlibc.
7098
7099 2006-10-18  Jim Meyering  <jim@meyering.net>
7100
7101         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
7102         type for a local, and rename it: s/up/user_proc/.
7103
7104 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
7105
7106         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
7107         READ_UTMP_USER_PROCESS.
7108         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
7109
7110 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
7111
7112         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
7113         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
7114
7115 2006-10-17  Eric Blake  <ebb9@byu.net>
7116
7117         * lib/sigprocmask.c (sigprocmask): Fix typo.
7118
7119         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
7120
7121         * modules/clean-temp (Makefile.am): Don't add to make output...
7122         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
7123         config.h.
7124
7125 2006-10-17  Bruno Haible  <bruno@clisp.org>
7126
7127         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
7128         differently if DEFAULT_TEXT_DOMAIN is set.
7129
7130 2006-10-16  Bruno Haible  <bruno@clisp.org>
7131
7132         * lib/clean-temp.c: Include fwriteerror.h.
7133
7134 2006-10-16  Bruno Haible  <bruno@clisp.org>
7135
7136         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
7137
7138 2006-10-16  Bruno Haible  <bruno@clisp.org>
7139
7140         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
7141         * lib/sigprocmask.h: Include <sys/types.h>.
7142         (sigset_t): Use the system's definition if present.
7143
7144 2006-10-17  Eric Blake  <ebb9@byu.net>
7145
7146         * lib/xvasprintf.c (includes): Assume config.h.
7147         * lib/xasprintf.c (includes): Likewise.
7148
7149 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
7150
7151         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
7152         at least as wide as intmax_t.
7153
7154 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
7155
7156         (Imported from Automake.)
7157         * build-aux/gnupload: Update to version 1.1 of directive file.
7158
7159 2006-10-16  Eric Blake  <ebb9@byu.net>
7160
7161         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
7162         match Automake 1.10a.
7163
7164 2006-10-14  Bruno Haible  <bruno@clisp.org>
7165
7166         * modules/sigprocmask: New file.
7167         * lib/sigprocmask.h: New file.
7168         * lib/sigprocmask.c: New file.
7169         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
7170         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
7171         request sigprocmask.o.
7172         (gl_PREREQ_SIGPROCMASK): New macro.
7173         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
7174         (Depends-on): Add sigprocmask.
7175         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
7176         gt_SIGNALBLOCKING. Test for 'raise' only once.
7177         * lib/fatal-signal.c: Include sigprocmask.h.
7178         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
7179         unblock_fatal_signals): Define always.
7180         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7181         sigprocmask.
7182
7183 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7184
7185         Sync from Automake.
7186         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
7187         which incorrectly sets the mode of an existing destination
7188         directory.  In some cases the unpatched install-sh could do the
7189         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
7190         system.  We hope this is rare in practice, but it's clearly worth
7191         fixing.  Problem reported by Alex Unleashed in
7192         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
7193         Also, don't bother to check for -m bugs unless we're using -m;
7194         suggested by Stepan Kasal.
7195
7196 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7197
7198         Sync from Automake.
7199         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
7200         `-c' flag, so they appear at the same position as in %FASTDEP%
7201         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
7202         which ignores unknown options only after the first non-option.
7203         Bug report against M4 by Nelson H. F. Beebe.
7204
7205 2006-10-13  Jim Meyering  <jim@meyering.net>
7206
7207         Fix a bug in yesterday's change.
7208         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
7209         p->fts_statp->st_dev would be used uninitialized.
7210         Ensures that we always call fts_stat on the very first entry.
7211         Miklos Szeredi reported that find -xdev stopped working.
7212
7213 2006-10-12  Bruno Haible  <bruno@clisp.org>
7214
7215         * gnulib-tool (func_get_automake_snippet): Append an automatically
7216         computed EXTRA_DIST augmentation.
7217         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
7218         * modules/alloca-opt (Makefile.am): Likewise.
7219         * modules/allocsa (Makefile.am): Likewise.
7220         * modules/arcfour (Makefile.am): Likewise.
7221         * modules/arctwo (Makefile.am): Likewise.
7222         * modules/argmatch (Makefile.am): Likewise.
7223         * modules/argz (Makefile.am): Likewise.
7224         * modules/atexit (Makefile.am): Likewise.
7225         * modules/backupfile (Makefile.am): Likewise.
7226         * modules/byteswap (Makefile.am): Likewise.
7227         * modules/c-strtod (Makefile.am): Likewise.
7228         * modules/c-strtold (Makefile.am): Likewise.
7229         * modules/calloc (Makefile.am): Likewise.
7230         * modules/canon-host (Makefile.am): Likewise.
7231         * modules/canonicalize (Makefile.am): Likewise.
7232         * modules/chdir-long (Makefile.am): Likewise.
7233         * modules/chdir-safer (Makefile.am): Likewise.
7234         * modules/check-version (Makefile.am): Likewise.
7235         * modules/chown (Makefile.am): Likewise.
7236         * modules/cloexec (Makefile.am): Likewise.
7237         * modules/close-stream (Makefile.am): Likewise.
7238         * modules/closeout (Makefile.am): Likewise.
7239         * modules/crc (Makefile.am): Likewise.
7240         * modules/csharpexec (Makefile.am): Likewise.
7241         * modules/cycle-check (Makefile.am): Likewise.
7242         * modules/des (Makefile.am): Likewise.
7243         * modules/dev-ino (Makefile.am): Likewise.
7244         * modules/dirfd (Makefile.am): Likewise.
7245         * modules/dirname (Makefile.am): Likewise.
7246         * modules/dup2 (Makefile.am): Likewise.
7247         * modules/eealloc (Makefile.am): Likewise.
7248         * modules/error (Makefile.am): Likewise.
7249         * modules/euidaccess (Makefile.am): Likewise.
7250         * modules/exclude (Makefile.am): Likewise.
7251         * modules/exitfail (Makefile.am): Likewise.
7252         * modules/fcntl-safer (Makefile.am): Likewise.
7253         * modules/fcntl (Makefile.am): Likewise.
7254         * modules/file-type (Makefile.am): Likewise.
7255         * modules/fileblocks (Makefile.am): Likewise.
7256         * modules/filemode (Makefile.am): Likewise.
7257         * modules/filenamecat (Makefile.am): Likewise.
7258         * modules/fnmatch (Makefile.am): Likewise.
7259         * modules/fopen-safer (Makefile.am): Likewise.
7260         * modules/fpending (Makefile.am): Likewise.
7261         * modules/fprintftime (Makefile.am): Likewise.
7262         * modules/free (Makefile.am): Likewise.
7263         * modules/fsusage (Makefile.am): Likewise.
7264         * modules/ftruncate (Makefile.am): Likewise.
7265         * modules/fts (Makefile.am): Likewise.
7266         * modules/gc-arcfour (Makefile.am): Likewise.
7267         * modules/gc-des (Makefile.am): Likewise.
7268         * modules/gc-hmac-md5 (Makefile.am): Likewise.
7269         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
7270         * modules/gc-md4 (Makefile.am): Likewise.
7271         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
7272         * modules/gc-sha1 (Makefile.am): Likewise.
7273         * modules/gc (Makefile.am): Likewise.
7274         * modules/getaddrinfo (Makefile.am): Likewise.
7275         * modules/getcwd (Makefile.am): Likewise.
7276         * modules/getdelim (Makefile.am): Likewise.
7277         * modules/getdomainname (Makefile.am): Likewise.
7278         * modules/getgroups (Makefile.am): Likewise.
7279         * modules/gethostname (Makefile.am): Likewise.
7280         * modules/gethrxtime (Makefile.am): Likewise.
7281         * modules/getline (Makefile.am): Likewise.
7282         * modules/getloadavg (Makefile.am): Likewise.
7283         * modules/getlogin_r (Makefile.am): Likewise.
7284         * modules/getndelim2 (Makefile.am): Likewise.
7285         * modules/getopt (Makefile.am): Likewise.
7286         * modules/getpagesize (Makefile.am): Likewise.
7287         * modules/getpass-gnu (Makefile.am): Likewise.
7288         * modules/getpass (Makefile.am): Likewise.
7289         * modules/getsubopt (Makefile.am): Likewise.
7290         * modules/gettime (Makefile.am): Likewise.
7291         * modules/gettimeofday (Makefile.am): Likewise.
7292         * modules/getugroups (Makefile.am): Likewise.
7293         * modules/getusershell (Makefile.am): Likewise.
7294         * modules/glob (Makefile.am): Likewise.
7295         * modules/group-member (Makefile.am): Likewise.
7296         * modules/hard-locale (Makefile.am): Likewise.
7297         * modules/hash (Makefile.am): Likewise.
7298         * modules/hmac-md5 (Makefile.am): Likewise.
7299         * modules/hmac-sha1 (Makefile.am): Likewise.
7300         * modules/human (Makefile.am): Likewise.
7301         * modules/idcache (Makefile.am): Likewise.
7302         * modules/imaxabs (Makefile.am): Likewise.
7303         * modules/imaxdiv (Makefile.am): Likewise.
7304         * modules/inet_ntop (Makefile.am): Likewise.
7305         * modules/inet_pton (Makefile.am): Likewise.
7306         * modules/intprops (Makefile.am): Likewise.
7307         * modules/inttostr (Makefile.am): Likewise.
7308         * modules/inttypes (Makefile.am): Likewise.
7309         * modules/isapipe (Makefile.am): Likewise.
7310         * modules/javaversion (Makefile.am): Likewise.
7311         * modules/lchmod (Makefile.am): Likewise.
7312         * modules/lchown (Makefile.am): Likewise.
7313         * modules/localcharset (Makefile.am): Likewise.
7314         * modules/long-options (Makefile.am): Likewise.
7315         * modules/lstat (Makefile.am): Likewise.
7316         * modules/malloc (Makefile.am): Likewise.
7317         * modules/mathl (Makefile.am): Likewise.
7318         * modules/mbchar (Makefile.am): Likewise.
7319         * modules/md2 (Makefile.am): Likewise.
7320         * modules/md4 (Makefile.am): Likewise.
7321         * modules/md5 (Makefile.am): Likewise.
7322         * modules/memcasecmp (Makefile.am): Likewise.
7323         * modules/memchr (Makefile.am): Likewise.
7324         * modules/memcmp (Makefile.am): Likewise.
7325         * modules/memcoll (Makefile.am): Likewise.
7326         * modules/memcpy (Makefile.am): Likewise.
7327         * modules/memmem (Makefile.am): Likewise.
7328         * modules/memmove (Makefile.am): Likewise.
7329         * modules/mempcpy (Makefile.am): Likewise.
7330         * modules/memrchr (Makefile.am): Likewise.
7331         * modules/memset (Makefile.am): Likewise.
7332         * modules/memxor (Makefile.am): Likewise.
7333         * modules/mkancesdirs (Makefile.am): Likewise.
7334         * modules/mkdir-p (Makefile.am): Likewise.
7335         * modules/mkdir (Makefile.am): Likewise.
7336         * modules/mkdtemp (Makefile.am): Likewise.
7337         * modules/mkstemp (Makefile.am): Likewise.
7338         * modules/mktime (Makefile.am): Likewise.
7339         * modules/modechange (Makefile.am): Likewise.
7340         * modules/mountlist (Makefile.am): Likewise.
7341         * modules/nanosleep (Makefile.am): Likewise.
7342         * modules/obstack (Makefile.am): Likewise.
7343         * modules/openat (Makefile.am): Likewise.
7344         * modules/pagealign_alloc (Makefile.am): Likewise.
7345         * modules/pathmax (Makefile.am): Likewise.
7346         * modules/physmem (Makefile.am): Likewise.
7347         * modules/poll (Makefile.am): Likewise.
7348         * modules/posixtm (Makefile.am): Likewise.
7349         * modules/posixver (Makefile.am): Likewise.
7350         * modules/putenv (Makefile.am): Likewise.
7351         * modules/quote (Makefile.am): Likewise.
7352         * modules/quotearg (Makefile.am): Likewise.
7353         * modules/raise (Makefile.am): Likewise.
7354         * modules/read-file (Makefile.am): Likewise.
7355         * modules/readline (Makefile.am): Likewise.
7356         * modules/readlink (Makefile.am): Likewise.
7357         * modules/readtokens (Makefile.am): Likewise.
7358         * modules/readutmp (Makefile.am): Likewise.
7359         * modules/realloc (Makefile.am): Likewise.
7360         * modules/regex (Makefile.am): Likewise.
7361         * modules/rename-dest-slash (Makefile.am): Likewise.
7362         * modules/rename (Makefile.am): Likewise.
7363         * modules/rijndael (Makefile.am): Likewise.
7364         * modules/rmdir (Makefile.am): Likewise.
7365         * modules/rpmatch (Makefile.am): Likewise.
7366         * modules/safe-read (Makefile.am): Likewise.
7367         * modules/safe-write (Makefile.am): Likewise.
7368         * modules/same-inode (Makefile.am): Likewise.
7369         * modules/same (Makefile.am): Likewise.
7370         * modules/save-cwd (Makefile.am): Likewise.
7371         * modules/savedir (Makefile.am): Likewise.
7372         * modules/setenv (Makefile.am): Likewise.
7373         * modules/settime (Makefile.am): Likewise.
7374         * modules/sha1 (Makefile.am): Likewise.
7375         * modules/sig2str (Makefile.am): Likewise.
7376         * modules/snprintf (Makefile.am): Likewise.
7377         * modules/stat-macros (Makefile.am): Likewise.
7378         * modules/stat-time (Makefile.am): Likewise.
7379         * modules/stdbool (Makefile.am): Likewise.
7380         * modules/stdint (Makefile.am): Likewise.
7381         * modules/stdlib-safer (Makefile.am): Likewise.
7382         * modules/stpcpy (Makefile.am): Likewise.
7383         * modules/stpncpy (Makefile.am): Likewise.
7384         * modules/strcase (Makefile.am): Likewise.
7385         * modules/strcasestr (Makefile.am): Likewise.
7386         * modules/strchrnul (Makefile.am): Likewise.
7387         * modules/strcspn (Makefile.am): Likewise.
7388         * modules/strdup (Makefile.am): Likewise.
7389         * modules/strerror (Makefile.am): Likewise.
7390         * modules/strftime (Makefile.am): Likewise.
7391         * modules/strndup (Makefile.am): Likewise.
7392         * modules/strnlen (Makefile.am): Likewise.
7393         * modules/strpbrk (Makefile.am): Likewise.
7394         * modules/strsep (Makefile.am): Likewise.
7395         * modules/strstr (Makefile.am): Likewise.
7396         * modules/strtod (Makefile.am): Likewise.
7397         * modules/strtoimax (Makefile.am): Likewise.
7398         * modules/strtok_r (Makefile.am): Likewise.
7399         * modules/strtol (Makefile.am): Likewise.
7400         * modules/strtoll (Makefile.am): Likewise.
7401         * modules/strtoul (Makefile.am): Likewise.
7402         * modules/strtoull (Makefile.am): Likewise.
7403         * modules/strtoumax (Makefile.am): Likewise.
7404         * modules/strverscmp (Makefile.am): Likewise.
7405         * modules/sys_socket (Makefile.am): Likewise.
7406         * modules/sys_stat (Makefile.am): Likewise.
7407         * modules/sysexits (Makefile.am): Likewise.
7408         * modules/time_r (Makefile.am): Likewise.
7409         * modules/timegm (Makefile.am): Likewise.
7410         * modules/timespec (Makefile.am): Likewise.
7411         * modules/tmpfile-safer (Makefile.am): Likewise.
7412         * modules/trim (Makefile.am): Likewise.
7413         * modules/unistd-safer (Makefile.am): Likewise.
7414         * modules/unlinkdir (Makefile.am): Likewise.
7415         * modules/unlocked-io (Makefile.am): Likewise.
7416         * modules/userspec (Makefile.am): Likewise.
7417         * modules/utime (Makefile.am): Likewise.
7418         * modules/utimecmp (Makefile.am): Likewise.
7419         * modules/utimens (Makefile.am): Likewise.
7420         * modules/vasnprintf (Makefile.am): Likewise.
7421         * modules/vasprintf (Makefile.am): Likewise.
7422         * modules/vsnprintf (Makefile.am): Likewise.
7423         * modules/xalloc (Makefile.am): Likewise.
7424         * modules/xgetcwd (Makefile.am): Likewise.
7425         * modules/xnanosleep (Makefile.am): Likewise.
7426         * modules/xreadlink (Makefile.am): Likewise.
7427         * modules/xstrtod (Makefile.am): Likewise.
7428         * modules/xstrtol (Makefile.am): Likewise.
7429         * modules/xstrtold (Makefile.am): Likewise.
7430         * modules/yesno (Makefile.am): Likewise.
7431         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
7432
7433 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7434
7435         * modules/error (Makefile.am): Distribute files through
7436         EXTRA_DIST, not lib_SOURCES.
7437
7438 2006-10-12  Eric Blake  <ebb9@byu.net>
7439
7440         * modules/error (Makefile.am): Distribute files in /lib.
7441         * modules/obstack (Makefile.am): Likewise.
7442
7443 2006-10-12  Bruno Haible  <bruno@clisp.org>
7444
7445         * modules/acl (Makefile.am): Distribute all files in lib/ through
7446         EXTRA_DIST.
7447         * modules/arcfour (Makefile.am): Likewise.
7448         * modules/arctwo (Makefile.am): Likewise.
7449         * modules/argmatch (Makefile.am): Likewise.
7450         * modules/argz (Makefile.am): Likewise.
7451         * modules/atexit (Makefile.am): Likewise.
7452         * modules/backupfile (Makefile.am): Likewise.
7453         * modules/c-strtod (Makefile.am): Likewise.
7454         * modules/c-strtold (Makefile.am): Likewise.
7455         * modules/calloc (Makefile.am): Likewise.
7456         * modules/canon-host (Makefile.am): Likewise.
7457         * modules/canonicalize (Makefile.am): Likewise.
7458         * modules/chdir-long (Makefile.am): Likewise.
7459         * modules/chdir-safer (Makefile.am): Likewise.
7460         * modules/check-version (Makefile.am): Likewise.
7461         * modules/chown (Makefile.am): Likewise.
7462         * modules/cloexec (Makefile.am): Likewise.
7463         * modules/close-stream (Makefile.am): Likewise.
7464         * modules/closeout (Makefile.am): Likewise.
7465         * modules/crc (Makefile.am): Likewise.
7466         * modules/cycle-check (Makefile.am): Likewise.
7467         * modules/des (Makefile.am): Likewise.
7468         * modules/dirfd (Makefile.am): Likewise.
7469         * modules/dirname (Makefile.am): Likewise.
7470         * modules/dup2 (Makefile.am): Likewise.
7471         * modules/euidaccess (Makefile.am): Likewise.
7472         * modules/exclude (Makefile.am): Likewise.
7473         * modules/exitfail (Makefile.am): Likewise.
7474         * modules/fcntl-safer (Makefile.am): Likewise.
7475         * modules/file-type (Makefile.am): Likewise.
7476         * modules/fileblocks (Makefile.am): Likewise.
7477         * modules/filemode (Makefile.am): Likewise.
7478         * modules/filenamecat (Makefile.am): Likewise.
7479         * modules/fnmatch (Makefile.am): Likewise.
7480         * modules/fopen-safer (Makefile.am): Likewise.
7481         * modules/fpending (Makefile.am): Likewise.
7482         * modules/fprintftime (Makefile.am): Likewise.
7483         * modules/free (Makefile.am): Likewise.
7484         * modules/fsusage (Makefile.am): Likewise.
7485         * modules/ftruncate (Makefile.am): Likewise.
7486         * modules/fts (Makefile.am): Likewise.
7487         * modules/gc (Makefile.am): Likewise.
7488         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
7489         * modules/getaddrinfo (Makefile.am): Likewise.
7490         * modules/getcwd (Makefile.am): Likewise.
7491         * modules/getdelim (Makefile.am): Likewise.
7492         * modules/getdomainname (Makefile.am): Likewise.
7493         * modules/getgroups (Makefile.am): Likewise.
7494         * modules/gethostname (Makefile.am): Likewise.
7495         * modules/gethrxtime (Makefile.am): Likewise.
7496         * modules/getline (Makefile.am): Likewise.
7497         * modules/getloadavg (Makefile.am): Likewise.
7498         * modules/getlogin_r (Makefile.am): Likewise.
7499         * modules/getopt (Makefile.am): Likewise.
7500         * modules/getpass (Makefile.am): Likewise.
7501         * modules/getpass-gnu (Makefile.am): Likewise.
7502         * modules/getsubopt (Makefile.am): Likewise.
7503         * modules/gettime (Makefile.am): Likewise.
7504         * modules/gettimeofday (Makefile.am): Likewise.
7505         * modules/getugroups (Makefile.am): Likewise.
7506         * modules/getusershell (Makefile.am): Likewise.
7507         * modules/glob (Makefile.am): Likewise.
7508         * modules/group-member (Makefile.am): Likewise.
7509         * modules/hard-locale (Makefile.am): Likewise.
7510         * modules/hash (Makefile.am): Likewise.
7511         * modules/hmac-md5 (Makefile.am): Likewise.
7512         * modules/hmac-sha1 (Makefile.am): Likewise.
7513         * modules/human (Makefile.am): Likewise.
7514         * modules/idcache (Makefile.am): Likewise.
7515         * modules/imaxabs (Makefile.am): Likewise.
7516         * modules/imaxdiv (Makefile.am): Likewise.
7517         * modules/inet_ntop (Makefile.am): Likewise.
7518         * modules/inet_pton (Makefile.am): Likewise.
7519         * modules/inttostr (Makefile.am): Likewise.
7520         * modules/isapipe (Makefile.am): Likewise.
7521         * modules/lchown (Makefile.am): Likewise.
7522         * modules/long-options (Makefile.am): Likewise.
7523         * modules/lstat (Makefile.am): Likewise.
7524         * modules/malloc (Makefile.am): Likewise.
7525         * modules/mathl (Makefile.am): Likewise.
7526         * modules/mbchar (Makefile.am): Likewise.
7527         * modules/md2 (Makefile.am): Likewise.
7528         * modules/md4 (Makefile.am): Likewise.
7529         * modules/md5 (Makefile.am): Likewise.
7530         * modules/memcasecmp (Makefile.am): Likewise.
7531         * modules/memchr (Makefile.am): Likewise.
7532         * modules/memcmp (Makefile.am): Likewise.
7533         * modules/memcoll (Makefile.am): Likewise.
7534         * modules/memcpy (Makefile.am): Likewise.
7535         * modules/memmem (Makefile.am): Likewise.
7536         * modules/memmove (Makefile.am): Likewise.
7537         * modules/mempcpy (Makefile.am): Likewise.
7538         * modules/memrchr (Makefile.am): Likewise.
7539         * modules/memset (Makefile.am): Likewise.
7540         * modules/memxor (Makefile.am): Likewise.
7541         * modules/mkancesdirs (Makefile.am): Likewise.
7542         * modules/mkdir (Makefile.am): Likewise.
7543         * modules/mkdir-p (Makefile.am): Likewise.
7544         * modules/mkdtemp (Makefile.am): Likewise.
7545         * modules/mkstemp (Makefile.am): Likewise.
7546         * modules/mktime (Makefile.am): Likewise.
7547         * modules/modechange (Makefile.am): Likewise.
7548         * modules/mountlist (Makefile.am): Likewise.
7549         * modules/nanosleep (Makefile.am): Likewise.
7550         * modules/openat (Makefile.am): Likewise.
7551         * modules/pagealign_alloc (Makefile.am): Likewise.
7552         * modules/physmem (Makefile.am): Likewise.
7553         * modules/poll (Makefile.am): Likewise.
7554         * modules/posixtm (Makefile.am): Likewise.
7555         * modules/posixver (Makefile.am): Likewise.
7556         * modules/putenv (Makefile.am): Likewise.
7557         * modules/quote (Makefile.am): Likewise.
7558         * modules/quotearg (Makefile.am): Likewise.
7559         * modules/raise (Makefile.am): Likewise.
7560         * modules/read-file (Makefile.am): Likewise.
7561         * modules/readline (Makefile.am): Likewise.
7562         * modules/readlink (Makefile.am): Likewise.
7563         * modules/readtokens (Makefile.am): Likewise.
7564         * modules/readutmp (Makefile.am): Likewise.
7565         * modules/realloc (Makefile.am): Likewise.
7566         * modules/regex (Makefile.am): Likewise.
7567         * modules/rename (Makefile.am): Likewise.
7568         * modules/rename-dest-slash (Makefile.am): Likewise.
7569         * modules/rijndael (Makefile.am): Likewise.
7570         * modules/rmdir (Makefile.am): Likewise.
7571         * modules/rpmatch (Makefile.am): Likewise.
7572         * modules/safe-read (Makefile.am): Likewise.
7573         * modules/safe-write (Makefile.am): Likewise.
7574         * modules/same (Makefile.am): Likewise.
7575         * modules/save-cwd (Makefile.am): Likewise.
7576         * modules/savedir (Makefile.am): Likewise.
7577         * modules/setenv (Makefile.am): Likewise.
7578         * modules/settime (Makefile.am): Likewise.
7579         * modules/sha1 (Makefile.am): Likewise.
7580         * modules/sig2str (Makefile.am): Likewise.
7581         * modules/snprintf (Makefile.am): Likewise.
7582         * modules/stdlib-safer (Makefile.am): Likewise.
7583         * modules/stpcpy (Makefile.am): Likewise.
7584         * modules/stpncpy (Makefile.am): Likewise.
7585         * modules/strcase (Makefile.am): Likewise.
7586         * modules/strcasestr (Makefile.am): Likewise.
7587         * modules/strchrnul (Makefile.am): Likewise.
7588         * modules/strcspn (Makefile.am): Likewise.
7589         * modules/strdup (Makefile.am): Likewise.
7590         * modules/strerror (Makefile.am): Likewise.
7591         * modules/strftime (Makefile.am): Likewise.
7592         * modules/strndup (Makefile.am): Likewise.
7593         * modules/strnlen (Makefile.am): Likewise.
7594         * modules/strpbrk (Makefile.am): Likewise.
7595         * modules/strsep (Makefile.am): Likewise.
7596         * modules/strstr (Makefile.am): Likewise.
7597         * modules/strtod (Makefile.am): Likewise.
7598         * modules/strtoimax (Makefile.am): Likewise.
7599         * modules/strtok_r (Makefile.am): Likewise.
7600         * modules/strtol (Makefile.am): Likewise.
7601         * modules/strtoll (Makefile.am): Likewise.
7602         * modules/strtoul (Makefile.am): Likewise.
7603         * modules/strtoull (Makefile.am): Likewise.
7604         * modules/strtoumax (Makefile.am): Likewise.
7605         * modules/strverscmp (Makefile.am): Likewise.
7606         * modules/time_r (Makefile.am): Likewise.
7607         * modules/timegm (Makefile.am): Likewise.
7608         * modules/tmpfile-safer (Makefile.am): Likewise.
7609         * modules/unistd-safer (Makefile.am): Likewise.
7610         * modules/unlinkdir (Makefile.am): Likewise.
7611         * modules/userspec (Makefile.am): Likewise.
7612         * modules/utime (Makefile.am): Likewise.
7613         * modules/utimecmp (Makefile.am): Likewise.
7614         * modules/utimens (Makefile.am): Likewise.
7615         * modules/vasnprintf (Makefile.am): Likewise.
7616         * modules/vasprintf (Makefile.am): Likewise.
7617         * modules/vsnprintf (Makefile.am): Likewise.
7618         * modules/xalloc (Makefile.am): Likewise.
7619         * modules/xgetcwd (Makefile.am): Likewise.
7620         * modules/xnanosleep (Makefile.am): Likewise.
7621         * modules/xreadlink (Makefile.am): Likewise.
7622         * modules/xstrtod (Makefile.am): Likewise.
7623         * modules/xstrtol (Makefile.am): Likewise.
7624         * modules/xstrtold (Makefile.am): Likewise.
7625         * modules/yesno (Makefile.am): Likewise.
7626
7627 2006-10-12  Jim Meyering  <jim@meyering.net>
7628
7629         * m4/getloadavg.m4: Revert the change below.
7630
7631         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
7632         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
7633         fail with a symlink, which is what coreutils' ./bootstrap now
7634         creates by default.
7635
7636 2006-10-12  Bruno Haible  <bruno@clisp.org>
7637
7638         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
7639         mingw.
7640         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
7641         MSVC and mingw explicitly.
7642
7643 2006-10-11  Simon Josefsson  <jas@extundo.com>
7644             Bruno Haible  <bruno@clisp.org>
7645
7646         Add support for multiple gnulib-tool invocations in the scope of a
7647         single configure.ac file.
7648         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
7649         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
7650         with the same contents as the _LIBADD variable.
7651         (func_emit_initmacro_start, func_emit_initmacro_end,
7652         func_emit_initmacro_done): New functions.
7653         (func_import, func_create_testdir): Invoke them. Allow the identifiers
7654         gl_LIBOBJS and gl_LTLIBOBJS.
7655
7656 2006-10-11  Bruno Haible  <bruno@clisp.org>
7657
7658         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
7659         (func_create_testdir): Don't create po/Makefile.am, don't invoke
7660         autoreconf. Instead, invoke autopoint explicitly but move back the
7661         *.m4 files from gnulib.
7662
7663 2006-10-11  Bruno Haible  <bruno@clisp.org>
7664
7665         * gnulib-tool (func_usage): Make module names after --create-testdir
7666         optional.
7667         (func_create_testdir): If no module was specified, use nearly all
7668         modules.
7669
7670 2006-10-12  Jim Meyering  <jim@meyering.net>
7671
7672         Big performance improvement for fts-based tools that use FTS_NOSTAT.
7673         Avoid spurious inode-mismatch problems on non-POSIX file systems.
7674         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
7675         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
7676         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
7677         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
7678         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
7679         (fts_set_stat_required): New function.
7680         (fts_open): Defer the calls to fts_stat, if possible or requested.
7681         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
7682         into fts_stat itself.
7683         (fts_read): Perform any required (deferred) fts_stat call.
7684         (fts_build): Likewise, for the directory we're about to open and read.
7685         In the readdir loop, carefully decide whether each entry will require
7686         an eventual call to fts_stat, using dirent.d_type info if available.
7687         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
7688         a command line argument into this function.  Update all callers.
7689         Map a return value of FTS_DOT to FTS_D for a command line argument.
7690         * modules/fts (Depends-on): Add d-type.  Alphabetize.
7691         Thanks to Miklos Szeredi for his tenacity and for the initial
7692         bug report about "find" failing on a FUSE-based file system.
7693
7694         * lib/fts.c (fts_open): Use consistent indentation.
7695
7696 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7697
7698         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
7699         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
7700         reported by Jim Meyering.  All uses of cache variables renamed
7701         to match Autoconf's.
7702         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
7703         the other one.
7704
7705         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
7706         Fix misspelling in diagnostic.
7707
7708 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7709
7710         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
7711         defined.  Problem reported by Matthew Woehlke.
7712
7713         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
7714         Add support for Tandem NonStop R series.
7715         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
7716         Use new macro.
7717
7718         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
7719         (has_trailing_slash): Omit size arg; all callers changed.
7720         Omit 'inline', since it doesn't help performance and we'd
7721         need to configure it.
7722         Don't count //, ///, etc. as having a trailing slash.
7723         As a side effect, this removes a C99ism reported by Matthew Woehlke.
7724         (rpl_rename_dest_slash): On failure, use rename's errno rather
7725         than (in some cases) an incorrect or junk errno.
7726         Simplify code by removing need to compute length; this does
7727         cause it to make two passes instead of one over the file name,
7728         but it's worth it.
7729
7730         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
7731         change, since Autoconf's version may no longer be appropriate now
7732         that we are using CVS Autoconf's version.  Add support for Tandem.
7733
7734 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7735             Bruno Haible  <bruno@clisp.org>
7736
7737         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
7738         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
7739         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
7740         gl_AC_TYPE_LONG_LONG.
7741
7742         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
7743         instead of HAVE_LONG_LONG.
7744         * lib/printf-args.c (printf_fetchargs): Likewise.
7745         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
7746         * lib/vasnprintf.c (VASNPRINTF): Likewise.
7747         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
7748         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
7749         gl_AC_TYPE_LONG_LONG.
7750
7751 2006-10-11  Bruno Haible  <bruno@clisp.org>
7752
7753         * m4/longlong.m4: Add comments.
7754         * m4/ulonglong.m4: Likewise.
7755
7756 2006-10-10  Bruno Haible  <bruno@clisp.org>
7757
7758         Make it possible to #define stpcpy, strdup to aliases.
7759         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
7760         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
7761
7762 2006-10-10  Bruno Haible  <bruno@clisp.org>
7763
7764         Make it possible to #define gcd to an alias.
7765         * lib/gcd.c: Include config.h.
7766
7767 2006-10-10  Bruno Haible  <bruno@clisp.org>
7768
7769         Make it possible to #define c_isascii to an alias.
7770         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
7771         defined. Undefine the macros before defining them, to avoid gcc
7772         warnings.
7773         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
7774         define NO_C_CTYPE_MACROS early.
7775
7776 2006-10-10  Bruno Haible  <bruno@clisp.org>
7777
7778         Make it possible to #define set_program_name to an alias.
7779         * lib/progname.c: Don't undefine set_program_name; instead, undefine
7780         ENABLE_RELOCATABLE early.
7781
7782 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7783
7784         Port to Tandem NSK OSS, which has 64-bit signed int but at most
7785         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
7786         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
7787         More generally, don't assume that 64-bit signed int is available
7788         if unsigned int is, and vice versa.
7789         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
7790         unsigned symbols, not on their signed counterparts.
7791         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
7792         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
7793         (UINT64_C, UINTMAX_C):
7794         Likewise.
7795         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
7796         unsigned counterparts.
7797         (Have_long_long, Unsigned): New macros.
7798         (Int): Renamed from INT.
7799         (strtoimax): Use the new macros.
7800         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
7801         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
7802         * modules/inttypes (inttypes.h): Substitute
7803         HAVE_UNSIGNED_LONG_LONG_INT.
7804         * modules/stdint (stdint.h): Likewise.
7805         (Files): Add m4/ulonglong.m4.
7806
7807 2006-10-10  Bruno Haible  <bruno@clisp.org>
7808
7809         Fix a gcc -Wshadow warning.
7810         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
7811         to 'bucket'.
7812         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
7813         gl_linked_indexof_from_to): Likewise.
7814         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
7815         Likewise.
7816         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
7817         Likewise.
7818         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
7819         Reported by Eric Blake.
7820
7821 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
7822
7823         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
7824         for NetBSD.  Problem reported by Bruno Haible.
7825
7826 2006-10-09  Jim Meyering  <jim@meyering.net>
7827
7828         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
7829         Patch from Bruno Haible.
7830
7831 2006-10-09  Jim Meyering  <jim@meyering.net>
7832
7833         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
7834         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
7835         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
7836
7837 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7838
7839         Don't include <config.h> twice; this doesn't work in some cases,
7840         e.g., when config.h has "#define intmax_t long long int" and
7841         we include <config.h>, <inttypes.h>, <config.h> in that order.
7842         Problem reported by Matthew Woehlke in:
7843         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
7844         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
7845         * lib/fts-cycle.c: Don't include config.h.
7846         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
7847         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
7848         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
7849         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
7850         inttypes.h.
7851         * lib/xstrtoumax.c: Likewise.
7852         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
7853         __strtol and the like, so that this module is more like its siblings.
7854         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
7855         Remove; no longer needed now that we assume gnulib inttypes.h.
7856
7857 2006-10-08  Bruno Haible  <bruno@clisp.org>
7858
7859         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
7860         option.
7861
7862 2006-10-07  Jim Meyering  <jim@meyering.net>
7863
7864         * modules/inttypes (inttypes.h): Revert what seems to have been
7865         an inadvertent part of today's change: use "|", not "/" in the
7866         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
7867
7868 2006-10-07  Bruno Haible  <bruno@clisp.org>
7869
7870         * modules/sublist: New file.
7871
7872 2006-10-07  Bruno Haible  <bruno@clisp.org>
7873
7874         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
7875         * modules/argz (argz.h): Likewise.
7876         * modules/arpa_inet (arpa/inet.h): Likewise.
7877         * modules/byteswap (byteswap.h): Likewise.
7878         * modules/configmake (configmake.h): Likewise.
7879         * modules/fcntl (fcntl.h): Likewise.
7880         * modules/fnmatch (fnmatch.h): Likewise.
7881         * modules/getopt (getopt.h): Likewise.
7882         * modules/glob (glob.h): Likewise.
7883         * modules/inttypes (inttypes.h): Likewise.
7884         * modules/netinet_in (netinet/in.h): Likewise.
7885         * modules/poll (poll.h): Likewise.
7886         * modules/stdbool (stdbool.h): Likewise.
7887         * modules/stdint (stdint.h): Likewise.
7888         * modules/sys_select (sys/select.h): Likewise.
7889         * modules/sys_socket (sys/socket.h): Likewise.
7890         * modules/sys_stat (sys/stat.h): Likewise.
7891         * modules/sysexits (sysexits.h): Likewise.
7892         * modules/unistd (unistd.h): Likewise.
7893         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7894         Add a "DO NOT EDIT" comment to the generated file.
7895         (func_import): Likewise for gnulib-comp.m4.
7896
7897 2006-10-07  Bruno Haible  <bruno@clisp.org>
7898
7899         * lib/gl_sublist.h: New file.
7900         * lib/gl_sublist.c: New file.
7901
7902 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7903
7904         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
7905         name (relative to the original working directory) and the file
7906         name component (relative to the temporary working directory).  All
7907         callers changed.
7908         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
7909         * lib/mkdir-p.c (make_dir_parents): Likewise.
7910         * lib/mkdir-p.h (make_dir_parents): Likewise.
7911
7912 2006-10-06  Eric Blake  <ebb9@byu.net>
7913
7914         Define several macros for use by the clean-temp module.
7915         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
7916         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
7917         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
7918
7919         * lib/clean-temp.h (close_stream_temp): New declaration.
7920         * lib/clean-temp.c (includes): Pull in headers according to what
7921         other modules are in use.
7922         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
7923
7924 2006-10-06  Bruno Haible  <bruno@clisp.org>
7925
7926         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
7927         instead of fopen, fwriteerror.
7928
7929 2006-10-06  Bruno Haible  <bruno@clisp.org>
7930
7931         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
7932         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
7933         int.
7934         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
7935         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
7936         Return an error indicator.
7937         Suggested by Eric Blake.
7938
7939 2006-10-06  Bruno Haible  <bruno@clisp.org>
7940
7941         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
7942         Reported by Eric Blake.
7943
7944 2006-10-06  Bruno Haible  <bruno@clisp.org>
7945
7946         * modules/closeout (Description): Mention stderr too.
7947
7948 2006-10-06  Bruno Haible  <bruno@clisp.org>
7949         and Paul Eggert  <eggert@cs.ucla.edu>
7950
7951         * lib/closeout.c (close_stdout): Also close stderr.
7952         * lib/closeout.h: Update comment.
7953
7954 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7955
7956         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
7957         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
7958         * lib/dirchownmod.c: Include lchown.h.
7959         * lib/lchown.c: Don't include files that lchown.h now includes.
7960         Don't declare chown, since lchown.h now does that.
7961         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
7962         (lchown): Define to rpl_chown if lchown is declared but
7963         does not exist.  Declare using a prototype if lchown is not
7964         declared.  Add a copyright notice.
7965         * lib/mkstemp.h: Include <unistd.h>.
7966         * lib/openat.c: Include lchown.h.
7967
7968         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
7969         we now test for that separately.
7970         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
7971         rather than O_NOFOLLOW, when testing whether it's possible to
7972         avoid a race condition reliably.
7973         * lib/savewd.c (savewd_chdir): Likewise.
7974
7975         Remove macros that are no longer needed now that stdint.h is
7976         reliable.
7977         * lib/fsusage.c (UINTMAX_MAX): Remove.
7978         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
7979         * lib/utimecmp.c (SIZE_MAX): Remove.
7980
7981         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
7982
7983         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
7984         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
7985         O_NOATIME works.
7986
7987 2006-10-05  Bruno Haible  <bruno@clisp.org>
7988
7989         * lib/gl_list.h (gl_sortedlist_search_from_to,
7990         gl_sortedlist_indexof_from_to): New declarations.
7991         (gl_list_implementation): New fields sortedlist_search_from_to,
7992         sortedlist_indexof_from_to.
7993         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
7994         inline functions.
7995         * lib/gl_list.c (gl_sortedlist_search_from_to,
7996         gl_sortedlist_indexof_from_to): New functions.
7997         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
7998         function.
7999         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
8000         (gl_array_sortedlist_search_from_to): New function.
8001         (gl_array_list_implementation): Update.
8002         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
8003         function.
8004         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
8005         (gl_carray_sortedlist_search_from_to): New function.
8006         (gl_carray_list_implementation): Update.
8007         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
8008         gl_linked_sortedlist_indexof_from_to): New functions.
8009         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
8010         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
8011         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
8012         gl_tree_sortedlist_indexof_from_to): New functions.
8013         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
8014         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
8015         Update.
8016         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
8017         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
8018         Update.
8019
8020 2006-10-05  Bruno Haible  <bruno@clisp.org>
8021
8022         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
8023         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
8024         (struct gl_list_implementation): Add fields search_from_to,
8025         indexof_from_to. Remove fields search, indexof.
8026         (gl_list_search): Use the search_from_to method.
8027         (gl_list_search_from, gl_list_search_from_to): New functions.
8028         (gl_list_indexof): Use the indexof_from_to method.
8029         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
8030         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
8031         (gl_list_search_from, gl_list_search_from_to): New functions.
8032         (gl_list_indexof): Use the indexof_from_to method.
8033         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
8034         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
8035         gl_array_indexof. Add start_index, end_index arguments.
8036         (gl_array_search_from_to): Renamed from gl_array_search. Add
8037         start_index, end_index arguments.
8038         (gl_array_remove, gl_array_list_implementation): Update.
8039         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
8040         gl_carray_indexof. Add start_index, end_index arguments.
8041         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
8042         start_index, end_index arguments.
8043         (gl_carray_remove, gl_carray_list_implementation): Update.
8044         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
8045         gl_linked_search. Add start_index, end_index arguments.
8046         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
8047         start_index, end_index arguments.
8048         (gl_linked_remove): Update.
8049         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
8050         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
8051         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
8052         field to 'size_t'.
8053         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
8054         gl_tree_search. Add start_index, end_index arguments.
8055         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
8056         start_index, end_index arguments.
8057         (gl_tree_remove): Update.
8058         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
8059         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
8060         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
8061         function.
8062         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
8063         gl_tree_search. Add start_index, end_index arguments.
8064         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
8065         start_index, end_index arguments.
8066         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
8067         Update.
8068         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
8069
8070 2006-10-05  Bruno Haible  <bruno@clisp.org>
8071
8072         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
8073
8074         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
8075         fwriteerror_temp): New declarations.
8076         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
8077         (descriptors): New variable.
8078         (cleanup): First, close the descriptors.
8079         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
8080         fclose_temp, fwriteerror_temp): New functions.
8081
8082 2006-10-04  Jim Meyering  <jim@meyering.net>
8083
8084         * lib/fts.c (fts_open): Tiny comment change.
8085
8086 2006-10-04  Bruno Haible  <bruno@clisp.org>
8087
8088         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
8089         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
8090         gl_LOCK_BODY.
8091         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
8092         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
8093         gl_LOCK_EARLY_BODY.
8094         (gl_LOCK): Require gl_LOCK_BODY.
8095
8096 2006-10-04  Bruno Haible  <bruno@clisp.org>
8097
8098         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
8099         (gl_oset_search_atleast): New declaration.
8100         (struct gl_oset_implementation): Add field 'search_atleast'.
8101         (gl_oset_search_atleast): New inline function.
8102         * lib/gl_oset.c (gl_oset_search_atleast): New function.
8103         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
8104         (gl_array_oset_implementation): Update.
8105         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
8106         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
8107         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
8108
8109 2006-10-04  Bruno Haible  <bruno@clisp.org>
8110
8111         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
8112
8113 2006-10-03  Bruno Haible  <bruno@clisp.org>
8114
8115         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
8116         from gl_avltreehash_list_implementation.
8117
8118 2006-10-03  Bruno Haible  <bruno@clisp.org>
8119
8120         * lib/gl_oset.c (gl_oset_add): Fix return type.
8121
8122 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
8123
8124         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
8125
8126 2006-10-02  Eric Blake  <ebb9@byu.net>
8127
8128         * modules/strnlen (Depends-on): Add extensions.
8129
8130 2006-10-02  Eric Blake  <ebb9@byu.net>
8131
8132         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
8133         definition in 2.60+.
8134
8135 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
8136
8137         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
8138         checks.
8139
8140 2006-10-02  Bruno Haible  <bruno@clisp.org>
8141
8142         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
8143         to the AUTOMAKE_OPTIONS.
8144         Reported by Jim Meyering.
8145
8146 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8147
8148         Work around bug in Solaris 10 /proc file system:
8149         /proc/self/fd/NNN/.. isn't the parent directory of
8150         the directory whose file descriptor is NNN.  This needs to
8151         be worked around at run time, not compile time, since a
8152         program might be built on Solaris 8, where things work, and
8153         run on Solaris 10.
8154         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
8155         to use the following interface instead:
8156         (OPENAT_BUFFER_SIZE): New macro.
8157         (openat_proc_name): New function.
8158         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
8159         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
8160         Likewise.
8161         * lib/openat-proc.c: New file.
8162         * modules/openat (Files): Add lib/openat-proc.c.
8163         (Depends-on): Add same-inode, stdbool.
8164         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
8165
8166 2006-09-29  Bruno Haible  <bruno@clisp.org>
8167
8168         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
8169         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
8170         argument. Set stdout_closed before testing for ferror, not after.
8171         (fwriteerror, fwriteerror_no_ebadf): New functions.
8172
8173 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8174
8175         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
8176
8177 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
8178
8179         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
8180         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
8181
8182 2006-09-28  Jim Meyering  <jim@meyering.net>
8183
8184         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
8185         Include <unistd.h>.
8186
8187 2006-09-28  Bruno Haible  <bruno@clisp.org>
8188
8189         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
8190         * modules/linkedhash-list (Depends-on): Likewise.
8191         * modules/rbtreehash-list (Depends-on): Likewise.
8192
8193 2006-09-28  Bruno Haible  <bruno@clisp.org>
8194
8195         * lib/strndup.h: Simplify the redefinition of strndup.
8196         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
8197         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
8198
8199 2006-09-28  Bruno Haible  <bruno@clisp.org>
8200
8201         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
8202         * lib/gl_linkedhash_list.c: Likewise.
8203         * lib/gl_rbtreehash_list.c: Likewise.
8204
8205 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8206
8207         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
8208         getaddrinfo.
8209
8210         * lib/__fpending.h: Don't include <stdio_ext.h> unless
8211         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
8212         it causes <stdio_ext.h> to cause a compile-time error.
8213         Problem reported by Nelson H. F. Beebe.
8214         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
8215         of HAVE_DECL___PENDING.
8216
8217         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
8218         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
8219         declaration.
8220
8221 2006-09-27  Jim Meyering  <jim@meyering.net>
8222
8223         This file could end up with a definition for a function
8224         named __strndup, rather than rpl_strndup on a system with
8225         incomplete weak_alias support.
8226         * lib/strndup.c (strndup): Rename from __strndup.
8227         Remove #defines that used to map __strndup to strndup.
8228         Don't use K&R prototypes.
8229         Remove LIBC-related code, since this file is not sync'd with glibc.
8230         * lib/strndup.h: Revamp, accordingly.
8231         * m4/strndup.m4: Modernize.
8232
8233 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8234
8235         * modules/savewd (Depends-on): Add 'raise'.
8236         * lib/savewd.c: Include <signal.h>, for 'raise'.
8237
8238 2006-09-26  Jim Meyering  <jim@meyering.net>
8239
8240         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
8241         when we detect Darwin 8.7.0's acl_get_file bug.
8242         Rearrange to perform the new (below) run-test while $LIBS
8243         contains any acl-related library.  Set USE_ACL at the end.
8244         (gl_ACL_GET_FILE): New function.
8245
8246 2006-09-26  Eric Blake  <ebb9@byu.net>
8247
8248         * lib/verror.c: Include <config.h> unconditionally.
8249
8250 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
8251
8252         * modules/clock-time (Maintainer): Add self.
8253         * modules/getlogin_r (Depends-on): Add extensions.
8254
8255 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8256
8257         * modules/clock-time: New module.
8258         * modules/nanosleep (Depends-on): Add clock-time.
8259         * modules/gethrxtime (Depends-on): Likewise.
8260         * modules/gettime (Depends-on): Likewise.
8261         * modules/settime (Depends-on): Likewise.
8262
8263         * modules/fts-lgpl: Depend on openat.
8264         * modules/mkancesdirs: Depend on savewd.
8265         * modules/mkdir-p: Likewise.
8266
8267 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8268
8269         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
8270
8271         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
8272         `gl_have_arbitrary_file_name_length_limit' to
8273         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
8274         actually works between configure runs.
8275
8276 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8277             Bruno Haible  <bruno@clisp.org>
8278
8279         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
8280
8281 2006-09-25  Jim Meyering  <jim@meyering.net>
8282
8283         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
8284         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
8285
8286 2006-09-25  Eric Blake  <ebb9@byu.net>
8287
8288         * gnulib-tool (func_import, func_create_testdir): Fix typos in
8289         exec's in 2006-09-18 patch when shuffling fds.
8290
8291 2006-09-25  Bruno Haible  <bruno@clisp.org>
8292
8293         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
8294         Reported by Jim Meyering.
8295
8296 2006-09-24  Jim Meyering  <jim@meyering.net>
8297
8298         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
8299         compare a pointer against a literal "0".  That caused failures with
8300         at least HP-UX's hpcc.
8301
8302 2006-09-22  Simon Josefsson  <jas@extundo.com>
8303
8304         * modules/gc-sha1:
8305         * modules/gc-md4:
8306         * modules/gc-hmac-sha1:
8307         * modules/gc-hmac-md5:
8308         * modules/gc-des:
8309         * modules/gc-arcfour: Distribute more files.
8310
8311 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8312
8313         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
8314         (gl_linked_iterator_from_to): Initialize struct completely.
8315         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
8316         (gl_tree_iterator_from_to): Likewise
8317         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
8318         * lib/gl_array_list.c [lint] (gl_array_iterator)
8319         (gl_array_iterator_from_to): Likewise.
8320         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
8321         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
8322         (gl_carray_iterator_from_to): Likewise.
8323
8324         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
8325         * lib/md4.c (md4_process_block): Remove unused variable.
8326         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
8327         parentheses for clarity.
8328
8329 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8330
8331         * modules/bison-i18n (Depends-on): Add gettext.
8332
8333 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8334
8335         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
8336         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
8337         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
8338         also add missing comma that caused broken test.
8339         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
8340         stdlib.h, for `abort'.
8341         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
8342         variables.
8343         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
8344         include unistd.h if present, for `rmdir'.
8345         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
8346         variables.
8347         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
8348         in the process include standard headers for prototypes.
8349         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
8350         gets declared on GNU/Linux.
8351         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
8352         unistd.h, for `rmdir'.
8353         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
8354
8355         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
8356         always true.
8357         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
8358
8359         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
8360
8361 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8362
8363         * gnulib-tool (func_version): Create output all at once.  This
8364         may help avoid triggering unnecessary SIGPIPEs, and at any
8365         rate it doesn't hurt.
8366
8367 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8368             Bruno Haible  <bruno@clisp.org>
8369
8370         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
8371         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8372         * m4/signed.m4 (bh_C_SIGNED): Likewise.
8373
8374         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
8375         (gl_FUNC_VASPRINTF): Invoke it.
8376
8377 2006-09-22  Bruno Haible  <bruno@clisp.org>
8378
8379         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
8380         getloadavg.c as first argument.
8381
8382 2006-09-22  Bruno Haible  <bruno@clisp.org>
8383
8384         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
8385         at the beginning of the gl_INIT macro.
8386         * modules/getloadavg (configure.ac): Pass $gl_source_base to
8387         gl_GETLOADAVG.
8388
8389 2006-09-22  Bruno Haible  <bruno@clisp.org>
8390
8391         * gnulib-tool (func_create_megatestdir): Don't include the config-h
8392         module.
8393         Suggested by Ralf Wildenhues.
8394
8395 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
8396
8397         Import this patch from libc:
8398
8399         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
8400
8401         * lib/regex_internal.c (re_string_reconstruct): Handle
8402         offset < pstr->valid_raw_len && pstr->offsets_needed case.
8403         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
8404         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
8405         re_string_context_at.
8406
8407         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
8408         now requires it.
8409         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
8410         gl_REGEX now does it for us.
8411         (gl_REGEX): Add test taken from
8412         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
8413
8414         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
8415         Check that large offsets work.  Modernize Autoconf usages.
8416         Prefer "yes" to mean a good thing rather than a bad.
8417         Don't put "#define mkstemp" in config.h, as this might interfere
8418         with standard system headers that "#define mkstemp mkstemp64".
8419
8420         * modules/mkstemp (Depends-on): Add extensions, so that
8421         mkstemp is visible on some platforms.
8422         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
8423         (Include): Change to "mkstemp.h" from <stdlib.h>.
8424         (Files): Add mkstemp.h.
8425
8426         * lib/mkstemp.h: New file, since some standard headers
8427         #define mkstemp.
8428         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
8429         Include "mkstemp.h".
8430         Make the _LIBC code resemble glibc original more,
8431         e.g., use K&R style.
8432         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
8433         (mkstemp): Remove, since mkstemp.h does this for us.
8434         * lib/stdlib--.h: Include mkstemp.h.
8435
8436         Import this patch from libc:
8437
8438         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
8439
8440         * lib/tempname.c (__gen_tempname): Change attempts_min
8441         into a macro.  Use preprocessor to decide how to initialize
8442         attempts [Coverity CID 67].
8443
8444 2006-09-20  Bruno Haible  <bruno@clisp.org>
8445
8446         * lib/mkdtemp.c: Import from libc.
8447         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
8448                 * sysdeps/posix/tempname.c (__gen_tempname): Change
8449                 attempts_min into a macro.  Use preprocessor to decide how to
8450                 initialize attempts [Coverity CID 67].
8451         2001-11-27  Paul Eggert  <eggert@twinsun.com>
8452                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
8453                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
8454
8455 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8456
8457         * gnulib-tool (func_exit): New function, to allow to pass the
8458         exit status portably through the trap.  Use everywhere.
8459         (--help, --version): Signal a write error.
8460         (trap): catch SIGPIPE, for write errors.
8461         Exit at the end of the trap, with the correct exit status.
8462
8463 2006-09-19  Karl Berry  <karl@gnu.org>
8464
8465         * doc/gnulib.texi: note about the license texinfo files.
8466
8467 2006-09-19  Eric Blake  <ebb9@byu.net>
8468
8469         * gnulib-tool: Avoid space-tab.
8470
8471 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
8472
8473         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
8474         that prevented coreutils 6.1 from building.  Problem reported
8475         by Petter Reinholdtsen.
8476
8477 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
8478
8479         * gnulib-tool (avoidlist): Fix typo that broke options like
8480         --avoid=lock that are used by coreutils bootstrap.
8481
8482 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
8483
8484         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
8485         more systematically.
8486
8487 2006-09-18  Jim Meyering  <jim@meyering.net>
8488
8489         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
8490
8491 2006-09-18  Bruno Haible  <bruno@clisp.org>
8492
8493         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
8494
8495 2006-09-18  Bruno Haible  <bruno@clisp.org>
8496
8497         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
8498         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
8499         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
8500         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
8501         * m4/gettext.m4: Require autoconf >= 2.52.
8502         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
8503         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
8504         of gl_cv_header_inttypes_h.
8505
8506 2006-09-18  Bruno Haible  <bruno@clisp.org>
8507
8508         * lib/javaversion.c: Include configmake.h.
8509
8510 2006-09-18  Bruno Haible  <bruno@clisp.org>
8511
8512         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
8513         avoid that the while loops be executed in a subshell.
8514
8515 2006-09-18  Bruno Haible  <bruno@clisp.org>
8516
8517         * MODULES.html.sh (func_module): Break long lines.
8518         Suggested by Bruce Korb <bkorb@gnu.org>.
8519
8520 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8521
8522         Speed up by a factor of 1.12.
8523         * gnulib-tool (nl): New variable.
8524         (func_import): Rewrite include directive extraction to only read each
8525         directive once.
8526
8527 2006-09-17  Bruno Haible  <bruno@clisp.org>
8528
8529         * modules/javaversion (Makefile.am): Remove DEFS setting.
8530         (Depends-on): Add configmake, for PKGDATADIR definition.
8531
8532 2006-09-17  Bruno Haible  <bruno@clisp.org>
8533
8534         * gnulib-tool (func_create_testdir): Rewrite all files at once.
8535
8536 2006-09-17  Bruno Haible  <bruno@clisp.org>
8537
8538         * gnulib-tool (func_append): New function, stolen from libtool.m4.
8539         (func_modules_transitive_closure, func_modules_add_dummy,
8540         func_modules_to_filelist, func_import, func_create_testdir,
8541         func_create_megatestdir, ...): Use it wherever possible.
8542         Suggested by Ralf Wildenhues.
8543
8544 2006-09-16  Karl Berry  <karl@gnu.org>
8545
8546         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
8547         to avoid sectioning errors.
8548         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
8549         [ifinfo]: blank line after @center-ed titles.
8550         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
8551         Spell FSF address consistently with others.
8552         (These changes approved by rms.)
8553
8554 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8555
8556         Speed up by a factor of 1.61.
8557         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
8558         already checked module names again.
8559
8560 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8561
8562         Speed up by a factor of 1.13.
8563         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
8564         for new_files, and the input to func_add_or_update.
8565
8566 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8567
8568         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
8569         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
8570
8571 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8572
8573         * modules/mkancesdirs (Depends-on): Add fcntl.
8574         * modules/savewd: New file.
8575         * MODULES.html.sh (File system functions): Add savewd.
8576
8577         * modules/configmake (Makefile.am): Add support for the
8578         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
8579
8580 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8581
8582         * m4/savewd.m4: New file.
8583
8584 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8585
8586         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
8587         (dirchownmod): New arg FD.  All callers changed.
8588         Use FD rather than opening the directory ourself, as opening is
8589         now the caller's responsibility.
8590         * lib/dirchownmod.h: Likewise.
8591         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
8592         hosts that require <sys/types.h> before <sys/stat.h>.  Include
8593         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
8594         (test_dir): Remove.
8595         (mkancesdirs): Return length of prefix of FILE that has already
8596         been made, or -2 if there is a child doing the work.  Redo
8597         algorithm so that it is O(N) rather than O(N**2).  Optimize away
8598         ".", and treat ".." specially since it might stray back into
8599         already-created areas.  Use a subprocess if necessary.  New arg
8600         WD; all users changed.  MAKE_DIR function should now return 1
8601         if it creates a directory that is not readable.  Return -2 if
8602         a child process is spun off.
8603         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
8604         Adjust signature to match code.
8605         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
8606         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
8607         all users changed.
8608         * lib/savewd.c, lib/savewd.h: New files.
8609
8610 2006-09-15  Jim Meyering  <jim@meyering.net>
8611
8612         * modules/rename-dest-slash: New module.
8613         * MODULES.html.sh (posix_compat): Add it here.
8614
8615         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
8616
8617 2006-09-15  Jim Meyering  <jim@meyering.net>
8618
8619         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
8620         file.
8621
8622         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
8623
8624 2006-09-15  Jim Meyering  <jim@meyering.net>
8625
8626         * lib/rename-dest-slash.c (has_trailing_slash): Use
8627         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
8628         (rpl_rename_dest_slash): Perform the cheaper trailing slash
8629         test before testing whether SRC is a directory.
8630         Suggestions from Bruno Haible.
8631
8632         Avoid a warning about an unused variable.
8633         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
8634         into the #ifdef block where it's used.
8635
8636         * lib/rename-dest-slash.c: New file.
8637
8638 2006-09-14  Bruno Haible  <bruno@clisp.org>
8639
8640         * lib/allocsa.c: Include <config.h> unconditionally.
8641         * lib/asnprintf.c: Likewise.
8642         * lib/asprintf.c: Likewise.
8643         * lib/c-strcasecmp.c: Likewise.
8644         * lib/c-strcasestr.c: Likewise.
8645         * lib/c-strncasecmp.c: Likewise.
8646         * lib/c-strstr.c: Likewise.
8647         * lib/classpath.c: Likewise.
8648         * lib/clean-temp.c: Likewise.
8649         * lib/concatpath.c: Likewise.
8650         * lib/copy-file.c: Likewise.
8651         * lib/csharpcomp.c: Likewise.
8652         * lib/csharpexec.c: Likewise.
8653         * lib/execute.c: Likewise.
8654         * lib/fatal-signal.c: Likewise.
8655         * lib/findprog.c: Likewise.
8656         * lib/fwriteerror.c: Likewise.
8657         * lib/gl_array_list.c: Likewise.
8658         * lib/gl_array_oset.c: Likewise.
8659         * lib/gl_avltree_list.c: Likewise.
8660         * lib/gl_avltree_oset.c: Likewise.
8661         * lib/gl_avltreehash_list.c: Likewise.
8662         * lib/gl_carray_list.c: Likewise.
8663         * lib/gl_linked_list.c: Likewise.
8664         * lib/gl_linkedhash_list.c: Likewise.
8665         * lib/gl_list.c: Likewise.
8666         * lib/gl_oset.c: Likewise.
8667         * lib/gl_rbtree_list.c: Likewise.
8668         * lib/gl_rbtree_oset.c: Likewise.
8669         * lib/gl_rbtreehash_list.c: Likewise.
8670         * lib/imaxabs.c: Likewise.
8671         * lib/imaxdiv.c: Likewise.
8672         * lib/javacomp.c: Likewise.
8673         * lib/javaexec.c: Likewise.
8674         * lib/javaversion.c: Likewise.
8675         * lib/linebreak.c: Likewise.
8676         * lib/localcharset.c: Likewise.
8677         * lib/lock.c: Likewise.
8678         * lib/mbchar.c: Likewise.
8679         * lib/mbswidth.c: Likewise.
8680         * lib/mkdtemp.c: Likewise.
8681         * lib/pipe.c: Likewise.
8682         * lib/printf-args.c: Likewise.
8683         * lib/printf-parse.c: Likewise.
8684         * lib/progname.c: Likewise.
8685         * lib/progreloc.c: Likewise.
8686         * lib/readlink.c: Likewise.
8687         * lib/sh-quote.c: Likewise.
8688         * lib/stpcpy.c: Likewise.
8689         * lib/stpncpy.c: Likewise.
8690         * lib/strcasecmp.c: Likewise.
8691         * lib/strcasestr.c: Likewise.
8692         * lib/strcspn.c: Likewise.
8693         * lib/striconv.c: Likewise.
8694         * lib/strncasecmp.c: Likewise.
8695         * lib/strnlen1.c: Likewise.
8696         * lib/strstr.c: Likewise.
8697         * lib/strtok_r.c: Likewise.
8698         * lib/tls.c: Likewise.
8699         * lib/tmpdir.c: Likewise.
8700         * lib/unicodeio.c: Likewise.
8701         * lib/unsetenv.c: Likewise.
8702         * lib/vasnprintf.c: Likewise.
8703         * lib/vasprintf.c: Likewise.
8704         * lib/wait-process.c: Likewise.
8705         * lib/xallocsa.c: Likewise.
8706         * lib/xsetenv.c: Likewise.
8707         * lib/xstriconv.c: Likewise.
8708
8709 2006-09-13  Simon Josefsson  <jas@extundo.com>
8710
8711         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
8712         that internally, suggested by Ralf Wildenhues
8713         <Ralf.Wildenhues@gmx.de>.
8714
8715 2006-09-13  Simon Josefsson  <jas@extundo.com>
8716
8717         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
8718         @LIBOBJS@.
8719         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8720
8721 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
8722
8723         * lib/_fpending.c: Include <config.h> unconditionally, since we no
8724         longer worry about uses that don't define HAVE_CONFIG_H.
8725         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
8726         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
8727         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
8728         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
8729         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
8730         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
8731         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
8732         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
8733         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
8734         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
8735         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
8736         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
8737         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
8738         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
8739         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
8740         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
8741         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
8742         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
8743         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
8744         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
8745         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
8746         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
8747         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
8748         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
8749         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
8750         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
8751         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
8752         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
8753         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
8754         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
8755         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
8756         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
8757         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
8758         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
8759         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
8760         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
8761         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
8762         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
8763         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
8764         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
8765         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
8766         Likewise.
8767
8768 2006-09-13  Eric Blake  <ebb9@byu.net>
8769
8770         * lib/getopt.c: Fix typo in last commit.
8771
8772 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8773
8774         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
8775         dgettext.
8776
8777 2006-09-12  Jim Meyering  <jim@meyering.net>
8778
8779         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
8780         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
8781         Reported by Nelson H. F. Beebe.
8782
8783 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8784
8785         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
8786         program_invocation_name and program_invocation_short_name are
8787         initialized.
8788         * lib/argp-namefrob.h: Move declarations of program_invocation_name
8789         and program_invocation_short_name to argp.h, so they are visible
8790         to user programs.
8791         * lib/argp.h: Likewise
8792
8793 2006-09-10  Bruno Haible  <bruno@clisp.org>
8794
8795         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8796         m4/inttypes_h.m4, m4/uintmax_t.m4.
8797
8798 2006-09-10  Bruno Haible  <bruno@clisp.org>
8799
8800         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
8801         gl_AC_TYPE_UINTMAX_T.
8802
8803 2006-09-10  Bruno Haible  <bruno@clisp.org>
8804
8805         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
8806
8807 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8808
8809         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
8810         convention.  Text proposed by Bruno Haible.
8811         (struct argp_option): Document the use of N_() wrappers.
8812
8813         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
8814         '\v', and translate the two parts separately, instead of feeding
8815         the whole string to gettext.  This allows to exclude
8816         '\v' from the strings visible to the translator by writing doc
8817         strings as N_("..") "\v" N_("..").
8818
8819 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
8820
8821         * config/srclist.txt: Undo latest change; the bug was fixed.
8822
8823 2006-09-09  Bruno Haible  <bruno@clisp.org>
8824
8825         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
8826         assignments if building a library without libtool.
8827         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
8828         in func_emit_lib_Makefile_am.
8829         (func_import): When building a static library libfoo.a, arrange to
8830         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
8831         (func_create_testdir): Likewise.
8832         * modules/gc (configure.ac, Makefile.am): If building statically,
8833         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
8834         * modules/iconvme (configure.ac, Makefile.am): Likewise.
8835         * modules/striconv (configure.ac, Makefile.am): Likewise.
8836         Based on a suggestion by Ralf Wildenhues.
8837
8838 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8839
8840         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8841         Check for unistd.h too, since Autoconf doesn't assume POSIX.
8842         Also:
8843
8844         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8845         Add year_2050_test to catch glibc bug 2821
8846         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8847
8848         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8849         Prefer #ifdef to #if.
8850
8851         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
8852         Return from 'main' instead of calling 'exit'.
8853
8854 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8855
8856         * lib/mktime.c (guess_time_tm): Fix bug where mktime
8857         returned the maximum time_t value rather than (time_t) -1.
8858         Problem originally reported by William Bardwell
8859         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8860
8861         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8862         Moved to here ...
8863         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8864         ... from here.
8865
8866 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
8869         2821 is fixed.
8870
8871 2006-09-08  Jim Meyering  <jim@meyering.net>
8872
8873         Don't make generated files read-only.  That would bother too many
8874         people.  However, do retain the ability to work when targets are
8875         read-only: remove the destination and temporary files before writing
8876         them (when generated via sed or echo), or by using the -f option for
8877         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
8878         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8879         * modules/byteswap, modules/configmake, modules/fcntl:
8880         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8881         * modules/localcharset, modules/netinet_in, modules/poll:
8882         * modules/stdbool, modules/stdint, modules/sys_select:
8883         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8884
8885 2006-09-08  Jim Meyering  <jim@meyering.net>
8886
8887         Avoid new build failure on FreeBSD 6.0.
8888         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
8889         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
8890         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
8891
8892 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8893
8894         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
8895
8896 2006-09-07  Jim Meyering  <jim@meyering.net>
8897
8898         Fix global typo in last change: use chmod u-w, not chmod u-x.
8899         Spotted by Paul Eggert and Bruce Korb.
8900         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8901         * modules/byteswap, modules/configmake, modules/fcntl:
8902         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8903         * modules/localcharset, modules/netinet_in, modules/poll:
8904         * modules/stdbool, modules/stdint, modules/sys_select:
8905         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8906
8907 2006-09-06  Jim Meyering  <jim@meyering.net>
8908
8909         Make generated files be read-only.
8910         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
8911         Ensure that each generated file is now read-only.
8912         * modules/argz: Likewise.
8913         * modules/arpa_inet: Likewise.
8914         * modules/byteswap: Likewise.
8915         * modules/configmake: Likewise.
8916         * modules/fcntl: Likewise.
8917         * modules/fnmatch: Likewise.
8918         * modules/getopt: Likewise.
8919         * modules/glob: Likewise.
8920         * modules/inttypes: Likewise.
8921         * modules/netinet_in: Likewise.
8922         * modules/poll: Likewise.
8923         * modules/stdbool: Likewise.
8924         * modules/stdint: Likewise.
8925         * modules/sys_select: Likewise.
8926         * modules/sys_socket: Likewise.
8927         * modules/sys_stat: Likewise.
8928         * modules/sysexits: Likewise.
8929         * modules/localcharset: Same as above, but continue using temporary
8930         file named "t-$@" (why different?) rather than the "$@-t" used
8931         everywhere else.
8932
8933         * modules/sysexits (Makefile.am): Replace literal occurrences
8934         of "sysexit.h" more readable, and more consistent, "$@".
8935
8936 2006-09-06  Bruno Haible  <bruno@clisp.org>
8937
8938         * modules/striconv: New file.
8939         * modules/xstriconv: New file.
8940         * MODULES.html.sh (Internationalization functions): Add striconv,
8941         xstriconv.
8942
8943 2006-09-06  Bruno Haible  <bruno@clisp.org>
8944
8945         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
8946         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
8947         not using libtool correctly.
8948
8949 2006-09-06  Bruno Haible  <bruno@clisp.org>
8950
8951         * lib/striconv.h: New file.
8952         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
8953         iconvstring.c.
8954         * lib/xstriconv.h: New file.
8955         * lib/xstriconv.c: New file.
8956
8957 2006-09-06  Bruno Haible  <bruno@clisp.org>
8958
8959         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8960         lib_..._LDFLAGS.
8961
8962 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8963
8964         * lib/argz_.h: Sync from Libtool.
8965
8966         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
8967                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8968
8969         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
8970
8971 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8972
8973         * modules/trim: New file.
8974
8975 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8976
8977         * lib/trim.h: New file.
8978         * lib/trim.c: New file.
8979
8980 2006-09-05  Bruno Haible  <bruno@clisp.org>
8981
8982         * MODULES.html.sh (String handling): Add trim.
8983
8984 2006-09-04  Karl Berry  <karl@gnu.org>
8985
8986         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
8987         until next release.
8988
8989 2006-09-03  Bruno Haible  <bruno@clisp.org>
8990
8991         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
8992         correctly.
8993
8994 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8995
8996         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
8997         not gl_GETLOADAVG.  Omit unneeded semicolons.
8998         Problems reported by Ralf Wildenhues in
8999         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
9000         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
9001         at the end, which is the usual gnulib style.
9002
9003         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
9004         of doing all the work ourselves.
9005         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
9006         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
9007
9008 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9009
9010         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
9011         Problem reported by Ralf Wildenhues in
9012         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
9013
9014         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
9015         HAVE_STRUCT_STATFS_F_FSTYPENAME.
9016
9017 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9018
9019         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
9020         yesterday's patch by changing test -n to test -z.
9021
9022 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9023
9024         * modules/getloadavg (Files): Add m4/getloadavg.m4.
9025         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
9026         the former is now obsolescent.
9027
9028         * modules/chdir-long (Depends-on): Add fcntl.
9029
9030 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9031
9032         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
9033         obsolescent, and programs should use gnulib instead.
9034         * m4/getloadavg.m4: New file, with contents taken from Autoconf
9035         but with prefixes changed.
9036
9037 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9038
9039         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
9040         or stdbool.h, because they might not exist while configuring.
9041
9042         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
9043         Don't include unistd.h or limits.h; not needed, since chdir-long.h
9044         does that for us.
9045         (O_DIRECTORY): Remove.
9046
9047 2006-08-31  Eric Blake  <ebb9@byu.net>
9048
9049         * gnulib-tool: Don't let emacs change spaces to TAB.
9050
9051 2006-08-31  Bruno Haible  <bruno@clisp.org>
9052
9053         * gnulib-tool: When calling func_import more than once, do it in a
9054         subshell.
9055         Reported by Eric Blake <ebb9@byu.net>.
9056
9057 2006-08-31  Bruno Haible  <bruno@clisp.org>
9058
9059         * gnulib-tool (nl): Remove variable.
9060         (sed_transform_lib_file): Use more robust test for config-h module.
9061         (func_import): Fix typo in 2006-08-25 patch.
9062
9063 2006-08-31  Bruno Haible  <bruno@clisp.org>
9064
9065         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
9066         specified, augment Makefile.am variables instead of assigning them.
9067
9068 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9069
9070         Work around a bug in both the Linux and SunOS 64-bit kernels:
9071         nanosleep mishandles sleeps for longer than 2**31 seconds.
9072         Problem reported by Frank v Waveren in
9073         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
9074         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
9075         Check for nanosleep bug.
9076         (LIB_NANOSLEEP): Append clock_gettime library if needed.
9077
9078 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9079
9080         Work around a bug in both the Linux and SunOS 64-bit kernels:
9081         nanosleep mishandles sleeps for longer than 2**31 seconds.
9082         Problem reported by Frank v Waveren in
9083         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
9084         * lib/nanosleep.c (BILLION): New constant.
9085         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
9086         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
9087         implementation.
9088
9089 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9090
9091         * modules/nanosleep (Depends-on): Add gettime.
9092
9093 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9094         and Simon Josefsson  <jas@extundo.com>
9095         and Oskar Liljeblad  <oskar@osk.mine.nu>
9096
9097         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
9098         * gnulib-tool (func_import): New license type 'unmodifiable license
9099         text'.
9100         * modules/fdl: Use it.  Longer description.
9101         * module/gpl, module/lgpl: New files.
9102
9103 2006-08-30  Jim Meyering  <jim@meyering.net>
9104
9105         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
9106         shadowing the parameter.
9107
9108 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9109
9110         Sync from Libtool:
9111
9112         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9113
9114         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
9115         sharing with gnulib.  Report by Eric Blake.
9116
9117 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9118
9119         * modules/isapipe: New file.
9120         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
9121
9122 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9123
9124         * modules/configmake (Makefile.am): Add a comment, and omit
9125         the CONFIGMAKE_ prefix from generated macro names.  Suggested
9126         by Bruno Haible.
9127
9128 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9129
9130         * m4/isapipe.m4: New file.
9131
9132 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9133
9134         * lib/isapipe.c, lib/isapipe.h: New files.
9135
9136 2006-08-29  Jim Meyering  <jim@meyering.net>
9137
9138         * modules/configmake (Makefile.am): Make configmake.h depend on
9139         Makefile.  Otherwise, a stale configmake.h could hang around.
9140
9141 2006-08-29  Eric Blake  <ebb9@byu.net>
9142
9143         * lib/error.c (error_at_line, print_errno_message): Match libc, after
9144         resolution of upstream bug 3044.
9145
9146 2006-08-29  Bruno Haible  <bruno@clisp.org>
9147
9148         * modules/localcharset (Depends-on): Add configmake.
9149         (Makefile.am): Remove setting of LIBDIR through DEFS.
9150
9151 2006-08-29  Bruno Haible  <bruno@clisp.org>
9152
9153         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
9154         defined.
9155
9156 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9157
9158         * modules/fcntl: New file.
9159         * modules/chdir-safer (Depends-on): Add fcntl.
9160         * modules/fts: Likewise.
9161         * modules/mkdir-p: Likewise.
9162
9163         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
9164         This undoes the most recent change, since we're now addressing the
9165         problem in a different way.
9166
9167         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
9168         into output, since the output might be called Makefile.am even
9169         if $makefile_name is something different.
9170         (func_import): Use $makefile_am rather than
9171         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
9172         empty.
9173
9174         * modules/inttypes (Files): Add m4/inttypes-h.m4.
9175
9176 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9177
9178         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
9179         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
9180         recent change to stdint.m4, since we're now addressing the problem in a
9181         different way.
9182
9183 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9184
9185         * m4/fcntl_h.m4: New file.
9186
9187 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9188
9189         * lib/fcntl_.h: New file.
9190         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
9191         the fcntl module.
9192         * lib/dirchownmod.c: Likewise.
9193         * lib/fts.c: Likewise.
9194
9195         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
9196         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
9197         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
9198         just before including <inttypes.h>, to avoid circular inclusion.
9199
9200 2006-08-28  Jim Meyering  <jim@meyering.net>
9201
9202         * doc/visibility.texi: Actually read and correct the grammar of the
9203         sentence affected by yesterday's change.
9204
9205 2006-08-28  Eric Blake  <ebb9@byu.net>
9206
9207         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
9208         needs wrapper.
9209
9210 2006-08-28  Eric Blake  <ebb9@byu.net>
9211
9212         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
9213
9214 2006-08-28  Eric Blake  <ebb9@byu.net>
9215
9216         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
9217
9218 2006-08-28  Bruno Haible  <bruno@clisp.org>
9219
9220         * modules/c-strstr: New file, from GNU gettext.
9221         * MODULES.html.sh (String handling): Add c-strstr.
9222
9223 2006-08-28  Bruno Haible  <bruno@clisp.org>
9224
9225         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
9226         macros.
9227         Reported by Eric Blake.
9228
9229 2006-08-28  Bruno Haible  <bruno@clisp.org>
9230
9231         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
9232         (VASNPRINTF): Return a string of length > INT_MAX without failing.
9233         * lib/vasprintf.c: Include errno.h, limits.h.
9234         (EOVERFLOW): New fallback definition.
9235         (vasprintf): Test here whether the string length is > INT_MAX.
9236         * lib/vsnprintf.c: Include errno.h, limits.h.
9237         (EOVERFLOW): New fallback definition.
9238         (vsnprintf): Fix bug when generated string was too long for the buffer.
9239         Test here whether the string length is > INT_MAX.
9240
9241 2006-08-28  Bruno Haible  <bruno@clisp.org>
9242
9243         * lib/inttypes_.h (SCNX*): Remove definitions.
9244         Reported by Eric Blake.
9245
9246 2006-08-28  Bruno Haible  <bruno@clisp.org>
9247
9248         * lib/c-strstr.h: New file, from GNU gettext.
9249         * lib/c-strstr.c: New file, from GNU gettext.
9250
9251 2006-08-28  Bruno Haible  <bruno@clisp.org>
9252
9253         * gnulib-tool: Reorder some statements.
9254
9255 2006-08-28  Bruno Haible  <bruno@clisp.org>
9256
9257         * gnulib-tool: New option --makefile-name.
9258         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
9259         $makefile_name.
9260         (func_import): Write $makefile_name to the cache file, and read it from
9261         there unless explicitly specified. Use $makefile_name as file name
9262         instead of Makefile.am. Adjust the recommendations accordingly.
9263
9264 2006-08-28  Bruno Haible  <bruno@clisp.org>
9265
9266         * gnulib-tool (func_verify_module): Check against misapplying patch.
9267
9268 2006-08-28  Bruno Haible  <bruno@clisp.org>
9269
9270         * gnulib-tool (func_relativize, func_relconcat): New functions.
9271         Give an error if --local-dir is given with --update.
9272         Remove trailing slashes from $local_gnulib_dir.
9273         (func_import): Store the relativized $local_gnulib_dir in
9274         gnulib-cache.m4, and read it from there if not specified explicitly.
9275
9276 2006-08-28  Bruno Haible  <bruno@clisp.org>
9277
9278         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
9279         is the current directory. Respect also $local_gnulib_dir.
9280
9281 2006-08-28  Bruno Haible  <bruno@clisp.org>
9282             Simon Josefsson  <jas@extundo.com>
9283
9284         BeOS portability.
9285         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
9286
9287 2006-08-27  Jim Meyering  <jim@meyering.net>
9288
9289         * doc/visibility.texi: Remove duplicate word: "pointer".
9290
9291 2006-08-26  Bruno Haible  <bruno@clisp.org>
9292
9293         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
9294         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
9295         (Makefile.am): Create inttypes.h from inttypes_.h.
9296         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
9297
9298         * modules/imaxabs: New file.
9299
9300         * modules/imaxdiv: New file.
9301
9302 2006-08-26  Bruno Haible  <bruno@clisp.org>
9303
9304         * m4/inttypes.m4: New file.
9305         * m4/_inttypes_h.m4: Remove file.
9306         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
9307         PRI_MACROS_BROKEN.
9308         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
9309
9310         * m4/imaxabs.m4: New file.
9311
9312         * m4/imaxdiv.m4: New file.
9313
9314 2006-08-26  Bruno Haible  <bruno@clisp.org>
9315
9316         * lib/inttypes_.h: New file.
9317         * lib/inttypes.h: Remove file.
9318         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
9319
9320         * lib/imaxabs.c: New file.
9321
9322         * lib/imaxdiv.c: New file.
9323
9324 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9325
9326         New config-h module, so that "make" output needn't be cluttered
9327         by -DHAVE_CONFIG_H.
9328         * MODULES.html.sh (Support for building libraries and executables):
9329         Add config-h.
9330         * modules/config-h: New file.
9331         * gnulib-tool (nl, sed_transform_lib_file): New vars.
9332         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
9333         the config-h module is used.
9334
9335         New configmake module, so that "make" output needn't be cluttered
9336         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
9337         * MODULES.html.sh (Support for building libraries and executables):
9338         Add configmake.
9339         * modules/configmake: New file.
9340
9341 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9342
9343         * m4/config-h.m4: New file.
9344
9345 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9346
9347         * config/srclist.txt: Add elisp-comp.
9348
9349 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9350
9351         * MODULES.html.sh (Support for building libraries and executables):
9352         Add elisp-comp.
9353         * build-aux/elisp-comp: New file.
9354         * modules/elisp-comp: New file.
9355
9356 2006-08-24  Bruno Haible  <bruno@clisp.org>
9357
9358         * gnulib-tool (func_create_testdir): Use non-default values of
9359         sourcebase and m4base.
9360
9361 2006-08-24  Bruno Haible  <bruno@clisp.org>
9362
9363         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
9364         HTML structure.
9365
9366 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9367
9368         * modules/openat (Depends-on): Add lchown.
9369
9370 2006-08-23  Bruno Haible  <bruno@clisp.org>
9371
9372         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
9373         of gl_LOCK_EARLY instead of gl_LOCK.
9374
9375 2006-08-23  Bruno Haible  <bruno@clisp.org>
9376
9377         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
9378         on OSF/1 to no.
9379         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
9380
9381 2006-08-23  Bruno Haible  <bruno@clisp.org>
9382
9383         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
9384         as unusable.
9385
9386         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
9387         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
9388         (gl_LOCK): New macro.
9389
9390 2006-08-22  Simon Josefsson  <jas@extundo.com>
9391
9392         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
9393         to md5 module.
9394
9395 2006-08-22  Simon Josefsson  <jas@extundo.com>
9396
9397         * MODULES.html.sh: Add "Support for maintaining and release
9398         projects".
9399
9400         * build-aux/gnupload: New file, from coreutils.
9401
9402 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9403
9404         Avoid the need for AC_LIBSOURCES in m4 macros.
9405         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
9406         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
9407         * modules/check-version (EXTRA_DIST): Add check-version.h.
9408         * modules/crc (EXTRA_DIST): Add crc.h.
9409         * modules/des (EXTRA_DIST): Add des.h.
9410         * modules/gc (EXTRA_DIST): Add gc.h.
9411         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
9412         * modules/getline (EXTRA_DIST): Add getline.h.
9413         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
9414         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
9415         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
9416         * modules/md2 (EXTRA_DIST): Add md2.h.
9417         * modules/md4 (EXTRA_DIST): Add md4.h.
9418         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
9419         * modules/read-file (EXTRA_DIST): Add read-file.h.
9420         * modules/readline (EXTRA_DIST): Add readline.h.
9421         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
9422         rijndael-api-fst.h.
9423
9424 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9425
9426         * m4/rijndael.m4 (gl_ARCFOUR):
9427         * m4/arctwo.m4 (gl_ARCTWO):
9428         * m4/check-version.m4 (gl_CHECK_VERSION):
9429         * m4/crc.m4 (gl_CRC):
9430         * m4/des.m4 (gl_DES):
9431         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
9432         * m4/gc.m4 (gl_GC):
9433         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
9434         * m4/getline.m4 (gl_FUNC_GETLINE):
9435         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
9436         * m4/hmac-md5.m4 (gl_HMAC_MD5):
9437         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
9438         * m4/md2.m4 (gl_MD2):
9439         * m4/md4.m4 (gl_MD4):
9440         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
9441         * m4/read-file.m4 (gl_FUNC_READ_FILE):
9442         * m4/readline.m4 (gl_FUNC_READLINE):
9443         * m4/rijndael.m4 (gl_RIJNDAEL):
9444         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9445         to get the necessary .h files and whatnot.
9446
9447 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9448
9449         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
9450         gnulib rather than the other way around.
9451         * config/srclistvars.sh (COREUTILS): Remove.
9452
9453 2006-08-22  Jim Meyering  <jim@meyering.net>
9454
9455         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
9456
9457         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
9458
9459 2006-08-22  Eric Blake  <ebb9@byu.net>
9460
9461         * modules/regexprops-generic: New file.
9462         * MODULES.html.sh (Support for building documentation): List it.
9463
9464 2006-08-22  Eric Blake  <ebb9@byu.net>
9465
9466         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
9467         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
9468         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
9469         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
9470
9471 2006-08-22  Bruno Haible  <bruno@clisp.org>
9472
9473         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
9474         and lib_LTLIBRARIES like the other lib_* variables.
9475
9476 2006-08-22  Bruno Haible  <bruno@clisp.org>
9477
9478         * build-aux/x-to-1.in: New file, from GNU gettext.
9479
9480 2006-08-22  Bruno Haible  <bruno@clisp.org>
9481
9482         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
9483         <utmpx.h> exists.
9484
9485 2006-08-22  Bruno Haible  <bruno@clisp.org>
9486
9487         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
9488         <utmpx.h> exists.
9489
9490 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9491
9492         BeOS portability.
9493         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
9494         exist.
9495         Problem reported by Bruno Haible.
9496
9497 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9498
9499         Avoid the need for AC_LIBSOURCES in m4 macros.
9500         * modules/acl (EXTRA_DIST): Add acl.h.
9501         * modules/argmatch (Files): Add m4/argmatch.m4.
9502         (configure.ac): Add gl_ARGMATCH.
9503         (EXTRA_DIST): Renamed from lib_SOURCES, for
9504         consistency with the other modules.  Remove argmatch.c.
9505         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
9506         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
9507         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
9508         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
9509         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
9510         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
9511         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
9512         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
9513         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
9514         * modules/closeout (EXTRA_DIST): Add closeout.h.
9515         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
9516         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
9517         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
9518         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
9519         dirname.h; remove basename.c and stripslash.c.
9520         * modules/exclude (EXTRA_DIST): Add exclude.h.
9521         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
9522         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
9523         * modules/file-type (EXTRA_DIST): Add file-type.h.
9524         * modules/filemode (EXTRA_DIST): Add filemode.h.
9525         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
9526         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9527         * modules/fpending (EXTRA_DIST): Add __fpending.h.
9528         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
9529         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
9530         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
9531         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
9532         * modules/getdate (EXTRA_DIST): Add getdate.c.
9533         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
9534         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
9535         * modules/getpass (EXTRA_DIST): Add getpass.h.
9536         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
9537         * modules/group-member (EXTRA_DIST): Add group-member.h.
9538         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
9539         * modules/hash (EXTRA_DIST): Add hash.h.
9540         * modules/human (EXTRA_DIST): Add human.h.
9541         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
9542         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
9543         * modules/lchown (EXTRA_DIST): Add lchown.h.
9544         * modules/long-options (EXTRA_DIST): Add long-options.h.
9545         * modules/lstat (EXTRA_DIST): Add lstat.h.
9546         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
9547         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
9548         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
9549         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
9550         * modules/memxor (EXTRA_DIST): Add memxor.h.
9551         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
9552         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
9553         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
9554         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
9555         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
9556         * modules/physmem (EXTRA_DIST): Add physmem.h.
9557         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
9558         * modules/posixver (EXTRA_DIST): Add posixver.h.
9559         * modules/quote (EXTRA_DIST): Add quote.h.
9560         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
9561         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
9562         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
9563         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
9564         regex_internal.h regexec.c.
9565         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
9566         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
9567         * modules/same (EXTRA_DIST): Add same.h.
9568         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
9569         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
9570         * modules/savedir (EXTRA_DIST): Add savedir.h.
9571         * modules/sha1 (EXTRA_DIST): Add sha1.h.
9572         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
9573         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
9574         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
9575         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
9576         * modules/strdup (EXTRA_DIST): Add strdup.h.
9577         * modules/strftime (EXTRA_DIST): Add strftime.h.
9578         * modules/strndup (EXTRA_DIST): Add strndup.h.
9579         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
9580         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
9581         * modules/time_r (EXTRA_DIST): Add time_r.h.
9582         * modules/timespec (EXTRA_DIST): Add timespec.h.
9583         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9584         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
9585         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
9586         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
9587         * modules/userspec (EXTRA_DIST): Add userspec.h.
9588         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
9589         * modules/utimens (EXTRA_DIST): Add utimens.h.
9590         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
9591         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
9592         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
9593         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
9594         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
9595         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
9596         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
9597         * modules/yesno (EXTRA_DIST): Add yesno.h.
9598
9599 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9600
9601         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
9602
9603         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
9604         * m4/dev-ino.m4, same-inode.m4: Remove.
9605
9606         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
9607         * m4/acl.m4 (AC_FUNC_ACL):
9608         * m4/backupfile.m4 (gl_BACKUPFILE):
9609         * m4/c-strtod.m4 (gl_C99_STRTOLD):
9610         * m4/canon-host.m4 (gl_CANON_HOST):
9611         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9612         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
9613         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
9614         * m4/cloexec.m4 (gl_CLOEXEC):
9615         * m4/close-stream.m4 (gl_CLOSE_STREAM):
9616         * m4/closeout.m4 (gl_CLOSEOUT):
9617         * m4/dirfd.m4 (gl_FUNC_DIRFD):
9618         * m4/dirname.m4 (gl_DIRNAME):
9619         * m4/exclude.m4 (gl_EXCLUDE):
9620         * m4/exitfail.m4 (gl_EXITFAIL):
9621         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
9622         * m4/file-type.m4 (gl_FILE_TYPE):
9623         * m4/filemode.m4 (gl_FILEMODE):
9624         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
9625         * m4/fpending.m4 (gl_FUNC_FPENDING):
9626         * m4/fprintftime.m4 (gl_FPRINTFTIME):
9627         * m4/fts.m4 (gl_FUNC_FTS):
9628         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
9629         * m4/getdate.m4 (gl_GETDATE):
9630         * m4/gethrxtime.m4 (gl_GETHRXTIME):
9631         * m4/getpagesize.m4 (gl_GETPAGESIZE):
9632         * m4/getpass.m4 (gl_FUNC_GETPASS):
9633         * m4/gettime.m4 (gl_GETTIME):
9634         * m4/getugroups.m4 (gl_GETUGROUPS):
9635         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
9636         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
9637         * m4/hard-locale.m4 (gl_HARD_LOCALE):
9638         * m4/hash.m4 (gl_HASH):
9639         * m4/idcache.m4 (gl_IDCACHE):
9640         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
9641         * m4/lchown.m4 (gl_FUNC_LCHOWN):
9642         * m4/long-options.m4 (gl_LONG_OPTIONS):
9643         * m4/lstat.m4 (gl_FUNC_LSTAT):
9644         * m4/md5.m4 (gl_MD5):
9645         * m4/memcasecmp.m4 (gl_MEMCASECMP):
9646         * m4/memcoll.m4 (gl_MEMCOLL):
9647         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
9648         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
9649         * m4/memxor.m4 (gl_MEMXOR):
9650         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
9651         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
9652         * m4/modechange.m4 (gl_MODECHANGE):
9653         * m4/mountlist.m4 (gl_MOUNTLIST):
9654         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
9655         * m4/openat.m4 (gl_FUNC_OPENAT):
9656         * m4/pathmax.m4 (gl_PATHMAX):
9657         * m4/physmem.m4 (gl_PHYSMEM):
9658         * m4/posixtm.m4 (gl_POSIXTM):
9659         * m4/posixver.m4 (gl_POSIXVER):
9660         * m4/quote.m4 (gl_QUOTE):
9661         * m4/quotearg.m4 (gl_QUOTEARG):
9662         * m4/readtokens.m4 (gl_READTOKENS):
9663         * m4/readutmp.m4 (gl_READUTMP):
9664         * m4/regex.m4 (gl_REGEX):
9665         * m4/safe-read.m4 (gl_SAFE_READ):
9666         * m4/safe-write.m4 (gl_SAFE_WRITE):
9667         * m4/same.m4 (gl_SAME):
9668         * m4/save-cwd.m4 (gl_SAVE_CWD):
9669         * m4/savedir.m4 (gl_SAVEDIR):
9670         * m4/settime.m4 (gl_SETTIME):
9671         * m4/sha1.m4 (gl_SHA1):
9672         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
9673         * m4/stat-macros.m4 (gl_STAT_MACROS):
9674         * m4/stat-time.m4 (gl_STAT_TIME):
9675         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
9676         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
9677         * m4/strdup.m4 (gl_FUNC_STRDUP):
9678         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
9679         * m4/strndup.m4 (gl_FUNC_STRNDUP):
9680         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
9681         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
9682         * m4/time_r.m4 (gl_TIME_R):
9683         * m4/timespec.m4 (gl_TIMESPEC):
9684         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
9685         * m4/unlinkdir.m4 (gl_UNLINKDIR):
9686         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
9687         * m4/userspec.m4 (gl_USERSPEC):
9688         * m4/utimecmp.m4 (gl_UTIMECMP):
9689         * m4/utimens.m4 (gl_UTIMENS):
9690         * m4/xalloc.m4 (gl_XALLOC):
9691         * m4/xgetcwd.m4 (gl_XGETCWD):
9692         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
9693         * m4/xreadlink.m4 (gl_XREADLINK):
9694         * m4/xstrtod.m4 (gl_XSTRTOD):
9695         * m4/yesno.m4 (gl_YESNO):
9696         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9697         to get the necessary .h files and whatnot.
9698
9699 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
9700             Bruno Haible  <bruno@clisp.org>
9701
9702         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
9703         /bin/sh understanding of '!' conditional negation.
9704
9705 2006-08-21  Jim Meyering  <jim@meyering.net>
9706
9707         * modules/openat (Depends-on): Really alphabetize.
9708
9709         * modules/acl (Depends-on): Add error and quote.
9710
9711         * check-module (find_included_lib_files): Add at-func.c to the
9712         ok-to-include-more-than-once white list.
9713
9714         * modules/openat (Depends-on): Add lstat.  Alphabetize.
9715
9716 2006-08-21  Bruno Haible  <bruno@clisp.org>
9717
9718         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9719         Emit a pkgdata_DATA variable only if some snippets add contents to it.
9720         Reported by Martin Lambers <marlam@marlam.de>.
9721
9722 2006-08-21  Bruno Haible  <bruno@clisp.org>
9723
9724         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
9725         specify an installation location, don't emit a noinst_LIBRARIES or
9726         noinst_LTLIBRARIES assignment.
9727
9728 2006-08-21  Bruno Haible  <bruno@clisp.org>
9729
9730         BeOS portability.
9731         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
9732         BeOS has mbrtowc() but no <wctype.h>.
9733
9734 2006-08-21  Bruno Haible  <bruno@clisp.org>
9735
9736         BeOS portability.
9737         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
9738         exist.
9739
9740 2006-08-21  Bruno Haible  <bruno@clisp.org>
9741
9742         BeOS portability.
9743         * lib/mbchar.h: Include <wctype.h> only if it exists.
9744
9745 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9746
9747         Remove files that are no longer needed by their respective modules.
9748         * m4/obstack.m4: Remove.
9749         * m4/strerror_r.m4: Remove.
9750         * m4/uint32_t.m4: Remove.
9751         * m4/uintptr_t.m4: Remove.
9752         * m4/ullong_max.m4: Remove.
9753         * m4/xstrtoimax.m4: Remove.
9754         * m4/xstrtoumax.m4: Remove.
9755
9756         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
9757         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
9758         dependencies now capture this.
9759
9760         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
9761         Do not use AC_LIBSOURCES, since gnulib modules now do this.
9762         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
9763         * m4/human.m4 (gl_HUMAN): Likewise.
9764         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
9765         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
9766
9767         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
9768
9769         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
9770         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
9771         stdint.
9772         * m4/human.m4 (gl_HUMAN): Likewise.
9773         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
9774         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
9775         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9776         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9777         * m4/xstrtol (gl_XSTRTOL): Likewise.
9778
9779         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
9780         AC_TYPE_LONG_LONG_INT.
9781         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9782         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
9783         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
9784         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9785
9786         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
9787         on stdbool.
9788
9789         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
9790         (gl_PREREQ_XSTRTOUL): Remove.
9791
9792         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
9793
9794         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
9795         mode.
9796
9797 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9798
9799         Add and change modules to make it easier for coreutils to use
9800         gnulib-tool.
9801         * modules/backupfile (Files): Remove m4/d-ino.m4.
9802         (Depends-on): Add d-ino.
9803         * modules/cycle-check (Depends-on): Add stdint.
9804         (lib_SOURCES): Add cycle-check.h.
9805         * modules/d-ino: New module.
9806         * modules/d-type: New module.
9807         * modules/error (Files): Remove m4/strerror_r.m4.
9808         * modules/filemode (Files): Add m4/st_dm_mode.m4.
9809         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
9810         m4/inttypes_h.m4, m4/uintmax_t.m4.
9811         (Depends-on): Add stdint.
9812         (lib_SOURCES): Add fsusage.h.
9813         * modules/getcwd (Files): Remove d-ino.m4.
9814         (Depends-on): Add d-ino.
9815         * modules/getndelim2 (Depends-on): Add stdint.
9816         * modules/glob (Files): Remove m4/d-type.m4.
9817         (Depends-on): Add d-type.
9818         * modules/host-os: New module.
9819         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
9820         m4/inttypes_h.m4, m4/uintmax_t.m4.
9821         * Depends-on: Add stdint.
9822         (lib_SOURCES): Add human.h.
9823         * modules/inttostr (Files): Remove m4/intmax_t.m4,
9824         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
9825         m4/uintmax_t.m4, m4/ulonglong.m4.
9826         (Depends-on): Add stdint.
9827         (EXTRA_DIST): Add inttostr.h.
9828         * modules/lchmod: New module.
9829         * modules/link-follow: New module.
9830         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
9831         (Depends-on): Add lchmod.
9832         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
9833         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
9834         (Depends-on): Add stdint.
9835         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
9836         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9837         (Depends-on): Add stdint.
9838         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
9839         * modules/perl: New module.
9840         * modules/regex (Depends-on): Add stdint.
9841         * modules/rmdir-errno: New module.
9842         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9843         m4/intmax_t.m4.
9844         (Depends-on): Add stdint.
9845         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9846         m4/uintmax_t.m4.
9847         (Depends-on): Add stdint.
9848         * modules/unlink-busy: New module.
9849         * modules/utimecmp (Depends-on): Add stdint.
9850         * modules/uptime: New module.
9851         * modules/winsz-ioctl: New module.
9852         * modules/winsz-termios: New module.
9853         * modules/xnanosleep (Depends-on): Add nanosleep.
9854         * modules/ullong_max: Remove.
9855         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
9856         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
9857         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
9858         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
9859         (Depends-on): Add inttypes.
9860         (lib_SOURCES): Add xstrtol.h.
9861         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
9862         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
9863         * MODULES.html.sh: Move 'assert' into the assert section.
9864         Move 'dummy' into the linking section.
9865         Remove ullong_max.
9866         Add section for compatibility checks for POSIX:2001 functions,
9867         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
9868         winsz-ioctl, and winsz-termios into it.
9869         Add lchmod.
9870         Add top-level Misc section and put host-os, perl, and uptime
9871         into it.
9872
9873 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9874
9875         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
9876         now assume the stdint module.  Do not include inttypes.h.
9877         * lib/fsusage.h: Likewise.
9878         * lib/getndelim2.c: Likewise.
9879         * lib/human.h: Likewise.
9880         * lib/inttostr.h: Likewise.
9881         * lib/obstack.c: Likewise.
9882         * lib/regex_internal.h: Likewise.
9883         * lib/tempname.c: Likewise.
9884         * lib/utimecmp.c: Likewise.
9885         * lib/xstrtol.h: Likewise.
9886
9887         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
9888
9889         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
9890         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
9891         * lib/xtime.h: Likewise.
9892
9893 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9894
9895         * modules/openat (Files): Add lib/fchmodat.c.
9896         Fixes problem reported by Jay Youngman.
9897
9898 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9899
9900         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
9901         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
9902
9903 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
9904             Bruno Haible  <bruno@clisp.org>
9905
9906         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
9907         and is a script that invokes bison. Tighten the code. Add comments.
9908
9909 2006-08-18  Jim Meyering  <jim@meyering.net>
9910
9911         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
9912         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
9913         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
9914         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
9915
9916 2006-08-18  Bruno Haible  <bruno@clisp.org>
9917
9918         * modules/bison-i18n: New file.
9919         * MODULES.html.sh (Internationalization functions): Add it.
9920
9921 2006-08-18  Bruno Haible  <bruno@clisp.org>
9922
9923         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
9924         sys/statvfs.h. When getmntinfo was found, check its declaration and
9925         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
9926
9927 2006-08-18  Bruno Haible  <bruno@clisp.org>
9928
9929         * m4/bison-i18n.m4: New file, from bison.
9930
9931 2006-08-18  Bruno Haible  <bruno@clisp.org>
9932
9933         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
9934         (ME_DUMMY): Treat "kernfs" as a dummy.
9935         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
9936
9937 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9938
9939         Update from coreutils.
9940
9941         2006-08-15  Jim Meyering  <jim@meyering.net>
9942
9943         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
9944
9945         2006-01-17  Jim Meyering  <jim@meyering.net>
9946
9947         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
9948
9949         2006-01-11  Jim Meyering  <jim@meyering.net>
9950
9951         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
9952         Check for the lchmod function.
9953
9954 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9955
9956         Update from coreutils.
9957
9958         * lib/__fpending.h: Add copyright notice.
9959         * lib/fprintftime.h: Likewise.
9960         * lib/savedir.c: Use (C) in copyright notice.
9961         * lib/savedir.h: Likewise.
9962
9963         2006-08-15  Jim Meyering  <jim@meyering.net>
9964
9965         * lib/at-func.c: New file, with the logic of all emulated at-functions.
9966         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
9967         in support of the EXPECTED_ERRNO macro.
9968         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
9969         definitions.  Instead, define the appropriate symbols and include
9970         "at-func.c".
9971         * lib/mkdirat.c (mkdirat): Likewise.
9972         * lib/fchmodat.c (fchmodat): Likewise.
9973         (ENOSYS): Remove definition.
9974         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
9975         it.  Don't include "unistd--.h" -- it wasn't ever used.
9976
9977         2006-01-17  Jim Meyering  <jim@meyering.net>
9978
9979         Rewrite fts.c not to change the current working directory,
9980         by using openat, fstatat, fdopendir, etc..
9981
9982         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
9983         (HAVE_OPENAT_SUPPORT): Define.
9984         [_LIBC] (fchdir): Don't undef or define; no longer used.
9985         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
9986         Now, this `function' always succeeds, and consumes its file descriptor
9987         parameter -- so callers must not close such FDs.  Update callers.
9988         (diropen_fd, opendirat, cwd_advance_fd): New functions.
9989         (diropen): Add parameter, SP.  Adjust all callers.
9990         Implement using diropen_fd, rather than open.
9991         (fts_open): Initialize new member, fts_cwd_fd.
9992         Remove fts_rft-setting code.
9993         (fts_close): Close fts_cwd_fd, if necessary.
9994         (__opendir2): Define in terms of opendir or opendirat,
9995         depending on whether the FST_NOCHDIR flag is set.
9996         (fts_build): Since fts_safe_changedir consumes its FD, and since
9997         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
9998         and close the dup'd file descriptor upon failure.
9999         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
10000         (fts_safe_changedir): Tweak semantics to reflect that this function
10001         now calls cwd_advance_fd and hence consumes its FD argument.
10002         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
10003         [struct FTS] (fts_rft): Remove now-unused member.
10004         [struct FTS] (fts_cycle.state): Improve comment.
10005
10006         * lib/openat.c (openat_needs_fchdir): New function.
10007         * lib/openat.h (openat_needs_fchdir): Declare it.
10008
10009 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10010
10011         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
10012         Problem and fix reported by Pádraig Brady in
10013         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
10014
10015 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10016
10017         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
10018
10019 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10020
10021         * lib/memcoll.c (memcoll): Optimize for the common case where the
10022         arguments are bytewise equal.
10023
10024 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10025
10026         * doc/regexprops-generic.texi: Add a copyright notice.
10027
10028 2006-08-15  Bruno Haible  <bruno@clisp.org>
10029
10030         * modules/tmpdir (License): Change to LGPL.
10031
10032 2006-08-15  Bruno Haible  <bruno@clisp.org>
10033
10034         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
10035         module.
10036
10037 2006-08-14  Simon Josefsson  <jas@extundo.com>
10038
10039         * config/srclist.txt: Add gnupload.
10040
10041 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10042
10043         Change copyright notice from LGPL 2 to GPL 2, since that's the
10044         standard form used in the gnulib repository.
10045         * tests/test-lock.c: Likewise.
10046         * tests/test-stdint.c: Likewise.
10047         * tests/test-tls.c: Likewise.
10048
10049         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
10050         prelude-manager.  User shorter URLs for GNU projects, without '?'.
10051         Add copyright notice.
10052
10053         * check-module: Add copyright notice.  Output a copyright
10054         notice if "--version" is specified.
10055         * modules/COPYING: New file.
10056         * tests/test-getaddrinfo.c: Add copyright notice.
10057         * tests/test-verify.c: Likewise.
10058
10059 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10060
10061         Change copyright notice from LGPL 2 to GPL 2, since that's the
10062         standard form used in the gnulib repository.
10063         * lib/lock.c: LGPL -> GPL.
10064         * lib/lock.h: Likewise.
10065         * lib/strnlen1.c: Likewise.
10066         * lib/strnlen1.h: Likewise.
10067         * lib/tls.c: Likewise.
10068         * lib/tls.h: Likewise.
10069         * lib/tmpdir.c: Likewise.
10070
10071         * lib/TODO: Remove; this belongs only in coreutils.
10072
10073 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10074
10075         Add copyright notices to long-enough files that lack them, since
10076         otherwise the files aren't clearly free.  Use the same notice that
10077         getdate.texi already uses.
10078         * doc/alloca-opt.texi: Add copyright notice.
10079         * doc/alloca.texi: Likewise.
10080         * doc/ctime.texi: Likewise.
10081         * doc/functions.texi: Likewise.
10082         * doc/gcd.texi: Likewise.
10083         * doc/gnulib-tool.texi: Likewise.
10084         * doc/inet_ntoa.texi: Likewise.
10085         * doc/visibility.texi: Likewise.
10086
10087         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
10088         * doc/quote.texi: Add copyright notice.
10089
10090         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
10091         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
10092         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
10093         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
10094         is now obsolete, and give a pointer to the Sun list.
10095         Add copyright notice.
10096
10097 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10098
10099         * config/srclistvars.sh: Add copyright notice.
10100
10101 2006-08-14  Eric Blake  <ebb9@byu.net>
10102
10103         Import the following change from libc:
10104
10105         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
10106
10107         Upstream bug 2997.
10108         * lib/misc/error.c: Add space between program name and message if file
10109         name is missing.
10110
10111 2006-08-12  Karl Berry  <karl@gnu.org>
10112
10113         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
10114         remove, these originate in gnulib now.
10115
10116 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10117
10118         * doc/Makefile (standards.info standards.html standards.dvi):
10119         Also depend on make-stds.texi.
10120
10121 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
10122
10123         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
10124         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
10125
10126         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
10127         in wchar_t.  Problem reported by Eric Blake.
10128
10129         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
10130         LEN is smaller than SIZE.  Suggested by Bruno Haible.
10131         Also, help the compiler to keep LEN in a register.
10132
10133 2006-08-11  Eric Blake  <ebb9@byu.net>
10134
10135         * users.txt: Sort.  Add tar.
10136
10137 2006-08-11  Bruno Haible  <bruno@clisp.org>
10138
10139         * users.txt: New file.
10140
10141 2006-08-11  Bruno Haible  <bruno@clisp.org>
10142
10143         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
10144         before <wchar.h>. Needed for OSF/1 and BSD/OS.
10145
10146 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
10147
10148         * modules/snprintf (Depends-on): Remove minmax.
10149         (Maintainer): Add self and Bruno.
10150
10151 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
10152
10153         * lib/.cppi-disable: Add snprintf.h, socket_.h.
10154         * lib/snprintf.c: Include <errno.h> and <limits.h>.
10155         (EOVERFLOW): Define if the system does not.
10156         Do not include "minmax.h"; it wasn't used.
10157         (snprintf): Don't assume size_t promotes to an unsigned type.
10158         Fix bug when generated string was too long for the buffer: the
10159         buffer's contents are supposed to be the initial prefix of the
10160         output.  Don't assume vasnprintf returns EOVERFLOW if the size
10161         exceeds INT_MAX; do the check ourselves.
10162
10163         Import the following changes from libc:
10164
10165         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
10166
10167         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
10168         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
10169         set wc to the byte which couldn't be converted.
10170         (re_string_reconstruct): Don't clear valid_raw_len before calling
10171         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
10172         tip_context using re_string_context_at.
10173
10174         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
10175
10176         * lib/posix/regex.h: g++ still cannot handled [restrict].
10177
10178         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
10179
10180         * lib/posix/regex.h: Remove special handling for VMS.
10181
10182 2006-08-10  Jim Meyering  <jim@meyering.net>
10183
10184         * modules/same-inode: New module.
10185         * modules/dev-ino: New module.
10186         * modules/cycle-check: Depend on these modules, rather than simply
10187         including their .h files.
10188         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
10189         required via m4/cycle-check.m4.
10190         * modules/same: Depend on new same-inode module, rather than
10191         including same-inode.h.
10192         * modules/chdir-safer: New file.
10193
10194         * modules/chown (Depends-on): Add stat-macros.
10195
10196 2006-08-10  Jim Meyering  <jim@meyering.net>
10197
10198         * m4/cycle-check.m4: New file.
10199         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
10200         * m4/dev-ino.m4, m4/same-inode.m4: New files.
10201
10202 2006-08-10  Eric Blake  <ebb9@byu.net>
10203
10204         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
10205         in from original proposal.
10206
10207 2006-08-10  Eric Blake  <ebb9@byu.net>
10208         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10209
10210         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
10211         namespace.
10212
10213 2006-08-10  Bruno Haible  <bruno@clisp.org>
10214
10215         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
10216         as well.
10217
10218 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
10219
10220         Sync from coreutils.
10221
10222         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
10223
10224         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
10225         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
10226
10227 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
10228
10229         * modules/restrict: Remove; no longer needed now that we assume
10230         Autoconf 2.59 or later.
10231         * MODULES.html.sh: Remove 'restrict'.
10232         * modules/argp (Depends-on): Remove 'restrict'.
10233         * modules/base64 (Depends-on): Likewise.
10234         * modules/gc (Depends-on): Likewise.
10235         * modules/getaddrinfo (Depends-on): Likewise.
10236         * modules/glob (Depends-on): Likewise.
10237         * modules/inet_ntop (Depends-on): Likewise.
10238         * modules/inet_pton (Depends-on): Likewise.
10239         * modules/memxor (Depends-on): Likewise.
10240         * modules/regex (Depends-on): Likewise.
10241         * modules/strtok_r (Depends-on): Likewise.
10242         * modules/time_r (Depends-on): Likewise.
10243
10244 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
10245
10246         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
10247         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
10248         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
10249         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
10250         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
10251         * m4/memxor.m4 (gl_MEMXOR): Likewise.
10252         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
10253         gl_C_RESTRICT replaced by AC_C_RESTRICT.
10254
10255         Merge from coreutils.
10256         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
10257         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
10258         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
10259         * m4/time_r.m4 (gl_TIME_R): Likewise.
10260
10261 2006-08-09  Karl Berry  <karl@gnu.org>
10262
10263         * config/srclist.txt: no more gettext-tools, per Bruno.
10264
10265 2006-08-08  Eric Blake  <ebb9@byu.net>
10266
10267         * modules/verror: New module.
10268         * MODULES.html.sh: Document it.
10269
10270 2006-08-08  Eric Blake  <ebb9@byu.net>
10271
10272         * lib/verror.h, lib/verror.c: New files.
10273
10274 2006-08-08  Eric Blake  <ebb9@byu.net>
10275
10276         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
10277         verror_at_line output complies with GNU Coding Standards even when
10278         file is NULL.
10279
10280 2006-08-07  Bruno Haible  <bruno@clisp.org>
10281
10282         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
10283         versions of AIX.
10284         Reported by Ralf Wildenhues.
10285
10286 2006-08-07  Bruno Haible  <bruno@clisp.org>
10287
10288         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
10289         in an AC_DEFUN. Needed so that the autoconf snippets can use
10290         AC_REQUIRE.
10291
10292 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10293
10294         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10295         Initialize pkgdata_DATA.
10296         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
10297         overriding it.
10298
10299 2006-08-06  Eric Blake  <ebb9@byu.net>
10300
10301         * lib/error.h: Fold in some upstream changes from glibc.
10302         * lib/error.c: Likewise.
10303
10304 2006-08-04  Bruno Haible  <bruno@clisp.org>
10305
10306         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10307         Make the mostlyclean-local rule depend on mostlyclean-generic.
10308         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
10309
10310 2006-07-31  Bruno Haible  <bruno@clisp.org>
10311
10312         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
10313         <stdlib.h>, <string.h>.
10314
10315 2006-07-30  Bruno Haible  <bruno@clisp.org>
10316
10317         * modules/readlink (License): Change to LGPL.
10318
10319 2006-07-30  Bruno Haible  <bruno@clisp.org>
10320
10321         * modules/javaversion (Makefile.am): Distribute javaversion.java and
10322         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
10323         set PKGDATADIR to point to it.
10324
10325 2006-07-30  Bruno Haible  <bruno@clisp.org>
10326
10327         * modules/csharpexec (configure.ac): Comment out macro invocation.
10328         * modules/javaexec (configure.ac): Likewise.
10329         * modules/javacomp-script (configure.ac): Likewise.
10330
10331         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
10332
10333 2006-07-30  Bruno Haible  <bruno@clisp.org>
10334
10335         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
10336         linked-list.
10337
10338 2006-07-30  Bruno Haible  <bruno@clisp.org>
10339
10340         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
10341
10342 2006-07-30  Bruno Haible  <bruno@clisp.org>
10343
10344         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10345         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
10346         get removed.
10347
10348 2006-07-29  Bruno Haible  <bruno@clisp.org>
10349
10350         Make it possible for gnulib-tool to work with locally modified or
10351         augmented gnulib repositories.
10352         * gnulib-tool (func_usage): Document --local-dir option.
10353         (local_gnulib_dir): New variable.
10354         Handle --local-dir option.
10355         (func_lookup_file): New function.
10356         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
10357         (func_get_description, func_get_filelist, func_get_description,
10358         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
10359         func_get_automake_snippet, func_get_include_directive,
10360         func_get_license, func_get_maintainer): Use func_lookup_file.
10361         (func_import, func_create_testdir): Use func_lookup_file.
10362
10363 2006-07-29  Bruno Haible  <bruno@clisp.org>
10364
10365         * modules/setenv (Depends-on): Add unistd.
10366
10367 2006-07-29  Bruno Haible  <bruno@clisp.org>
10368
10369         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
10370
10371 2006-07-29  Bruno Haible  <bruno@clisp.org>
10372
10373         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
10374
10375 2006-07-29  Bruno Haible  <bruno@clisp.org>
10376
10377         * gnulib-tool (import, update): If there is no Makefile.am, look at
10378         aclocal.m4, instead of bailing out.
10379
10380 2006-07-29  Bruno Haible  <bruno@clisp.org>
10381
10382         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
10383         Categorize the options by when they are useful.
10384
10385 2006-07-29  Bruno Haible  <bruno@clisp.org>
10386
10387         * gnulib-tool (func_usage): Document option --no-libtool.
10388         Handle option --no-libtool.
10389         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
10390         for changed semantics of $libtool variable.
10391         (func_import): Likewise. If libtool is not used, show this through
10392         an option --no-libtool.
10393         (func_create_testdir): Update.
10394
10395 2006-07-29  Bruno Haible  <bruno@clisp.org>
10396
10397         * gnulib-tool (func_import): Extend error message about missing
10398         --doc-base.
10399
10400 2006-07-29  Bruno Haible  <bruno@clisp.org>
10401
10402         * gnulib-tool (func_import): Don't create the $docbase directory if
10403         there is no file to store there.
10404
10405 2006-07-29  Bruno Haible  <bruno@clisp.org>
10406
10407         * gnulib-tool (autoconf_minversion): If a --dir option is given and
10408         relevant, look for configure.ac there, not in the current directory.
10409         Also use a simple search for AC_PREREQ, not "autoconf --trace".
10410
10411 2006-07-29  Bruno Haible  <bruno@clisp.org>
10412
10413         * gnulib-tool (SORT): New variable.
10414         (func_usage): Undocument --assume-autoconf option.
10415         Remove --assume-autoconf option handling.
10416         (autoconf_minversion): Determine from the contents of configure.ac.
10417         (func_import): Remove autoconf_minversion handling.
10418         Suggested by Eric Blake.
10419
10420 2006-07-29  Bruno Haible  <bruno@clisp.org>
10421
10422         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
10423
10424 2006-07-29  Bruno Haible  <bruno@clisp.org>
10425
10426         * config/srclist.txt (*setenv.[ch]): Remove rules.
10427
10428 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10429
10430         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
10431
10432 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10433
10434         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
10435         arpa/inet.h.
10436
10437 2006-07-28  Simon Josefsson  <jas@extundo.com>
10438
10439         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
10440         * modules/inet_pton (Depends-on): Likewise.
10441
10442 2006-07-28  Simon Josefsson  <jas@extundo.com>
10443
10444         * m4/netinet_in_h.m4: New file.
10445
10446 2006-07-28  Simon Josefsson  <jas@extundo.com>
10447
10448         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
10449         #include's.
10450
10451 2006-07-28  Simon Josefsson  <jas@extundo.com>
10452
10453         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
10454         #include's.
10455
10456 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
10457
10458         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
10459         setgid on directories only if they set these bits.
10460         * lib/modechange.h: Remove obsolete comment about masks.
10461
10462 2006-07-28  Eric Blake  <ebb9@byu.net>
10463
10464         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
10465         macro expansion.
10466
10467 2006-07-28  Bruno Haible  <bruno@clisp.org>
10468
10469         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
10470
10471 2006-07-28  Bruno Haible  <bruno@clisp.org>
10472
10473         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
10474
10475 2006-07-28  Bruno Haible  <bruno@clisp.org>
10476
10477         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
10478         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
10479         Define fallbacks.
10480         Avoids link error on FreeBSD 4.x.
10481         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10482
10483         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
10484         encoding.
10485         * lib/mbswidth.c (iswcntrl): Likewise.
10486
10487 2006-07-27  Bruno Haible  <bruno@clisp.org>
10488
10489         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
10490         test.
10491
10492 2006-07-27  Bruno Haible  <bruno@clisp.org>
10493
10494         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
10495         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
10496         defined.
10497
10498 2006-07-26  Eric Blake  <ebb9@byu.net>
10499
10500         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
10501
10502 2006-07-26  Eric Blake  <ebb9@byu.net>
10503
10504         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
10505         like mingw that lack mkstemp.
10506         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
10507         avoid compilation warning on mingw.
10508
10509 2006-07-26  Bruno Haible  <bruno@clisp.org>
10510
10511         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
10512         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
10513         INT_FAST*_MIN, INTPTR_MIN.
10514
10515 2006-07-25  Bruno Haible  <bruno@clisp.org>
10516
10517         * modules/version-etc (Depends-on): Add stdarg.
10518
10519 2006-07-25  Bruno Haible  <bruno@clisp.org>
10520
10521         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
10522         complex commands.
10523
10524 2006-07-25  Bruno Haible  <bruno@clisp.org>
10525
10526         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
10527         defined in <stdarg.h> or config.h.
10528
10529 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10530
10531         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
10532         (gl_STDIO_SAFER): Remove.
10533
10534 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10535
10536         * MODULES.html.sh (File stream based Input/Output):
10537         Add fopen-safer, tmpfile-safer; remove stdio-safer.
10538         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
10539         * modules/fopen-safer, modules/tmpfile-safer: New files.
10540         * modules/stdio-safer: Remove.
10541
10542 2006-07-24  Bruno Haible  <bruno@clisp.org>
10543
10544         * modules/tmpdir: New file.
10545         * MODULES.html.sh (File system functions): Add it.
10546
10547 2006-07-24  Bruno Haible  <bruno@clisp.org>
10548
10549         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
10550         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
10551
10552 2006-07-24  Bruno Haible  <bruno@clisp.org>
10553
10554         * modules/clean-temp: New file.
10555
10556 2006-07-24  Bruno Haible  <bruno@clisp.org>
10557
10558         * m4/tmpdir.m4: New file, from GNU gettext.
10559
10560 2006-07-24  Bruno Haible  <bruno@clisp.org>
10561
10562         * lib/tmpdir.h: New file, from GNU gettext.
10563         * lib/tmpdir.c: New file, from GNU gettext.
10564
10565 2006-07-24  Bruno Haible  <bruno@clisp.org>
10566
10567         * lib/clean-temp.h: New file, from GNU gettext.
10568         * lib/clean-temp.c: New file, from GNU gettext.
10569
10570 2006-07-23  Eric Blake  <ebb9@byu.net>
10571
10572         * modules/stdio-safer (Files): Add tmpfile-safer.c.
10573         (Depends-on): Add binary-io.
10574
10575 2006-07-23  Eric Blake  <ebb9@byu.net>
10576
10577         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
10578
10579 2006-07-23  Eric Blake  <ebb9@byu.net>
10580
10581         * lib/tmpfile-safer.c: New file.
10582         * lib/stdio-safer.h (fopen_safer): Add prototype.
10583         * lib/stdio--.h (tmpfile): Make safer.
10584
10585 2006-07-23  Bruno Haible  <bruno@clisp.org>
10586
10587         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
10588         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
10589         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
10590         gl_linked_remove_at): Use it.
10591
10592 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10593         and Simon Josefsson <jas@extundo.com>
10594
10595         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
10596
10597         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
10598
10599 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10600
10601         * modules/close-stream: New file.
10602         * modules/closeout (Description): Make it clear that it exits
10603         with a diagnostic on error.
10604         (Depends-on): Add close-stream.  Remove fpending, stdbool.
10605         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
10606
10607 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10608
10609         * m4/close-stream.m4: New file.
10610
10611 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10612
10613         * lib/close-stream.c, lib/close-stream.h: New files.
10614
10615 2006-07-22  Bruno Haible  <bruno@clisp.org>
10616
10617         Merge from GNU gettext 0.15.
10618
10619         2006-05-01  Bruno Haible  <bruno@clisp.org>
10620
10621                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
10622
10623         2006-07-22  Bruno Haible  <bruno@clisp.org>
10624
10625                 * modules/javaversion: New file.
10626                 * MODULES.html.sh (Java): Add javaversion.
10627
10628         2006-03-12  Bruno Haible  <bruno@clisp.org>
10629
10630                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
10631
10632         2005-12-04  Bruno Haible  <bruno@clisp.org>
10633
10634                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
10635                 (untested).
10636
10637         2006-06-21  Bruno Haible  <bruno@clisp.org>
10638
10639                 Avoid warnings from recent versions of mcs.
10640                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
10641                 -o, -L, -r any more. Use options documented since mcs-1.0
10642                 instead. Similarly for -g.
10643
10644         2005-12-04  Bruno Haible  <bruno@clisp.org>
10645
10646                 * build-aux/csharpcomp.sh.in: Suffix for resources is
10647                 .resources, not .resource.
10648
10649         2005-07-09  Bruno Haible  <bruno@clisp.org>
10650
10651                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
10652                 add a .dll suffix.
10653                 Reported by Mark Junker <mjscod@gmx.de>.
10654
10655         2006-07-22  Bruno Haible  <bruno@clisp.org>
10656
10657                 * modules/gettext: Upgrade to gettext-0.15.
10658                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
10659                 m4/visibility.m4.
10660                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
10661
10662 2006-07-22  Bruno Haible  <bruno@clisp.org>
10663
10664         Merge from GNU gettext 0.15.
10665
10666         2006-03-25  Bruno Haible  <bruno@clisp.org>
10667
10668                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
10669
10670         2006-07-21  Bruno Haible  <bruno@clisp.org>
10671
10672                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
10673                 "1.1".
10674
10675         2006-05-09  Bruno Haible  <bruno@clisp.org>
10676
10677                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
10678                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
10679                 for the conftestver execution.
10680
10681         2006-05-01  Bruno Haible  <bruno@clisp.org>
10682
10683                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
10684                 optional target-version argument. Verify that the compiler
10685                 groks source of the specified source-version, or add -source
10686                 option as necessary. Verify that the compiler produces
10687                 bytecode in the specified target-version, or add -target and
10688                 -source options as necessary. Make the result of the test
10689                 available as variable CONF_JAVAC. Also log error output in
10690                 config.log.
10691
10692         2006-03-11  Bruno Haible  <bruno@clisp.org>
10693
10694                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
10695
10696         2006-05-09  Bruno Haible  <bruno@clisp.org>
10697
10698                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
10699                 CLASSPATH_SEPARATOR to a semicolon.
10700
10701         2006-03-12  Bruno Haible  <bruno@clisp.org>
10702
10703                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
10704                 available as variable CONF_JAVA, for subsequent autoconf
10705                 tests. Also log error output in config.log.
10706
10707         2006-07-19  Bruno Haible  <bruno@clisp.org>
10708
10709                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
10710                 that getline works on glibc2 systems. Needed to avoid trouble
10711                 in relocatable.c.
10712                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
10713
10714         2005-12-04  Bruno Haible  <bruno@clisp.org>
10715
10716                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
10717                 launcher (untested).
10718
10719         2005-12-04  Bruno Haible  <bruno@clisp.org>
10720
10721                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
10722
10723         2006-07-22  Bruno Haible  <bruno@clisp.org>
10724
10725                 * gettext.m4: Update from GNU gettext-0.15.
10726                 * nls.m4: Likewise.
10727                 * po.m4: Likewise.
10728                 * inttypes-pri.m4: Likewise.
10729                 * inttypes-h.m4: Renamed from inttypes.m4.
10730                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
10731
10732 2006-07-22  Bruno Haible  <bruno@clisp.org>
10733
10734         Merge from GNU gettext 0.15.
10735
10736         2005-07-05  Bruno Haible  <bruno@clisp.org>
10737
10738                 * printf-args.c (printf_fetchargs): Work around broken
10739                 definition of wint_t on mingw.
10740
10741         2005-02-12  Bruno Haible  <bruno@clisp.org>
10742
10743                 * xallocsa.h: Add extern "C" for C++.
10744
10745         2006-05-17  Bruno Haible  <bruno@clisp.org>
10746
10747                 Cygwin portability.
10748                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
10749
10750         2006-04-30  Bruno Haible  <bruno@clisp.org>
10751
10752                 * progreloc.c: Include <mach-o/dyld.h> if available.
10753                 (find_executable): Use _NSGetExecutablePath when possible.
10754
10755         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
10756
10757                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
10758                 function.
10759
10760         2005-12-29  Bruno Haible  <bruno@clisp.org>
10761
10762                 * progreloc.c (set_program_name_and_installdir): Fix
10763                 compilation error.
10764
10765         2005-12-04  Bruno Haible  <bruno@clisp.org>
10766
10767                 Cygwin portability.
10768                 * progreloc.c: Include <windows.h> also on Cygwin.
10769                 (find_executable): Add support for Cygwin.
10770                 (set_program_name_and_installdir): Handle also platforms with
10771                 nonempty EXEEXT.
10772
10773         2006-07-11  Bruno Haible  <bruno@clisp.org>
10774
10775                 * javacomp.c: Fix a comment.
10776                 Reported by Jim Meyering.
10777
10778         2006-04-30  Bruno Haible  <bruno@clisp.org>
10779
10780                 * javacomp.h (compile_java_class): Add source_version,
10781                 target_version arguments.
10782                 * javacomp.c: Rewritten to choose only a compiler that
10783                 respects the specified source_version and target_version.
10784
10785         2006-06-27  Bruno Haible  <bruno@clisp.org>
10786
10787                 Assume correct S_ISDIR macro.
10788                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
10789
10790         2006-07-22  Bruno Haible  <bruno@clisp.org>
10791
10792                 * javaversion.h: New file, from GNU gettext.
10793                 * javaversion.c: New file, from GNU gettext.
10794                 * javaversion.java: New file, from GNU gettext.
10795                 * javaversion.class: New file, from GNU gettext.
10796
10797         2006-05-17  Bruno Haible  <bruno@clisp.org>
10798
10799                 Cygwin portability.
10800                 * javaexec.c (execute_java_class): Test for jview program
10801                 also on Cygwin.
10802
10803         2006-04-09  Bruno Haible  <bruno@clisp.org>
10804
10805                 * fatal-signal.c: Don't include string.h.
10806                 (at_fatal_signal): Use a copying loop instead of memcpy.
10807
10808         2005-12-04  Bruno Haible  <bruno@clisp.org>
10809
10810                 * csharpexec.c: Add support for 'clix' launcher (untested).
10811                 (execute_csharp_using_sscli): New function.
10812                 (execute_csharp_program): Call it.
10813
10814         2006-06-21  Bruno Haible  <bruno@clisp.org>
10815
10816                 Avoid warnings from recent versions of mcs.
10817                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
10818                 -o, -L, -r any more. Use options documented since mcs-1.0
10819                 instead. Similarly for -g.
10820
10821         2005-07-09  Bruno Haible  <bruno@clisp.org>
10822
10823                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
10824                 add a .dll suffix.
10825                 Reported by Mark Junker <mjscod@gmx.de>.
10826
10827         2006-06-17  Bruno Haible  <bruno@clisp.org>
10828
10829                 * config.charset: Update for NetBSD 3.0.
10830
10831         2006-05-17  Bruno Haible  <bruno@clisp.org>
10832
10833                 Cygwin portability.
10834                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
10835
10836         2006-05-16  Bruno Haible  <bruno@clisp.org>
10837
10838                 * localcharset.c [CYGWIN]: Include <windows.h>.
10839                 (get_charset_aliases): For Cygwin, return the same CPxxx
10840                 aliases list as under WIN32.
10841                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
10842                 the environment variables. Fall back to GetACP().
10843
10844         2006-04-05  Bruno Haible  <bruno@clisp.org>
10845
10846                 * config.charset: Update Juan Manuel Guerrero's address.
10847
10848         2005-02-12  Bruno Haible  <bruno@clisp.org>
10849
10850                 * allocsa.h: Add extern "C" for C++.
10851
10852         2005-02-10  Bruno Haible  <bruno@clisp.org>
10853
10854                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
10855                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
10856
10857         2006-07-22  Bruno Haible  <bruno@clisp.org>
10858
10859                 * gettext.h: Update to GNU gettext-0.15.
10860
10861 2006-07-22  Bruno Haible  <bruno@clisp.org>
10862
10863         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
10864         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
10865         lib-prefix.m4, longdouble.m4, ssize_t.m4.
10866
10867 2006-07-21  Eric Blake  <ebb9@byu.net>
10868
10869         * modules/stdlib-safer: New file.
10870         * MODULES.html.sh (File stream based Input/Output): Add
10871         stdlib-safer.
10872
10873 2006-07-21  Eric Blake  <ebb9@byu.net>
10874
10875         * lib/stdlib-safer.h: New file from coreutils, required by
10876         stdlib--.h.
10877
10878 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
10879
10880         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
10881
10882 2006-07-20  Bruno Haible  <bruno@clisp.org>
10883
10884         * gnulib-tool: Recognize new option --assume-autoconf.
10885         (autoconf_minversion): New variable.
10886         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
10887
10888 2006-07-20  Bruno Haible  <bruno@clisp.org>
10889
10890         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
10891
10892 2006-07-19  Derek R. Price  <derek@ximbiot.com>
10893
10894         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
10895         Reindent and repaginate.
10896
10897 2006-07-19  Derek Price  <derek@ximbiot.com>
10898
10899         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
10900         Correct grammar.
10901
10902 2006-07-17  Bruno Haible  <bruno@clisp.org>
10903
10904         * modules/list: New file.
10905         * modules/array-list: New file.
10906         * modules/carray-list, modules/carray-list-tests: New files.
10907         * modules/linked-list, modules/linked-list-tests: New files.
10908         * modules/avltree-list, modules/avltree-list-tests: New files.
10909         * modules/rbtree-list, modules/rbtree-list-tests: New files.
10910         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
10911         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
10912         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
10913         * modules/oset: New file.
10914         * modules/array-oset: New file.
10915         * modules/avltree-oset, modules/avltree-oset-tests: New files.
10916         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
10917         * tests/test-carray_list.c: New file.
10918         * tests/test-linked_list.c: New file.
10919         * tests/test-avltree_list.c: New file.
10920         * tests/test-rbtree_list.c: New file.
10921         * tests/test-linkedhash_list.c: New file.
10922         * tests/test-avltreehash_list.c: New file.
10923         * tests/test-rbtreehash_list.c: New file.
10924         * tests/test-avltree_oset.c: New file.
10925         * tests/test-rbtree_oset.c: New file.
10926         * MODULES.html.sh (Container data structures): New section.
10927
10928 2006-07-17  Bruno Haible  <bruno@clisp.org>
10929
10930         * m4/gl_list.m4: New file.
10931
10932 2006-07-17  Bruno Haible  <bruno@clisp.org>
10933
10934         * lib/gl_list.h: New file.
10935         * lib/gl_list.c: New file.
10936         * lib/gl_array_list.h: New file.
10937         * lib/gl_array_list.c: New file.
10938         * lib/gl_carray_list.h: New file.
10939         * lib/gl_carray_list.c: New file.
10940         * lib/gl_linked_list.h: New file.
10941         * lib/gl_linked_list.c: New file.
10942         * lib/gl_anylinked_list1.h: New file.
10943         * lib/gl_anylinked_list2.h: New file.
10944         * lib/gl_avltree_list.h: New file.
10945         * lib/gl_avltree_list.c: New file.
10946         * lib/gl_anyavltree_list1.h: New file.
10947         * lib/gl_anyavltree_list2.h: New file.
10948         * lib/gl_rbtree_list.h: New file.
10949         * lib/gl_rbtree_list.c: New file.
10950         * lib/gl_anyrbtree_list1.h: New file.
10951         * lib/gl_anyrbtree_list2.h: New file.
10952         * lib/gl_anytree_list1.h: New file.
10953         * lib/gl_anytree_list2.h: New file.
10954         * lib/gl_linkedhash_list.h: New file.
10955         * lib/gl_linkedhash_list.c: New file.
10956         * lib/gl_anyhash_list1.h: New file.
10957         * lib/gl_anyhash_list2.h: New file.
10958         * lib/gl_avltreehash_list.h: New file.
10959         * lib/gl_avltreehash_list.c: New file.
10960         * lib/gl_rbtreehash_list.h: New file.
10961         * lib/gl_rbtreehash_list.c: New file.
10962         * lib/gl_anytreehash_list1.h: New file.
10963         * lib/gl_anytreehash_list2.h: New file.
10964
10965         * lib/gl_oset.h: New file.
10966         * lib/gl_oset.c: New file.
10967         * lib/gl_array_oset.h: New file.
10968         * lib/gl_array_oset.c: New file.
10969         * lib/gl_avltree_oset.h: New file.
10970         * lib/gl_avltree_oset.c: New file.
10971         * lib/gl_rbtree_oset.h: New file.
10972         * lib/gl_rbtree_oset.c: New file.
10973         * lib/gl_anytree_oset.h: New file.
10974
10975 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10976
10977         * m4/mkancesdirs.m4: New file.
10978         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
10979         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
10980         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
10981         it.
10982
10983 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10984
10985         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
10986         * lib/mkancesdirs.h: New files.
10987         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
10988         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
10989         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
10990         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
10991         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
10992         callers changed.  Revamp internals significantly, by not
10993         attempting to create directories that are temporarily more
10994         permissive than the final results.  Do not attempt to use
10995         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
10996         This removes some race conditions, fixes some bugs, and simplifies
10997         things.  Use new dirchownmod function to do owner and mode changes.
10998         * lib/mkdir-p.h: Likewise.
10999         * lib/modechange.c (octal_to_mode): New function.
11000         (struct mode_change): New member mentioned.
11001         (make_node_op_equals): New arg mentioned.  All callers changed.
11002         (mode_compile): Keep track of which mode bits the user has explicitly
11003         mentioned.
11004         (mode_adjust): New arg DIR, so that we implement the X op correctly.
11005         New arg PMODE_BITS, to keep track of which mode bits the user
11006         mentioned; it treats S_ISUID and S_ISGID speciall.
11007         All callers changed.
11008         * lib/modechange.h: Likewise.
11009
11010 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
11011
11012         * MODULES.html.sh: Add mkancestors.
11013         * modules/mkancesdirs: New module.
11014         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
11015         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
11016         The chdir-safer and afs files are now orphans; I'll remove them
11017         unless someone speaks up.
11018         Add lib/dirchownmod.c, lib/dirchownmod.h.
11019         (Depends-on): Remove alloca, chown, save-cwd, dirname.
11020         Add lchown, mkancesdirs.
11021         (Maintainer): Add self.
11022
11023 2006-07-15  Karl Berry  <karl@gnu.org>
11024
11025         * gnulib-tool: help message wording/arrangement.
11026
11027 2006-07-14  Simon Josefsson  <jas@extundo.com>
11028
11029         * doc/gnulib.texi (Libtool and Windows): New section.
11030
11031 2006-07-12  Simon Josefsson  <jas@extundo.com>
11032
11033         * modules/gendocs (License): Fix license, approved by Karl.
11034
11035 2006-07-12  Eric Blake  <ebb9@byu.net>
11036
11037         * MODULES.html.sh: Add gendocs.
11038
11039 2006-07-11  Eric Blake  <ebb9@byu.net>
11040
11041         * modules/fdl: New module, to install doc/fdl.texi.
11042         * MODULES.html.sh: Add new section for documentation modules.
11043         * gnulib-tool: Avoid space-tab.
11044         (--doc-base): New option, to manage files from doc.
11045
11046 2006-07-11  Eric Blake  <ebb9@byu.net>
11047
11048         * m4/absolute-header.m4: Fix comments to match recent change.
11049
11050 2006-07-11  Eric Blake  <ebb9@byu.net>
11051
11052         * gnulib-tool: List --doc-base before --tests-base.
11053
11054 2006-07-11  Derek R. Price  <derek@ximbiot.com>
11055
11056         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
11057
11058 2006-07-11  Bruno Haible  <bruno@clisp.org>
11059
11060         * README: Mention where to put documentation.
11061
11062 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11063
11064         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
11065
11066 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
11067
11068         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
11069         to stdint.m4.
11070
11071 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
11072
11073         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
11074         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
11075         "no/such/file/stdint.h" when there is no such file, so that
11076         the resulting C code can be parsed by dodgy compilers.
11077         Problems reported by Bob Proulx.
11078
11079 2006-07-10  Derek R. Price  <derek@ximbiot.com>
11080
11081         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
11082         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
11083         macros into the GNU _D_EXACT_NAMLEN.
11084         * lib/savedir.c:  Likewise.
11085         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
11086
11087 2006-07-10  Derek R. Price  <derek@ximbiot.com>
11088         and Paul Eggert  <eggert@cs.ucla.edu>
11089
11090         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
11091         * m4/savedir.m4:
11092         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
11093         macros into the GNU _D_EXACT_NAMLEN.
11094
11095 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
11096
11097         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
11098         around the absolute name, to work around a problem with the HP-UX
11099         11.23 native C compiler, reported by Bob Proulx.
11100
11101 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
11102
11103         * doc/maintain.texi, make-stds.texi: Sync from
11104         <http://savannah.gnu.org/projects/gnustandards>.
11105
11106 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
11107
11108         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
11109
11110 2006-07-09  Jim Meyering  <jim@meyering.net>
11111
11112         * m4/glob.m4: Remove a doubled word in a comment.
11113
11114 2006-07-09  Jim Meyering  <jim@meyering.net>
11115
11116         * lib/argp-pv.c: Remove a doubled word in a comment.
11117         * lib/check-version.c (check_version): Likewise.
11118         * lib/javacomp.c (compile_java_class): Likewise.
11119
11120 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11121
11122         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
11123         for the benefit of people using Autoconf 2.60.  If you want to
11124         support older Autoconf versions you can copy m4/onceonly_2_57.m4
11125         (or m4/onceonly.m4, if pre-2.57) manually.
11126
11127 2006-07-08  Jim Meyering  <jim@meyering.net>
11128
11129         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
11130         comment.
11131         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
11132         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
11133         comment.
11134
11135 2006-07-08  Jim Meyering  <jim@meyering.net>
11136
11137         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
11138
11139 2006-07-07  Simon Josefsson  <jas@extundo.com>
11140
11141         * tests/test-crc.c: Change expected crc value, the test vector
11142         were probably computed using the old broken crc.c?
11143
11144 2006-07-06  Simon Josefsson  <jas@extundo.com>
11145
11146         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
11147         now the canonical place for the M4 file).
11148
11149         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
11150         from the sys_socket dependency now.
11151
11152         * modules/inet_pton (Files): Ditto.
11153
11154         * modules/inet_ntop (Files): Ditto.
11155
11156 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11157
11158         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
11159         not gl_PREREQ_GETUSERSHELL.
11160
11161 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11162
11163         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
11164         with only one argument, for Autoconf 2.60.
11165         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
11166         expand to nothing, so add a shell command to avoid syntax error.
11167         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11168
11169 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11170
11171         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
11172
11173 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11174
11175         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
11176         no longer needed.  Check for isblank decl.
11177         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
11178         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
11179         of existence.
11180
11181 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11182
11183         * lib/getloadavg.c: Use __VMS, not VMS.
11184         * lib/getopt.c: Likewise.
11185         * lib/getpagesize.h: Likewise.
11186         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
11187         and probably does not work.
11188
11189 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11190
11191         * lib/.cppi-disable: Add wcwidth.
11192         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
11193         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
11194         (ISGRAPH): Remove.  All uses changed to isgraph.
11195         (FOLD) [!defined _LIBC]: Remove special case.
11196         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
11197         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
11198         HAVE_ISBLANK.
11199         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
11200         case.
11201
11202 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
11203
11204         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
11205         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
11206         brackets.  Other minor changes to suppress some compiler
11207         warnings.
11208
11209 2006-07-06  Derek R. Price  <derek@ximbiot.com>
11210         and Paul Eggert  <eggert@cs.ucla.edu>
11211
11212         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
11213         of invoking obsolescent AC_HEADER_DIRENT macro.
11214         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
11215         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
11216         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
11217         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
11218         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
11219         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
11220         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
11221         * m4/readdir.m4: Remove; no longer needed.
11222
11223 2006-07-06  Derek R. Price  <derek@ximbiot.com>
11224         and Paul Eggert  <eggert@cs.ucla.edu>
11225
11226         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
11227         Don't worry about this obsolete case any more.
11228         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
11229         directories.
11230         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
11231         worry about this obsolete case any more.
11232         * lib/fts.c: Likewise.
11233         * lib/getcwd.c: Likewise.
11234         * lib/glob.h: Likewise.
11235         * lib/savedir.c: Likewise.
11236
11237 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11238
11239         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
11240         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
11241         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
11242         needed.
11243         All uses removed.
11244         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
11245         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
11246         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
11247         needed.
11248         * m4/getdate.m4 (gl_GETDATE): Likewise.
11249         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
11250         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
11251         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
11252         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
11253         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
11254         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
11255         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
11256         needed.
11257
11258 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11259
11260         * lib/memcasecmp.c: Include <limits.h>.
11261         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
11262         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
11263         Don't assume isdigit succeeds only on '0' through '9'.
11264
11265 2006-07-05  Eric Blake  <ebb9@byu.net>
11266
11267         * modules/getaddrinfo (Depends-on): Add snprintf.
11268
11269 2006-07-05  Eric Blake  <ebb9@byu.net>
11270
11271         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
11272         to avoid 'header present but could not be compiled' on cygwin.
11273
11274 2006-07-05  Eric Blake  <ebb9@byu.net>
11275
11276         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
11277         missing from netdb.h.
11278         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
11279
11280 2006-07-05  Derek R. Price  <derek@ximbiot.com>
11281
11282         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
11283         no longer needed.
11284         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
11285         * m4/getdate.m4 (gl_GETDATE): Likewise.
11286         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
11287         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
11288         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
11289         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
11290         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
11291
11292 2006-07-05  Derek R. Price  <derek@ximbiot.com>
11293
11294         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
11295         All uses of is_space replaced by isspace.
11296         * lib/exit.h: Don't talk about STDC_HEADERS.
11297         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
11298         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
11299         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
11300         replaced by isprint etc.
11301         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
11302         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
11303         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
11304         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
11305         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
11306         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
11307
11308 2006-07-05  Bruno Haible  <bruno@clisp.org>
11309
11310         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
11311         the function exists, before testing against AIX.
11312         Reported by Martin Lambers <marlam@marlam.de>.
11313
11314 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
11315
11316         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
11317         From Mark D. Baushke.
11318
11319 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
11320
11321         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
11322         to the absolute name, not just one, to bypass Sun C 5.8's
11323         "warning: #include of /usr/include/... may be non-portable".
11324
11325 2006-07-04  Eric Blake  <ebb9@byu.net>
11326
11327         * modules/dirname-tests: New test module.
11328         * tests/test-dirname.c: New file, replacing dirname.c
11329         TEST_DIRNAME section that was recently deleted.
11330
11331 2006-07-04  Bruno Haible  <bruno@clisp.org>
11332
11333         Assume ANSI C header files and <ctype.h> functions.
11334         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
11335         (mbsnwidth): Use isprint, iscntrl instead.
11336
11337 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11338
11339         Merge from coreutils.
11340         * MODULES.html.sh: Add xstrtold.
11341         * modules/xstrtold: New file.
11342         * modules/cycle-check (Files): Add lib/same-inode.h.
11343         * modules/dirname (Files): Add m4/double-slash-root.m4.
11344         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
11345         * modules/mkdir-p (Files): Add lib/same-inode.h.
11346         * modules/same (Files): Add lib/same-inode.h.
11347
11348 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11349
11350         * m4/absolute-header.m4: Renamed from full-header-path.m4.
11351         This is to keep the terminology clean; POSIX talks about
11352         "absolute pathnames", not "full pathnames", but the GNU
11353         Coding Standards say to use "path" for something else;
11354         so use "absolute" to keep both sides happy.
11355         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
11356         Set gl_absolute_header, not gl_full_header_path.
11357         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
11358         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
11359         All uses changed.
11360
11361         Merge from coreutils.
11362
11363         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
11364
11365         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
11366         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
11367         want to require the building of c-strtod.o.
11368         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
11369         needs -lm directly.
11370         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
11371
11372         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
11373
11374         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
11375         --as-needed option if available.  Problem reported by Albert Chin in
11376         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
11377         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
11378         cc merely issues a bunch of annoying warnings for --as-needed
11379         (this problem was reported by Bob Proulx).  Also, try linking with
11380         -lm to detect a bug in binutils 2.16 (this problem was reported
11381         by Ralf Wildenhues).
11382
11383         2006-06-18  Jim Meyering  <jim@meyering.net>
11384
11385         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
11386         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
11387         macro.
11388         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
11389         also check for glibc-2.4's abort-inducing bug.
11390
11391         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
11392         Low-probability clean-up should be to use rmdir to get rid of
11393         the just-created directory, not unlink.
11394
11395         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
11396         configure fail, and request a bug report to inform us about it.
11397         Add a comment that, barring reports to the contrary, in 2007 we'll
11398         assume ftruncate is universally available.
11399
11400         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
11401
11402         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
11403
11404         2006-03-12  Jim Meyering  <jim@meyering.net>
11405
11406         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
11407         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
11408         * m4/same.m4 (gl_SAME): Likewise.
11409         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
11410
11411         2006-03-11  Eric Blake  <ebb9@byu.net>
11412
11413         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
11414         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
11415         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
11416         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
11417
11418 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11419
11420         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
11421         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
11422         reported by Mark D. Baushke, one in
11423         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
11424
11425         Merge from coreutils.
11426
11427         * lib/.cppi-disable: Add stdint_.h.
11428         * lib/.cvsignore: Add stdint.h.
11429
11430         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
11431
11432         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
11433         both double and long double versions.
11434         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
11435         * lib/xstrtold.c: New file.
11436         * lib/xstrtod.h (xstrtold): New decl.
11437
11438         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11439
11440         * lib/filemode.c (setst): Remove.
11441         (strmode): Rewrite to avoid setst.  This makes the code shorter,
11442         (arguably) clearer, and the generated code is a bit smaller on my
11443         Debian GNU/Linux stable x86 host.
11444
11445         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
11446
11447         * lib/filemode.c: Include "filemode.h" first, to test the interface.
11448         Assume that filemode.h includes sys/types.h and sys/stat.h.
11449         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
11450         (ftypelet): Reorder to put common cases first, for efficiency.
11451         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
11452         to do 'M'.
11453         (strmode): Renamed from mode_string, and now stores 12 bytes instead
11454         of 10, for compatibility with FreeBSD.  All callers changed.
11455         (filemodestring): Now stores 12 bytes instead of 10, and sets file
11456         types that can't be deduced solely from st_mode.  First arg is now a
11457         const pointer.
11458         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
11459         (strmode): Renamed from mode_string.
11460         (filemodestring): New decl.
11461         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
11462         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
11463         needed.
11464         (S_ISPORT, S_ISWHT): New macros, if not already defined.
11465
11466         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
11467
11468         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
11469         fsusage.h now does that.  Include fsusage.h first, to test interface.
11470         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
11471         at most one method (the old code could have generated decls that
11472         didn't conform to C89, not that this was ever exercised).
11473         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
11474
11475         2006-03-19  Jim Meyering  <jim@meyering.net>
11476
11477         Work even in a chroot where d_ino values for entries in "/"
11478         don't match the stat.st_ino values for the same names.
11479         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
11480         number, iterate through all entries again, using lstat instead.
11481         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
11482         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
11483
11484         * lib/getcwd.c (__getcwd): Clarify a comment.
11485         Use memcpy in place of a call to strcpy.
11486
11487         2006-03-12  Jim Meyering  <jim@meyering.net>
11488
11489         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
11490         matches that of the current directory (which we're about to chdir ".."
11491         out of), then save the dev-ino of the parent, instead.
11492
11493         * lib/same-inode.h (SAME_INODE): New file/macro.
11494         * lib/chdir-safer.c (SAME_INODE): Remove definition.
11495         Include "same-inode.h", instead.
11496         * lib/same.c: Likewise.
11497         * lib/cycle-check.h: Include "same-inode.h".
11498         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
11499         * lib/cycle-check.c (SAME_INODE): Remove definition.
11500         * lib/root-dev-ino.h: Include "same-inode.h".
11501
11502         2006-03-11  Eric Blake  <ebb9@byu.net>
11503
11504         * lib/same.c (same_name): s/base_name/last_component/
11505         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
11506         * lib/filenamecat.c (file_name_concat): Likewise.
11507
11508         2006-03-11  Eric Blake  <ebb9@byu.net>,
11509                     Paul Eggert  <eggert@cs.ucla.edu>
11510
11511         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
11512         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
11513         drive prefix.
11514         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
11515         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
11516         (last_component): New method.
11517         * lib/dirname.c (dir_len): Determine when drive letters need a
11518         subsequent slash.  Preserve // when it is special.
11519         (dir_name): Don't append dot when drive letter is absolute.
11520         [TEST_DIRNAME]: Move into a full-blown gnulib test.
11521         * lib/basename.c (base_name): New semantics - malloc the result.
11522         Preserve // when it is special.  Preserve relative files that look
11523         like drive letters.
11524         (base_len): Preserve // when it is special.
11525         (last_component): New method, similar to old base_name semantics.
11526         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
11527         base_name.  Strip redundant slashes from ///.
11528
11529 2006-07-03  Jim Meyering  <jim@meyering.net>
11530
11531         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
11532         macro is used before the first cycle_check call.
11533
11534 2006-07-03  Eric Blake  <ebb9@byu.net>
11535
11536         * modules/dirname (Depends-on): Add xstrndup.
11537
11538 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11539
11540         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
11541         test cases, so that config.log is a bit easier to follow.
11542
11543 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11544
11545         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
11546         both are 64 bits, since this seems to be the tradition, and this
11547         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
11548         we ever run into a host that prefers long long to long in this
11549         case, we'll need another configure-time test.  Problem reported by
11550         Jim Meyering.
11551
11552 2006-07-02  Eric Blake  <ebb9@byu.net>
11553
11554         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
11555
11556 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11557
11558         * modules/inttypes (Depends-on): No longer depends on stdint.
11559         * modules/stdint (Description): Say more about assumptions.
11560         Say that the fast types might differ.  Say macros are used.
11561         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
11562         (Makefile.am): Revise list of substituted symbols to match
11563         new stdint.m4.
11564         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
11565         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
11566         * tests/test-stdint.c (verify_same_types)
11567         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
11568         the code conforms to C99/C89.
11569         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
11570         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
11571
11572 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11573
11574         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
11575         but fix a bug, by requiring at least 64 bits.
11576         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
11577         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
11578         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
11579         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
11580
11581         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
11582         changes.  Make 2.59 a prerequisite.  Check and substitute for
11583         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
11584         inttypes.h.  Do not use special include files; just use the
11585         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
11586         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
11587         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
11588         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
11589         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
11590         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
11591         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
11592         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
11593         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
11594         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
11595         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
11596         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
11597         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
11598         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
11599         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
11600         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
11601         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
11602         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
11603         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
11604         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
11605         WINT_MAX.  Check for C99 conformance more strictly, by detecting
11606         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
11607         not check for things that C99 does not require, e.g., int8_t.  If
11608         a test isn't needed unless <stdint.h> isn't working, and is
11609         unlikely to be needed for any other reason, then don't do it
11610         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
11611         size_t, since we assume C89 freestanding at least.  Do not check
11612         for sig_atomic_t, wchar_t, or wint_t, since the code now does
11613         the right thing even if the types are not defined.  Instead use:
11614         (gl_STDINT_TYPE_PROPERTIES): New macro.
11615         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
11616         testing whether <sys/types.h> clashes, as Autoconf does this for
11617         us now.  All uses removed.
11618         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
11619         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
11620         (gl_CHECK_TYPE_SAME):
11621         Remove; no longer needed.
11622         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
11623         exists, since we'll return 0 anyway in that case.
11624         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
11625
11626 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11627
11628         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
11629         possible collision with system files.
11630         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
11631         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
11632         WCHAR_MIN and WCHAR_MAX in this case.
11633         (<stddef.h>): Do not include; no longer needed.
11634         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
11635         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
11636         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
11637         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
11638         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
11639         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
11640         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
11641         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
11642         !defined(__c99))]: Include in this case too, since it's harmless
11643         now.
11644         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
11645         dangerous to do so.
11646         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
11647         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
11648         (_STDINT_MIN, _STDINT_MAX): New macros.
11649         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
11650         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
11651         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
11652         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
11653         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
11654         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
11655         macros, not typedefs; this simplifies things quite a bit.
11656         Use long int for all types narrower than int64_t.
11657         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
11658         Define in terms of long long int or int64_t or long int,
11659         not int64_t or int32_t.  This saves some compile-time testing.
11660         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
11661         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
11662         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
11663         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
11664         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
11665         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
11666         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
11667         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
11668         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
11669         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
11670         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11671         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11672         undef any previous version and define our own version, for
11673         simplicity and consistency with the new macros for types.
11674         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11675         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11676         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
11677         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
11678         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
11679         @WINT_T_SUFFIX@ to keep things simple here.
11680         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
11681         Simplify by assuming typical 8/16/32/64 host, since we're
11682         already doing that elsewhere anyway.
11683         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
11684         and assume long long int is 64 bits if available.  This
11685         speeds up 'configure'.
11686
11687 2006-07-01  Eric Blake  <ebb9@byu.net>
11688
11689         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
11690         Reported by Andreas Buening.
11691
11692 2006-07-01  Eric Blake  <ebb9@byu.net>
11693
11694         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
11695
11696 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
11697
11698         * lib/getaddrinfo.c: fixed typo
11699
11700 2006-06-29  Jim Meyering  <jim@meyering.net>
11701
11702         * modules/strftime (Maintainer): Add my name, since with the
11703         FPRINTFTIME changes strftime.c has forked from glibc.
11704
11705 2006-06-29  Eric Blake  <ebb9@byu.net>
11706
11707         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
11708
11709 2006-06-29  Eric Blake  <ebb9@byu.net>
11710
11711         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
11712
11713 2006-06-29  Eric Blake  <ebb9@byu.net>
11714
11715         * lib/stat_.h: New file.
11716
11717 2006-06-29  Eric Blake  <ebb9@byu.net>
11718
11719         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
11720         unused static function.
11721
11722 2006-06-29  Eric Blake  <ebb9@byu.net>
11723
11724         * doc/functions.texi (Function Portability): Document missing lstat
11725         on mingw.
11726
11727 2006-06-29  Eric Blake  <ebb9@byu.net>
11728
11729         * MODULES.html.sh: Add sys_stat.
11730         * modules/sys_stat: New module.
11731         * modules/mkstemp (Depends-on): Add sys_stat.
11732
11733 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11734
11735         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
11736
11737 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11738
11739         * m4/c-bs-a.m4: Removed.
11740
11741 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11742
11743         * lib/strftime.c: Assume strftime() exists.
11744
11745 2006-06-29  Derek Price  <derek@ximbiot.com>
11746
11747         * modules/c-bs-a: Removed - \a is C89.
11748         * MODULES.html.sh: Remove c-bs-a.
11749
11750 2006-06-29  Bruno Haible  <bruno@clisp.org>
11751
11752         * modules/wcwidth (License): Change to LGPL.
11753
11754 2006-06-28  Simon Josefsson  <jas@extundo.com>
11755
11756         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
11757         on _WIN32.
11758
11759         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
11760         getnameinfo.
11761
11762 2006-06-28  Simon Josefsson  <jas@extundo.com>
11763
11764         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
11765
11766 2006-06-28  Simon Josefsson  <jas@extundo.com>
11767
11768         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
11769         functions there.  It will succeed on Windows XP, but on Windows
11770         2000 and (presumably) earlier, it will fail, and use the internal
11771         re-implementation.
11772         (use_win32_p): New function.
11773         (getaddrinfo): Use strtoul on servname, to support numeric ports.
11774         Support AI_NUMERICSERV to disable getservbyname.
11775         (getnameinfo): New function, only supports
11776         NI_NUMERICHOST|NI_NUMERICSERV for now.
11777
11778         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
11779         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
11780         getnameinfo.
11781
11782 2006-06-28  Eric Blake  <ebb9@byu.net>
11783
11784         * modules/wcwidth: New file.
11785         * modules/mbchar (Depends-on): Add wcwidth.
11786         * modules/mbswidth (Depends-on): Add wcwidth.
11787         * MODULES.html.sh: Add wcwidth.
11788
11789 2006-06-28  Eric Blake  <ebb9@byu.net>
11790
11791         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
11792         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
11793
11794 2006-06-28  Eric Blake  <ebb9@byu.net>
11795
11796         * lib/xvasprintf.h: Fix comments.
11797
11798 2006-06-28  Eric Blake  <ebb9@byu.net>
11799
11800         * lib/mbchar.h (wcwidth): Include wcwidth.h.
11801         * lib/mbswidth.c (wcwidth): Move from here...
11802         * lib/wcwidth.h: ...to this new file.
11803
11804 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11805
11806         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
11807
11808         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
11809         it's obsolete.
11810         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
11811
11812 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11813
11814         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
11815         Autoconf 2.60 says this stuff was obsolete.
11816
11817 2006-06-28  Bruno Haible  <bruno@clisp.org>
11818
11819         * modules/wcwidth (Files): Add m4/wchar_t.m4.
11820
11821 2006-06-28  Bruno Haible  <bruno@clisp.org>
11822
11823         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
11824         gt_TYPE_WCHAR_T.
11825
11826 2006-06-28  Bruno Haible  <bruno@clisp.org>
11827
11828         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
11829         declaration for wcwidth.
11830         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
11831
11832 2006-06-28  Bruno Haible  <bruno@clisp.org>
11833
11834         * lib/mkdtemp.c [MINGW]: Include <io.h>.
11835         (mkdir): Define using _mkdir.
11836
11837 2006-06-28  Bruno Haible  <bruno@clisp.org>
11838
11839         * lib/getaddrinfo.h: Fix POSIX URL.
11840         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
11841         _WIN32.
11842         (use_win32_p): Make static.
11843         (getaddrinfo): Reject service name if it is empty or does not consist
11844         solely of decimal digits, or if its value is > 65535.
11845         (getnameinfo): Remove useless casts.
11846
11847 2006-06-27  Simon Josefsson  <jas@extundo.com>
11848
11849         * modules/sys_select: New file, suggested by Bruno Haible, Paul
11850         Eggert and Martin Lambers.
11851
11852 2006-06-27  Simon Josefsson  <jas@extundo.com>
11853
11854         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
11855         Eggert and Martin Lambers.
11856
11857 2006-06-27  Bruno Haible  <bruno@clisp.org>
11858
11859         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
11860         result to 0, not to empty.
11861         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
11862
11863 2006-06-27  Bruno Haible  <bruno@clisp.org>
11864
11865         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
11866
11867 2006-06-26  Simon Josefsson  <jas@extundo.com>
11868
11869         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
11870         present.
11871
11872 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
11873
11874         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
11875         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
11876         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
11877
11878 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
11879
11880         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
11881
11882 2006-06-26  Bruno Haible  <bruno@clisp.org>
11883
11884         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
11885
11886 2006-06-26  Bruno Haible  <bruno@clisp.org>
11887
11888         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
11889
11890 2006-06-26  Bruno Haible  <bruno@clisp.org>
11891
11892         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
11893         SGI C compiler in pre-C99 mode.
11894         Suggested by Mark D. Baushke and Larry Jones.
11895
11896 2006-06-26  Bruno Haible  <bruno@clisp.org>
11897
11898         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
11899         WCHAR_MAX.
11900         Reported by Mark D. Baushke and Larry Jones.
11901
11902 2006-06-26  Bruno Haible  <bruno@clisp.org>
11903
11904         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
11905         in pre-C99 mode.
11906         Suggested by Mark D. Baushke and Larry Jones.
11907
11908 2006-06-23  Simon Josefsson  <jas@extundo.com>
11909             Bruno Haible  <bruno@clisp.org>
11910
11911         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
11912         Emit mostlyclean-local rule.
11913         (func_emit_tests_Makefile_am): Likewise.
11914         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
11915
11916 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
11917
11918         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
11919
11920 2006-06-23  Bruno Haible  <bruno@clisp.org>
11921
11922         * tests/test-stdint.c: Update to match ISO C 99 Technical
11923         Corrigendum 1.
11924
11925 2006-06-23  Bruno Haible  <bruno@clisp.org>
11926
11927         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
11928
11929 2006-06-23  Bruno Haible  <bruno@clisp.org>
11930
11931         * lib/stdint_.h: Treat IRIX like OpenBSD.
11932
11933 2006-06-23  Bruno Haible  <bruno@clisp.org>
11934
11935         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
11936         ISO C 99 Technical Corrigendum 1.
11937
11938 2006-06-22  Simon Josefsson  <jas@extundo.com>
11939
11940         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
11941         MinGW.
11942
11943 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11944
11945         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
11946         needed.  Some compiler complained about some of them.  Problem reported
11947         by Larry Jones in
11948         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
11949
11950 2006-06-21  Simon Josefsson  <jas@extundo.com>
11951
11952         * tests/test-getaddrinfo.c: New file.
11953
11954         * modules/getaddrinfo-tests: New file.
11955
11956         * MODULES.html.sh: Add inet_pton.
11957
11958         * modules/inet_pton: New file.
11959
11960 2006-06-21  Simon Josefsson  <jas@extundo.com>
11961
11962         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
11963         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
11964         of using the (limited) gnulib implementation on Windows XP.
11965
11966         * m4/inet_pton.m4: New file.
11967
11968 2006-06-21  Simon Josefsson  <jas@extundo.com>
11969
11970         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
11971         variable.
11972
11973         * lib/socket_.h: Don't define WINVER.
11974
11975         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
11976         slightly modified to work in gnulib.
11977
11978 2006-06-21  Simon Josefsson  <jas@extundo.com>
11979
11980         * doc/gnulib.texi (Windows sockets): Add.
11981
11982 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11983
11984         * lib/read-file.c (fread_file): Start with buffer allocation of
11985         0 bytes rather than 1 byte; this simplifies the code.
11986         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
11987         code to free buffer and save/restore errno.
11988         (internal_read_file): Remove unused local.
11989
11990 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
11991
11992         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
11993         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
11994         Problem reported by Denis Excoffier in
11995         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
11996
11997 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11998
11999         * modules/sys_socket, modules/socklen: Include sys/types since
12000         FreeBSD 4.x's sys/socket.h needs it.
12001
12002 2006-06-19  Simon Josefsson  <jas@extundo.com>
12003
12004         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
12005
12006 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
12007
12008         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
12009
12010 2006-06-19  Bruno Haible  <bruno@clisp.org>
12011
12012         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
12013         and FULL_PATH_INTTYPES_H in angle brackets.
12014         Reported by Mark D. Baushke <mdb@gnu.org>.
12015
12016 2006-06-17  Eric Blake  <ebb9@byu.net>
12017
12018         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
12019         errno.
12020
12021 2006-06-17  Bruno Haible  <bruno@clisp.org>
12022
12023         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
12024         <sys/inttypes.h>.
12025
12026 2006-06-17  Bruno Haible  <bruno@clisp.org>
12027
12028         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
12029         whether errno is declared. Assume <errno.h> declares errno.
12030
12031 2006-06-17  Bruno Haible  <bruno@clisp.org>
12032
12033         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
12034
12035 2006-06-17  Bruno Haible  <bruno@clisp.org>
12036
12037         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
12038         problem on Solaris 2.5.1.
12039
12040 2006-06-16  Eric Blake  <ebb9@byu.net>
12041
12042         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
12043         * lib/unicodeio.c [!defined errno]: Likewise.
12044         * lib/strtol.c [!defined errno]: Likewise.
12045         * lib/strtod.c [!defined errno]: Likewise.
12046
12047 2006-06-15  Eric Blake  <ebb9@byu.net>
12048
12049         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
12050
12051 2006-06-15  Eric Blake  <ebb9@byu.net>
12052
12053         * config/srclist.txt (ssize_t.m4): Lose sync.
12054
12055 2006-06-15  Bruno Haible  <bruno@clisp.org>
12056
12057         * modules/stdint (Files): Include m4/full-header-path.m4,
12058         m4/size_max.m4, m4/wchar_t.m4.
12059         (Makefile.am): Many more substitutions.
12060         * modules/stdint-tests: New file.
12061         * tests/test-stdint.c: New file.
12062
12063 2006-06-15  Bruno Haible  <bruno@clisp.org>
12064
12065         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
12066         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
12067         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
12068         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
12069         gl_CHECK_TYPE_SAME): New macros.
12070
12071 2006-06-15  Bruno Haible  <bruno@clisp.org>
12072
12073         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
12074
12075 2006-06-15  Bruno Haible  <bruno@clisp.org>
12076
12077         * lib/stdint_.h: Rewritten to be fully auto-configured.
12078         Fixes bug on HP-UX/IA64.
12079
12080 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
12081
12082         * lib/getdate.y (__attribute__): Don't define if already defined.
12083         Problem reported by Larry Jones.
12084         * lib/utimens.c (__attribute__): Likewise.
12085
12086 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
12087
12088         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
12089         reported by Andreas Schwab.
12090
12091 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12092             Bruno Haible  <bruno@clisp.org>
12093
12094         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
12095         check for the declaration of strnlen and a run test that exposes the
12096         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
12097         rpl_strndup.
12098
12099 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12100             Bruno Haible  <bruno@clisp.org>
12101
12102         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
12103
12104 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12105
12106         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
12107         compile test, for Tru64 4.0D.
12108
12109 2006-05-28  Karl Berry  <karl@gnu.org>
12110
12111         * config/srclist.txt (printf-args.c): lose sync.
12112
12113 2006-05-26  Martin Lambers  <marlam@marlam.de>
12114
12115         * lib/getpass.c: Updates the test for the native W32 API, and adds
12116         missing includes, thus fixing compilation warnings.
12117
12118 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12119
12120         * lib/exclude.c (exclude_fnmatch): New function.
12121         (excluded_file_name): Call exclude_fnmatch.
12122         * lib/exclude.h (excluded_file_name): New prototype
12123
12124 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
12125
12126         * lib/tempname.c (small_open, large_open): New macros.
12127         (__open, __open64) [!_LIBC]: Remove.
12128         (__gen_tempname): Use small_open and large_open instead of __open
12129         and __open64.  This fixes a portability bug on HP-UX 11.11i
12130         reported by Simon Wing-Tang in
12131         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
12132
12133 2006-05-24  Bruno Haible  <bruno@clisp.org>
12134
12135         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
12136         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
12137         Reported by Thorsten Maerz <torte@netztorte.de> via
12138         Aaron Stone <aaron@serendipity.cx>.
12139
12140 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
12141
12142         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
12143         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
12144         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
12145         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
12146         not really conditional on the cache.
12147         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
12148
12149 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
12152         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
12153         (my_usleep): Don't mishandle maximum value.
12154
12155 2006-05-19  Jim Meyering  <jim@meyering.net>
12156
12157         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
12158
12159 2006-05-17  Bruno Haible  <bruno@clisp.org>
12160
12161         Cygwin portability.
12162         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
12163
12164 2006-05-17  Bruno Haible  <bruno@clisp.org>
12165
12166         * lib/stdint_.h: Fix recognition of Cygwin.
12167
12168 2006-05-15  Bruno Haible  <bruno@clisp.org>
12169
12170         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
12171         on libtool patch by Ralf Wildenhues.
12172
12173 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12174
12175         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
12176         test for C99 conformance; (bool) 0.5 is an integer constant
12177         expression, but (bool) -0.5 is not.  Problem reported by Fedor
12178         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
12179
12180 2006-05-11  Simon Josefsson  <jas@extundo.com>
12181
12182         * m4/xvasprintf.m4: Fix obvious typo.
12183
12184 2006-05-11  Jim Meyering  <jim@meyering.net>
12185
12186         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
12187         James Lemley.
12188
12189 2006-05-10  Simon Josefsson  <jas@extundo.com>
12190
12191         * lib/md4.c: Typo fix, update copyright years.
12192         (K1, K2): Don't use L because it turn computations into 64-bit on
12193         64-bit platforms.
12194
12195 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
12196
12197         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
12198         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
12199         unwanted sign propagation, e.g., on hosts with 64-bit int.
12200         There still are some problems with reeelly weird theoretical hosts
12201         (e.g., 33-bit int) but it's not worth worrying about now.
12202         * lib/sha1.c (rol): Likewise.
12203         (K1, K2, K3, K4): Remove unnecessary L suffix.
12204
12205 2006-05-10  Bruno Haible  <bruno@clisp.org>
12206
12207         * lib/des.c: Cast to avoid warnings.
12208
12209 2006-05-09  Bruno Haible  <bruno@clisp.org>
12210
12211         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
12212         (Depends-on): Depend also on xsize, stdarg.
12213         (configure.ac): Add gl_XVASPRINTF.
12214
12215 2006-05-09  Bruno Haible  <bruno@clisp.org>
12216
12217         * m4/xvasprintf.m4: New file.
12218
12219 2006-05-09  Bruno Haible  <bruno@clisp.org>
12220
12221         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
12222         (EOVERFLOW): Define fallback value.
12223         (xstrcat): New function.
12224         (xvasprintf): Recognize the special case of a string concatenation.
12225
12226 2006-05-08  Eric Blake  <ebb9@byu.net>
12227
12228         * gnulib-tool (func_version): Base copyright year on CVS date.
12229         (func_emit_copyright_notice): New function.
12230         (func_emit_lib_Makefile_am): Use it.
12231         (func_emit_tests_Makefile_am): Likewise.
12232         (func_import): Likewise.
12233
12234 2006-05-08  Bruno Haible  <bruno@clisp.org>
12235
12236         * modules/stdarg: New file.
12237         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
12238
12239 2006-05-08  Bruno Haible  <bruno@clisp.org>
12240
12241         * m4/stdarg.m4: New file, from GNU gettext.
12242
12243 2006-05-08  Bruno Haible  <bruno@clisp.org>
12244
12245         * config/srclist.txt (build-aux/config.rpath): different from latest
12246         release.
12247
12248 2006-05-08  Bruno Haible  <bruno@clisp.org>
12249
12250         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
12251
12252 2006-05-05  Jim Meyering  <jim@meyering.net>
12253
12254         * m4/warning.m4: New file, derived from bison's file by the same name.
12255
12256 2006-05-03  Bruno Haible  <bruno@clisp.org>
12257
12258         * lib/stdint_.h: Shorter URL.
12259         * lib/inttypes.h: Likewise.
12260
12261 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12262
12263         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
12264
12265 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12266
12267         * lib/verify.h: Document the internals better.  Most of this change
12268         was written by Bruno Haible.
12269
12270 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12271
12272         * doc/verify.texi: New file, partly based on a proposal by
12273         Bruno Haible.
12274
12275 2006-05-02  Bruno Haible  <bruno@clisp.org>
12276
12277         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
12278         test from here...
12279         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
12280
12281 2006-04-29  Bruno Haible  <bruno@clisp.org>
12282
12283         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
12284         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
12285
12286 2006-04-29  Bruno Haible  <bruno@clisp.org>
12287
12288         * gnulib-tool: Make --update option actually work.
12289
12290 2006-04-29  Bruno Haible  <bruno@clisp.org>
12291
12292         * doc/gcd.texi: New file.
12293         * doc/gnulib.texi: Include it.
12294
12295 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
12296
12297         * lib/getdate.y (get_date): When adding relative date, start with the
12298         initial time, not with the result of the first mktime call.
12299
12300 2006-04-25  Bruno Haible  <bruno@clisp.org>
12301
12302         * gnulib-tool (func_import): Output the include directives in three
12303         blocks, sorted separately.
12304         Reported by Ben Pfaff <blp@cs.stanford.edu>.
12305
12306 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
12307
12308         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
12309         to define main with arguments, for C++.  Reported by Eric Blake.
12310         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
12311         Prefer 'int main ()' to 'int main (void)', for C++.
12312         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
12313         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
12314         for 'main', for C99 and C++.
12315
12316 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
12317
12318         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
12319         Don't assume that exit status -1 is valid.
12320         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12321         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
12322         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
12323         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
12324         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
12325         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
12326         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
12327         functions can be used without declaring them, or that you can
12328         exit with status -1.
12329         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
12330
12331 2006-04-24  Karl Berry  <karl@gnu.org>
12332
12333         * config/srclist.txt (longdouble.m4): sync lost.
12334
12335 2006-04-24  Eric Blake  <ebb9@byu.net>
12336
12337         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
12338
12339 2006-04-24  Bruno Haible  <bruno@clisp.org>
12340
12341         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
12342         poll() implementation in AIX.
12343         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12344
12345 2006-04-24  Bruno Haible  <bruno@clisp.org>
12346
12347         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
12348         assigned exactly once.
12349
12350 2006-04-23  Claudio Fontana  <claudio@gnu.org>
12351             Bruno Haible  <bruno@clisp.org>
12352
12353         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
12354         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
12355         for AM_CPPFLAGS.
12356
12357 2006-04-23  Bruno Haible  <bruno@clisp.org>
12358
12359         * modules/copy-file: Depend on unistd.
12360         * modules/execute: Likewise.
12361         * modules/fatal-signal: Likewise.
12362         * modules/findprog: Likewise.
12363         * modules/mkdtemp : Likewise.
12364         * modules/pipe: Likewise.
12365         * modules/wait-process: Likewise.
12366
12367 2006-04-23  Bruno Haible  <bruno@clisp.org>
12368
12369         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
12370         condition was already detected.
12371         Reported by Ben Pfaff <blp@cs.stanford.edu>.
12372
12373 2006-04-23  Bruno Haible  <bruno@clisp.org>
12374
12375         * lib/copy-file.c: Include <unistd.h> unconditionally.
12376         * lib/execute.c: Likewise.
12377         * lib/fatal-signal.c: Likewise.
12378         * lib/findprog.c: Likewise.
12379         * lib/mkdtemp.c: Likewise.
12380         * lib/pipe.h: Likewise.
12381         * lib/pipe.c: Likewise.
12382         * lib/wait-process.h: Likewise.
12383
12384 2006-04-23  Bruno Haible  <bruno@clisp.org>
12385
12386         * gnulib-tool (func_usage): Fix --import description. Document
12387         --update.
12388         (func_import): Create temporary file in a temporary directory, if
12389         --dry-run is specified. Silence errors from 'grep' when there are no
12390         m4 files in $m4dir.
12391         (func_create_testdir): Silence errors from 'grep' when there are no
12392         m4 files in $m4dir.
12393         Reported by Karl Berry <karl@freefriends.org>.
12394
12395 2006-04-20  Bruno Haible  <bruno@clisp.org>
12396
12397         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
12398         one argument, so that the code will be portable to Autoconf 2.60.
12399         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
12400         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
12401         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
12402
12403 2006-04-19  Derek Price  <derek@ximbiot.com>
12404             Eric Blake  <ebb9@byu.net>
12405
12406         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
12407         rather than "/full/path.h".  Update comment to match.  Shorten &
12408         generalize m4_translit call via AS_TR_CPP.
12409
12410 2006-04-19  Derek Price  <derek@ximbiot.com>
12411             Eric Blake  <ebb9@byu.net>
12412
12413         * lib/inttypes.h: Correct grammar in comment.
12414
12415 2006-04-18  Derek Price  <derek@ximbiot.com>
12416             Paul Eggert  <eggert@cs.ucla.edu>
12417
12418         * modules/inttypes: New file.
12419         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
12420
12421 2006-04-18  Derek Price  <derek@ximbiot.com>
12422             Paul Eggert  <eggert@cs.ucla.edu>
12423
12424         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
12425         New files.
12426
12427 2006-04-18  Derek Price  <derek@ximbiot.com>
12428             Paul Eggert  <eggert@cs.ucla.edu>
12429
12430         * lib/inttypes.h: New file.
12431         * lib/strtoimax.c: Assume <inttypes.h>.
12432
12433 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
12434
12435         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
12436         isn't mounted.  Problem reported by Kir Kolyshkin.
12437
12438 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12439
12440         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
12441         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
12442         Derek R. Price.
12443         * lib/regex.h (RE_DUP_MAX): Update comment to match current
12444         implementation.
12445
12446 2006-04-12  Eric Blake  <ebb9@byu.net>
12447
12448         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
12449         is now done automatically by the corresponding Autoconf macro.
12450
12451 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
12452
12453         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
12454         time_r.h.
12455
12456 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12457
12458         Merge regex changes from libc, removing some of our
12459         POSIX-conformance changes that were rejected and redoing them in a
12460         less-intrusive way.
12461
12462         * lib/regcomp.c (re_compile_internal, init_dfa):
12463         Length arg is now size_t, not Idx.  All uses changed.
12464         (peek_token): Forward decl now says internal_function.
12465         (__re_error_msgid, __re_error_msgid_idx):
12466         Now static rather than extern with attribute_hidden.
12467         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
12468         For some reason libc prefers K&R style defns for external functions.
12469         (regerror) [!defined _LIBC]: Likewise.
12470         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
12471         (seek_collating_symbol_entry, lookup_collation_sequence_value):
12472         (build_range_exp, build_collating_symbol):
12473         Use K&R-style defn.
12474         (re_compile_fastmap): Use '\0' to memset, not 0.
12475         (utf8_sb_map): Make the calculations more obvious.
12476         (init_dfa, parse_bracket_exp, build_charclass_op):
12477         Call calloc and cast result, as glibc does.
12478         (init_word_char, fetch_token, peek_token, peek_token_bracket):
12479         (build_range_exp, build_collating_symbol):
12480         Now internal functions.
12481
12482         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
12483
12484         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
12485         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
12486         Don't depend on VMS; depend on __VMS instead, for POSIX
12487         namespace cleanness.
12488         (regoff_t): Define to ssize_t, not long int.
12489
12490         Remove the REG_ macros named below.  Instead, make the old names
12491         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
12492         __USE_GNU_REGEX.
12493         (REG_BACKSLASH_ESCAPE_IN_LISTS):
12494         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
12495         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
12496         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
12497         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
12498         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
12499         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
12500         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
12501         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
12502         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
12503         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
12504         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
12505         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
12506         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
12507         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
12508         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
12509         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
12510         (REG_NREGS):
12511         Remove.  All uses replaced by the old RE_* names.
12512         (RE_BACKSLASH_ESCAPE_IN_LISTS):
12513         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
12514         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
12515         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
12516         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
12517         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
12518         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
12519         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
12520         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
12521         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
12522         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
12523         Don't bother having these macros be independent of each others'
12524         values, since they no longer exist in the POSIX name space.
12525
12526         Rename the following member names back to their old names,
12527         unless !__USE_GNU_REGEX.  All uses changed back.
12528         (buffer): Renamed from re_buffer.
12529         (allocated): Renamed from re_allocated.
12530         (used): Renamed from re_used.
12531         (syntax): Renamed from re_syntax.
12532         (fastmap): Renamed from re_fastmap.
12533         (translate): Renamed from re_translate.
12534         (can_be_null): Renamed from re_can_be_null.
12535         (regs_allocated): Renamed from re_regs_allocated.
12536         (fastmap_accurate): Renamed from re_fastmap_accurate.
12537         (no_sub): Renamed from re_no_sub.
12538         (not_bol): Renamed from re_not_bol.
12539         (not_eol): Renamed from re_not_eol.
12540         (newline_anchor): Renamed from re_newline_anchor.
12541         (num_regs): Renamed from rm_num_regs.
12542         (start): Renamed from rm_start.
12543         (end): Renamed from rm_end.
12544
12545         (free_state): Move up a bit.
12546
12547         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
12548         #define to be empty.
12549         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
12550         when that is what is intended.
12551         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
12552         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
12553         (MAX): New macro.
12554         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
12555         All uses changed back to re_malloc, etc.  It's now the caller's
12556         responsibility to check for overflow; all callers changed.
12557         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
12558         (re_x2nrealloc): Remove.
12559         (free_state): Remove decl.
12560
12561         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
12562         (re_set_registers, re_exec):
12563         Use K&R-style defn.
12564
12565         2006-01-31  Roland McGrath  <roland@redhat.com>
12566
12567         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
12568         Reported by Mike Frysinger <vapier@gentoo.org>.
12569
12570         2006-01-15  Andreas Jaeger  <aj@suse.de>
12571
12572         [BZ #1950]
12573         * lib/regex_internal.c (re_string_reconstruct): Adjust for
12574         build_wcs_upper_buffer change.
12575         (build_wcs_upper_buffer): Change return type.
12576
12577         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
12578
12579         * lib/regex_internal.h: Include <stdint.h> if available.
12580
12581         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
12582
12583         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
12584
12585         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
12586
12587         * lib/regcomp.c: Adjust for changed secondary hash function.
12588
12589         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
12590
12591         * lib/regex.h: Pretty printing.
12592         Clean up namespace a bit.
12593
12594         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
12595
12596         * lib/regexec.c (update_cur_sifted_state, check_arrival,
12597         check_arrival_add_next_nodes): Avoid using uninitialized variable.
12598
12599         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12600                     Ulrich Drepper  <drepper@redhat.com>
12601
12602         [BZ #1302]
12603         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
12604         changed.
12605         (bitset_word_t): Renamed from bitset_word.  All uses changed.
12606
12607         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
12608
12609         [BZ #281]
12610         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
12611         * lib/regcomp.c: Remove unnecessary uses of
12612         unsigned RE_TRANSLATE_TYPE.
12613         * lib/regex_internal.h: Likewise.
12614         * lib/regex_internal.c: Likewise.
12615         * lib/regexec.c: Likewise.
12616         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
12617
12618         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
12619
12620         * lib/regexec.c (find_recover_state): Remove unnecessary
12621         initialization.
12622         (transit_state_bkref): Make DFA a const pointer.
12623         (get_subexp): Likewise.
12624         (check_arrival): Likewise.
12625         (update_cur_sifted_state): Likewise.
12626         (re_search_internal): Likewise.
12627         (prune_impossible_nodes): Likewise.
12628         (acquire_init_state_context): Likewise.
12629         (proceed_next_node): Likewise.
12630         (set_regs): Likewise.
12631         (free_fail_stack_return): Likewise.
12632         (check_arrival_expand_ecl): Mark DFA parameter as const.
12633         (check_arrival_expand_ecl_sub): Likewise.
12634         (check_subexp_limits): Likewise.
12635         (sub_epsilon_src_nodes):  Likewise.
12636         (add_epsilon_src_nodes):  Likewise.
12637         (merge_state_array): Likewise.
12638         (update_regs): Likewise.
12639         (build_trtable): Likewise.
12640         (sift_states_backward): Mark MCTX parameter as const.
12641         (build_sifted_states): Likewise.
12642         (update_cur_sifted_state): Likewise.
12643         (sift_states_mkref): Likewise.
12644         (check_arrival_expand_ecl): Mark eclosure as const.
12645         (check_dst_limits_calc_pos_1): Likewise.
12646         * lib/regex_internal.h (re_match_context_t): Make dfa a const
12647         pointer.
12648
12649         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
12650
12651         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
12652         (transit_state_sb): Likewise.
12653         (transit_state_mb): Likewise.
12654         (sift_states_iter_mb): Likewise.
12655         (check_arrival_add_next_nodes): Likewise.
12656         (check_node_accept_bytes): Change first parameter to pointer-to-const.
12657         [_LIBC] (re_search_2_stub): Use mempcpy.
12658
12659         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
12660         mbrtowc for very simple UTF-8 case.
12661
12662         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
12663         a pointer-to-const.
12664         (re_acquire_state_context): Likewise.
12665         * lib/regex_internal.h: Adjust prototypes.
12666
12667         * lib/regex.c: Prevent using C++ compilers.
12668
12669         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
12670         (re_acquire_state_context): Likewise.
12671
12672 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12673
12674         * modules/regex (Depends-on): Add ssize_t.
12675
12676 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12677
12678         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
12679         translation table.
12680
12681 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12682
12683         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
12684
12685 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
12686             Bruno Haible  <bruno@clisp.org>
12687
12688         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
12689         <sys/types.h> and <inttypes.h>.
12690
12691 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12692
12693         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
12694         `__error_t_defined', so argp.h will not typedef the former.
12695
12696 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
12697
12698         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
12699         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
12700         glibc names.  Even if glibc is changed to conform to POSIX, the
12701         traditional names will be available anyway, since regex depends on
12702         the extensions module.  Also, fix a longstanding typo in the
12703         implementation of Spencer ERE test #75 from grep 2.3.  Problems
12704         reported by Emanuele Giaquinta.  Also, change sense of cached
12705         variable, so that the message makes sense.
12706
12707 2006-03-24  Simon Josefsson  <jas@extundo.com>
12708
12709         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
12710         including some doc fixes.
12711         (base64_encode_alloc): Fix +1 bug on allocation failures.
12712
12713 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12714
12715         * lib/base64.c (base64_encode): Do not read past end of array with
12716         unsanitized input on systems with CHAR_BIT > 8.
12717
12718 2006-03-24  Eric Blake  <ebb9@byu.net>
12719
12720         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
12721
12722 2006-03-22  Karl Berry  <karl@gnu.org>
12723
12724         * config/srclist.txt (*setenv.[ch]): get from coreutils.
12725         * config/srclistvars.sh (COREUTILS): new var.
12726
12727 2006-03-17  Jim Meyering  <jim@meyering.net>
12728
12729         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
12730         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
12731
12732 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12733
12734         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
12735         no longer needs it.  Instead, check that regoff_t is as least
12736         as wide as ptrdiff_t.
12737
12738         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
12739         so that our regex.h stays compatible with the installed regex.
12740         This is helpful for installers who configure --without-included-regex.
12741         Problem reported by Emanuele Giaquinta.
12742
12743 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12744
12745         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
12746         Typedef to long int, not to off_, as POSIX will likely change
12747         in that direction.
12748
12749 2006-03-15  Eric Blake  <ebb9@byu.net>
12750
12751         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
12752
12753 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12754
12755         * lib/argp-help.c (validate_uparams): Fix typo
12756         * lib/argp-parse.c (argp_default_options): Consistently begin help
12757         messages with a lowercase letter.
12758
12759 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
12760
12761         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
12762         overrun buffers and shouldn't be used (much as gets shouldn't be
12763         used).
12764         * lib/time_r.c (asctime_r, ctime_r): Likewise.
12765
12766 2006-03-08  Simon Josefsson  <jas@extundo.com>
12767
12768         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
12769         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12770
12771 2006-03-08  Simon Josefsson  <jas@extundo.com>
12772
12773         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
12774         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12775
12776 2006-03-08  Simon Josefsson  <jas@extundo.com>
12777
12778         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
12779         signal that configure disabled the device.
12780
12781 2006-03-08  Simon Josefsson  <jas@extundo.com>
12782
12783         * build-aux/maint.mk: Fix refresh-po, to handle no translated
12784         languages.
12785
12786 2006-03-07  Simon Josefsson  <jas@extundo.com>
12787
12788         * modules/getopt (Depends-on): Add unistd.
12789
12790         * modules/unistd: New file.
12791
12792 2006-03-07  Simon Josefsson  <jas@extundo.com>
12793
12794         * modules/gc-random: New file.
12795
12796 2006-03-07  Simon Josefsson  <jas@extundo.com>
12797
12798         * m4/unistd_h.m4: New file.
12799
12800 2006-03-07  Simon Josefsson  <jas@extundo.com>
12801
12802         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
12803         test to be side-effect free by storing the result in the cache
12804         variable gl_cv_lib_readline, and moving the assignment of
12805         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
12806         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12807
12808 2006-03-07  Simon Josefsson  <jas@extundo.com>
12809
12810         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
12811         error on missing devices (the functions will return an error).
12812
12813         * m4/gc.m4: Move random stuff to gc-random.m4
12814
12815 2006-03-07  Simon Josefsson  <jas@extundo.com>
12816
12817         * lib/unistd_.h: New file.
12818
12819 2006-03-07  Simon Josefsson  <jas@extundo.com>
12820
12821         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
12822
12823 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12824
12825         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
12826         Problem reported by Juan Manuel Guerrero.
12827
12828 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12829
12830         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
12831         the unistd module.
12832         * lib/getlogin_r.c: Likewise.
12833         * lib/getlogin_r.h: Likewise.
12834         * lib/glob.c: Likewise.
12835         * lib/pagealign_alloc.c: Likewise.
12836         * lib/unistd_.h: Remove; no longer needed.
12837
12838 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12839
12840         * MODULES.html.sh (Support for systems lacking POSIX:2001):
12841         Add unistd.
12842         * modules/c-stack (Depends-on): Add unistd.
12843         * modules/getlogin_r: Likewise.
12844         * modules/glob: Likewise.
12845         * modules/pagealign_alloc: Likewise.
12846         * modules/unistd (Files): Remove lib/unistd_.h.
12847         (EXTRA_DIST): Remove.
12848         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
12849         need unistd_.h.
12850         (MOSTLYCLEANFILES): Remove unistd.h-t.
12851
12852 2006-03-03  Simon Josefsson  <jas@extundo.com>
12853
12854         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
12855
12856 2006-03-03  Simon Josefsson  <jas@extundo.com>
12857
12858         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
12859         libidn and bison.
12860
12861 2006-03-03  Simon Josefsson  <jas@extundo.com>
12862
12863         * build-aux/maint.mk: Add indent target.
12864
12865 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
12866
12867         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
12868         our replacement poll.h in any case, to avoid a differing
12869         declaration from a system header.  Seen on AIX.
12870
12871 2006-03-01  Simon Josefsson  <jas@extundo.com>
12872
12873         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
12874         <kasal@ucw.cz>.
12875
12876 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12877
12878         * modules/gettime (Depends-on): Add extensions module.
12879         * modules/nanosleep (Depends-on): Likewise.
12880         * modules/settime (Depends-on): Likewise.
12881
12882 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12883
12884         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
12885         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
12886         pedantically.
12887         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12888         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
12889
12890         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
12891         not "==".  Reported by Ralf Wildenhues.
12892
12893 2006-03-01  Karl Berry  <karl@gnu.org>
12894
12895         * doc/Copyright/request-*: new files, synced from gnuorg.
12896
12897 2006-03-01  Karl Berry  <karl@gnu.org>
12898
12899         * config/srclist.txt (Copyright/*): new entries.
12900
12901 2006-02-28  Simon Josefsson  <jas@extundo.com>
12902
12903         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
12904
12905 2006-02-27  Simon Josefsson  <jas@extundo.com>
12906
12907         * lib/base64.h: Indent #define's.  From Jim Meyering
12908         <jim@meyering.net>.
12909
12910 2006-02-27  Jim Meyering  <jim@meyering.net>
12911
12912         Revert the change of 2006-02-24, so these files can continue
12913         to be sync'd from gettext.
12914         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
12915         of `config.h'.
12916
12917 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12918
12919         * modules/intprops: New file.
12920         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
12921         Add intprops.
12922         * modules/getloadavg (Files): Remove lib/intprops.h.
12923         (Depends-on): Add intprops.
12924         * modules/human: Likewise.
12925         * modules/inttostr: Likewise.
12926         * modules/openat: Likewise.
12927         * modules/sig2str: Likewise.
12928         * modules/userspec: Likewise.
12929         * modules/utimecmp: Likewise.
12930         * modules/xnanosleep: Likewise.
12931         * modules/xstrtol: Likewise.
12932
12933 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
12934
12935         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
12936         * modules/lock-tests (TESTS): Use $(EXEEXT).
12937         * modules/tls-tests: Likewise.
12938         * modules/argp-tests: Likewise.
12939         (check_PROGRAMS): New var, replacing...
12940         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
12941
12942 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12943
12944         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
12945         `config.h'.
12946
12947 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
12948
12949         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
12950
12951 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12952
12953         Sync from coreutils.
12954         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
12955         gl_CHDIR_SAFER.
12956
12957 2006-02-22  Jim Meyering  <jim@meyering.net>
12958
12959         Sync from coreutils.
12960         * m4/chdir-safer.m4: New file.
12961
12962 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
12963
12964         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
12965         AT_FDCWD exceeds INT_MAX.
12966         * lib/openat.h (AT_FDCWD): Likewise.
12967
12968 2006-02-17  Eric Blake  <address@hidden>
12969
12970         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
12971
12972 2006-02-16  Simon Josefsson  <jas@extundo.com>
12973
12974         * modules/getaddrinfo (Depends-on): Add sys_socket.
12975
12976 2006-02-15  Simon Josefsson  <jas@extundo.com>
12977
12978         * build-aux/maint.mk: Add dsyntax-check rule.
12979
12980 2006-02-15  Eric Blake  <ebb9@byu.net>
12981
12982         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
12983         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
12984         'present but cannot compile' warnings on cygwin.
12985         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
12986         use ws2tcpip.h if sys/socket.h works.
12987         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
12988         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
12989
12990 2006-02-14  Simon Josefsson  <jas@extundo.com>
12991
12992         * modules/maintainer-makefile (Files): Rename.
12993
12994         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
12995         and (the local) Makefile.cfg to maint-cfg.mk.
12996
12997         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
12998         to the latter.
12999
13000         * modules/maintainer-makefile: New module.
13001
13002         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
13003         severaly stripped to make it possible to build it up from scratch
13004         with reliable tests.
13005
13006         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
13007         fixes to permit overriding the default actions when configure and
13008         makefile are not available.
13009
13010 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
13011
13012         Sync from coreutils.
13013         * modules/lstat (Depends-on): Don't depend on xalloc.
13014         (License): Change from GPL to LGPL, since this is now simply a
13015         replacement for a libc function.
13016
13017 2006-02-14  Jim Meyering  <jim@meyering.net>
13018
13019         Sync from coreutils.
13020
13021         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
13022         failure on deficient systems, and simplify gnulib lgpl dependencies.
13023         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
13024         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
13025
13026         * lib/xalloc-die.c: Remove unused definition of N_.
13027
13028 2006-02-14  Jim Meyering  <jim@meyering.net>
13029
13030         Sync from coreutils.
13031         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
13032         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
13033         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
13034         double-quote uses of that variable, to accommodate the rare case in
13035         which getmntent is available in none of the libraries checked.  This
13036         happens at least on FreeBSD 5.0.
13037
13038 2006-02-13  Simon Josefsson  <jas@extundo.com>
13039
13040         * gnulib-tool (Usage): Fix --import, from
13041         karl@freefriends.org (Karl Berry).
13042
13043 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
13044
13045         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
13046
13047 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
13048
13049         * lib/argp-namefrob.h: Restore changes accidentally lost during the
13050         "autoupdate" on 2005-12-12.
13051
13052 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
13053
13054         * modules/closeout (Depends-on): Remove atexit.
13055
13056 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
13057
13058         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
13059         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
13060
13061 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
13062
13063         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
13064         __EXTENSIONS__ if this causes compilation to fail.  Problem
13065         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
13066         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
13067
13068 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
13069
13070         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
13071         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
13072         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
13073         All uses changed.
13074
13075 2006-01-26  Simon Josefsson  <jas@extundo.com>
13076
13077         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
13078         prototype is visible on mingw32.
13079
13080         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
13081         for mingw32.
13082
13083         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
13084         mingw32).
13085
13086 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
13089         attempt to open for write; this always fails, at least on POSIX
13090         hosts.  This reinstates the 2006-01-09 change, which was
13091         inadvertently removed.
13092
13093 2006-01-26  Bruno Haible  <bruno@clisp.org>
13094
13095         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
13096         Reported by Paul Eggert.
13097
13098 2006-01-26  Bruno Haible  <bruno@clisp.org>
13099             Paul Eggert  <eggert@cs.ucla.edu>
13100
13101         * lib/stdbool_.h (_Bool)
13102         [(! (defined __cplusplus || defined __BEOS__)
13103           && !defined __GNUC__
13104           && !(defined __HP_cc || defined __xlc__
13105                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
13106                || defined __sgi))]:
13107         #define to signed char in these cases too; this simplifies
13108         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
13109         etc., separately) and makes it more conservative.
13110
13111 2006-01-25  Simon Josefsson  <jas@extundo.com>
13112
13113         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
13114         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
13115         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
13116
13117 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
13118
13119         * lib/argp-namefrob.h: Bugfix. Remove stray #
13120
13121 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
13122
13123         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
13124         so that we test the test.
13125         Check for yet another HP-UX cc bug involving *bool |= bool.
13126
13127 2006-01-25  Karl Berry  <karl@gnu.org>
13128
13129         * config/srclist.txt (vasnprintf.c): sync lost.
13130
13131 2006-01-25  Jim Meyering  <jim@meyering.net>
13132
13133         Sync from the stable (b5) branch of coreutils:
13134
13135         * lib/fts.c (fts_children): Don't let close() clobber errno from
13136         failed fchdir().
13137
13138         * lib/fts.c (fts_stat): When following a symlink-to-directory,
13139         don't necessarily interpret stat-fails+lstat-succeeds as indicating
13140         a dangling symlink.  That can also happen at least for ELOOP.
13141         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
13142         FYI, this bug predates the inclusion of fts.c in coreutils.
13143
13144         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
13145         in their own block, so pre-c99 compilers don't object.
13146
13147         Avoid the double-free (first in fts_read, second in fts_close) that
13148         would occur when an `active' directory is made inaccessible (e.g.,
13149         via chmod a-x) during a traversal.
13150         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
13151         before returning.  Reproduce this failure by
13152         mkdir -p a/b; cd a; chmod a-x . b
13153         Reported by Stavros Passas.
13154
13155 2006-01-25  Jim Meyering  <jim@meyering.net>
13156
13157         * lib/fileblocks.c: Remove more useless parentheses.
13158         * lib/readutmp.h: Likewise.
13159
13160 2006-01-25  Bruno Haible  <bruno@clisp.org>
13161
13162         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
13163         warnings.
13164         Reported by Paul Eggert.
13165
13166 2006-01-25  Bruno Haible  <bruno@clisp.org>
13167
13168         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
13169         rid of a trap command. For Solaris sh.
13170         Reported by Mark D. Baushke <mdb@gnu.org>.
13171
13172 2006-01-24  Simon Josefsson  <jas@extundo.com>
13173
13174         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
13175         Bruno.
13176
13177 2006-01-24  Karl Berry  <karl@gnu.org>
13178
13179         * config/srclist.txt (argp-namefrob.h): sync lost.
13180
13181 2006-01-24  Jim Meyering  <jim@meyering.net>
13182
13183         * modules/openat (Files): Add lib/intprops.h.
13184         From Mark D. Baushke.
13185
13186 2006-01-24  Jim Meyering  <jim@meyering.net>
13187
13188         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
13189         Reported by Mark D. Baushke.
13190
13191 2006-01-24  Jim Meyering  <jim@meyering.net>
13192
13193         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
13194
13195 2006-01-24  Bruno Haible  <bruno@clisp.org>
13196
13197         * modules/strnlen (Maintainer): Change from glibc to all.
13198
13199 2006-01-24  Bruno Haible  <bruno@clisp.org>
13200
13201         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
13202         Patch by Paul Eggert.
13203
13204 2006-01-24  Bruno Haible  <bruno@clisp.org>
13205
13206         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
13207         already has it.
13208         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
13209         2005-11-26.
13210
13211         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
13212         'signed char' to avoid problems with the built-in _Bool type.
13213         Reported by Paul Eggert on 2005-11-26.
13214
13215 2006-01-24  Bruno Haible  <bruno@clisp.org>
13216
13217         * gnulib-tool (func_import): Avoid constructing complicated sed
13218         expressions inside backquote.
13219         Report and solution by Mark D. Baushke <mdb@gnu.org>.
13220
13221 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
13222
13223         These changes imported from libc.
13224         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
13225         test and two separate function calls.
13226         * lib/strndup.c (__strndup): Add libc_hidden_def.
13227
13228 2006-01-23  Simon Josefsson  <jas@extundo.com>
13229
13230         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
13231         Remove the test_*_SOURCES variable: automake infers it by default.
13232         * modules/tls-tests: Likewise.
13233
13234 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13235
13236         Work around porting bugs reported by Dieter in
13237         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
13238         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
13239         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
13240         Include "getopt.h" first, to check interface.
13241         (getenv): Declare only if defined HAVE_DECL_GETENV &&
13242         !HAVE_DECL_GETENV.
13243         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
13244         (__strndup): Revert to K&R-style function dfns, the glibc style.
13245         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
13246         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
13247         Include strnlen.h first, to get prototype properly.
13248         (strnlen): Renamed from __strnlen.
13249         Remove weak alias.
13250
13251 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13252
13253         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
13254
13255 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13256
13257         * config/srclist.txt: Adjust to reflect glibc reorganization.
13258         This affects only comments.
13259
13260 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13261
13262          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
13263          Reported by Bruce Korb <bkorb@gnu.org>.
13264
13265 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
13266
13267         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
13268         to pacify gcc -Wswitch-default.
13269
13270 2006-01-22  Bruno Haible  <bruno@clisp.org>
13271
13272         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
13273         temporary buffer for sprintf, take into account the precision also
13274         for 'd', 'i', 'u', 'o', 'x', 'X'.
13275
13276 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13277
13278         * modules/argp-tests: New module
13279         * tests/test-argp.c: New file
13280         * tests/test-argp-2.sh: New file
13281
13282 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13283
13284         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
13285         (__argp_base_name): Removed
13286         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
13287         typo.
13288         (__argp_base_name): Provide macro definition or extern declaration
13289         depending on the configuration
13290
13291 2006-01-20  Simon Josefsson  <jas@extundo.com>
13292
13293         * modules/inet_ntop (Depends-on): Depend on sys_socket.
13294
13295 2006-01-20  Simon Josefsson  <jas@extundo.com>
13296
13297         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
13298
13299 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13300
13301         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
13302         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
13303         Suggested by Bruno Haible.
13304
13305 2006-01-20  Karl Berry  <karl@gnu.org>
13306
13307         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
13308         until changes propagate, I guess.
13309
13310 2006-01-19  Simon Josefsson  <jas@extundo.com>
13311
13312         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
13313
13314 2006-01-19  Simon Josefsson  <jas@extundo.com>
13315
13316         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
13317
13318 2006-01-19  Simon Josefsson  <jas@extundo.com>
13319
13320         * gnulib-tool: Set check_PROGRAMS.
13321
13322         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
13323         modules/des-tests, modules/gc-arcfour-tests,
13324         modules/gc-arctwo-tests, modules/gc-des-tests,
13325         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
13326         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
13327         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
13328         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
13329         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
13330         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
13331         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
13332         test_*_SOURCES.
13333
13334 2006-01-18  Simon Josefsson  <jas@extundo.com>
13335
13336         * modules/socklen (Depends-on): Depend on sys_socket.
13337
13338 2006-01-18  Simon Josefsson  <jas@extundo.com>
13339
13340         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
13341         modules/des-tests, modules/gc-arcfour-tests,
13342         modules/gc-arctwo-tests, modules/gc-des-tests,
13343         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
13344         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
13345         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
13346         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
13347         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
13348         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
13349         $(EXEEXT) to automake TESTS variable, for mingw32.
13350
13351 2006-01-17  Simon Josefsson  <jas@extundo.com>
13352
13353         * modules/socklen (Include): Need sys/socket.h.
13354
13355 2006-01-17  Bruno Haible  <bruno@clisp.org>
13356
13357         * modules/ssize_t (Include): Add <sys/types.h>.
13358
13359 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
13360
13361         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
13362         it's not portable and it doesn't work with cross-compiles.
13363         Problem reported by Bruno Haible.  Fix missing-$ typo in
13364         'test "gl_cv_ignore_unused_libraries" ...' that prevented
13365         -zignore from being used with Sun's C compiler.
13366
13367 2006-01-12  Simon Josefsson  <jas@extundo.com>
13368
13369         * lib/base64.c: Fix warning, reported by Bruno Haible
13370         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
13371
13372 2006-01-12  Bruno Haible  <bruno@clisp.org>
13373
13374         * modules/ldd: New file.
13375         * build-aux/ldd.sh.in: New file.
13376         * MODULES.html.sh (Support for building libraries and executables): Add
13377         ldd.
13378
13379 2006-01-12  Bruno Haible  <bruno@clisp.org>
13380
13381         * m4/ldd.m4: New file.
13382
13383 2006-01-12  Bruno Haible  <bruno@clisp.org>
13384
13385         * gnulib-tool (func_import, func_create_testdir): Don't go into an
13386         endless loop while replacing $auxdir with build-aux.
13387
13388 2006-01-11  Simon Josefsson  <jas@extundo.com>
13389
13390         * lib/stdint_.h (SIZE_MAX): Add missing (.
13391
13392 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
13393
13394         Sync from coreutils.
13395         * lib/md5.c: Fix commentary typos.
13396         (alignof, UNALIGNED_P): No need for a GCC-specific version.
13397         * lib/md5.h (__attribute__): Remove; unused.
13398         * lib/sha1.c: Fix commentary to match md5 better.
13399         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
13400         so that we don't need to worry about alignment.  All uses changed.
13401         This merges the 2005-10-28 md5 change into sha1.
13402
13403 2006-01-11  Jim Meyering  <jim@meyering.net>
13404
13405         Sync from coreutils.
13406         * lib/md5.c (OP): Fix spacing.
13407
13408 2006-01-11  Bruno Haible  <bruno@clisp.org>
13409
13410         Ensure automatic ordering between gl_LOCK and gl_ARGP.
13411         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
13412         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
13413
13414 2006-01-11  Bruno Haible  <bruno@clisp.org>
13415
13416         Ensure automatic ordering between gl_LOCK and gl_ARGP.
13417         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
13418         the "early" section as well.
13419
13420 2006-01-11  Bruno Haible  <bruno@clisp.org>
13421
13422         Avoid "ar: no archive members specified" error on MacOS X.
13423         * gnulib-tool (func_modules_add_dummy): New function.
13424         (func_import, func_create_testdir): Invoke it.
13425
13426 2006-01-11  Bruno Haible  <bruno@clisp.org>
13427
13428         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
13429         with $auxdir in AC_CONFIG_FILES statements.
13430
13431 2006-01-11  Bruno Haible  <bruno@clisp.org>
13432
13433         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13434         Initialize also noinst_HEADERS to empty.
13435
13436 2006-01-11  Bruno Haible  <bruno@clisp.org>
13437
13438         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
13439         variables.
13440         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
13441         autoreconf.
13442
13443 2006-01-11  Bruno Haible  <bruno@clisp.org>
13444
13445         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
13446         overridable by the user.
13447         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13448
13449 2006-01-10  Simon Josefsson  <jas@extundo.com>
13450
13451         * modules/sys_socket: New file.
13452
13453 2006-01-10  Simon Josefsson  <jas@extundo.com>
13454
13455         * m4/sys_socket_h.m4: New file.
13456
13457 2006-01-10  Simon Josefsson  <jas@extundo.com>
13458
13459         * lib/socket_.h: New file.
13460
13461 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13462
13463         * modules/readutmp (Maintainer): Add myself.
13464
13465 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13466
13467         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
13468         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
13469         People who are still concerned with buggy memcmp implementations
13470         can invoke gl_FUNC_MEMCMP themselves.
13471
13472 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13473
13474         * lib/regex_internal.h (BITSET_WORD_BITS):
13475         Work around a bug in 64-bit PGC (before version 6.1-2), where the
13476         preprocessor mishandles large unsigned values as if they were signed.
13477         Problem reported by Claudio Fontana in
13478         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
13479
13480 2006-01-10  Jim Meyering  <jim@meyering.net>
13481
13482         Avoid the double-free (first in fts_read, second in fts_close) that
13483         would occur when an `active' directory is made inaccessible (e.g.,
13484         via chmod a-x) during a traversal.
13485         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
13486         before returning.  Reproduce this failure by
13487         mkdir -p a/b; cd a; chmod a-x . b
13488         Reported by Stavros Passas.
13489
13490         Sync from coreutils.
13491         * lib/sha1.c: Tweak grammar in a comment.
13492
13493 2006-01-10  Jim Meyering  <jim@meyering.net>
13494
13495         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
13496         Patch by Joerg Sonnenberger.
13497
13498 2006-01-10  Bruno Haible  <bruno@clisp.org>
13499
13500         * modules/readutmp: Depend on module free.
13501         * modules/strtok_r: Depend on module restrict.
13502
13503 2006-01-10  Bruno Haible  <bruno@clisp.org>
13504
13505         * modules/gettext (configure.ac): Add an invocation of
13506         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
13507
13508 2006-01-10  Bruno Haible  <bruno@clisp.org>
13509
13510         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
13511         Reported by Werner Lemberg <wl@gnu.org>.
13512
13513 2006-01-10  Bruno Haible  <bruno@clisp.org>
13514
13515         * lib/localcharset.c: Update from GNU gettext.
13516
13517 2006-01-10  Bruno Haible  <bruno@clisp.org>
13518
13519         * lib/argp.h (__const): Remove macro. Use const instead.
13520         * lib/argp-fmtstream.h (__const): Likewise.
13521         * lib/glob_.h (__const): Remove macro.
13522         * lib/glob-libc.h: Use const instead of __const.
13523
13524 2006-01-10  Bruno Haible  <bruno@clisp.org>
13525
13526         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
13527         variable.
13528         Needed to avoid an automake error regarding the 'gettext' module.
13529
13530 2006-01-09  Simon Josefsson  <jas@extundo.com>
13531
13532         * modules/inet_ntop (Depends-on): Add restrict.
13533
13534 2006-01-09  Simon Josefsson  <jas@extundo.com>
13535
13536         * modules/gc-rijndael-tests (License): Put under LGPL.
13537
13538         * modules/gc-des-tests (License): Likewise.
13539
13540         * modules/gc-arcfour-tests (License): Likewise.
13541
13542         * modules/gc-arctwo-tests (License): Likewise.
13543
13544         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
13545
13546         * modules/gc-hmac-sha1-tests (Files): Likewise.
13547
13548         * modules/gc-hmac-md5-tests (License): Likewise.
13549
13550         * modules/gc-sha1-tests (License): Likewise.
13551
13552         * modules/gc-md5-tests (License): Likewise.
13553
13554         * modules/gc-md4-tests (License): Likewise.
13555
13556         * modules/gc-md2-tests (License): Likewise.
13557
13558         * modules/gc-tests (License): Likewise.
13559
13560         * modules/des-tests (License): Likewise.
13561
13562         * modules/md4-tests (License): Likewise.
13563
13564         * modules/md2-tests (License): Likewise.
13565
13566 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13567
13568         Sync from coreutils:
13569
13570         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
13571         * modules/lib-ignore: New file.
13572         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
13573         chdir-safer.m4, lchmod.m4.
13574         * modules/openat: Add mkdirat.c, openat-priv.h.
13575
13576 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13577
13578         Sync from coreutils.
13579         * m4/lib-ignore.m4: New file.
13580         * m4/lchmod.m4: New file.
13581
13582 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13583
13584         Sync from coreutils.
13585         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
13586         for write access: POSIX says that must fail.
13587         * lib/fts.c (diropen): Likewise.
13588         * lib/save-cwd.c (save_cwd): Likewise.
13589         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
13590         well, for minor improvements on hosts that lack O_DIRECTORY.
13591         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
13592         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
13593         Fall back on chown if open failed with EACCES.
13594
13595         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
13596         Report an error at compile-time if only a 1-second nominal clock
13597         resolution is found.
13598
13599         * lib/lchmod.h: New file.
13600         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
13601         (make_dir_parents): Use lchown rather than chown, and
13602         lchmod rather than chmod.
13603
13604         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
13605         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
13606         "proc" reported by n0dalus.
13607
13608         * lib/mountlist.c: Include <limits.h>.
13609         (dev_from_mount_options)
13610         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
13611         New function.  It no longer assumes "dev=" has the System V meaning
13612         on Linux (since it doesn't).  It also parses "dev=" more carefully.
13613         (read_file_system_list)
13614         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
13615         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
13616         dev= in that case.
13617
13618         * lib/posixtm.h (PDS_PRE_2000): New macro.
13619         * lib/posixtm.c (year): Arg is now syntax_bits rather than
13620         allow_century.  All usages changed.  Reject dates outside the range
13621         1969-1999 if PDS_PRE_2000 is used.
13622
13623 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13624
13625         Sync from coreutils.
13626         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
13627         (Time of day items): Mention the possibility of leap seconds.
13628         Problem reported by Dr. David Alan Gilbert.
13629
13630 2006-01-09  Jim Meyering  <jim@meyering.net>
13631
13632         Sync from coreutils.
13633
13634         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
13635
13636         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
13637
13638         * lib/modechange.c (mode_compile): Reject an invalid mode string
13639         that starts with an octal digit.  From Andreas Gruenbacher.
13640
13641         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
13642         and dup to open_safer and dup_safer, respectively.
13643         (openat_permissive): Fix typo in comment.
13644
13645         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
13646         "gettext.h"; either no longer needed or are guaranteed by openat.h.
13647         (_): Remove; no longer needed.
13648         (openat): Renamed from rpl_openat; no need for rpl_openat
13649         since openat.h renames openat for us.
13650         Replace most of the body with a call to openat_permissive,
13651         to avoid duplicate code.
13652         Port to (probably hypothetical) environments were mode_t is
13653         wider than int.
13654         (openat_permissive): Require mode arg, so that we can check
13655         types better.  Put it just after flags.  Change cwd failure
13656         indicator from pointer-to-bool to pointer-to-errno-value.
13657         All callers changed.
13658         Invoke openat_save_fail and/or openat_restore_fail if
13659         cwd_errno is null, so that openat can call us.
13660         (openat_permissive, fdopendir, fstatat, unlinkat):
13661         Simplify errno handling to avoid some duplicate code,
13662         as it's OK to set errno on success.
13663         * lib/openat.h: Revamp code so that function macros depend on
13664         __OPENAT_PREFIX only, not also on AT_FDCWD.
13665         (openat_ro): Remove.  Caller changed to use openat_permissive.
13666         (openat_permissive): Now a macro, if not a function.
13667         (openat_restore_fail, openat_save_fail): Now always functions,
13668         since mkdirat needs them even if __OPENAT_PREFIX is defined.
13669
13670         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
13671         and openat.c.
13672         * lib/mkdirat.c: Include openat-priv.h.
13673         Remove definitions of macros defined therein.
13674         * lib/openat.c: Likewise.
13675
13676         * lib/mkdirat.c (mkdirat): New file and function.
13677         * lib/openat.h (mkdirat): Declare.
13678
13679         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
13680
13681         * lib/openat.h (openat_permissive): Declare.
13682         (openat_ro): Define.
13683
13684         * lib/openat.c (EXPECTED_ERRNO): New macro.
13685         (openat_permissive): New function -- used in remove.c rewrite.
13686         (all functions): Set errno just before returning, only if there
13687         was an actual failure.
13688         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
13689
13690         Emulate openat-family functions using Linux's procfs, if possible.
13691         Idea and some code based on Ulrich Drepper's glibc changes.
13692
13693         * lib/openat.c: (BUILD_PROC_NAME): New macro.
13694         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
13695         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
13696         before falling back on save_cwd and restore_cwd.
13697         (fdopendir, fstatat, unlinkat): Likewise.
13698
13699         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
13700         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
13701
13702         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
13703         as second argument to va_arg.  Otherwise, some versions of gcc
13704         warn that `if this code is reached, the program will abort'.
13705
13706 2006-01-09  Jim Meyering  <jim@meyering.net>
13707
13708         Sync from coreutils.
13709         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
13710         Require openat-priv.h.
13711
13712 2006-01-09  Bruno Haible  <bruno@clisp.org>
13713
13714         * modules/strnlen (Include): Use strnlen.h.
13715
13716 2006-01-09  Bruno Haible  <bruno@clisp.org>
13717
13718         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
13719
13720 2006-01-09  Bruno Haible  <bruno@clisp.org>
13721
13722         * lib/sysexit_.h (EX_OK): New macro.
13723         Suggested by Martin Lambers <marlam@marlam.de>.
13724
13725 2006-01-09  Bruno Haible  <bruno@clisp.org>
13726
13727         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
13728         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
13729
13730 2006-01-09  Bruno Haible  <bruno@clisp.org>
13731
13732         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
13733         numbers.
13734
13735 2006-01-09  Bruno Haible  <bruno@clisp.org>
13736
13737         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
13738         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
13739         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
13740         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
13741
13742 2006-01-09  Bruno Haible  <bruno@clisp.org>
13743
13744         * build-aux/javacomp.sh.in: New file, moved from lib/.
13745         * modules/javacomp-script (Files): Update.
13746         (configure.ac): Add AC_CONFIG_FILES invocation.
13747         (EXTRA_DIST): Remove variable.
13748
13749         * build-aux/javaexec.sh.in: New file, moved from lib/.
13750         * modules/javaexec (Files): Update.
13751         (configure.ac): Add AC_CONFIG_FILES invocation.
13752         (EXTRA_DIST): Remove javaexec.sh.in.
13753
13754         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
13755         * modules/csharpcomp-script (Files): Update.
13756         (configure.ac): Add AC_CONFIG_FILES invocation.
13757         (EXTRA_DIST): Remove variable.
13758
13759         * build-aux/csharpexec.sh.in: New file, moved from lib/.
13760         * modules/csharpexec (Files): Update.
13761         (configure.ac): Add AC_CONFIG_FILES invocation.
13762         (EXTRA_DIST): Remove csharpexec.sh.in.
13763
13764 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13765
13766         Sync from coreutils.
13767
13768         Add POSIX ACL support
13769         * lib/acl.h (copy_acl, set_acl): Add declarations.
13770         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
13771         systems other than Linux.
13772         (chmod_or_fchmod): New function: use fchmod when possible,
13773         and chmod otherwise.
13774         (file_has_acl): Add a POSIX ACL implementation, with a
13775         Linux-specific subcase.
13776         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
13777         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
13778         acls are unsupported.
13779         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
13780         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
13781         are unsupported.
13782
13783 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13784
13785         Sync from coreutils.
13786         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
13787
13788 2006-01-07  Bruno Haible  <bruno@clisp.org>
13789
13790         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
13791         gl_EARLY.
13792
13793 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13794
13795         * lib/strftime.c (tzname): Don't declare if it is already #defined.
13796         Problem reported for Mingw by Mark Junker.
13797
13798 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13799
13800         * README: Gnulib normally doesn't generate a tarball.
13801
13802 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
13803
13804         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
13805         long int, not int, for nanosecond counts, so that people who are
13806         used to POSIX struct timespec won't be surprised.  Reported by Jim
13807         Meyering.
13808
13809 2005-12-28  Bruno Haible  <bruno@clisp.org>
13810
13811         * build-aux/config.rpath: Update from GNU gettext.
13812
13813 2005-12-16  Jim Meyering  <jim@meyering.net>
13814
13815         * modules/fprintftime: New module.
13816         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
13817
13818 2005-12-16  Jim Meyering  <jim@meyering.net>
13819
13820         * m4/fprintftime.m4: New file.
13821
13822 2005-12-16  Jim Meyering  <jim@meyering.net>
13823
13824         * lib/fprintftime.c, lib/fprintftime.h: New files.
13825
13826 2005-12-15  Simon Josefsson  <jas@extundo.com>
13827
13828         * modules/socklen (configure.ac): Fix M4 macro name, to align with
13829         new m4/socklen.m4.
13830
13831 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13832
13833         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
13834         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
13835
13836 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13837
13838         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
13839         * lib/argp-help.c (fill_in_uparams): Check if the constructed
13840         struct uparams is valid. Fall back to the default values if it is
13841         not.
13842
13843 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13844
13845         * modules/argp (Files): Add argp-pin.c
13846         (Depends-on): dirname
13847         (lib_SOURCES): Add argp-pin.c
13848
13849 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13850
13851         * m4/argp.m4:  Check if program_invocation_name and
13852         program_invocation_short_name are declared and define appropriate
13853         macros if they are not.
13854
13855 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13856
13857         * lib/argp-help.c (__argp_base_name): New function
13858         (__argp_short_program_name): Rewrite using __argp_base_name
13859         * lib/argp-namefrob.h: Define program_invocation_name and
13860         program_invocation_short_name if requested
13861         (__argp_base_name): Add prototype
13862         * lib/argp-parse.c (argp_def): Use gettext wrappers
13863         (argp_default_parser): Use __argp_base_name
13864         * lib/argp-pin.c: New file. Defines program_invocation_name and
13865         program_invocation_short_name on systems that lack them.
13866
13867 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13868
13869         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
13870         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13871         porting problem reported by Georg Schwarz in
13872         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13873
13874 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13875
13876         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
13877         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13878         porting problem reported by Georg Schwarz in
13879         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13880
13881 2005-12-05  Bruno Haible  <bruno@clisp.org>
13882
13883         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
13884         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
13885         Reported by Mark Junker <mjscod@gmx.de>.
13886
13887 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
13888
13889         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
13890         Use implementation from Albert Chin, with some
13891         comments/corrections by Stepan Kasal and myself.
13892
13893 2005-12-02  Bruno Haible  <bruno@clisp.org>
13894
13895         * gnulib-tool (func_import): Accept GPLed build tool modules when
13896         --lgpl is given.
13897         * modules/csharpcomp-script: New file.
13898         * modules/csharpcomp: Depend on it.
13899         * modules/javacomp-script: New file.
13900         * modules/javacomp: Depend on it.
13901         Suggested by Simon Josefsson.
13902
13903 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
13904
13905         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
13906         statement, to work around an HP-UX 10.20 compiler bug reported by
13907         Peter O'Gorman.
13908
13909 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13910
13911         * modules/savedir (Depends-on): Add openat.
13912
13913 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13914
13915         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
13916         (uintmax_t) [defined uintmax_t]: Do not declare.
13917         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
13918         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
13919         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
13920         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
13921         sake of portability to weird hosts that C allows (though we don't
13922         know of any practical examples).
13923
13924         * lib/savedir.h (fdsavedir): New decl.
13925         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
13926         contains most of the former guts of savedir.
13927         (savedir): Use savedirstream.
13928         Include "openat.h".
13929
13930 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13931
13932         * modules/obstack (Files): Add m4/ulonglong.m4.
13933         Problem reported by Davide Angelocola.
13934
13935 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
13936
13937         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
13938         coreutils no longer futzes with rounding modes.
13939
13940 2005-11-14  Jim Meyering  <jim@meyering.net>
13941
13942         * lib/mkstemp-safer.c: Include <config.h>, required for possible
13943         replacement of mkstemp.
13944
13945 2005-11-10  Simon Josefsson  <jas@extundo.com>
13946
13947         * lib/readline.c: Remove EOL.
13948
13949 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13950
13951         * modules/gethrxtime (Depends-on): Add gettime.
13952
13953 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13954
13955         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
13956         or gettimeofday; no longer needed.
13957
13958 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13959
13960         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
13961         time business.
13962         (gethrxtime) [! (HAVE_NANOUPTIME
13963         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
13964         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
13965         our own approximation.
13966
13967 2005-11-08  Eric Blake  <ebb9@byu.net>
13968
13969         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13970
13971 2005-11-08  Eric Blake  <ebb9@byu.net>
13972
13973         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13974
13975 2005-11-04  Bruno Haible  <bruno@clisp.org>
13976
13977         * gnulib-tool: Implement --update mode.
13978
13979 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13980
13981         Fix porting problem reported by Theodoros V. Kalamatianos.
13982         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
13983         Don't assume that futimes failing means we must fail.
13984
13985 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13986
13987         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
13988         variables to suggest the intended function of the PATH_MAX check.
13989
13990 2005-10-30  Kean Johnston  <jkj@sco.com>
13991
13992         Trivial changes to support SCO systems.
13993         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
13994         as PATH_MAX.
13995         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
13996         where __ptr is null when no I/O is pending.
13997
13998 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13999
14000         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
14001         leave errno alone.  Problem reported by Dmitry V. Levin.
14002
14003 2005-10-28  Simon Josefsson  <jas@extundo.com>
14004
14005         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
14006         Test more.
14007
14008         * tests/test-gc-md2.c, tests/test-md2.c: New files.
14009
14010         * modules/md2, modules/md2-tests: New files.
14011
14012 2005-10-28  Simon Josefsson  <jas@extundo.com>
14013
14014         * m4/inet_ntop.m4: More tests.
14015
14016         * m4/gc-md2.m4, md2.m4: New file.
14017
14018 2005-10-28  Simon Josefsson  <jas@extundo.com>
14019
14020         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
14021         "restrict" keywords, as per POSIX.  Protect the function
14022         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
14023         Don't use K&R prototypes.  Check the sprintf return values.
14024         Re-define EAFNOSUPPORT if not present.  Indent.
14025
14026         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
14027         suggested by Bruno Haible <bruno@clisp.org>.
14028
14029         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
14030
14031         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
14032
14033         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
14034         libgcrypt).
14035
14036         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
14037
14038         * lib/md2.h, lib/md2.c: New files.
14039
14040 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
14041
14042         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
14043         errno alone.  Problem reported by Frederic Jolliton.
14044
14045 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
14046
14047         * modules/verify (License): Change from GPL to LGPL.  This is a
14048         tiny module and there are apparently near-equivalents that are
14049         under the BSD license.
14050
14051 2005-10-24  Simon Josefsson  <jas@extundo.com>
14052
14053         * modules/sha1: Relicense to LGPL.
14054
14055 2005-10-24  Simon Josefsson  <jas@extundo.com>
14056
14057         * lib/md4.h: Shrink buffer size, now that we changed the type.
14058
14059 2005-10-23  Simon Josefsson  <jas@extundo.com>
14060
14061         * gnulib-tool (func_import): Fix --tests-base.
14062
14063 2005-10-22  Simon Josefsson  <jas@extundo.com>
14064
14065         * modules/arcfour (Depends-on): Need stdint.
14066
14067 2005-10-22  Simon Josefsson  <jas@extundo.com>
14068
14069         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
14070         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
14071
14072 2005-10-22  Simon Josefsson  <jas@extundo.com>
14073
14074         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
14075         suggested by Bruno Haible <bruno@clisp.org>.
14076
14077 2005-10-22  Simon Josefsson  <jas@extundo.com>
14078
14079         * lib/crc.h: Include stddef.h, for size_t.
14080
14081 2005-10-22  Simon Josefsson  <jas@extundo.com>
14082
14083         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
14084         arcfour_context struct (simplify test vector testing in GNU
14085         Shishi).
14086
14087 2005-10-21  Simon Josefsson  <jas@extundo.com>
14088
14089         * modules/des, modules/des-tests: New files.
14090
14091         * modules/gc-des, modules/gc-des-tests: New files.
14092
14093         * tests/test-des.c, tests/test-gc-des.c: New file.
14094
14095 2005-10-21  Simon Josefsson  <jas@extundo.com>
14096
14097         * modules/arctwo, modules/arctwo-tests: New files.
14098
14099         * tests/test-arctwo.c: New file.
14100
14101         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
14102
14103         * tests/test-gc-arctwo.c: New file.
14104
14105 2005-10-21  Simon Josefsson  <jas@extundo.com>
14106
14107         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
14108         Bruno Haible <bruno@clisp.org>.
14109
14110         * m4/gc-des.m4: New file.
14111
14112 2005-10-21  Simon Josefsson  <jas@extundo.com>
14113
14114         * m4/arctwo.m4: New file.
14115
14116         * m4/gc-arctwo.m4: New file.
14117
14118 2005-10-21  Simon Josefsson  <jas@extundo.com>
14119
14120         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
14121         block.
14122
14123 2005-10-21  Simon Josefsson  <jas@extundo.com>
14124
14125         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
14126         <bruno@clisp.org>.
14127
14128         * lib/hmac-sha1.c (hmac_sha1): Likewise.
14129
14130         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
14131         Bruno Haible <bruno@clisp.org>.
14132
14133         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
14134         <bruno@clisp.org>.
14135
14136 2005-10-21  Simon Josefsson  <jas@extundo.com>
14137
14138         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
14139
14140 2005-10-21  Simon Josefsson  <jas@extundo.com>
14141
14142         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
14143
14144 2005-10-21  Simon Josefsson  <jas@extundo.com>
14145
14146         * lib/des.h, lib/des.c: New files.
14147
14148         * lib/gc-gnulib.c: Support DES.c
14149
14150 2005-10-21  Simon Josefsson  <jas@extundo.com>
14151
14152         * lib/arctwo.h, lib/arctwo.c: New files.
14153
14154         * lib/gc-gnulib.c: Support ARCTWO.
14155
14156 2005-10-21  Simon Josefsson  <jas@extundo.com>
14157
14158         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
14159         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14160
14161 2005-10-21  Simon Josefsson  <jas@extundo.com>
14162
14163         * gnulib-tool (func_import, func_create_testdir): Define automake
14164         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
14165         Makefile.am snippet),
14166         suggested by Bruno Haible <bruno@clisp.org>.
14167
14168         * modules/gc (Makefile.am): Use it.
14169
14170 2005-10-21  Bruno Haible  <bruno@clisp.org>
14171
14172         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
14173         patch.
14174
14175 2005-10-19  Simon Josefsson  <jas@extundo.com>
14176
14177         * tests/test-gc-rijndael.c: New file.
14178
14179         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
14180
14181 2005-10-19  Simon Josefsson  <jas@extundo.com>
14182
14183         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
14184         interface too.
14185
14186 2005-10-19  Simon Josefsson  <jas@extundo.com>
14187
14188         * tests/test-gc-arcfour.c: New file.
14189
14190         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
14191
14192 2005-10-19  Simon Josefsson  <jas@extundo.com>
14193
14194         * modules/gc-md4, modules/gc-md4-tests: New file.
14195
14196         * tests/test-gc-md4.c: New file.
14197
14198 2005-10-19  Simon Josefsson  <jas@extundo.com>
14199
14200         * m4/gc-md4.m4: New file.
14201
14202 2005-10-19  Simon Josefsson  <jas@extundo.com>
14203
14204         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
14205         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
14206         <kasal@ucw.cz>.
14207
14208 2005-10-19  Simon Josefsson  <jas@extundo.com>
14209
14210         * m4/gc-arcfour.m4: New file.
14211
14212         * m4/gc-rijndael.m4: New file.
14213
14214 2005-10-19  Simon Josefsson  <jas@extundo.com>
14215
14216         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
14217
14218 2005-10-19  Simon Josefsson  <jas@extundo.com>
14219
14220         * lib/gc-gnulib.c: Support ARCFOUR.
14221
14222 2005-10-19  Simon Josefsson  <jas@extundo.com>
14223
14224         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
14225         support.
14226
14227         * lib/gc.h: Add ECB enum type.
14228
14229         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
14230
14231 2005-10-18  Simon Josefsson  <jas@extundo.com>
14232
14233         * tests/test-md5.c: New file.
14234
14235         * modules/md5-tests: New file.
14236
14237 2005-10-18  Simon Josefsson  <jas@extundo.com>
14238
14239         * tests/test-md4.c: New file.
14240
14241         * modules/md4, modules/md4-tests: New files.
14242
14243 2005-10-18  Simon Josefsson  <jas@extundo.com>
14244
14245         * m4/md4.m4: New file.
14246
14247 2005-10-18  Simon Josefsson  <jas@extundo.com>
14248
14249         * lib/md4.h, lib/md4.c: New files, based on md5.?.
14250
14251 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
14252
14253         * gnulib-tool (func_create_testdir): Omit the second check whether
14254         BUILT_SOURCES in nonempty.
14255
14256 2005-10-17  Simon Josefsson  <jas@extundo.com>
14257
14258         * tests/test-rijndael.c: New file.
14259
14260 2005-10-17  Simon Josefsson  <jas@extundo.com>
14261
14262         * modules/sha1: Depend on stdint instead of md5.
14263
14264         * modules/md5: Depend on stdint, remove uint32_t.
14265
14266 2005-10-17  Simon Josefsson  <jas@extundo.com>
14267
14268         * modules/gc-sha1-tests: New file.
14269
14270         * tests/test-gc-sha1.c: New file.
14271
14272 2005-10-17  Simon Josefsson  <jas@extundo.com>
14273
14274         * m4/md5.m4: Remove call to uint32_t.m4.
14275
14276 2005-10-17  Simon Josefsson  <jas@extundo.com>
14277
14278         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
14279
14280         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
14281         md5.h.
14282
14283         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
14284
14285         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
14286
14287 2005-10-17  Simon Josefsson  <jas@extundo.com>
14288
14289         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
14290
14291 2005-10-17  Simon Josefsson  <jas@extundo.com>
14292
14293         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
14294
14295 2005-10-17  Simon Josefsson  <jas@extundo.com>
14296
14297         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
14298
14299         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
14300
14301 2005-10-17  Bruno Haible  <bruno@clisp.org>
14302
14303         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
14304         that it can also be used in a test.
14305
14306 2005-10-16  Bruno Haible  <bruno@clisp.org>
14307
14308         * gnulib-tool (func_emit_tests_Makefile_am): Also define
14309         TESTS_ENVIRONMENT, so that individual tests can augment it.
14310
14311         * gnulib-tool (func_create_testdir): Use an intermediate target for
14312         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
14313         macros, like $(ALLOCA_H), which cannot be passed through the command
14314         line.
14315
14316 2005-10-15  Simon Josefsson  <jas@extundo.com>
14317
14318         * modules/rijndael-tests: New file.
14319
14320         * modules/rijndael: New file.
14321
14322 2005-10-15  Simon Josefsson  <jas@extundo.com>
14323
14324         * m4/rijndael.m4: New file.
14325
14326 2005-10-15  Simon Josefsson  <jas@extundo.com>
14327
14328         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
14329
14330         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
14331
14332 2005-10-14  Simon Josefsson  <jas@extundo.com>
14333
14334         * tests/test-arcfour.c: New file.
14335
14336         * modules/arcfour, modules/arcfour-tests: New files.
14337
14338 2005-10-14  Simon Josefsson  <jas@extundo.com>
14339
14340         * m4/arcfour.m4: New file.
14341
14342 2005-10-14  Simon Josefsson  <jas@extundo.com>
14343
14344         * lib/arcfour.h, lib/arcfour.c: New files.
14345
14346 2005-10-14  Roland McGrath  <roland@redhat.com>
14347
14348         Import from libc.  [BZ #1331]
14349         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
14350         macro argument.
14351         Reported by Matej Vela <vela@debian.org>.
14352
14353 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
14354
14355         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
14356         include <wchar.h>; no longer needed.
14357
14358 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
14359
14360         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
14361
14362 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
14363         and  Ulrich Drepper  <drepper@redhat.com>
14364
14365         Import from libc.
14366         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
14367         instead of inline stream orientation test and two separate
14368         function calls.  Pay no attention to USE_IN_LIBIO.
14369
14370 2005-10-13  Simon Josefsson  <jas@extundo.com>
14371
14372         * modules/gc-hmac-md5-tests: New file.
14373
14374         * tests/test-gc-hmac-sha1.c: New file.
14375
14376         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
14377
14378         * modules/gc-hmac-md5-tests: New file.
14379
14380         * tests/test-gc-md5.c: New file.
14381
14382         * modules/gc-md5-tests: New file.
14383
14384 2005-10-13  Simon Josefsson  <jas@extundo.com>
14385
14386         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
14387         Move memory allocation outside of loop.
14388
14389 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
14390
14391         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
14392         intermediate directory is in a read-only file system.  Problem
14393         reported by Eric Blake.
14394
14395 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
14396
14397         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
14398
14399 2005-10-12  Simon Josefsson  <jas@extundo.com>
14400
14401         * tests/test-hmac-sha1.c: New file.
14402
14403         * modules/hmac-sha1-tests: New file.
14404
14405         * modules/hmac-sha1: New file.
14406
14407 2005-10-12  Simon Josefsson  <jas@extundo.com>
14408
14409         * modules/gc-sha1: New file.
14410
14411 2005-10-12  Simon Josefsson  <jas@extundo.com>
14412
14413         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
14414
14415         * tests/test-gc-pbkdf2-sha1.c: New file.
14416
14417 2005-10-12  Simon Josefsson  <jas@extundo.com>
14418
14419         * modules/gc-md5, modules/gc-hmac-md5: New files.
14420
14421         * modules/gc (Files): Remove md5, memxor and hmac files.
14422
14423 2005-10-12  Simon Josefsson  <jas@extundo.com>
14424
14425         * m4/gc-pbkdf2-sha1.m4: New file.
14426
14427         * m4/gc-hmac-sha1.m4: New file.
14428
14429         * m4/gc-sha1: New file.
14430
14431         * m4/hmac-sha1.m4: New file.
14432
14433 2005-10-12  Simon Josefsson  <jas@extundo.com>
14434
14435         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
14436
14437         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
14438
14439 2005-10-12  Simon Josefsson  <jas@extundo.com>
14440
14441         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
14442         suggested by Bruno Haible <bruno@clisp.org>.
14443
14444 2005-10-12  Simon Josefsson  <jas@extundo.com>
14445
14446         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
14447
14448 2005-10-12  Simon Josefsson  <jas@extundo.com>
14449
14450         * lib/gc-pbkdf2-sha1.c: New file.
14451
14452         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
14453
14454 2005-10-12  Simon Josefsson  <jas@extundo.com>
14455
14456         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
14457
14458         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
14459
14460 2005-10-12  Simon Josefsson  <jas@extundo.com>
14461
14462         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
14463         GC_USE_HMAC_MD5, respectively.
14464
14465         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
14466         (gc_md5): Fix typo.
14467
14468         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
14469
14470         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
14471
14472         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
14473
14474 2005-10-12  Bruno Haible  <bruno@clisp.org>
14475
14476         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
14477         Reported by Stepan Kasal <kasal@ucw.cz>.
14478
14479 2005-10-11  Simon Josefsson  <jas@extundo.com>
14480
14481         * tests/test-crc.c: New file.
14482
14483         * modules/crc, modules/crc-tests: New files.
14484
14485 2005-10-11  Simon Josefsson  <jas@extundo.com>
14486
14487         * m4/crc.m4: New file.
14488
14489 2005-10-11  Simon Josefsson  <jas@extundo.com>
14490
14491         * lib/gc.h: Add gc_hash and gc_hash_buffer.
14492
14493         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
14494
14495         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
14496
14497 2005-10-11  Simon Josefsson  <jas@extundo.com>
14498
14499         * lib/crc.h, lib/crc.c: New files.
14500
14501         * lib/gc.h (gc_hash_buffer): Add doc.
14502
14503 2005-10-11  Bruno Haible  <bruno@clisp.org>
14504
14505         * modules/c-strcasestr: New file.
14506         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
14507
14508 2005-10-11  Bruno Haible  <bruno@clisp.org>
14509
14510         * modules/c-strcase: New file.
14511         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
14512
14513 2005-10-11  Bruno Haible  <bruno@clisp.org>
14514
14515         * lib/strcasecmp.c: Include limits.h.
14516         (strcasecmp): Avoid integer overflow on exotic platforms.
14517         * lib/strncasecmp.c: Include limits.h.
14518         (strncasecmp): Avoid integer overflow on exotic platforms.
14519         Reported by Paul Eggert.
14520
14521 2005-10-11  Bruno Haible  <bruno@clisp.org>
14522
14523         * lib/c-strcasestr.h: New file, from GNU gettext.
14524         * lib/c-strcasestr.c: New file, from GNU gettext.
14525
14526 2005-10-11  Bruno Haible  <bruno@clisp.org>
14527
14528         * lib/c-strcase.h: New file, from GNU gettext.
14529         * lib/c-strcasecmp.c: New file, from GNU gettext.
14530         * lib/c-strncasecmp.c: New file, from GNU gettext.
14531
14532 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14533
14534         * modules/mempcpy (License): GPL -> LGPL.
14535         * modules/strchrnul (License): Likewise.
14536         * modules/sysexits (License): Likewise.
14537
14538 2005-10-08  Simon Josefsson  <jas@extundo.com>
14539
14540         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
14541
14542 2005-10-07  Simon Josefsson  <jas@extundo.com>
14543
14544         * m4/memxor.m4: Remove gl_C_RESTRICT call.
14545
14546 2005-10-06  Simon Josefsson  <jas@extundo.com>
14547
14548         * tests/test-hmac-md5.c: New file.
14549
14550         * modules/hmac-md5-tests: New file.
14551
14552         * modules/hmac-md5: New file.
14553
14554 2005-10-06  Simon Josefsson  <jas@extundo.com>
14555
14556         * m4/hmac-md5.m4: New file.
14557
14558         * m4/memxor.m4: Require gl_C_RESTRICT.
14559
14560 2005-10-06  Simon Josefsson  <jas@extundo.com>
14561
14562         * lib/memxor.c (memxor): Avoid casts and warnings.
14563
14564 2005-10-06  Simon Josefsson  <jas@extundo.com>
14565
14566         * lib/hmac-md5.c: New file.
14567
14568         * lib/hmac.h: New file.
14569
14570 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14571
14572         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
14573         promotes to int, not unsigned int, to catch the AIX 5.3
14574         compiler bug.
14575
14576 2005-10-05  Simon Josefsson  <jas@extundo.com>
14577
14578         * modules/memxor: New file.
14579
14580         * modules/iconv (Files): Move config.rpath to havelib, it is used
14581         there.
14582
14583         * modules/havelib (Files): Add config.rpath.
14584
14585 2005-10-05  Simon Josefsson  <jas@extundo.com>
14586
14587         * m4/memxor.m4: New file.
14588
14589 2005-10-05  Simon Josefsson  <jas@extundo.com>
14590
14591         * lib/memxor.c (memxor): Fix compiler error.
14592
14593         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
14594         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
14595
14596         * lib/memxor.h, lib/memxor.c: New files.
14597
14598         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
14599         we assume all systems have it, suggested by Jim Meyering
14600         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
14601         any systems lack sys/socket.h; mingw32 is known to lack it, but we
14602         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
14603         same reasons.
14604
14605 2005-10-05  Simon Josefsson  <jas@extundo.com>
14606
14607         * config/srclist.txt: Add glibc bug 1423 for md5.h.
14608
14609 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
14610
14611         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
14612         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
14613         needed, since the source code now assumes these .h files.
14614
14615 2005-10-05  Derek Price  <derek@ximbiot.com>
14616
14617         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
14618
14619 2005-10-05  Bruno Haible  <bruno@clisp.org>
14620
14621         * modules/stdint (License): Change to LGPL.
14622
14623 2005-10-04  Simon Josefsson  <jas@extundo.com>
14624
14625         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
14626         D. Baushke" <mdb@gnu.org>.
14627
14628 2005-10-04  Bruno Haible  <bruno@clisp.org>
14629
14630         * lib/verify.h (verify_true): Provide alternative definition for C++.
14631
14632 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
14633
14634         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
14635         (SSIZE_MAX): New macro, if not already defined.
14636         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
14637         than 2 GiB.
14638
14639 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14640
14641         Sync from coreutils.
14642         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
14643         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
14644         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
14645         ULLONG_MAX doesn't work with 2.7.2.1.
14646
14647 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14648
14649         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
14650         From Ben Pfaff.
14651
14652         * modules/exclude (Depends-on): Depend on verify.
14653         * modules/strtoimax (Depends-on): Likewise.
14654         * modules/utimecmp (Depends-on): Likewise.
14655
14656 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14657
14658         * lib/exclude.c: Include verify.h.
14659         (verify): Remove.  All callers changed to use verify.h's version.
14660         * lib/strtoimax.c: Likewise.
14661         * lib/utimecmp.c: Likewis.e
14662
14663         Sync from coreutils.
14664         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
14665         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
14666         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
14667         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
14668         bother returning ENOSYS if settimeofday or stime fails; just let
14669         them return whatever errno they want to return.
14670         * lib/utimens.c: Include unistd.h, for dup2.
14671         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
14672         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
14673
14674 2005-10-02  Jim Meyering  <jim@meyering.net>
14675
14676         Sync from coreutils.
14677         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
14678         from glibc-2.2.5 that fails for read-only files.
14679
14680 2005-10-02  Jim Meyering  <jim@meyering.net>
14681
14682         Sync from coreutils.
14683         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
14684         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
14685         `#if HAVE_CONFIG_H'.
14686         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
14687         Remove AT_FDCWD test.
14688         Do not consume the fd unless successful.
14689         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
14690         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
14691         block, so that we don't even try to compile it if settimeofday is
14692         available.  This works around a compilation failure on OSF1 V5.1,
14693         due to stime requiring a `long int*' while tv_sec is `int'.
14694
14695 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
14696
14697         Sync from coreutils.
14698         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
14699         against `yes', rather than just testing for nonempty.
14700
14701 2005-10-01  Simon Josefsson  <jas@extundo.com>
14702
14703         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
14704         and Darwin.
14705
14706         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
14707         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
14708         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
14709         freeaddrinfo and gai_strerror are declared by the POSIX headers.
14710         Check if struct addrinfo is declared.
14711
14712 2005-10-01  Simon Josefsson  <jas@extundo.com>
14713
14714         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
14715         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
14716         AI_* and EAI_* definitions.  Protect function declarations.
14717
14718 2005-10-01  Jim Meyering  <jim@meyering.net>
14719
14720         Sync from coreutils.
14721
14722         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
14723         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
14724         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
14725         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14726         in the inet and nsl libraries.  Required on Solaris 5.7.
14727
14728 2005-10-01  Jim Meyering  <jim@meyering.net>
14729
14730         Sync from coreutils.
14731         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14732         in the inet and nsl libraries.  Required on Solaris 5.7.
14733
14734 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
14735
14736         * lib/getdelim.c (getdelim): Remove unused variables.
14737
14738 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
14739
14740         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
14741         so that the code works even with ancient cpp.  Portability problem
14742         with GCC 2.7.2.1 reported by Thomas M.Ott.
14743
14744 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
14745
14746         * modules/regex (Depends-on): Add strcase.
14747
14748         * modules/gethostname (Licence): Change from GPL to LGPL, since
14749         gethostname.c is a trivial implementation of a standard library
14750         function.
14751         * modules/poll (License): Change from GPL to LGPL, since it's
14752         derived from LGPL code.
14753
14754 2005-09-27  Jim Meyering  <jim@meyering.net>
14755
14756         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
14757         HAVE_CONFIG_H.
14758
14759         * lib/intprops.h (signed_type_or_expr__): Define.
14760         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
14761         for unsigned types.
14762
14763 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
14764
14765         * lib/verify.h (verify_expr): Remove, replacing with:
14766         (verify_true): New macro that returns true instead of void.
14767         (verify_type__): Remove.
14768         (verify): Use verify_true rather than verify_type__.
14769
14770 2005-09-26  Bruno Haible  <bruno@clisp.org>
14771
14772         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
14773         is necessary.
14774         (lib_SOURCES): Remove mbchar.c.
14775         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
14776         (Files): Add m4/mbrtowc.m4.
14777         * modules/mbiter: Likewise.
14778         * modules/mbuiter: Likewise.
14779
14780 2005-09-26  Bruno Haible  <bruno@clisp.org>
14781
14782         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
14783         compile mbchar.c if they are not both present.
14784         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
14785         * m4/mbiter.m4 (gl_MBITER): Likewise.
14786         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
14787         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
14788         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
14789
14790 2005-09-25  Jim Meyering  <jim@meyering.net>
14791
14792         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
14793         also uses socklen_t.
14794
14795 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
14796
14797         * lib/utimens.c (ENOSYS): Define if not already defined.
14798         (futimens): Support having a null PATH if the file descriptor
14799         is nonnegative.
14800
14801         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
14802         Remove.
14803         (__attribute): Define to empty unless GCC 3.1 or later.
14804         This works around a core dump on OpenBSD 3.4, which has GCC
14805         2.95.3, which dumps core when given __attribute__(()).  It also
14806         simplifies other tests, since we really don't want to bother with
14807         worrying about which ancient version of GCC supported what.
14808         Original problem reported by Yoann Vandoorselaere, with part of
14809         the fix suggested by Derek Price.
14810
14811 2005-09-24  Jim Meyering  <jim@meyering.net>
14812
14813         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
14814         so we can once again use a positive bitfield width of 1 -- now we
14815         don't have to explain why we were using a bitfield width of 2.
14816
14817 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14818
14819         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
14820         and similarly for the other external symbols.  Problem reported
14821         by James Gallager.
14822
14823         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
14824         bug reported by Jim Meyering.
14825
14826         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
14827         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
14828         not needed, since socklen is a prerequisite module.
14829
14830 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14831
14832         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
14833         Problem reported by Eric Blake.
14834         (getaddrinfo): Initialize se so that it's not garbage.
14835         Redo internal storage allocation so that it doesn't make unportable
14836         assumptions about alignment.
14837         Fix a memory leak.
14838
14839         * lib/utimens.c (futimens): Use futimesat if available.
14840         Prefer it to futimes since it doesn't have the futimes bug.
14841
14842         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
14843         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
14844         Instead, declare a function that returns a pointer to an array,
14845         and use verify_type__ to declare the size of the array.
14846         Problem and germ of a solution reported by Bruno Haible.
14847         (verify_type__): Use 2, not 1, for bitfield size, to avoid
14848         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
14849
14850 2005-09-23  Jim Meyering  <jim@meyering.net>
14851
14852         Sync from coreutils.
14853         Correct build failure (socklen_t not defined) on at least
14854         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
14855         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
14856
14857 2005-09-23  Jim Meyering  <jim@meyering.net>
14858
14859         * modules/getaddrinfo (Depends-on): Add socklen.
14860
14861 2005-09-23  Bruno Haible  <bruno@clisp.org>
14862
14863         * tests/test-verify.c: New file.
14864
14865 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14866
14867         Sync from coreutils.
14868
14869         * modules/argmatch (Depends-on): Add verify.
14870         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
14871         unistd-safer.
14872         * modules/save-cwd (Depends-on): Likewise.
14873
14874         * modules/openat (Files): Add lib/openat-die.c.
14875         (Depends-on): Remove error, exitfail.
14876         Add dirname.
14877
14878         * modules/verify: New file.
14879         * MODULES.html.sh (Diagnostics <assert.h>): New section,
14880         with "verify" module.
14881
14882 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14883
14884         Sync from coreutils.
14885
14886         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
14887         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
14888         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
14889         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
14890         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
14891         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
14892         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
14893         Don't bother checking for string.h, stdlib.h, unistd.h.
14894         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
14895         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
14896         module's job.
14897         * m4/jm-macros.m4 (gl_MACROS): Likewise.
14898         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
14899
14900         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
14901         (gl_GETDATE): Use it.
14902
14903         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
14904
14905 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14906
14907         Sync from coreutils.
14908
14909         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
14910         stat-time.h.
14911         * lib/argmatch.h: Include verify.h
14912         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
14913         (ARGMATCH_ASSERT): Remove; unused.
14914         * lib/canonicalize.c: Assume STDC_HEADERS.
14915         * lib/exclude.c: Include "strcase.h".
14916         * lib/regex_internal.h [!defined _LIBC]: Likewise.
14917         * lib/getusershell.c: Include stdio--.h rather than stdio.h
14918         and stdio-safer.h.
14919         (getusershell): Call fopen, not fopen_safer.
14920         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
14921         Do not include unistd-safer.h.
14922         (save_cwd): Don't call fd_safer; no longer needed
14923         now that we include fcntl--.h.
14924
14925         * lib/getdate.y (relative_time): New type.
14926         (RELATIVE_TIME_0): New constant.
14927         (parser_control): Use relative_time instead of doing it ourselves.
14928         (%union): Add new relative_time rel member.
14929         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
14930         Now typeless.
14931         (relunit, relunit_snumber): Now of type rel.
14932         (zone, rel, relunit, get_date): Adjust to above changes.
14933
14934         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
14935         Do not include unistd-safer.h.
14936         (getloadavg): Don't call fd_safer; no longer needed
14937         now that we include fcntl--.h.
14938
14939         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
14940         (make_dir_parents): Treat ENOSYS like EEXIST.
14941
14942         Improve quality of diagnostics on restore_cwd failure.
14943         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
14944         (make_dir_parents): Last arg is now int * (for errno), not bool *.
14945         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
14946         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
14947         each time through the loop.  Do not diagnose restore_cwd failure;
14948         that is the caller's job (and perhaps the caller does not care).
14949
14950         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
14951         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
14952         If the file already exists but is not a directory, don't bother
14953         to try to make its parents.
14954         Close potential file descriptor leak if we can't chdir("/") (!).
14955         Don't always return true if chdir($PWD) fails; return true only
14956         if the requested action was done successfully (except for the
14957         chdir($PWD)).
14958         Don't log final directory unless we actually made it.
14959         Refactor to avoid duplicate code to fix up permissions.
14960         Don't attempt to fix up parent permissions if chdir($PWD) fails.
14961
14962         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
14963         to make it a bit faster and (I hope) clearer.
14964         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
14965         Fix bug in formats like %2N.
14966
14967         * lib/verify.h: New file.
14968
14969 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14970
14971         Sync from coreutils.
14972         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
14973
14974 2005-09-22  Jim Meyering  <jim@meyering.net>
14975
14976         Sync from coreutils.
14977
14978         * m4/lstat.m4 (gl_FUNC_LSTAT):
14979         Use AC_LIBSOURCES to require lstat.c and lstat.h.
14980         Remove obsolete comment.
14981         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
14982         * m4/xstrtod.m4: Likewise.
14983
14984         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
14985
14986 2005-09-22  Jim Meyering  <jim@meyering.net>
14987
14988         Sync from coreutils.
14989
14990         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
14991
14992         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
14993         the .tm_year member, since otherwise gcc-4.0 would now warn about
14994         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
14995
14996         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
14997         order to avoid an unsuppressible warning from gcc on 64-bit systems.
14998
14999         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
15000         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
15001         when run in a time zone for which daylight savings time is in effect
15002         for the starting date.
15003
15004         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
15005         stop us from restricting permissions of just-created absolute-named
15006         directories.
15007         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
15008         to restore initial working directory.
15009         * lib/mkdir-p.c (make_dir_parents): New parameter:
15010         different_working_dir, to tell caller if/when we change the working
15011         directory and are unable to return to the initial one.
15012         * lib/mkdir-p.h (make_dir_parents): Update prototype.
15013         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
15014         `return false'.  This fixes a bug introduced on 2004-07-30.
15015
15016         * lib/openat.c (fdopendir): Be sure to close the supplied
15017         file descriptor before returning.  This makes our replacement
15018         implementation a little closer to Solaris's, where fdopendir
15019         ties the file descriptor to the returned DIR* pointer.
15020         * lib/openat.c (unlinkat): New function.
15021         * lib/openat.h (unlinkat): Add prototype.
15022         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
15023         (openat_restore_fail): Rename from openat_restore_die.
15024         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
15025
15026         Provide an alternative to exiting immediately upon save_cwd or
15027         restore_cwd failure.  Now, an application can arrange e.g.,
15028         to perform a longjump in that case.
15029         * lib/openat.c: Include dirname.h.
15030         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
15031         (rpl_openat, fdopendir, fstatat): Call openat_save_die
15032         and openat_restore_die rather than calling error directly.
15033         Don't include "error.h" or "exitfail.h"; they're no longer needed.
15034
15035         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
15036         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
15037         define.
15038
15039         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
15040         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
15041                             int utc, int nanoseconds);
15042         Background:
15043         date should not have to allocate a megabyte of virtual memory to
15044         handle a format argument like +%1048575T.  When implemented with
15045         strftime, it must allocate such a buffer, use strftime to fill it
15046         in, print it, then free it.
15047         With fprintftime, it simply prints everything and exits.
15048         With no need for memory allocation, that's one fewer way to fail.
15049         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
15050         optional field width, not before, so we accept %9:z, not %:9z.
15051         (my_strftime): Be sure to use L_('x') for literals.
15052
15053         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
15054         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
15055         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
15056         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
15057         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
15058         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
15059         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
15060         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
15061         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
15062         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
15063         * lib/xgethostname.c, lib/xreadlink.c:
15064         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
15065
15066         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
15067         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
15068         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
15069         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15070         and don't include <sys/file.h>).
15071
15072 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
15073
15074         Sync from coreutils.
15075
15076         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
15077         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
15078         [!LDAV_DONE]: Avoid unused variable warning.
15079
15080 2005-09-21  Bruno Haible  <bruno@clisp.org>
15081
15082         * lib/unicodeio.h (unicode_to_mb): New declaration.
15083
15084 2005-09-20  Derek Price  <derek@ximbiot.com>
15085
15086         * lib/getaddrinfo.c: Don't include <netdb.h> included from
15087         getaddrinfo.h.
15088
15089 2005-09-20  Bruno Haible  <bruno@clisp.org>
15090
15091         * gnulib-tool: Remove trailing slashes from the values specified for
15092         --source-base, --m4-base, --tests-base, --aux-dir.
15093         Suggested by Simon Josefsson <jas@extundo.com>.
15094
15095 2005-09-20  Bruno Haible  <bruno@clisp.org>
15096
15097         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
15098         func_modules_to_filelist, func_import, func_create_testdir): Make all
15099         sorting results locale-independent, so that gnulib-cache.m4 doesn't
15100         change when gnulib-tool is invoked in a different locale.
15101
15102 2005-09-19  Simon Josefsson  <jas@extundo.com>
15103
15104         * m4/socklen.m4: Fix typo.
15105
15106 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15107
15108         Use a consistent style for including <config.h>.
15109         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
15110         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
15111         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
15112         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
15113         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
15114         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
15115         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
15116         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
15117         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
15118         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
15119         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
15120         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
15121         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
15122         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
15123         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
15124         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
15125         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
15126         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
15127         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
15128         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
15129         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
15130         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
15131         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
15132         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
15133         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
15134         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
15135         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
15136         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
15137         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
15138         lib/xstrtoumax.c, lib/yesno.c:
15139         Standardize inclusion of config.h.
15140         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
15141         lib/inttostr.h:  Removed inclusion of config.h from header files.
15142         * lib/inttostr.c:  Adjusted in-tree users.
15143         * lib/timespec.h: Remove superfluous warning to include config.h.
15144         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
15145         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
15146         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
15147         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
15148         config.h with HAVE_CONFIG_H.
15149
15150 2005-09-19  Jim Meyering  <jim@meyering.net>
15151
15152         * modules/pathmax (License): Change to LGPL.
15153
15154 2005-09-19  Derek Price  <derek@ximbiot.com>
15155
15156         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
15157
15158 2005-09-19  Bruno Haible  <bruno@clisp.org>
15159
15160         * gnulib-tool (import): Provide default for --tests-base.
15161
15162 2005-09-19  Bruno Haible  <bruno@clisp.org>
15163
15164         * doc/quote.texi: New file, extracted from gnulib.texi.
15165         * doc/ctime.texi: New file, extracted from gnulib.texi.
15166         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
15167         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
15168         * doc/gnulib.texi: Include them.
15169
15170 2005-09-18  Bruno Haible  <bruno@clisp.org>
15171
15172         Portability fix.
15173         * gnulib-tool (func_readlink): New function.
15174         (func_ln_if_changed): Use it.
15175
15176 2005-09-18  Bruno Haible  <bruno@clisp.org>
15177
15178         * gnulib-tool: Support --with-tests also with --import.
15179         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
15180         (func_import): Use variables $testsbase and $inctests. Emit a
15181         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
15182         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
15183         SUBDIRS += $testsdir.
15184         (func_create_testdir): Update.
15185
15186 2005-09-18  Bruno Haible  <bruno@clisp.org>
15187
15188         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
15189         instead of $dry_run.
15190         (func_cp_if_changed, func_mv_if_changed): Remove functions.
15191         (func_ln_if_changed): Don't handle dry-run here.
15192         (func_import): In dry-run mode, detect more precisely which actions
15193         would be performed, and don't use "...ing" verbs.
15194
15195 2005-09-18  Bruno Haible  <bruno@clisp.org>
15196
15197         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
15198         (func_import): Use join on two temporary files instead of three nested
15199         loops, in order to determine which files are new or old.
15200
15201 2005-09-18  Bruno Haible  <bruno@clisp.org>
15202
15203         * gnulib-tool (func_import): Comment out code that spits out the
15204         new files with --dry-run.
15205
15206 2005-09-18  Bruno Haible  <bruno@clisp.org>
15207
15208         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
15209
15210 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
15211
15212         * lib/stat-time.h: New file.
15213         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
15214         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
15215         in a different way.
15216         (timespec_cmp): New function.
15217         * lib/utimecmp.c: Include stat-time.h.
15218         (SYSCALL_RESOLUTION): Depend on whether various struct stat
15219         members exist, not on the obsolescent ST_MTIM_NSEC.
15220         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
15221
15222 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
15223
15224         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
15225
15226 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
15227
15228         * MODULES.html.sh (File system functions): Add stat-time.
15229         * modules/stat-time: New file.
15230         * modules/timespec (Files): Remove m4/st_mtim.m4; this
15231         is now done in a different way, by the stat-time module.
15232         * modules/utimecmp (Depends-on): Add stat-time.
15233
15234 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
15235
15236         * m4/st_mtim.m4: Remove.  Superseded by...
15237         * m4/stat-time.m4: New file.
15238         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
15239         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
15240
15241 2005-09-15  Derek Price  <derek@ximbiot.com>
15242
15243         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
15244
15245 2005-09-15  Derek Price  <derek@ximbiot.com>
15246
15247         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
15248         * lib/regex_internal.c: Ditto, using this...
15249         (__GNUC_PREREQ): ...new macro.
15250         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
15251         using...
15252         (__GNUC_PREREQ): ...this new macro.
15253
15254         * lib/strstr.h: Include string.h. Define strstr as a macro here.
15255
15256 2005-09-15  Derek Price  <derek@ximbiot.com>
15257             Paul Eggert  <eggert@cs.ucla.edu>
15258
15259         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
15260         changes, consolidating in...
15261         * lib/regex_internal.h: ...this file.
15262
15263 2005-09-13  Jim Meyering  <jim@meyering.net>
15264
15265         * lib/canon-host.c: Filter through gnu indent and reword comments
15266         slightly.
15267         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
15268
15269 2005-09-13  Derek Price  <derek@ximbiot.com>
15270
15271         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
15272         failure.
15273         Reported by Jim Meyering  <jim@meyering.net>.
15274
15275 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15276
15277         * lib/base64.c: Typo.
15278         (base64_encode): Put b64str in initialized data section.
15279
15280 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
15281
15282         Merge glibc and coreutils changes into gnulib, plus a few
15283         extra fixes.
15284         * lib/md5.c: Use #error rather than a string.
15285         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
15286         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
15287         (__attribute__): Define to empty for non recent-GCC.
15288         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
15289         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
15290         Renamed from their non-__ counterparts, with new macros replacing
15291         them if not _LIBC.  Add __THROW attribute.
15292         (rol): Remove.
15293         (struct md5_ctx): Align buffer if using GCC.
15294         * lib/sha1.h (struct sha1_ctx): Likewise.
15295         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
15296         The old name was backwards.
15297         (NOTSWAP): Remove; not used.
15298         (rol): New macro, moved here from md5.h.
15299         (sha1_process_block): Remove a FIXME that doesn't make sense.
15300
15301 2005-09-12  Derek Price  <derek@ximbiot.com>
15302
15303         Return usable errors from canon-host.
15304         * lib/canon-host.h: New file.
15305         * lib/canon-host.c (canon_host): Wrap...
15306         (canon_host_r): ...this new function, which now relies exclusively on
15307         getaddrinfo.
15308         (ch_strerror): New function.
15309         (last_cherror): New global.
15310         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
15311         interface.
15312         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
15313         void *.
15314         (freeaddrinfo): Free ai->ai_canonname when set.
15315
15316 2005-09-12  Derek Price  <derek@ximbiot.com>
15317
15318         Make canon-host require getaddrinfo.
15319         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
15320         AC_LIBSOURCE canon-host.h.  Call...
15321         (gl_PREREQ_CANON_HOST): ...this new function, which requires
15322         gl_GETADDRINFO.
15323         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
15324
15325 2005-09-12  Derek Price  <derek@ximbiot.com>
15326
15327         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
15328         LGPL.
15329         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
15330
15331 2005-09-12  Derek Price  <derek@ximbiot.com>
15332
15333         * lib/gai_strerror.c: Include config.h when available.  Include
15334         getaddrinfo.h before other headers to test interface.
15335         Reported by Larry Jones <lawrence.jones@ugs.com>.
15336
15337 2005-09-12  Derek Price  <derek@ximbiot.com>
15338             Paul Eggert  <eggert@cs.ucla.edu>
15339
15340         * modules/glob (Files): Add glob-libc.h.
15341
15342 2005-09-12  Derek Price  <derek@ximbiot.com>
15343             Paul Eggert  <eggert@cs.ucla.edu>
15344
15345         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
15346         glob_.h, glob-libc.h.
15347         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
15348
15349 2005-09-12  Derek Price  <derek@ximbiot.com>
15350             Paul Eggert  <eggert@cs.ucla.edu>
15351
15352         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
15353         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
15354         protecting things that should be done only in gnulib contexts.
15355         * lib/glob_.h: New file, containing only the glob things needed for
15356         gnulib.
15357         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
15358         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
15359         (glob, globfree, glob_pattern_p): Now defined simply in terms of
15360         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
15361         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
15362         and to respect the namespace rules better.
15363
15364 2005-09-08  Simon Josefsson  <jas@extundo.com>
15365
15366         * modules/socklen: New file.
15367
15368 2005-09-08  Simon Josefsson  <jas@extundo.com>
15369
15370         * m4/socklen.m4: New file.
15371
15372 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
15373
15374         * modules/utimens (Files): Add m4/utimbuf.m4, since
15375         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
15376         Reported by Sergey Poznyakoff.
15377
15378 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
15379
15380         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
15381         definitions, since that's the preferred style in glibc.
15382         Fix a minor spacing issue, and update copyright notice to match
15383         glibc's.
15384
15385 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
15386
15387         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
15388
15389 2005-09-06  Simon Josefsson  <jas@extundo.com>
15390
15391         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
15392         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
15393
15394 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15395
15396         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
15397         warning.
15398
15399 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15400
15401         * config/srclist.txt: Add glibc bug 1302.
15402
15403 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
15404
15405         Change bitset word type from unsigned int to unsigned long int,
15406         as this has better performance on typical 64-bit hosts.
15407         Port bitset code to hosts with unusual word sizes.
15408         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
15409         (build_collating_symbol):
15410         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
15411         argument is a bitset.  This is merely a style issue, but it makes
15412         it clearer that an entire array is expected.
15413         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
15414         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
15415         Port to the case where bitset_word is not the same as unsigned int.
15416         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
15417         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
15418         Likewise.
15419         * lib/regexec.c (check_dst_limits_calc_pos_1,
15420         check_subexp_matching_top):
15421         (build_trtable, group_nodes_into_DFAstates):
15422         Likewise.
15423         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
15424         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
15425         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
15426         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
15427         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
15428         * lib/regcomp.c (optimize_subexps, lower_subexp):
15429         Work even if bitset_word has holes in its bitwise representation.
15430         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
15431         * lib/regexec.c (check_dst_limits_calc_pos_1,
15432         check_subexp_matching_top):
15433         Likewise.
15434         * lib/regex_internal.c (re_string_reconstruct):
15435         Don't assume UCHAR_MAX == 255.
15436         * lib/regex_internal.h (bitset_set_all): Likewise.
15437         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
15438         All uses changed.
15439         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
15440         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
15441         All uses changed.
15442         (BITSET_WORD_MAX): New macro.
15443         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
15444         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
15445         (bitset_empty, bitset_copy):
15446         Prefer sizeof (bitset) to multiplying it out ourselves.
15447         (bitset_not_merge): Remove; unused.
15448         (bitset_contain): Return bool, not unsigned int with one bit on.
15449         All callers changed.
15450         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
15451         alignment than re_node_set; do this by defining a new internal
15452         type struct dests_alloc and using it to allocate memory.
15453
15454 2005-09-05  Bruno Haible  <bruno@clisp.org>
15455
15456         * gnulib-tool (func_import): Fix comparison in handling of symbolic
15457         links.
15458
15459 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
15460
15461         * modules/size_max (Makefile.am): Add size_max.h
15462
15463 2005-09-04  Derek Price  <derek@ximbiot.com>
15464
15465         * gnulib-tool (func_import): Fix reversed $symbolic logic.
15466
15467 2005-09-03  Simon Josefsson  <jas@extundo.com>
15468
15469         * gnulib-tool: Fix typo.
15470
15471 2005-09-03  Simon Josefsson  <jas@extundo.com>
15472
15473         * config/srclist.txt: Add glibc bug 1293.
15474
15475 2005-09-03  Derek Price  <derek@ximbiot.com>
15476
15477         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
15478         From Larry Jones <lawrence.jones@ugs.com>.
15479
15480 2005-09-02  Simon Josefsson  <jas@extundo.com>
15481
15482         * modules/socklen: New file.
15483
15484 2005-09-02  Simon Josefsson  <jas@extundo.com>
15485
15486         * modules/havelib: New module.
15487
15488         * modules/gettext, modules/iconv, modules/lock, modules/readline:
15489         Use havelib.
15490
15491 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
15492
15493         Check for arithmetic overflow when calculating sizes, to prevent
15494         some buffer-overflow issues.  These patches are conservative, in the
15495         sense that when I couldn't determine whether an overflow was possible,
15496         I inserted a run-time check.
15497         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
15498         macros.
15499         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
15500         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
15501         (re_xnrealloc, re_x2nrealloc): New inline functions.
15502         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
15503         parse_bracket_exp):
15504         (build_equiv_class, build_charclass): Check for arithmetic overflow
15505         in size expression calculations.
15506         * lib/regex_internal.c (re_string_realloc_buffers):
15507         (build_wcs_upper_buffer, re_node_set_add_intersect):
15508         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
15509         (re_dfa_add_node, register_state): Likewise.
15510         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
15511         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
15512         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
15513         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
15514
15515 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
15516
15517         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15518         m4/ulonglong.m4.  Problem reported by Martin Lambers.
15519
15520 2005-09-02  Bruno Haible  <bruno@clisp.org>
15521
15522         Support for lib vs. lib64 distinction on biarch platforms.
15523         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
15524         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
15525         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
15526
15527 2005-09-02  Bruno Haible  <bruno@clisp.org>
15528
15529         * gnulib-tool (import): In the other first-use case, provide defaults
15530         as well.
15531
15532 2005-09-02  Bruno Haible  <bruno@clisp.org>
15533
15534         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
15535         patches not yet found in the latest gettext release.
15536
15537 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15538
15539         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
15540         to avoid a collision with bits/local_lim.h in glibc.
15541         All uses changed.  Problem reported by Dmitry V. Levin in
15542         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
15543
15544         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
15545         bugs in int versus size_t comparisons.
15546         (re_string_context_at): Fix bug where the code assumed that
15547         Idx is signed.
15548
15549         Use bool where appropriate.
15550         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
15551         All callers changed.
15552         (calc_eclosure_iter): Likewise, for ROOT arg.
15553         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
15554         (build_charclass_op): Likewise, for NON_MATCH arg.
15555         * lib/regex_internal.c (re_string_allocate, re_string_construct):
15556         (re_string_construct_common): Likewise, for ICASE arg.
15557         * lib/regexec.c (re_search_2_stub, re_search_stub):
15558         Likewise, for RET_LEN arg.
15559         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
15560         (set_regs): Likewise, for FL_BACKTRACK arg.
15561         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
15562         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
15563         (calc_eclosure_iter, parse_bracket_exp):
15564         Use bool for internal variables that are booleans.
15565         * lib/regexec.c (re_search_internal, check_matching,
15566         proceed_next_node):
15567         (set_regs, build_sifted_states, sift_states_bkref):
15568         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
15569         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15570         (find_collation_sequence_value):
15571         Likewise.
15572         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
15573         (re_node_set_compare):
15574         Return bool, not int. All callers changed.
15575         * lib/regexec.c (check_halt_node_context, check_dst_limits):
15576         (build_trtable, check_node_accept): Likewise.
15577         * lib/regex_internal.h: Include stdbool.h.
15578
15579         Fix bugs uncovered when converting to bool.
15580         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
15581         failure instead of charging ahead blindly.
15582         * lib/regex_internal.c (register_state): Likewise.
15583         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
15584         for freeing internal storage.
15585         (group_nodes_into_DFA_states): Use unsigned int, not int, for
15586         bitset pieces used as boolean, to avoid undefined behavior
15587         on hosts that do int overflow checking.
15588
15589 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15590
15591         * config/srclist.txt: Add glibc bugs 1285-1287.
15592
15593 2005-09-01  Jim Meyering  <jim@meyering.net>
15594
15595         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
15596         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
15597         Require gl_STAT_MACROS, too.
15598
15599 2005-09-01  Bruno Haible  <bruno@clisp.org>
15600
15601         * gnulib-tool (import): In the first-use case, provide defaults.
15602
15603 2005-09-01  Bruno Haible  <bruno@clisp.org>
15604
15605         * gnulib-tool (func_import): Remove the .tmp files.
15606
15607 2005-09-01  Bruno Haible  <bruno@clisp.org>
15608
15609         * gnulib-tool (func_import): Fix handling of symbolic links.
15610
15611 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15612
15613         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
15614         old glibc regex code mishandles strings longer than 2**31 bytes.
15615         This patch fixes this when the regex code is used in gnulib
15616         (i.e., outside glibc).
15617
15618         This patch should not affect the use of the regex code inside
15619         glibc.  No doubt this problem also needs to be handled for glibc
15620         as well, but the result will be an incompatible change to the
15621         glibc ABI, and the old ABI will have to be supported too.  That
15622         can be the the subject for another patch.
15623
15624         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
15625         governing whether the rest of this patch is active.  By default,
15626         the macro is disabled and the patch has no effect.
15627         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
15628         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
15629         (struct re_pattern_buffer, re_search, re_search_2, re_match):
15630         (re_match_2, re_set_registers): Use the new types.
15631         * lib/regex_internal.h (Idx, re_hashval_t): New types.
15632         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
15633         New macros.
15634         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
15635         (re_string_context_at, bin_tree_t, re_dfastate_t):
15636         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
15637         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
15638         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
15639         (re_string_char_size_at, re_string_wchar_at):
15640         (re_string_elem_size_at):
15641         Use the new types and macros to port to 64-bit hosts.
15642         Use unsigned types for internal values, so that the code
15643         mostly works even for arrays larger than SSIZE_MAX.
15644         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
15645         (search_duplicated_node, calc_eclosure_iter, fetch_number):
15646         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
15647         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
15648         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
15649         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
15650         (calc_inveclosure, parse_dup_op, build_range_exp):
15651         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
15652         (fetch_number, create_token_tree, mark_opt_subexp):
15653         Likewise.
15654         * lib/regex_internal.c (re_string_construct_common,
15655         create_ci_newstate):
15656         (create_cd_newstate, re_string_allocate, re_string_construct):
15657         (re_string_realloc_buffers, build_wcs_upper_buffer):
15658         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15659         (re_string_reconstruct, re_string_peek_byte_case):
15660         (re_string_fetch_byte_case, re_string_context_at):
15661         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15662         (re_node_set_init_copy, re_node_set_add_intersect):
15663         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15664         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15665         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15666         (re_acquire_state, re_acquire_state_context, register_state):
15667         Likewise.
15668         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
15669         search_cur_bkref_entry):
15670         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
15671         (re_search_internal, re_search_2_stub, re_search_stub)
15672         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
15673         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
15674         (update_cur_sifted_state, check_dst_limits):
15675         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15676         (check_subexp_limits, sift_states_bkref, merge_state_array):
15677         (check_subexp_matching_top, get_subexp, get_subexp_sub):
15678         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
15679         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15680         (expand_bkref_cache, check_node_accept_bytes):
15681         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
15682         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
15683         (acquire_init_state_context, check_halt_node_context):
15684         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
15685         (sift_states_backward, clean_state_log_if_needed):
15686         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
15687         (find_recover_state, transit_state_sb, transit_state_mb):
15688         (transit_state_bkref, build_trtable, match_ctx_clean):
15689         Likewise.
15690         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
15691         to work around an assumption that REG_MISSING is negative.
15692
15693         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
15694         (seek_collating_symbol_entry) [defined _LIBC]:
15695         (lookup_collation_sequence_value) [defined _LIBC]:
15696         (build_range_exp, build_collating_symbol) [defined _LIBC]:
15697         Use prototypes rather than old-style function definitions.
15698         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
15699         (transit_state_sb) [0]:
15700         (find_collation_sequence_value) [defined _LIBC]: Likewise.
15701
15702         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
15703         rm_eo.
15704
15705         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
15706         (optimize_subexps, lower_subexp):
15707         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
15708         since the signed shift might overflow.  Use 1u<<31 instead.
15709         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
15710         Likewise.
15711         * lib/regexec.c (check_dst_limits_calc_pos_1,
15712         check_subexp_matching_top): Likewise.
15713
15714         * lib/regcomp.c (optimize_subexps, lower_subexp):
15715         Use CHAR_BIT rather than 8, for clarity.
15716         * lib/regexec.c (check_dst_limits_calc_pos_1):
15717         (check_subexp_matching_top): Likewise.
15718         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
15719         have to worry about portability issues when shifting it left.
15720         Remove no-longer-needed test for table_size > 0.
15721         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
15722         in a word, as the resulting behavior is undefined.
15723         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
15724         in one case, a <= should have been an <, and in another case the
15725         whole test was missing.
15726         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
15727         the standard name CHAR_BIT.
15728         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
15729         this is not true on one's complement and signed-magnitude hosts.
15730
15731         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
15732         next_last_offset.
15733         (struct re_dfa_t): Remove unused member states_alloc.
15734         * lib/regcomp.c (init_dfa): Don't initialize unused members.
15735
15736 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15737
15738         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
15739         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
15740         and large-file glibc and in 32-bit large-file Solaris.
15741
15742 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15743
15744         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
15745         lengths fit in regoff_t; this isn't true if regoff_t is the same
15746         width as size_t.
15747         * lib/regex.c (re_search_internal): 5th arg is LAST_START
15748         (= START + RANGE) instead of RANGE.  This avoids overflow
15749         problems when regoff_t is the same width as size_t.
15750         All callers changed.
15751         (re_search_2_stub): Check for overflow when adding the
15752         sizes of the two strings.
15753         (re_search_stub): Check for overflow when adding START
15754         to RANGE; if it occurs, substitute the extreme value.
15755
15756 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15757
15758         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
15759
15760 2005-08-31  Jim Meyering  <jim@meyering.net>
15761
15762         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
15763         a pointer-to-const.
15764         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
15765         (register_state): Likewise.
15766         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
15767         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15768         (group_nodes_into_DFAstates): Likewise.
15769
15770 2005-08-31  Jim Meyering  <jim@meyering.net>
15771
15772         * check-module: Add a FIXME comment.
15773
15774 2005-08-31  Eric Blake  <ebb9@byu.net>
15775
15776         * modules/unistd-safer (Files): Add unistd--.h.
15777         * modules/stdio-safer (Files): Add stdio--.h.
15778
15779 2005-08-31  Derek Price  <derek@ximbiot.com>
15780
15781         * lib/getdelim.c (getdelim): Return EOF on EOF.
15782         Reported by Larry Jones <lawrence.jones@ugs.com>.
15783
15784 2005-08-31  Bruno Haible  <bruno@clisp.org>
15785
15786         Avoid unnecessary diffs in the generated lib/Makefile.am.
15787         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
15788         the generated files.
15789         (func_import): Don't set cmd.
15790
15791 2005-08-31  Bruno Haible  <bruno@clisp.org>
15792
15793         * lib/strstr.c: Include <stddef.h>, for NULL.
15794         * lib/strcasestr.c: Likewise.
15795         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15796
15797 2005-08-31  Bruno Haible  <bruno@clisp.org>
15798
15799         * gnulib-tool: New option --macro-prefix.
15800         (func_import): Use macro_prefix.
15801         (import): Handle option --macro-prefix.
15802
15803 2005-08-31  Bruno Haible  <bruno@clisp.org>
15804
15805         * gnulib-tool (import): Rename most ac_* variables to cached_*.
15806         Also use new variables cached_lgpl, cached_libtool.
15807
15808 2005-08-31  Bruno Haible  <bruno@clisp.org>
15809
15810         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
15811         always instantiating them.
15812
15813 2005-08-31  Bruno Haible  <bruno@clisp.org>
15814
15815         * gnulib-tool (func_import): Read the previous cached settings
15816         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
15817         earlier added by gnulib but are now dropped. Warn when a gnulib file
15818         overwrites a non-gnulib file.
15819
15820 2005-08-31  Bruno Haible  <bruno@clisp.org>
15821
15822         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
15823         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
15824         projects that don't keep autogenerated files in CVS. Put into
15825         actioncmd only the specified modules, not the transitive closure.
15826
15827 2005-08-31  Bruno Haible  <bruno@clisp.org>
15828
15829         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
15830         Create directories that shall be filled.
15831         (import): Don't look for gl_* macros in configure.ac. Recurse across
15832         all directories containing a gnulib-cache.m4 files, if meaningful.
15833
15834 2005-08-31  Bruno Haible  <bruno@clisp.org>
15835
15836         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
15837         (import): Set seen_libtool when we see gl_LIBTOOL.
15838
15839 2005-08-31  Bruno Haible  <bruno@clisp.org>
15840
15841         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
15842         declaration macro definitions from generated gnulib.m4.
15843
15844 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
15845
15846         * lib/iconvme.h: Add prototype for iconv_alloc.
15847
15848 2005-08-29  Simon Josefsson  <jas@extundo.com>
15849
15850         * lib/iconvme.c: Fix errno.
15851
15852 2005-08-29  Bruno Haible  <bruno@clisp.org>
15853
15854         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
15855         that it works when the directory contains spaces.
15856
15857 2005-08-29  Bruno Haible  <bruno@clisp.org>
15858
15859         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
15860
15861 2005-08-29  Bruno Haible  <bruno@clisp.org>
15862
15863         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
15864         Emit more advice.
15865
15866 2005-08-29  Bruno Haible  <bruno@clisp.org>
15867         and Stepan Kasal  <kasal@ucw.cz>
15868
15869         * check-module: If more parameters are given, check each of them
15870         separately; add more exceptions, as noted by Jim Meyering.
15871         (check_module): New procedure.
15872         (%exempt_header): Now contains all exceptions.
15873
15874 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
15875
15876         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
15877
15878 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15879
15880         * lib/iconvme.c: Split iconv_string into iconv_alloc.
15881
15882 2005-08-28  Bruno Haible  <bruno@clisp.org>
15883
15884         * m4/gnulib-tool.m4: New file.
15885
15886 2005-08-27  Jim Meyering  <jim@meyering.net>
15887
15888         * modules/unistd-safer (Files): Add pipe-safer.c.
15889         * modules/fcntl-safer (Files): Add creat-safer.c.
15890
15891 2005-08-27  Jim Meyering  <jim@meyering.net>
15892
15893         * m4/stdlib-safer.m4: New file.  From coreutils.
15894         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
15895         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
15896         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
15897         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
15898         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
15899
15900 2005-08-27  Jim Meyering  <jim@meyering.net>
15901
15902         * lib/fopen-safer.c: Merge minor changes from coreutils.
15903         * lib/dup-safer.c: Likewise.
15904         * lib/fd-safer.c: Likewise.
15905
15906         Merge from coreutils.
15907         * lib/stdio--.h: New file.
15908         * lib/stdlib--.h: New file.
15909         * lib/mkstemp-safer.c: New file.
15910
15911         GNU tar needs these.
15912         * lib/pipe-safer.c: New file.
15913         * lib/creat-safer.c: New file.
15914         * lib/fcntl--.h (creat): Define to creat_safer.
15915         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
15916         * lib/unistd--.h (pipe): Define to pipe_safer.
15917         * lib/unistd-safer.h: Declare pipe_safer.
15918
15919 2005-08-26  Simon Josefsson  <jas@extundo.com>
15920
15921         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
15922         Haible <bruno@clisp.org>.
15923
15924 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
15925
15926         * lib/regex_internal.h: Remove all references to
15927         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
15928         or better.
15929         (bitset_not, bitset_merge, bitset_not_merge):
15930         (bitset_mask, re_string_allocate, re_string_construct):
15931         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
15932         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
15933         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
15934         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
15935         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15936         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15937         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
15938         (re_acquire_state_context):
15939         Remove unnecessary forward decls.
15940         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
15941         Put __attribute at function definition,
15942         now that the function decl has been removed.
15943         * lib/regex_internal.c (re_string_peek_byte_case):
15944         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
15945         Likewise.
15946
15947 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
15948
15949         * m4/regex.m4: Add AC_PREREQ(2.50).
15950         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
15951
15952 2005-08-25  Simon Josefsson  <jas@extundo.com>
15953
15954         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
15955         __fsetlocking.
15956
15957 2005-08-25  Simon Josefsson  <jas@extundo.com>
15958
15959         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
15960         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
15961         GLIBC specific code.
15962
15963 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15964
15965         Make regex safe for g++.  This fixes one real bug (an "err"
15966         that should have been "*err").  g++ problem reported by
15967         Sam Steingold.
15968         * lib/regex_internal.h (re_calloc): New macro, consistent with
15969         re_malloc etc.  All callers of calloc changed to use re_calloc.
15970         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
15971         not int.  All callers changed.
15972         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
15973         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
15974         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
15975         (find_recover_state): Change "err" to "*err"; this fixes what
15976         appears to be a real bug.
15977         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
15978         versus int.
15979
15980 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15981
15982         * modules/regex (Depends-on): Add malloc, since the code
15983         assumes that !malloc(0) means failure.
15984
15985 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15986
15987         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
15988
15989         alloca modernization/simplification for regex.
15990         * lib/regex.c: Remove portability cruft for alloca.  This no longer
15991         needs to be at the start of the file, and can be moved into
15992         regex_internal.h and simplified.
15993         * lib/regex_internal.h: Include <alloca.h>.
15994         (__libc_use_alloca) [!defined _LIBC]: New macro.
15995         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
15996         now works outside glibc.
15997
15998 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15999
16000         * config/srclist.txt: Add glibc bugs 1241, 1245.
16001
16002 2005-08-25  Jim Meyering  <jim@meyering.net>
16003
16004         * lib/open-safer.c: Include <config.h>.
16005         Otherwise, we'd lose LARGEFILE support in any file using
16006         e.g. "fcntl--.h"
16007
16008 2005-08-25  Bruno Haible  <bruno@clisp.org>
16009
16010         * m4/minmax.m4: Require autoconf 2.52.
16011         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
16012         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
16013         alternatives of translit over the alphabet.
16014         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
16015
16016 2005-08-24  Simon Josefsson  <jas@extundo.com>
16017
16018         * tests/test-getpass.c: New file.
16019
16020 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
16021
16022         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
16023         for GNU regex features.
16024
16025 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
16026
16027         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
16028         * lib/regex.h (regerror): Likewise.
16029
16030         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
16031         requires this.  (The code never needed it.)
16032
16033         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
16034         All uses of recently-renamed identifiers changed to use the new,
16035         POSIX-compliant names.  The code will build and run just fine
16036         without these changes, but it's better to eat our own dog food
16037         and use the standard-conforming names.
16038
16039         * lib/regex.h: Fix a multitude of POSIX name space violations.
16040         These changes have an effect only for programs that define
16041         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
16042         do not change anything for programs compiled in the normal way.
16043         Also, there is no effect on the ABI.
16044
16045         (_REGEX_SOURCE): New macro.
16046         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
16047         defined and _GNU_SOURCE is not; this fixes a name space violation.
16048
16049         Rename the following macros to obey POSIX requirements.
16050         The old names are still visible as macros if _REGEX_SOURCE is defined.
16051         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
16052         RE_BACKSLASH_ESCAPE_IN_LISTS.
16053         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
16054         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
16055         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
16056         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
16057         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
16058         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
16059         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
16060         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
16061         (REG_INTERVALS): renamed from RE_INTERVALS.
16062         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
16063         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
16064         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
16065         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
16066         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
16067         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
16068         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
16069         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
16070         RE_UNMATCHED_RIGHT_PAREN_ORD.
16071         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
16072         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
16073         (REG_DEBUG): renamed from RE_DEBUG.
16074         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
16075         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
16076         unusual, since we can't clash with the POSIX REG_ICASE.
16077         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
16078         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
16079         (REG_NO_SUB): renamed from RE_NO_SUB.
16080         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
16081         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
16082         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
16083         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
16084         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
16085         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
16086         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
16087         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
16088         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
16089         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
16090         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
16091         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
16092         RE_SYNTAX_POSIX_MINIMAL_BASIC.
16093         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
16094         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
16095         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
16096         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
16097         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
16098         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
16099         (REG_FIXED): Renamed from REGS_FIXED.
16100         (REG_NREGS): Renamed from RE_NREGS.
16101
16102         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
16103         of other REG_* macros, since POSIX says the user is allowed to
16104         #undef these macros selectively.
16105
16106         (reg_errcode_t): Update comment stating what other tables need
16107         to be consistent.
16108
16109         Rename the following enum values to obey POSIX requirements.
16110         The old names are still visible as macros.
16111         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
16112         is not defined, since GNU is supposed to be a superset of POSIX as
16113         much as possible, and since we want reg_errcode_t to be a signed
16114         type for implementation consistency.
16115         (_REG_NOERROR): Renamed from REG_NOERROR.
16116         (_REG_NOMATCH): Renamed from REG_NOMATCH.
16117         (_REG_BADPAT): Renamed from REG_BADPAT.
16118         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
16119         (_REG_ECTYPE): Renamed from REG_ECTYPE.
16120         (_REG_EESCAPE): Renamed from REG_EESCAPE.
16121         (_REG_ESUBREG): Renamed from REG_ESUBREG.
16122         (_REG_EBRACK): Renamed from REG_EBRACK.
16123         (_REG_EPAREN): Renamed from REG_EPAREN.
16124         (_REG_EBRACE): Renamed from REG_EBRACE.
16125         (_REG_BADBR): Renamed from REG_BADBR.
16126         (_REG_ERANGE): Renamed from REG_ERANGE.
16127         (_REG_ESPACE): Renamed from REG_ESPACE.
16128         (_REG_BADRPT): Renamed from REG_BADRPT.
16129         (_REG_EEND): Renamed from REG_EEND.
16130         (_REG_ESIZE): Renamed from REG_ESIZE.
16131         (_REG_ERPAREN): Renamed from REG_ERPAREN.
16132         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
16133         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
16134         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
16135         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
16136
16137         (_REG_RE_NAME, _REG_RM_NAME): New macros.
16138         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
16139         changed.  But support the old name if the new one is not defined
16140         and if _REGEX_SOURCE.
16141
16142         Change the following member names in struct re_pattern_buffer.
16143         The old names are still supported if !_REGEX_SOURCE.
16144         The new names are always supported, regardless of _REGEX_SOURCE.
16145         (re_buffer): Renamed from buffer.
16146         (re_allocated): Renamed from allocated.
16147         (re_used): Renamed from used.
16148         (re_syntax): Renamed from syntax.
16149         (re_fastmap): Renamed from fastmap.
16150         (re_translate): Renamed from translate.
16151         (re_can_be_null): Renamed from can_be_null.
16152         (re_regs_allocated): Renamed from regs_allocated.
16153         (re_fastmap_accurate): Renamed from fastmap_accurate.
16154         (re_no_sub): Renamed from no_sub.
16155         (re_not_bol): Renamed from not_bol.
16156         (re_not_eol): Renamed from not_eol.
16157         (re_newline_anchor): Renamed from newline_anchor.
16158
16159         Change the following member names in struct re_registers.
16160         The old names are still supported if !_REGEX_SOURCE.
16161         The new names are always supported, regardless of _REGEX_SOURCE.
16162         (rm_num_regs): Renamed from num_regs.
16163         (rm_start): Renamed from start.
16164         (rm_end): Renamed from end.
16165
16166         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
16167         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
16168         Prepend __ to parameter names.
16169
16170         Undo yesterday's changes.
16171
16172 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
16175         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
16176         lib/regex.c.
16177
16178 2005-08-24  Jim Meyering  <jim@meyering.net>
16179
16180         Sync from coreutils.
16181         * m4/fcntl-safer.m4: New file.
16182
16183         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
16184         and object files for this module.
16185
16186 2005-08-24  Jim Meyering  <jim@meyering.net>
16187
16188         Sync from coreutils.
16189         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
16190
16191 2005-08-24  Jim Meyering  <jim@meyering.net>
16192
16193         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
16194         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
16195
16196 2005-08-24  Jim Meyering  <jim@meyering.net>
16197
16198         * modules/fcntl-safer: New module.
16199         * modules/fts (Depends-on): Add fcntl-safer.
16200         * MODULES.html.sh (File descriptor based Input/Output):
16201         Add fcntl-safer.
16202
16203 2005-08-24  Bruno Haible  <bruno@clisp.org>
16204
16205         Support for unit test modules.
16206         * modules/README: Mention tests modules.
16207         * modules/TEMPLATE-TESTS: New file.
16208         * gnulib-tool: New options --extract-tests-module, --with-tests and
16209         --tests-base (unused for the moment).
16210         (testsbase, inctests): New variables.
16211         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
16212         (func_verify_module): Exclude TEMPLATE-TESTS.
16213         (func_verify_nontests_module, func_verify_tests_module): New functions.
16214         (func_get_dependencies): Add implicit dependency for tests modules.
16215         (func_get_tests_module): New function.
16216         (func_modules_transitive_closure): When --with-tests was specified,
16217         include the unit tests as well, unless explicitly avoided.
16218         (func_emit_lib_Makefile_am): Ignore the tests modules here.
16219         (func_emit_tests_Makefile_am): New function.
16220         (func_create_testdir): When --with-tests was specified, emit a
16221         tests/ directory.
16222         * MODULES.html.sh (Future developments): Update.
16223
16224 2005-08-24  Bruno Haible  <bruno@clisp.org>
16225
16226         * modules/tls-tests: New file.
16227         * tests/test-tls.c: New file, from GNU gettext.
16228
16229 2005-08-24  Bruno Haible  <bruno@clisp.org>
16230
16231         * modules/lock-tests: New file.
16232         * tests/test-lock.c: New file, from GNU gettext.
16233
16234 2005-08-24  Bruno Haible  <bruno@clisp.org>
16235
16236         * lib/lock.h: Add multiple inclusion guard.
16237         * lib/tls.h: Add multiple inclusion guard.
16238
16239 2005-08-24  Bruno Haible  <bruno@clisp.org>
16240
16241         * gnulib-tool: Add support for the --aux-dir option to
16242         --create-testdir, --create-megatestdir, --test, --megatest.
16243         (func_create_testdir, func_create_megatestdir): Optionally emit a
16244         AC_CONFIG_AUX_DIR directive.
16245         (create-testdir, create-megatestdir, test, megatest): Provide a
16246         default value for $auxdir.
16247
16248 2005-08-24  Bruno Haible  <bruno@clisp.org>
16249
16250         * gnulib-tool (import): Use compound statement instead of subshell
16251         where possible.
16252
16253 2005-08-24  Bruno Haible  <bruno@clisp.org>
16254
16255         * gnulib-tool (import): Change --aux-dir default to "build-aux".
16256
16257 2005-08-24  Bruno Haible  <bruno@clisp.org>
16258
16259         * gnulib-tool (func_version): Update.
16260
16261 2005-08-24  Bruno Haible  <bruno@clisp.org>
16262
16263         * gnulib-tool (func_import, func_create_testdir,
16264         func_create_megatestdir): Quote all autoconf macro arguments.
16265
16266 2005-08-24  Bruno Haible  <bruno@clisp.org>
16267
16268         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
16269         option --force, because --force causes the aclocal.m4 of each
16270         subdirectory to be newer than the corresponding config.h.in.
16271
16272 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
16273
16274         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
16275         All contents moved to gl_REGEX.
16276         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
16277         assume that it does.
16278
16279 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
16280
16281         * lib/regex.h (REG_NOSYS)
16282         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
16283         Define, since POSIX requires it as of 2001.
16284         (_REG_ENOSYS)
16285         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
16286         New private symbol, used to keep the enum signed in all cases.
16287         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
16288         Youngman in
16289         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
16290
16291         * lib/regex_internal.c (re_string_skip_chars, register_state):
16292         (calc_state_hash):
16293         Remove forward decls; no longer needed now that we use prototypes.
16294         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
16295         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
16296         (clean_state_log_if_needed): Likewise.
16297
16298 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
16299
16300         * config/srclist.txt: Add glibc bugs 1231-1233.
16301
16302 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
16303
16304         Fix problems reported by Sam Steingold in
16305         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
16306         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
16307         assumed that reg_errcode_t is a signed type, which is not
16308         necessarily true if _XOPEN_SOURCE is not defined.
16309         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
16310         since some compilers warn about it otherwise.
16311
16312 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
16313
16314         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
16315         (init_word_char, create_initial_state, duplicate_node_closure):
16316         (fetch_token, peek_token_bracket, build_range_exp):
16317         (build_collating_symbol): Remove forward decls; no longer needed
16318         now that we use prototypes.
16319
16320         * lib/regcomp.c:
16321         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
16322         (re_compile_fastmap_iter, regcomp, regerror, regfree):
16323         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
16324         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
16325         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
16326         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
16327         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
16328         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
16329         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
16330         (build_range_exp, build_collating_symbol, parse_bracket_exp):
16331         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
16332         (build_charclass, build_charclass_op, fetch_number, create_tree):
16333         (create_token_tree, mark_opt_subexp, duplicate_tree):
16334         Use prototypes rather than old-style definitions.
16335
16336         * lib/regex_internal.c:
16337         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
16338         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
16339         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
16340         (re_string_reconstruct, re_string_peek_byte_case):
16341         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
16342         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
16343         (re_node_set_init_copy, re_node_set_add_intersect):
16344         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
16345         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
16346         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
16347         (re_acquire_state, re_acquire_state_context, register_state):
16348         (create_ci_newstate, create_cd_newstate, free_state):
16349         Likewise.
16350         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
16351         re_search_2):
16352         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
16353         (re_search_internal, prune_impossible_nodes):
16354         (acquire_init_state_context, check_matching, static):
16355         (check_halt_node_context, check_halt_state_context, proceed_next_node):
16356         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
16357         (update_regs, sift_states_backward, build_sifted_states):
16358         (clean_state_log_if_needed, merge_state_array):
16359         (update_cur_sifted_state, add_epsilon_src_nodes):
16360         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
16361         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
16362         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
16363         (find_recover_state, check_subexp_matching_top, transit_state_mb):
16364         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
16365         (check_arrival, check_arrival_add_next_nodes):
16366         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
16367         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
16368         (check_node_accept_bytes, check_node_accept, extend_buffers):
16369         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
16370         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
16371         (sift_ctx_init):
16372         Likewise.
16373
16374         * lib/regex_internal.h:
16375         (re_string_allocate, re_string_construct, re_string_reconstruct):
16376         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
16377         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
16378         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
16379         (re_string_context_at, re_string_peek_byte_case):
16380         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
16381         is defined, since we now use prototypes always.
16382
16383         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
16384         C89 or better.  All uses removed.
16385
16386 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
16387
16388         * config/srclist.txt: Add glibc bugs 1220-1227.
16389
16390 2005-08-20  Jim Meyering  <jim@meyering.net>
16391
16392         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
16393         of unused local, dfa.
16394
16395 2005-08-20  Bruno Haible  <bruno@clisp.org>
16396
16397         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
16398
16399 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16400
16401         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
16402         (re_node_set_insert_last, re_dfa_add_node):
16403         Rename local variables to avoid GCC shadowing warnings.
16404
16405 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16406
16407         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
16408         [defined lint]: Suppress bogus uninitialized-variable warnings.
16409
16410         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
16411         and let the caller return REG_ESPACE if out of space.  This
16412         removes an uninitialied-variable warning with GCC 4.0.1, and also
16413         avoids taking the address of a local variable.  All callers
16414         changed.
16415
16416 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16417
16418         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
16419         $LIBCSRC/posix/regexec.c.
16420         Add glibc bug 1217 for regcomp.c.
16421
16422 2005-08-19  Jim Meyering  <jim@meyering.net>
16423
16424         * lib/regexec.c (proceed_next_node): Redo local variables to
16425         avoid GCC shadowing warnings.
16426
16427 2005-08-18  Bruno Haible  <bruno@clisp.org>
16428
16429         * lib/strstr.c (strstr): Fix return value in multibyte case.
16430         * lib/strcasestr.c (strcasestr): Likewise.
16431
16432 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16433
16434         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
16435
16436 2005-08-17  Jim Meyering  <jim@meyering.net>
16437
16438         Make the %s format (seconds since the epoch) work for a negative
16439         number and when used with a zero-padded field width, e.g. %015s.
16440
16441         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
16442         label so that it precedes the code to set `digits'.  Otherwise,
16443         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
16444         print `00-22'.  Now, it prints `-0022', as it should.
16445
16446 2005-08-17  Bruno Haible  <bruno@clisp.org>
16447
16448         * modules/strstr (Files): Add m4/mbrtowc.m4.
16449         (Depends-on): Add mbuiter.
16450
16451 2005-08-17  Bruno Haible  <bruno@clisp.org>
16452
16453         * modules/strcasestr: New file.
16454         * MODULES.html.sh (String handling, based on ANSI C 89): Add
16455         strcasestr.
16456
16457 2005-08-17  Bruno Haible  <bruno@clisp.org>
16458
16459         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
16460
16461 2005-08-17  Bruno Haible  <bruno@clisp.org>
16462
16463         * modules/mbuiter: New file.
16464         * MODULES.html.sh (Extended multibyte and wide character utilities):
16465         Add mbuiter.
16466
16467 2005-08-17  Bruno Haible  <bruno@clisp.org>
16468
16469         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
16470         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
16471
16472 2005-08-17  Bruno Haible  <bruno@clisp.org>
16473
16474         * m4/strcasestr.m4: New file.
16475
16476 2005-08-17  Bruno Haible  <bruno@clisp.org>
16477
16478         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
16479         * lib/strstr.c: Completely rewritten, with multibyte locale support.
16480
16481 2005-08-17  Bruno Haible  <bruno@clisp.org>
16482
16483         * lib/strcasestr.h: New file.
16484         * lib/strcasestr.c: New file.
16485
16486 2005-08-17  Bruno Haible  <bruno@clisp.org>
16487
16488         * lib/strcasecmp.c: Use mbuiter.h.
16489
16490 2005-08-17  Bruno Haible  <bruno@clisp.org>
16491
16492         * lib/mbuiter.h: New file.
16493
16494 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
16495
16496         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
16497         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
16498         and gl_GETOPT are both invoked via different paths (as happens
16499         with GNU tar CVS because it uses both argp and getopt), the former
16500         wins.
16501
16502 2005-08-16  Bruno Haible  <bruno@clisp.org>
16503
16504         * modules/tls: New file.
16505         * MODULES.html.sh (Multithreading): Add tls.
16506
16507 2005-08-16  Bruno Haible  <bruno@clisp.org>
16508
16509         * modules/strnlen1: New file.
16510         * MODULES.html.sh (String handling): Add strnlen1.
16511
16512 2005-08-16  Bruno Haible  <bruno@clisp.org>
16513
16514         * modules/strcase (Files): Add m4/mbrtowc.m4.
16515         (Depends-on): Add strnlen1, mbchar.
16516
16517 2005-08-16  Bruno Haible  <bruno@clisp.org>
16518
16519         * modules/mbiter: New file.
16520         * MODULES.html.sh (Extended multibyte and wide character utilities):
16521         Add mbiter.
16522
16523 2005-08-16  Bruno Haible  <bruno@clisp.org>
16524
16525         * modules/mbfile: New file.
16526         * MODULES.html.sh (Extended multibyte and wide character utilities):
16527         Add mbfile.
16528
16529 2005-08-16  Bruno Haible  <bruno@clisp.org>
16530
16531         * modules/mbchar: New file.
16532         * MODULES.html.sh (Extended multibyte and wide character utilities):
16533         New section.
16534
16535 2005-08-16  Bruno Haible  <bruno@clisp.org>
16536
16537         * m4/tls.m4: New file, from GNU gettext.
16538
16539 2005-08-16  Bruno Haible  <bruno@clisp.org>
16540
16541         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
16542         always.
16543         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
16544
16545 2005-08-16  Bruno Haible  <bruno@clisp.org>
16546
16547         * m4/mbiter.m4: New file.
16548
16549 2005-08-16  Bruno Haible  <bruno@clisp.org>
16550
16551         * m4/mbfile.m4: New file.
16552
16553 2005-08-16  Bruno Haible  <bruno@clisp.org>
16554
16555         * m4/mbchar.m4: New file.
16556
16557 2005-08-16  Bruno Haible  <bruno@clisp.org>
16558
16559         * lib/tls.h: New file, from GNU gettext.
16560         * lib/tls.c: New file, from GNU gettext.
16561
16562 2005-08-16  Bruno Haible  <bruno@clisp.org>
16563
16564         * lib/strnlen1.h: New file.
16565         * lib/strnlen1.c: New file.
16566
16567 2005-08-16  Bruno Haible  <bruno@clisp.org>
16568
16569         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
16570         (mbi_init): Update.
16571         (mbi_avail, mbi_advance): Let the iteration end before the terminating
16572         NUL byte, not after it.
16573
16574 2005-08-16  Bruno Haible  <bruno@clisp.org>
16575
16576         * lib/strcase.h (strcasecmp): Add note in comments.
16577         * lib/strncasecmp.c: Use code from strcasecmp.c.
16578         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
16579         (strcasecmp): Work correctly in multibyte locales.
16580
16581 2005-08-16  Bruno Haible  <bruno@clisp.org>
16582
16583         * lib/mbiter.h: New file.
16584
16585 2005-08-16  Bruno Haible  <bruno@clisp.org>
16586
16587         * lib/mbfile.h: New file.
16588
16589 2005-08-16  Bruno Haible  <bruno@clisp.org>
16590
16591         * lib/mbchar.h: New file.
16592         * lib/mbchar.c: New file.
16593
16594 2005-08-16  Bruno Haible  <bruno@clisp.org>
16595
16596         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
16597         the valid ones. Makes the comparison operations transitive:
16598         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
16599         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
16600
16601 2005-08-15  Simon Josefsson  <jas@extundo.com>
16602
16603         * modules/ssize_t (License): Change to 'unlimited'.
16604
16605         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
16606
16607 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
16608
16609         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
16610         Add comments for each pending glibc patch.
16611
16612 2005-08-15  Bruno Haible  <bruno@clisp.org>
16613
16614         * lib/regex.h (__restrict_arr): Don't define to __restrict if
16615         __cplusplus is defined.
16616
16617 2005-08-14  Jim Meyering  <jim@meyering.net>
16618
16619         Sync from coreutils.
16620
16621         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
16622         Use the hash-table-based cycle-detection code not just when
16623         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
16624         Reported by James Youngman in
16625         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
16626         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
16627         FTS_TIGHT_CYCLE_CHECK.
16628         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
16629         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
16630         once again.
16631         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
16632         * lib/fts.c (fd_safer): Remove decl.
16633         Include fcntl--.h rather than unistd-safer.h
16634         (fts_safe_changedir): Don't call fd_safer; no longer needed
16635         now that we include fcntl--.h.
16636
16637 2005-08-12  Simon Josefsson  <jas@extundo.com>
16638
16639         * modules/getndelim2: Use ssize_t module.
16640         * modules/getnline: Likewise.
16641         * modules/safe-read: Likewise.
16642         * modules/xreadlink: Likewise.
16643
16644         * modules/ssize_t: New file.
16645
16646 2005-08-12  Simon Josefsson  <jas@extundo.com>
16647
16648         * m4/readline.m4: Look for termcap, curses or ncurses if required.
16649
16650 2005-08-12  Simon Josefsson  <jas@extundo.com>
16651
16652         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16653         ssize_t.
16654
16655 2005-08-12  Simon Josefsson  <jas@extundo.com>
16656
16657         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
16658         readline, getdelim and check_version.
16659         (Support for systems lacking ISO C 99: Sizes of integer types):
16660         Add size_max.
16661
16662 2005-08-12  Bruno Haible  <bruno@clisp.org>
16663
16664         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
16665
16666 2005-08-11  Simon Josefsson  <jas@extundo.com>
16667
16668         * modules/readline: New file.
16669
16670         * modules/strnlen (Files): Add strnlen.h.
16671
16672 2005-08-11  Simon Josefsson  <jas@extundo.com>
16673
16674         * m4/readline.m4: New file.
16675
16676 2005-08-11  Simon Josefsson  <jas@extundo.com>
16677
16678         * lib/readline.h, readline.c: New file.
16679
16680 2005-08-11  Simon Josefsson  <jas@extundo.com>
16681
16682         * doc/gnulib.texi (Initial import, Finishing touches): Mention
16683         gl_AVOID.
16684
16685 2005-08-11  Bruno Haible  <bruno@clisp.org>
16686
16687         * lib/strnlen.h (strnlen): Change parameter name to match comment.
16688
16689 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
16690
16691         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
16692
16693 2005-08-10  Simon Josefsson  <jas@extundo.com>
16694
16695         * tests/test-iconvme.c: New file.
16696
16697 2005-08-10  Simon Josefsson  <jas@extundo.com>
16698
16699         * m4/strnlen.m4: New file.
16700
16701         * m4/strndup.m4: Don't check for strnlen declaration, done in
16702         strnlen.m4.
16703
16704 2005-08-10  Simon Josefsson  <jas@extundo.com>
16705
16706         * lib/strndup.c: Use strnlen.h.
16707
16708         * lib/strnlen.h: New file.
16709
16710 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16711
16712         * README: Typos.
16713
16714 2005-08-02  Simon Josefsson  <jas@extundo.com>
16715
16716         * modules/readline: New file.
16717
16718 2005-08-02  Simon Josefsson  <jas@extundo.com>
16719
16720         * modules/getdelim: New file.
16721
16722         * modules/getline: Rewrite, don't use getndelim2.
16723
16724 2005-08-02  Simon Josefsson  <jas@extundo.com>
16725
16726         * m4/getline.m4: Separate out getdelim stuff into separate module.
16727
16728         * m4/getdelim.m4: New file.
16729
16730 2005-08-02  Simon Josefsson  <jas@extundo.com>
16731
16732         * lib/getline.h, getline.c: Rewrite.
16733
16734         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
16735
16736 2005-07-31  Bruno Haible  <bruno@clisp.org>
16737
16738         * lib/lock.h (gl_lock_initializer): New macro.
16739         (gl_lock_define_initialized): Use it.
16740         (gl_rwlock_initializer): New macro.
16741         (gl_rwlock_define_initialized): Use it.
16742         (gl_recursive_lock_initializer): New macro.
16743         (gl_recursive_lock_define_initialized): Use it.
16744
16745 2005-07-30  Karl Berry  <karl@gnu.org>
16746
16747         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
16748         Report from Ben Pfaff, regarding getopt.
16749
16750 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
16751
16752         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
16753         normal way.
16754         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
16755         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
16756         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
16757         (gl_GETOPT): Use the new macros.  Most of the implementation
16758         is moved to the new macros.  This is for programs like Emacs
16759         that don't want all the functionality of gl_GETOPT.
16760
16761 2005-07-26  Bruno Haible  <bruno@clisp.org>
16762
16763         * m4/lock.m4: Update from GNU gettext.
16764
16765 2005-07-26  Bruno Haible  <bruno@clisp.org>
16766
16767         * lib/lock.h: Update from GNU gettext.
16768         * lib/lock.c: Update from GNU gettext.
16769
16770 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
16771
16772         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
16773         obsolescent AC_TRY_RUN.  Include the default includes files, for
16774         'exit'.
16775
16776 2005-07-24  Bruno Haible  <bruno@clisp.org>
16777
16778         * modules/visibility: New file.
16779         * MODULES.html.sh (Misc): Add visibility.
16780
16781 2005-07-24  Bruno Haible  <bruno@clisp.org>
16782
16783         * m4/visibility.m4: New file.
16784
16785 2005-07-24  Bruno Haible  <bruno@clisp.org>
16786
16787         * doc/visibility.texi: New file.
16788
16789 2005-07-22  Bruno Haible  <bruno@clisp.org>
16790
16791         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
16792         $(ALLOCA_H), redundant through BUILT_SOURCES.
16793         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
16794         redundant through BUILT_SOURCES.
16795         * modules/byteswap (Makefile.am): Remove explicit dependency on
16796         $(BYTESWAP_H), redundant through BUILT_SOURCES.
16797         * modules/fnmatch (Makefile.am): Remove explicit dependency on
16798         $(FNMATCH_H), redundant through BUILT_SOURCES.
16799         * modules/getopt (Makefile.am): Remove explicit dependency on
16800         $(GETOPT_H), redundant through BUILT_SOURCES.
16801         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
16802         redundant through BUILT_SOURCES.
16803         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
16804         redundant through BUILT_SOURCES.
16805         * modules/stdbool (Makefile.am): Remove explicit dependency on
16806         $(STDBOOL_H), redundant through BUILT_SOURCES.
16807         * modules/stdint (Makefile.am): Remove explicit dependency on
16808         $(STDINT_H), redundant through BUILT_SOURCES.
16809         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
16810         Remove explicit dependency on $(SYSEXITS_H).
16811         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
16812
16813 2005-07-18  Simon Josefsson  <jas@extundo.com>
16814
16815         * lib/check-version.c (check_version): Accept identical versions too.
16816
16817 2005-07-18  Bruno Haible  <bruno@clisp.org>
16818
16819         * modules/lock: New file.
16820         * MODULES.html.sh (Multithreading): New section.
16821
16822 2005-07-18  Bruno Haible  <bruno@clisp.org>
16823
16824         * m4/lock.m4: New file, from GNU gettext.
16825
16826 2005-07-18  Bruno Haible  <bruno@clisp.org>
16827
16828         * lib/lock.h: New file, from GNU gettext.
16829         * lib/lock.c: New file, from GNU gettext.
16830
16831 2005-07-18  Bruno Haible  <bruno@clisp.org>
16832
16833         * lib/lock.h (gl_once_t): New type.
16834         (gl_once_define, gl_once): New macros.
16835         * lib/lock.c (fresh_once): New variable.
16836         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
16837         functions.
16838
16839 2005-07-16  Simon Josefsson  <jas@extundo.com>
16840
16841         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
16842         workaround, suggested by Bruno.
16843
16844 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16845
16846         * modules/xalloc (Depends-on): Add xalloc-die.
16847         * modules/xvasprintf (Depends-on): Add xalloc-die.
16848
16849 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16850
16851         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
16852         with a minor change.
16853
16854 2005-07-15  Bruno Haible  <bruno@clisp.org>
16855
16856         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
16857         When using lib/poll.c, define poll as rpl_poll.
16858
16859 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
16860
16861         * modules/argp (Depends-on): Remove unlocked-io.
16862
16863 2005-07-14  Derek Price  <derek@ximbiot.com>
16864
16865         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
16866         for glob symlink bug.
16867
16868 2005-07-14  Bruno Haible  <bruno@clisp.org>
16869
16870         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
16871         Instead, test for *_unlocked function declarations directly.
16872
16873 2005-07-11  Simon Josefsson  <jas@extundo.com>
16874
16875         * modules/size_max: New file.
16876
16877         * modules/xsize: Depend on size_max module for size_max.m4.
16878
16879 2005-07-11  Simon Josefsson  <jas@extundo.com>
16880
16881         * lib/size_max.h: New file.
16882
16883 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
16884
16885         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
16886         copyright symbol and the year.
16887         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
16888         (version_etc_va): Use parameterized copyright notice.
16889         Reword to conform to the current GNU coding standards.
16890
16891 2005-07-11  Karl Berry  <karl@gnu.org>
16892
16893         * doc/gnulib.texi (Quoting): new node.
16894         (Initial import): more info, from Patrice.
16895
16896 2005-07-11  Bruno Haible  <bruno@clisp.org>
16897
16898         * gnulib-tool (func_usage): Document option --avoid.
16899         (Command line options): Handle --avoid.
16900         (func_acceptable): New function.
16901         (func_modules_transitive_closure): Use it.
16902
16903 2005-07-11  Bruno Haible  <bruno@clisp.org>
16904
16905         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
16906         Reported by Jim Meyering.
16907
16908 2005-07-10  Bruno Haible  <bruno@clisp.org>
16909
16910         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
16911         Needed when size_t is smaller than 'unsigned int'.
16912         Reported by Paul Eggert.
16913
16914 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16915
16916         * modules/argp (Depends-on): Add unlocked-io
16917
16918 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16919
16920         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
16921         block of defines.
16922
16923 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
16924
16925         * config/srclist.txt: Comment out regcomp.c, since we have a porting
16926         fix now.
16927
16928 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
16929         and Paul Eggert  <eggert@cs.ucla.edu>
16930
16931         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
16932         in wint_t, not wchar_t.  Remove now-unnecessary cast.
16933
16934 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16935
16936         * modules/regex (Files): Add lib/regex_internal.c,
16937         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
16938         (Depends-on): Add extensions.
16939         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
16940
16941 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16942
16943         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
16944         pathconf.
16945         * m4/same.m4 (gl_SAME): Likewise.
16946         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
16947
16948         * m4/regex.m4: Adjust to new libc regex implementation.
16949         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
16950         all the .c and .h parts of (the new) regex.
16951         Quote the m4 stuff better.
16952         Check for RE_ICASE bug of old gnulib.
16953         Check for REG_STARTEND of recent libc.
16954         Rename local variables from jm_* to gl_*.
16955         Quote operand of "test -f".
16956         Say "recent enough" version of libc, not "version 2".
16957         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
16958         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
16959         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
16960         Remove check for btowc, isascii.
16961         Require AM_LANGINFO_CODESET.
16962
16963 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16964
16965         * lib/regex.c, regex.h: Sync from libc.
16966         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
16967         * lib/regexec.c:
16968         New files, synced from libc, except that regex_internal.h
16969         currently has a small porting fix.
16970
16971 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16972
16973         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
16974         regex_internal.c, regexec.c.
16975         Add regex_internal.h too, but as a comment, since the libc version
16976         is currently broken in gnulib mode.
16977
16978 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
16979
16980         Support programs like Emacs that use gnulib but not gettext.
16981         * MODULES.html.sh (Internationalization functions): Add gettext-h.
16982         * modules/gettext-h: New file.
16983         * modules/gettext (Files): Remove lib/gettext.h.
16984         (Depends-on): Add gettext-h.
16985         (Makefile.am): Remove lib_SOURCES.
16986         * modules/argmatch, modules/c-stack, modules/closeout:
16987         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
16988         * modules/execute, modules/file-type, modules/getaddrinfo:
16989         * modules/getopt, modules/human, modules/javacomp:
16990         * modules/javaexec, modules/mkdir-p, modules/obstack:
16991         * modules/openat, modules/pagealign_alloc, modules/pipe:
16992         * modules/quotearg, modules/regex, modules/rpmatch:
16993         * modules/unicodeio, modules/userspec, modules/version-etc:
16994         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
16995         * modules/xsetenv:
16996         Depend on gettext-h, not gettext.
16997
16998 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
16999
17000         * gnulib-tool (func_import): Add support for 'public domain' license.
17001         * modules/alloca, modules/atexit, modules/memmove:
17002         Now public domain, not GPL.
17003         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
17004         * modules/realloc, modules/strerror, modules/strtod:
17005         Now LGPL, not GPL.
17006
17007 2005-07-05  Bruno Haible  <bruno@clisp.org>
17008
17009         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
17010         autoconf CVS. Needed for mingw.
17011
17012 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
17013
17014         Remove the dependency of the strftime module on the tzset module.
17015         * modules/strftime (Depends-on): Remove dependency on tzset.
17016
17017 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
17018
17019         Remove the dependency of the strftime module on the tzset module.
17020         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
17021         gl_FUNC_TZSET_CLOBBER.
17022
17023 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
17024
17025         Remove the dependency of the strftime module on the tzset module.
17026         * lib/strftime.c (my_strftime)
17027         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
17028         Copy the input structure, to work around some of the bug with
17029         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
17030         Solaris releases, you should also use the tzset module, but we won't
17031         require it as a dependency any more since we don't want LGPLed code
17032         to depend on GPLed code.
17033
17034 2005-07-02  Jim Meyering  <jim@meyering.net>
17035
17036         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
17037         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
17038         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
17039         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
17040
17041 2005-07-02  Jim Meyering  <jim@meyering.net>
17042
17043         * lib/backupfile.c (backup_args): Change a `0' to NULL.
17044
17045 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
17046
17047         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
17048         declares only 'struct timespec;' (!).
17049
17050 2005-07-01  Jim Meyering  <jim@meyering.net>
17051
17052         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
17053         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
17054         * lib/save-cwd.c, tempname.c:
17055         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17056         and don't include <sys/file.h>).
17057
17058 2005-06-29  Jim Meyering  <jim@meyering.net>
17059
17060         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
17061         type name.  Use the variable name instead.
17062         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
17063         Likewise.
17064
17065 2005-06-28  Simon Josefsson  <jas@extundo.com>
17066
17067         * modules/check-version (Files): Add check-version.m4.
17068
17069 2005-06-28  Simon Josefsson  <jas@extundo.com>
17070
17071         * m4/check-version.m4: New file, suggested by Jim Meyering
17072         <jim@meyering.net>.
17073
17074 2005-06-28  Simon Josefsson  <jas@extundo.com>
17075
17076         * lib/check-version.h, lib/check-version.c: New files.
17077
17078 2005-06-28  Simon Josefsson  <jas@extundo.com>
17079
17080         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
17081         collision with global variable.  Better indentation.  Don't
17082         increment buffer pointer beyond buffer end.  Based on comments
17083         from Paul Eggert <eggert@cs.ucla.edu>.
17084
17085         * lib/base64.h: Indent.
17086
17087 2005-06-28  Simon Josefsson  <jas@extundo.com>
17088
17089         * doc/gnulib.texi (Library version handling): New section.
17090
17091 2005-06-28  Jim Meyering  <jim@meyering.net>
17092
17093         * check-module (find_included_lib_files): Hard-code another
17094         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
17095         but modules/fts-lgpl (correctly) does not list those files.
17096
17097         * modules/canonicalize (Files): Add lib/pathmax.h.
17098
17099 2005-06-25  Simon Josefsson  <jas@extundo.com>
17100
17101         * modules/check-version: New file.
17102
17103 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
17106         initializer of struct addrinfo, as an indication that we don't
17107         care how many members the structure has.
17108
17109 2005-06-24  Derek Price  <derek@ximbiot.com>
17110         and Bruno Haible  <bruno@clisp.org>
17111
17112         Remove stat module & update lstat.
17113         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
17114         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
17115         * m4/stat.m4: Remove this file.
17116
17117 2005-06-24  Derek Price  <derek@ximbiot.com>
17118         and Bruno Haible  <bruno@clisp.org>
17119
17120         Remove stat module & update lstat.
17121         * lib/stat.c: Remove this file...
17122         (slash_aware_lstat): ...moving this content and its support...
17123         * lib/lstat.c (rpl_lstat): ...into here.
17124         * lib/lstat.h: New file.
17125
17126 2005-06-24  Derek Price  <derek@ximbiot.com>
17127         and Bruno Haible  <bruno@clisp.org>
17128
17129         Remove stat module & update lstat.
17130         * config/srclist.txt (libc sources): Remove stat.
17131
17132 2005-06-24  Derek Price  <derek@ximbiot.com>
17133         and Bruno Haible  <bruno@clisp.org>
17134
17135         Remove stat module & update lstat.
17136         * MODULES.html.sh (stat): Remove.
17137         * MODULES.html: Regenerated.
17138         * modules/lstat (Description): Correct function name.
17139         (Files): Add "lstat.h".
17140         (Depends-on): Remove stat, add xalloc, stat-macros.
17141         * modules/stat: Remove this file.
17142         (Include): Add "lstat.h", remove <sys/stat.h>.
17143
17144 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
17145
17146         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
17147         (ranged_convert): Don't save conversion in a temporary struct.
17148         This causes a warning with GCC 4.0.0, and anyway in the typical
17149         case it's not worth the extra 100 bytes or so of code.
17150         (ranged_convert, __mktime_internal): When calling a function via a
17151         pointer P, use P () rather than (*P) (), as we now assume C89 or
17152         better.
17153
17154 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17155
17156         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
17157         "who -r" failed to give output.  Problem reported by Tim Waugh.
17158
17159         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
17160         (xcalloc): Use it to avoid needless tests.
17161         Problem reported by Jim Meyering.
17162
17163 2005-06-20  Derek Price  <derek@ximbiot.com>
17164
17165         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
17166         unnecessary for Autoconfs > 2.59c.
17167
17168 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17169
17170         * lib/argp.h (__option_is_short): Check upper limit of
17171         __key. Isprint() requires its argument to have the value
17172         of an unsigned char or EOF.
17173
17174 2005-06-16  Jim Meyering  <jim@meyering.net>
17175
17176         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
17177         when either N or S is zero.
17178
17179 2005-06-16  Derek Price  <derek@ximbiot.com>
17180
17181         * m4/bison.m4: Declare YACC & YFLAGS precious.
17182
17183 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
17184
17185         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
17186         multibyte string or pattern, fall back on unibyte matching.
17187         Problem reported by James Youngman.
17188
17189 2005-06-08  Bruno Haible  <bruno@clisp.org>
17190
17191         * modules/csharpcomp: New file.
17192         * MODULES.html.sh (C#): Add csharpcomp.
17193
17194 2005-06-08  Bruno Haible  <bruno@clisp.org>
17195
17196         * m4/csharpcomp.m4: New file, from GNU gettext.
17197
17198 2005-06-08  Bruno Haible  <bruno@clisp.org>
17199
17200         * lib/csharpcomp.h: New file, from GNU gettext.
17201         * lib/csharpcomp.c: New file, from GNU gettext.
17202         * lib/csharpcomp.sh.in: New file, from GNU gettext.
17203
17204 2005-06-08  Bruno Haible  <bruno@clisp.org>
17205
17206         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
17207         warning on mingw.
17208
17209 2005-06-07  Derek Price  <derek@ximbiot.com>
17210
17211         Sync from CVS.
17212         * lib/glob_.h: Indent nested #ifdef.
17213
17214 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
17215
17216         Sync from coreutils.
17217         Use "file name" when talking about file names, instead of "filename"
17218         or "path", as per the GNU coding standards.
17219         * lib/mkdir-p.c: Renamed from makepath.c.
17220         (make_dir_parents): Renamed from make_path.  All callers changed.
17221         * lib/mkdir-p.h: Likewise.  All includers changed.
17222         * lib/filenamecat.c: Renamed from path-concat.c.
17223         (file_name_concat): Renamed from path_concat.  All callers changed.
17224         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
17225         * lib/filenamecat.h: Likewise.  All includers changed.
17226         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
17227         in comments or local variable names.
17228         * lib/basename.c: Likewise.
17229         * lib/canonicalize.c, canonicalize.h: Likewise.
17230         * lib/dirname.c, dirname.h: Likewise.
17231         * lib/euidaccess.c: Likewise.
17232         * lib/exclude.c: Likewise
17233         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
17234         * lib/fsusage.c, fsuage.h: Likewise.
17235         * lib/fts.c, fts_.h: Likewise.
17236         * lib/getcwd.c: Likewise.
17237         * lib/getloadavg.c: Likewise.
17238         * lib/mkstemp.c: Likewise.
17239         * lib/mountlist.c, mountlist.h: Likewise.
17240         * lib/openat.c, openat.h: Likewise.
17241         * lib/readlink-stub.c: Likewise.
17242         * lib/readutmp.c, readutmp.h: Likewise.
17243         * lib/rename.c: Likewise.
17244         * lib/rmdir.c: Likewise.
17245         * lib/same.c: Likewise.
17246         * lib/savedir.c: Likewise.
17247         * lib/stripslash.c: Likewise.
17248         * lib/tempname.c: Likewise.
17249         * lib/xreadlink.c: Likewise.
17250         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
17251         All uses changed.
17252         * lib/exclude.h: Likewise.
17253
17254         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
17255         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
17256         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
17257         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
17258         * lib/pathmax.h: Include <limits.h> unconditionally, since other
17259         files have been getting away with it for years (MORE/BSD 4.3
17260         is extinct now).
17261         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
17262         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
17263
17264         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
17265         Define to 256, not 255, as per modern POSIX.
17266
17267 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
17268
17269         Sync from coreutils.
17270         Use "file name" when talking about file names, instead of "filename"
17271         or "path", as per the GNU coding standards.
17272         * MODULES.html.sh: mkdir-p renamed from makepath.
17273         filenamecat renamed from path-concat.
17274         * modules/filenamecat: Renamed from modules/path-concat.
17275         (Files): filenamecat.h and filenamecat.c renamed from
17276         path-concat.h and path-concat.c.
17277         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
17278         (Include): filenamecat.h, not path-concat.h.
17279         * modules/mkdir-p: Renamed from modules/makepath.
17280         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
17281         makepath.c.
17282         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
17283         (Include): mkdir-p.h, not makepath.h.
17284
17285 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
17286
17287         Sync from coreutils.
17288         * m4/mkdir-p.m4: Renamed from makepath.m4.
17289         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
17290         Rename files from makepath.c to mkdir-p.c, and from
17291         makepath.h to mkdir-p.h.
17292         * m4/filenamecat.m4: Renamed from path-concat.m4.
17293         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
17294         Rename files from path-concat.c to filenamecat.c,
17295         and from path-concat.h to filenamecat.h.
17296         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
17297         "file name" in local variables or comments.
17298         * m4/rename.m4: Likewise.
17299
17300 2005-06-01  Bruno Haible  <bruno@clisp.org>
17301
17302         * modules/csharpexec: New file.
17303         * MODULES.html.sh (C#): New section.
17304
17305 2005-06-01  Bruno Haible  <bruno@clisp.org>
17306
17307         * m4/csharp.m4: New file, from GNU gettext.
17308         * m4/csharpexec.m4: New file, from GNU gettext.
17309
17310 2005-06-01  Bruno Haible  <bruno@clisp.org>
17311
17312         * lib/csharpexec.h: New file, from GNU gettext.
17313         * lib/csharpexec.c: New file, from GNU gettext.
17314         * lib/csharpexec.sh.in: New file, from GNU gettext.
17315
17316 2005-05-31  Derek Price  <derek@ximbiot.com>
17317             Paul Eggert  <eggert@cs.ucla.edu>
17318
17319         Sync from cvs.
17320         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
17321
17322 2005-05-31  Derek Price  <derek@ximbiot.com>
17323             Paul Eggert  <eggert@cs.ucla.edu>
17324
17325         Sync from cvs.
17326         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
17327
17328 2005-05-29  Derek Price  <derek@ximbiot.com>
17329
17330         * config/srclist.txt (glob_.h, glob.c): Add these files.
17331
17332 2005-05-29  Derek Price  <derek@ximbiot.com>
17333
17334         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
17335         * modules/glob: New file.
17336         * modules/getlogin_r: Add link to POSIX spec in description.
17337
17338 2005-05-29  Derek Price  <derek@ximbiot.com>
17339             Paul Eggert  <eggert@cs.ucla.edu>
17340
17341         * m4/glob.m4: New file.
17342
17343 2005-05-29  Derek Price  <derek@ximbiot.com>
17344             Paul Eggert  <eggert@cs.ucla.edu>
17345
17346         * lib/glob_.h, lib/glob.c: New files.
17347
17348 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
17349
17350         * modules/fts (Files): Remove m4/inttypes-pri.m4.
17351         * modules/fts-lgpl (Depends-on): Remove gettext.
17352
17353 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
17354
17355         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
17356         and don't require gt_INTTYPES_PRI.
17357
17358 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
17359
17360         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
17361
17362         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
17363         the configuration hassle isn't worth it.
17364         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
17365         (LONGEST_MODIFIER, PRIuMAX): Remove.
17366
17367 2005-05-27  Bruno Haible  <bruno@clisp.org>
17368
17369         * lib/getlogin_r.h: Remove second include of <stddef.h>.
17370
17371 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
17372
17373         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
17374         _POSIX_PTHREAD_SEMANTICS for Solaris.
17375
17376 2005-05-25  Derek Price  <derek@ximbiot.com>
17377
17378         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
17379
17380 2005-05-25  Derek Price  <derek@ximbiot.com>
17381             Paul Eggert  <eggert@cs.ucla.edu>
17382
17383         * modules/getlogin_r, m4/getlogin_r.m4: New files.
17384         * lib/getlogin_r.c, getlogin_r.h: New files.
17385
17386 2005-05-25  Bruno Haible  <bruno@clisp.org>
17387             Derek Price  <derek@ximbiot.com>
17388
17389         * lib/getlogin_r.h: Simplify API documentation.
17390
17391 2005-05-23  Derek Price  <derek@ximbiot.com>
17392
17393         * modules/minmax (Files): Add m4/minmax.m4.
17394         (configure.ac): Add gl_MINMAX.
17395
17396 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
17397
17398         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
17399         so that unistd-safer.h (GPL'ed code) need not be included.
17400
17401 2005-05-22  Bruno Haible  <bruno@clisp.org>
17402
17403         * m4/minmax.m4: New file.
17404         Based on a patch by Derek Price <derek@ximbiot.com>.
17405
17406 2005-05-22  Bruno Haible  <bruno@clisp.org>
17407
17408         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
17409         (INT64_MIN): Fix definition.
17410         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
17411
17412         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
17413         NEED_SIGNED_INT_TYPES.
17414
17415         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
17416         HAVE_SYSTEM_INTTYPES.
17417
17418 2005-05-22  Bruno Haible  <bruno@clisp.org>
17419
17420         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
17421         Also include <sys/param.h> if it defines MIN, MAX.
17422         Based on a patch by Derek Price <derek@ximbiot.com>.
17423
17424 2005-05-21  Jim Meyering  <jim@meyering.net>
17425
17426         * modules/fts (Files): Add m4/inttypes-pri.m4.
17427         (Depends-on): Add lstat and remove gettext.  Alphabetize.
17428
17429 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17430
17431         New fts module.
17432         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
17433         (setup_dir, free_dir): New functions.
17434         (enter_dir, leave_dir): Define trivial
17435         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
17436         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
17437         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
17438         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
17439         Move to fts-cycle.c.
17440         (fts_open): Use setup_dir.
17441         (fts_close): Use free_dir.
17442         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
17443         This adds a label and some gotos, but the alternatives were messier.
17444         Check for memory allocation failure when entering a dir.
17445         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
17446         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
17447         (FTS): New member fts_cycle, that is a union that contains the
17448         old active_dir_ht and cycle_state.  All uses changed to mention
17449         fts_cycle.ht and fts_cycle.state.
17450         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
17451         fts.c, with the following changes:
17452         (setup_dir, free_dir): New functions.
17453         (enter_dir): Now returns bool.  Return true if successful, false
17454         if memory exhausted.  All callers changed.
17455         Do not bother partly cleaning up on
17456         memory allocation failure; that is free_dir's job.
17457         However, free ad if hash_insert fails, to avoid memory leak.
17458         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
17459         fts->fts_options to see which union member to use.
17460
17461 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17462
17463         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
17464         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
17465
17466 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17467
17468         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
17469
17470 2005-05-20  Jim Meyering  <jim@meyering.net>
17471
17472         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
17473         Now a macro, to pacify GCC.
17474
17475 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
17476
17477         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
17478         of -1.
17479
17480 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
17481
17482         * lib/chown.c (rpl_chown): Return -1 on failure.
17483
17484 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
17485
17486         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
17487         Don't check for stddef.h.
17488         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
17489         don't use its results.
17490         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
17491         since we include them unconditionally.  Don't require
17492         AM_STDBOOL_H, since stdbool is a prerequisite.
17493         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
17494         since we assume C89 or better.
17495         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
17496         as we don't use their results.
17497         Don't check for fchdir, memmove, memset, strrchr, as we use
17498         them unconditionally.
17499         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
17500         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
17501
17502 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
17503
17504         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
17505         Include <stddef.h> unconditionally, since we assume C89 now.
17506         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
17507         * lib/fts.c: Include fts_.h first, to check interface.
17508         Do not include intprops.h; no longer needed.
17509         Include cycle-check.h and hash.h, since fts_.h no longer does.
17510         Remove unnecessary casts of closedir to void.
17511         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
17512         decide whether to decrement nlinks.
17513         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
17514         (FTS): Use struct hash_table * instead of Hash_table, so that
17515         we no longer need to include hash.h here.
17516
17517 2005-05-18  Jim Meyering  <jim@meyering.net>
17518
17519         * modules/dirfd (License): Change to LGPL.  Most of the code
17520         is already in the public domain.
17521
17522 2005-05-18  Jim Meyering  <jim@meyering.net>
17523
17524         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
17525         Reported by Yoann Vandoorselaere.
17526
17527 2005-05-17  Jim Meyering  <jim@meyering.net>
17528
17529         * m4/fts.m4: New file, from coreutils.
17530
17531 2005-05-17  Jim Meyering  <jim@meyering.net>
17532
17533         * lib/fts.c, lib/fts_.h: New files, from coreutils.
17534
17535 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17536
17537         Sync from coreutils.
17538         * m4/unlinkdir.m4: New file.
17539
17540 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17541
17542         Sync from coreutils.
17543         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
17544         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
17545         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
17546         White space changes only.
17547         * lib/makepath.c (make_path): Port to hosts where leading "//" is
17548         special.
17549         * lib/yesno.c: Include getline.h, not ctype.h.
17550         (yesno): Don't remove leading white space; POSIX doesn't allow it.
17551         Use getline to remove arbitrary restriction on response length.
17552
17553 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17554
17555         * config/srclist-update: Spell out "Street" in FSF postal
17556         mail address; this is the style the FSF seems to prefer.
17557
17558         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
17559         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
17560         this updates FSF postal mail address.
17561
17562         Sync from coreutils.
17563         * modules/unlinkdir: New file.
17564         * modules/yesno (Depends-on): Add getline.
17565         * MODULES.html.sh (File system functions): Add unlinkdir.
17566
17567 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17568
17569         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
17570         lib/strsep.h:
17571         Change the initial comment to refer to GPL, not LGPL.
17572         gnulib-tool will change it to LGPL as needed.
17573
17574         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
17575         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
17576         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
17577         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
17578         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
17579         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
17580         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
17581         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
17582         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
17583         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
17584         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
17585         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
17586         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
17587         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
17588         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
17589         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
17590         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
17591         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
17592         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
17593         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
17594         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
17595         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
17596         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
17597         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
17598         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
17599         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
17600         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
17601         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
17602         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
17603         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
17604         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
17605         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
17606         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
17607         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
17608         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
17609         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
17610         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
17611         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
17612         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
17613         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
17614         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
17615         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
17616         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
17617         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
17618         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
17619         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
17620         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
17621         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
17622         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
17623         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
17624         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17625         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
17626         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
17627         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
17628         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
17629         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
17630         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
17631         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
17632         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
17633         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
17634         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
17635         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
17636         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
17637         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
17638         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
17639         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
17640         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
17641         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
17642         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
17643         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
17644         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
17645         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
17646         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
17647         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
17648         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
17649         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
17650         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
17651         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
17652         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
17653         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
17654         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
17655         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
17656         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
17657         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
17658         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
17659         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
17660         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
17661         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
17662         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
17663         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
17664         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
17665         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
17666         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
17667         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
17668         lib/yesno.c, lib/yesno.h:
17669         Update FSF postal mail address.
17670
17671 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17672
17673         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
17674         tests/test-memmem.c, tests/test-stpncpy.c:
17675         Update FSF postal mail address.
17676
17677 2005-05-13  Bruno Haible  <bruno@clisp.org>
17678
17679         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
17680         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
17681         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
17682         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
17683         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
17684         Add support for 64-bit integers in the MSVC compiler.
17685
17686 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17687
17688         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
17689
17690 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
17691
17692         * gnulib-tool (func_import): Sort and uniquify recommended includes.
17693
17694 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
17695
17696         * doc/getdate.texi (General date syntax): Don't say that date
17697         date --iso-8601=ns generates acceptable dates; it doesn't yet.
17698         Problem reported by Nic Ferrier.
17699
17700 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17701
17702         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
17703         specified in ai_socktype. Fix invalid ai_protocol
17704         check. ai_protocol is usually set to 0 or depending on
17705         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
17706         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
17707         ai_socktype / ai_protocol in the returned addrinfo structure.
17708
17709 2005-05-10  Simon Josefsson  <jas@extundo.com>
17710
17711         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
17712         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17713
17714 2005-05-10  Karl Berry  <karl@gnu.org>
17715
17716         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
17717         (from http://www.gnu.org/licenses).
17718         * doc/COPYING.LIB: also rename to COPYING.LESSER.
17719         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
17720         fdl.texi suffices.
17721
17722 2005-05-10  Karl Berry  <karl@gnu.org>
17723
17724         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
17725         (COPYING.DOC): remove.
17726
17727         * config/srclist-update: new FSF address.
17728
17729 2005-05-10  Derek Price  <derek@ximbiot.com>
17730
17731         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
17732         possible.
17733
17734 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17735             Bruno Haible  <bruno@clisp.org>
17736
17737         * modules/inet_ntop: New file.
17738         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17739         inet_ntop.
17740
17741 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17742             Bruno Haible  <bruno@clisp.org>
17743
17744         * m4/inet_ntop.m4: New file.
17745
17746 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17747             Bruno Haible  <bruno@clisp.org>
17748
17749         * lib/inet_ntop.h: New file.
17750         * lib/inet_ntop.c: New file, from glibc with modifications.
17751
17752 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
17753
17754         * modules/time_r (License): Change to LGPL.
17755         * modules/extensions (License): Change to LGPL.  Actually,
17756         the license is more permissive than that, but currently gnulib-tool
17757         doesn't know how to handle more-permissive licenses.
17758
17759         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
17760         Problem reported by Dave Love.
17761
17762 2005-05-08  Jim Meyering  <jim@meyering.net>
17763
17764         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
17765         blank.
17766
17767 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17768
17769         * modules/argmatch (Depends-on): Add stdbool.
17770         * modules/backupfile (Depends-on): Likewise.
17771         * modules/chdir-long (Depends-on): Likewise.
17772         * modules/closeout (Depends-on): Likewise.
17773         * modules/cycle-check (Depends-on): Likewise.
17774         * modules/dirname (Depends-on): Likewise.
17775         * modules/fnmatch (Depends-on): Likewise.
17776         * modules/fsusage (Depends-on): Likewise.
17777         * modules/fwriteerror (Depends-on): Likewise.
17778         * modules/getcwd (Depends-on): Likewise.
17779         * modules/getloadavg (Depends-on): Likewise.
17780         * modules/hard-locale (Depends-on): Likewise.
17781         * modules/makepath (Depends-on): Likewise.
17782         * modules/mountlist (Depends-on): Likewise.
17783         * modules/nanosleep (Depends-on): Likewise.
17784         * modules/posixtm (Depends-on): Likewise.
17785         * modules/quotearg (Depends-on): Likewise.
17786         * modules/readtokens (Depends-on): Likewise.
17787         * modules/readtokens0 (Depends-on): Likewise.
17788         * modules/readutmp (Depends-on): Likewise.
17789         * modules/save-cwd (Depends-on): Likewise.
17790         * modules/strftime (Depends-on): Likewise.
17791         * modules/userspec (Depends-on): Likewise.
17792         * modules/utimecmp (Depends-on): Likewise.
17793         * modules/xgetcwd (Depends-on): Likewise.
17794         * modules/xnanosleep (Depends-on): Likewise.
17795         * modules/xstrtod (Depends-on): Likewise.
17796         * modules/yesno (Depends-on): Likewise.
17797
17798 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
17799
17800         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
17801         needless checks.
17802
17803 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17804
17805         Merge from coreutils.  Among other things,
17806         add bulletproofing for cases where stdin, stdout, or stderr are closed.
17807         * lib/fd-safer.c: New file.
17808         * lib/fcntl-safer.h, open-safer.c: Remove.
17809         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
17810         * lib/dup-safer.c: Include unistd-safer.h first.
17811         Don't include errno.h.
17812         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
17813         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
17814         * lib/file-type.c: Rely on file-type.h change.
17815         * lib/getloadavg.c: Include unistd-safer.h.
17816         (getloadavg): Use safer open.
17817         * lib/getusershell.c: Include "stdio-safer.h".
17818         (getusershell): Use safer fopen.
17819         * lib/long-options.c (long_options): Use NULL rather than 0.
17820         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
17821         'free'.
17822         * lib/modechange.c: Likewise.
17823         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
17824         (MODE_DONE): New constant.
17825         (struct mode_change): Remove 'next' member.
17826         (make_node_op_equals): New function; like the old one of the
17827         same name, except it allocates an array.
17828         (mode_compile, mode_create_from_ref): Use it.
17829         (mode_compile): Allocate result as an array, not a linked list.
17830         Parse octal string ourself, so that we catch mistakes like "+0".
17831         (mode_adjust): Arg is an array, not a linked list.
17832         * lib/modechange.c: Include stat-macros.h, xalloc.h.
17833         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
17834         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
17835         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
17836         Remove.  This is now stat-macros.h's job.
17837         (talloc): Remove.  All callers replaced by xalloc, so that
17838         our invokers don't have to worry about reporting memory failures.
17839         (make_node_op_equals): Remove.
17840         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17841         New constants.
17842         (struct mode_change): Moved here from modechange.h.
17843         (mode_append_entry): Remove.
17844         (mode_compile): Remove MASKED_OPS arg, since it encouraged
17845         apps to have incorrect behavior.  Use simpler algorithm for head
17846         and tail.  Don't futz with umask; that's now the job of mode_adjust.
17847         Detect more invalid usages rather than having somewhat-random behavior.
17848         Don't insert an "a=" action, as that leads to incorrect behavior.
17849         (mode_compile, mode_create_from_ref): Return NULL on error instead
17850         of an enum, since now there's only one way to have an error.  All
17851         callers changed.
17852         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
17853         at the correct time.  Simplify calculation of "+u" and its ilk.
17854         Don't mishandle "+X".
17855         (mode_free): Remove "register" and localize decls.
17856         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17857         (struct mode_change): Move to modechange.c; callers don't
17858         need to see this stuff.
17859         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
17860         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
17861         (mode_change, mode_adjust): Reflect the new signatures noted above.
17862         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
17863         that might redefine system include files.
17864         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
17865         (my_usleep): Use NULL rather than (void *) 0.
17866         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
17867         Use siginterrupt to specify that system calls should be interrupted.
17868         (rpl_nanosleep): Move initialization of suspended closer to call of
17869         my_usleep.
17870         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
17871         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
17872         (desirable_utmp_entry): New function.
17873         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
17874         using x2nrealloc, to simplify logic.
17875         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
17876         size calculation.  Do not assume utmp file is a regular file.
17877         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
17878         (READ_UTMP_CHECK_PIDS): New constant.
17879         * lib/save-cwd.c: Include unistd-safer.h.
17880         (save_cwd): Use fd_safer.
17881         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
17882         [!_LIBC] Include "stat-macros.h" instead.
17883         * lib/unistd-safer.h (fd_safer): New decl.
17884
17885 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17886
17887         * modules/getloadavg (Depends-on): Add unistd-safer.
17888         * modules/getusershell (Depends-on): Add stdio-safer.
17889         * modules/lstat (Depends-on): Remove xalloc.
17890         * modules/mkstemp (Depends-on): Add stat-macros.
17891         * modules/modechange (Depends-on): Remove xstrtol.
17892         Add stat-macros, xalloc.
17893         * modules/save-cwd (Depends-on): Add unistd-safer.
17894         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
17895         * modules/unistd-safer (Files): Add lib/fd-safer.c
17896         (Makefile.am): Remove lib_SOURCES.
17897
17898         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
17899         Remove fcntl-safer; unistd-safer supersedes it.
17900
17901 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17902
17903         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
17904         AC_HEADER_STAT.
17905         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
17906         (gl_PREREQ_CHOWN): Remove.
17907         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
17908         it.  Don't require AC_HEADER_STAT.
17909         (gl_PREREQ_LSTAT): Remove.
17910         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
17911         Don't require AC_HEADER_STAT.
17912         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
17913         (gl_PREREQ_RMDIR): Remove.
17914         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
17915         mention stat-macros.h or AC_HEADER_STAT, since we'll make
17916         the stat-macros module a prerequisite.
17917         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
17918         * m4/filemode.m4 (gl_FILEMODE): Likewise.
17919         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
17920         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
17921         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
17922         variable names.
17923         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
17924         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
17925         variable prefixes.
17926         * m4/fcntl-safer.m4: Remove.
17927         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
17928         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
17929         Invoke gl_PREREQ_FD_SAFER.
17930         (gl_PREREQ_FD_SAFER): New macro.
17931         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
17932         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
17933         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
17934         Remove duplicate call to AC_LIBOBJ(readutmp).
17935         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
17936
17937         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
17938         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
17939
17940 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17941
17942         * MODULES.html.sh (Misc): Add byteswap.
17943
17944 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17945
17946         * modules/getcwd (Depends-on): Add extensions.
17947         * modules/openat (Depends-on): Likewise.
17948
17949 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17950
17951         * modules/byteswap: New file.
17952
17953 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17954
17955         * m4/byteswap.m4: New file.
17956
17957 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17958
17959         * lib/byteswap_.h: New file.
17960
17961 2005-04-25  Karl Berry  <karl@gnu.org>
17962
17963         * m4/gettext.m4: Update from GNU gettext 0.14.4.
17964
17965 2005-04-25  Albert Chin  <china@thewrittenword.com>
17966
17967         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
17968         Toolkit C bug.
17969
17970 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
17971
17972         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
17973         (func_ln_if_changed) Remove forcibly for no error message
17974         in case file does not exist.
17975
17976 2005-04-19  Simon Josefsson  <jas@extundo.com>
17977
17978         * gnulib-tool (Options): Make --symlink mean --symbolic.
17979
17980 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
17981
17982         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
17983
17984 2005-04-16  Simon Josefsson  <jas@extundo.com>
17985
17986         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
17987
17988 2005-04-15  Simon Josefsson  <jas@extundo.com>
17989
17990         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
17991
17992 2005-04-15  Simon Josefsson  <jas@extundo.com>
17993
17994         * gnulib-tool: Rename --symlink to --symbolic.
17995
17996 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
17997
17998         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
17999         symbolic links to files instead of copying/moving.  Add --aux-dir,
18000         specifying directory relative --dir where auxiliary build tools
18001         are placed.
18002
18003 2005-04-14  Bruno Haible  <bruno@clisp.org>
18004
18005         * modules/allocsa (License): Change to LGPL.
18006         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
18007
18008 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
18009
18010         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
18011         that "UTC +1 second" continues to work.  Problem reported
18012         by Dmitry V. Levin.
18013         (relunit_snumber): New rule.
18014         (relunit): Use it.
18015
18016 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
18017
18018         * lib/getdate.y (universal_time_zone_table): New constant.
18019         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
18020         universal_time_zone_table.
18021         (lookup_zone): Prefer universal_time_zone_table to
18022         local_time_zone_table, so that "GMT" time stamps are allowed in
18023         London during the summer.  Problem reported by Ian Abbott.
18024
18025 2005-04-12  Jim Meyering  <jim@meyering.net>
18026
18027         * lib/human.c (humblock): Set *options even when returning due to
18028         xstrtoumax conversion failure.  Thanks to a used-uninitialized
18029         warning from gcc-4.
18030
18031 2005-04-09  Jim Meyering  <jim@meyering.net>
18032
18033         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
18034         -Wuninitialized: initialize tm0.tm_year.
18035
18036 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
18037
18038         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
18039         count, since there's no maximum.  All uses changed.
18040         Add member dsts_seen.
18041         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
18042         not being INT_MAX.
18043         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
18044         Use pc_rels_seen to decide whther a date is absolute.
18045
18046         * lib/getdate.y (number): Don't overwrite year.
18047         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
18048         check.
18049
18050 2005-04-02  Simon Josefsson  <jas@extundo.com>
18051
18052         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
18053         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
18054
18055 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
18056
18057         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
18058         where no absolute path name can be longer than PATH_MAX.
18059
18060 2005-03-27  Jim Meyering  <jim@meyering.net>
18061
18062         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
18063
18064 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
18065
18066         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
18067         "one's complement" -> "ones' complement" in comment, as per Knuth.
18068         "value of type" -> "type or expression" in comment.
18069         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
18070
18071 2005-03-26  Jim Meyering  <jim@meyering.net>
18072
18073         Comment nits.
18074         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
18075         Correct typos: s/or/of/.
18076
18077 2005-03-26  Jim Meyering  <jim@meyering.net>
18078
18079         * modules/check-include-files: Move to ../ and rename to...
18080         * check-module: ...this.
18081
18082 2005-03-25  Jim Meyering  <jim@meyering.net>
18083
18084         * modules/xvasprintf (Files): Add xalloc.h.
18085
18086 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
18087
18088         * modules/gettext (Files): config/config.rpath ->
18089         build-aux/config.rpath
18090         * modules/iconv (Files): Likewise.
18091         Problem reported by Oskar Liljeblad.
18092
18093 2005-03-23  Jim Meyering  <jim@meyering.net>
18094
18095         * modules/check-include-files: New script to check for
18096         missing dependencies, multiple includes, etc.
18097
18098         * modules/c-strtold (Depends-on): Add xalloc.
18099         * modules/c-strtod (Depends-on): Add xalloc.
18100         * modules/hash (Depends-on): Add xalloc.
18101         (Files): Remove lib/xalloc.h.
18102
18103         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
18104         * modules/userspec (Files): Add lib/inttostr.h.
18105
18106 2005-03-23  Jim Meyering  <jim@meyering.net>
18107
18108         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
18109
18110 2005-03-22  Jim Meyering  <jim@meyering.net>
18111
18112         * modules/stat-macros: New module.
18113         * modules/canonicalize, modules/euidaccess, modules/file-type,
18114         * modules/filemode, modules/lchown, modules/makepath,
18115         * modules/rmdir, modules/stat: Depend on new stat-macros module
18116         rather than listing lib/stat-macros.h manually.
18117         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
18118
18119 2005-03-22  Jim Meyering  <jim@meyering.net>
18120
18121         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
18122
18123 2005-03-22  Bruno Haible  <bruno@clisp.org>
18124
18125         * config/srclist.txt: Replace target directory 'config' with
18126         'build-aux'.
18127         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
18128         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
18129         ../build-aux/.
18130
18131 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
18132
18133         * modules/chdir-long (Depends-on): Add mempcpy.
18134
18135         * modules/acl, modules/backupfile, modules/c-strtod,
18136         modules/c-strtold, modules/canon-host, modules/canonicalize,
18137         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
18138         modules/exclude, modules/exitfail, modules/file-type,
18139         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
18140         modules/getdate, modules/getline, modules/getpagesize,
18141         modules/getpass, modules/getugroups, modules/group-member,
18142         modules/hard-locale, modules/hash, modules/human, modules/idcache,
18143         modules/inttostr, modules/long-options, modules/makepath,
18144         modules/md5, modules/memcasecmp, modules/memcoll,
18145         modules/modechange, modules/mountlist, modules/path-concat,
18146         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
18147         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
18148         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
18149         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
18150         modules/strftime, modules/strndup, modules/strverscmp,
18151         modules/timespec, modules/unlocked-io, modules/userspec,
18152         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
18153         modules/yesno:
18154         Remove lib_SOURCES line from Makefile.am section, as this is now
18155         done automatically by the corresponding Autoconf macro.
18156
18157 2005-03-21  Jim Meyering  <jim@meyering.net>
18158
18159         Changes imported from coreutils.
18160
18161         * lib/cycle-check.c: Don't include xalloc.h.
18162
18163         * lib/path-concat.c: Don't include assert.h.
18164         (path_concat): Remove assertion that would have triggered
18165         for ABASE starting with more than one slash.
18166         Reported by Andreas Schwab.
18167
18168         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
18169         properly when ABASE is an absolute file name.
18170         Correct the description of this function.
18171         Include <assert.h>.
18172         Add an assertion and a test driver.
18173         This fixes a bug introduced on 2004-07-02.
18174         Andreas Schwab reported the resulting failure of cp --parents:
18175         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
18176
18177 2005-03-21  Jim Meyering  <jim@meyering.net>
18178
18179         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
18180         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
18181
18182 2005-03-21  Jim Meyering  <jim@meyering.net>
18183         and  Paul Eggert  <eggert@cs.ucla.edu>
18184
18185         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
18186         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
18187         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
18188         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
18189         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
18190         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
18191         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
18192         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
18193         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
18194         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
18195         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
18196         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
18197         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
18198         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
18199         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
18200         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
18201         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
18202         for these modules.
18203
18204 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
18205
18206         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
18207         (which shouldn't happen), generate nothing instead of returning 0
18208         immediately, so that nstrftime (NULL, ...) doesn't return 0.
18209
18210 2005-03-16  Bruno Haible  <bruno@clisp.org>
18211
18212         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
18213         HAVE_LONGLONG_64BIT.
18214
18215 2005-03-16  Bruno Haible  <bruno@clisp.org>
18216
18217         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
18218         HAVE_LONGLONG_64BIT.
18219
18220 2005-03-16  Bruno Haible  <bruno@clisp.org>
18221
18222         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
18223         HAVE_LONGLONG_64BIT.
18224
18225 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
18226
18227         * lib/strftime.c (my_strftime): Prepend space to format so that we can
18228         reliably distinguish strftime failure from empty output on POSIX
18229         hosts.
18230
18231 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
18232
18233         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
18234         (iconv_string): Don't guess a size-zero buffer, as that might cause
18235         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
18236         result would be 'too large', where 'too large' is (heuristically)
18237         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
18238         overflow concerns.  This will prevent some unwanted malloc failures
18239         when the inputs are very large.
18240
18241 2005-03-15  Karl Berry  <karl@gnu.org>
18242
18243         * config/srclist.txt (config.rpath): from gettext.
18244         * config/config.rpath: update.
18245
18246 2005-03-15  Bruno Haible  <bruno@clisp.org>
18247
18248         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
18249         to 'negate'.
18250
18251         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
18252         variable.
18253
18254         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
18255         results.
18256
18257 2005-03-14  Simon Josefsson  <jas@extundo.com>
18258
18259         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
18260         <fx@gnu.org>.
18261
18262 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
18263
18264         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
18265         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
18266         intprops.h.
18267         * lib/strtol.c: Likewise.
18268
18269 2005-03-14  Jim Meyering  <jim@meyering.net>
18270
18271         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
18272         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
18273         to be nonzero so that we (and caller) can detect the difference
18274         between a valid zero-length expansion and an error return, even
18275         when the underlying strftime fails before writing anything into
18276         that location.
18277
18278 2005-03-14  Bruno Haible  <bruno@clisp.org>
18279
18280         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
18281         Update from GNU gettext 0.14.3.
18282
18283 2005-03-10  Jim Meyering  <jim@meyering.net>
18284
18285         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
18286
18287 2005-03-10  Jim Meyering  <jim@meyering.net>
18288
18289         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
18290         so that this module works on systems without fchdir.
18291
18292 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
18293
18294         Factor int-properties macros into a single file, except for
18295         glibc-related files.
18296         * lib/intprops.h: New file.
18297         * lib/getloadavg.c: Include it instead of limits.h.
18298         (INT_STRLEN_BOUND): Remove.
18299         * lib/human.c: Include intprops.h.
18300         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
18301         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
18302         302/1000.
18303         * lib/inttostr.h: Include intprops.h instead of limits.h.
18304         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
18305         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
18306         for consistency with intprops.h.
18307         (time_t_is_integer, twos_complement_arithmetic): Use them.
18308         * lib/sig2str.h: Include <signal.h>, intprops.h.
18309         (INT_STRLEN_BOUND): Remove.
18310         * lib/strftime.c (TYPE_SIGNED): Remove.
18311         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
18312         * lib/strtol.c: Adjust comments to match intprops.h.
18313         * lib/userspec.c: Include intprops.h.
18314         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
18315         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
18316         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
18317         instead of rolling our own expressions.
18318         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
18319
18320         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
18321         instead of int.
18322         (my_strftime): Do not mishandle years close to INT_MAX, by doing
18323         the right thing even if adding 1900 would overflow.  Similarly
18324         for tm_mon + 1 and tm_yday + 1.
18325         Make %Y always equivalent to %C%y, and similarly for %G and %g.
18326         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
18327         (DO_SIGNED_NUMBER): New macro.
18328         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
18329
18330 2005-03-07  Bruno Haible  <bruno@clisp.org>
18331
18332         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
18333
18334 2005-03-07  Bruno Haible  <bruno@clisp.org>
18335
18336         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
18337
18338 2005-03-04  Derek R. Price  <derek@ximbiot.com>
18339
18340         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
18341         (func_import): Only replace files via --import when they have actually
18342         changed.
18343
18344 2005-03-03  Derek R. Price  <derek@ximbiot.com>
18345
18346         * m4/mmap-anon.m4: New file.
18347         * m4/pagealign_alloc.m4: New file.
18348
18349 2005-03-03  Derek R. Price  <derek@ximbiot.com>
18350             Bruno Haible  <bruno@clisp.org>
18351
18352         * modules/pagealign_alloc: New file.
18353         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
18354
18355 2005-03-03  Derek R. Price  <derek@ximbiot.com>
18356             Bruno Haible  <bruno@clisp.org>
18357
18358         * lib/pagealign_alloc.h: New file.
18359         * lib/pagealign_alloc.c: New file.
18360
18361 2005-03-03  Bruno Haible  <bruno@clisp.org>
18362
18363         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
18364         Use an all-permissive copyright notice, recommended by RMS.
18365
18366 2005-03-02  Bruno Haible  <bruno@clisp.org>
18367
18368         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
18369         of AIX, the replacement has to be done only after <string.h> is
18370         included, therefore not in config.h. stpncpy.h does the replacement,
18371         and stpncpy.c uses it.
18372
18373 2005-03-02  Bruno Haible  <bruno@clisp.org>
18374
18375         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
18376         stpncpy.c uses it.
18377
18378 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
18379
18380         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
18381         The workaround isn't strictly needed for POSIX conformance, and
18382         it's too much of a pain to configure and maintain.  We'll ask
18383         people to fix their kernels instead.
18384         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
18385         (NANOSLEEP_BUG_WORKAROUND): Remove.
18386         (xnanosleep): Remove the workaround.
18387
18388 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
18389
18390         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
18391         Reported by Derek Price.
18392         (Include): Add "timespec.h".
18393
18394         * modules/xnanosleep (Depends-on): Remove gethrxtime.
18395
18396 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
18397
18398         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
18399         to detect nanosleep bug.
18400
18401 2005-03-01  Bruno Haible  <bruno@clisp.org>
18402
18403         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
18404
18405 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
18406
18407         * modules/gethrxtime: New file.
18408         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
18409         (Depends-on): Add gethrxtime.
18410         (configure.ac): Add gl_XNANOSLEEP.
18411         (Makefile.am): Remove lib_SOURCES line.
18412
18413 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
18414
18415         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
18416         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
18417
18418 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
18419
18420         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
18421         * lib/timespec.h (gettime): Return void, since it always
18422         succeeds now.  All uses changed.
18423         * lib/gettime.c (gettime) Likewise.
18424         [HAVE_NANOTIME]: Prefer nanotime.
18425         Assume gettimeofday succeeds, as POSIX requires.
18426         Assime time () succeeds, since other code already does.
18427         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
18428         (timespec_subtract): Remove.
18429         (NANOSLEEP_BUG_WORKAROUND): New constant.
18430         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
18431         things considerably.  Use it only on GNU/Linux hosts, since the
18432         workaround shouldn't be needed elsewhere.
18433
18434 2005-02-24  Bruno Haible  <bruno@clisp.org>
18435
18436         * modules/gettext (Files): Add m4/glibc2.m4.
18437
18438 2005-02-24  Bruno Haible  <bruno@clisp.org>
18439
18440         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
18441         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
18442         * m4/progtest.m4:
18443         Update from GNU gettext 0.14.2.
18444         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
18445
18446 2005-02-24  Bruno Haible  <bruno@clisp.org>
18447
18448         * lib/localcharset.c: Update from GNU gettext 0.14.2.
18449         * lib/config.charset: Update from GNU gettext 0.14.2.
18450
18451 2005-02-24  Bruno Haible  <bruno@clisp.org>
18452
18453         * lib/gettext.h: Update from GNU gettext 0.14.2.
18454
18455 2005-02-23  Simon Josefsson  <jas@extundo.com>
18456
18457         * m4/iconvme.m4: New file.
18458
18459 2005-02-23  Jim Meyering  <jim@meyering.net>
18460
18461         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
18462         change.
18463         Thanks to Bruno Haible for catching it.
18464
18465 2005-02-22  Simon Josefsson  <jas@extundo.com>
18466
18467         * modules/iconvme: New file.
18468
18469         * MODULES.html.sh: Add iconvme.
18470
18471 2005-02-22  Simon Josefsson  <jas@extundo.com>
18472
18473         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
18474
18475 2005-02-22  Simon Josefsson  <jas@extundo.com>
18476
18477         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
18478
18479 2005-02-22  Jim Meyering  <jim@meyering.net>
18480
18481         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
18482         s/ifndef/ifdef/.
18483
18484 2005-02-20  Neil Conway  <neilc@samurai.com>
18485
18486         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
18487         returned by OSX/Darwin if the specified buffer is not large
18488         enough for the hostname.
18489
18490 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18491
18492         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
18493         pass it to _help, otherwise the latter coredumps trying to
18494         dereference state.root_argp.
18495
18496 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18497
18498         * modules/chdir-long (Depends-on): Add memrchr.
18499         * modules/memrchr (Files): Add lib/memrchr.h.
18500         (Include): "memrchr.h".
18501
18502 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18503
18504         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
18505
18506 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18507
18508         * lib/memrchr.h: New file.
18509         * lib/chdir-long.c: Include it.
18510         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
18511         Don't bother including stddef.h.
18512
18513 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
18514
18515         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
18516         inclusion.
18517         Include <sys/types.h>, for dev_t.
18518         (ME_DUMMY, ME_REMOTE): Move from here....
18519         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
18520         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
18521         Dmitry V. Levin.
18522         Include mountlist.h first, to test the interface.
18523
18524 2005-01-29  Bruno Haible  <bruno@clisp.org>
18525
18526         * lib/progname.c (program_name): Initialize.
18527         Needed when linking statically on MacOS X.
18528
18529 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18530
18531         Sync from coreutils.
18532         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
18533         (Depends-on): Add c-strtod.
18534         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
18535
18536 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18537
18538         Sync from coreutils.
18539         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
18540
18541         Remove files that are specific to coreutils.
18542         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
18543
18544 2005-01-28  Bruno Haible  <bruno@clisp.org>
18545
18546         * modules/javacomp: New file.
18547         * MODULES.html.sh (Java): Add javacomp.
18548
18549 2005-01-28  Bruno Haible  <bruno@clisp.org>
18550
18551         * m4/javacomp.m4: New file, from GNU gettext.
18552
18553 2005-01-28  Bruno Haible  <bruno@clisp.org>
18554
18555         * lib/javacomp.sh.in: New file, from GNU gettext.
18556         * lib/javacomp.h: New file, from GNU gettext.
18557         * lib/javacomp.c: New file, from GNU gettext.
18558
18559 2005-01-26  Simon Josefsson  <jas@extundo.com>
18560
18561         * lib/gai_strerror.c: Use GPL in header.
18562
18563 2005-01-26  Bruno Haible  <bruno@clisp.org>
18564
18565         * modules/javaexec: New file.
18566         * MODULES.html.sh (Java): Add javaexec.
18567
18568 2005-01-26  Bruno Haible  <bruno@clisp.org>
18569
18570         * m4/javaexec.m4: New file, from GNU gettext.
18571
18572 2005-01-26  Bruno Haible  <bruno@clisp.org>
18573
18574         * lib/javaexec.sh.in: New file, from GNU gettext.
18575         * lib/javaexec.h: New file, from GNU gettext.
18576         * lib/javaexec.c: New file, from GNU gettext.
18577
18578 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18579
18580         * modules/lchown (Depends-on): Remove lchown.h
18581
18582 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18583
18584         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
18585         must be defined if the header file was not found, in order
18586         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
18587
18588 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18589
18590         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
18591         initializers for struct pentry_state.
18592         (__argp_error): Check return value of __asprintf
18593         (__argp_failure): Translate error message
18594
18595         * lib/argp-parse.c: Removed braces around the expansion of N_()
18596
18597 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
18598
18599         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
18600         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
18601         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
18602         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
18603         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
18604         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
18605         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
18606         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
18607         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
18608         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
18609         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
18610         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
18611         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
18612         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
18613         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
18614         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
18615         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
18616         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
18617         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
18618         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
18619         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
18620         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
18621         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
18622         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
18623         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
18624         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
18625         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
18626         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
18627         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
18628         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
18629         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
18630         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
18631         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
18632         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
18633         xstrtol.m4, xstrtoumax.m4, yesno.m4:
18634         Use an all-permissive copyright notice, recommended by RMS.
18635
18636 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
18637
18638         * modules/chdir-long (Depends-on): Remove mempcpy.
18639
18640 2005-01-21  Jim Meyering  <jim@meyering.net>
18641
18642         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
18643         same value as for Solaris 9.
18644
18645         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
18646         component length.  This included changing the parameter to be
18647         of type `char *' rather than `char const *'.
18648         * lib/chdir-long.h (chdir_long): Update prototype.
18649
18650         * lib/openat.c (fdopendir, fstatat): New functions.
18651         * lib/openat.h: Include headers required for use of DIR and struct
18652         stat.
18653         [AT_SYMLINK_NOFOLLOW]: Define.
18654         (fdopendir, fstatat): Add prototypes.
18655
18656 2005-01-21  Bruno Haible  <bruno@clisp.org>
18657
18658         * modules/classpath: New file.
18659         * MODULES.html.sh (Java): Add classpath.
18660
18661 2005-01-21  Bruno Haible  <bruno@clisp.org>
18662
18663         * lib/classpath.h: New file, from GNU gettext.
18664         * lib/classpath.c: New file, from GNU gettext.
18665
18666 2005-01-20  Simon Josefsson  <jas@extundo.com>
18667
18668         * modules/version-etc-fsf: New file.
18669
18670 2005-01-20  Simon Josefsson  <jas@extundo.com>
18671
18672         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
18673         * lib/version-etc.c: Remove version_etc_copyright.
18674         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
18675         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
18676
18677 2005-01-20  Simon Josefsson  <jas@extundo.com>
18678
18679         * lib/base64.h (isbase64): Add.
18680
18681         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
18682         using a unsigned prototype, don't inline.
18683         (base64_decode): Use it.
18684
18685 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18686
18687         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
18688         it.
18689
18690 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18691
18692         * lib/save-cwd.c (save_cwd): Remove code to support the case
18693         where fchdir is missing or flaky.
18694
18695 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18696
18697         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
18698
18699 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
18700
18701         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
18702         AC_LIBSOURCES now does this.
18703         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
18704         with new ullong_max module.
18705
18706 2005-01-19  Bruno Haible  <bruno@clisp.org>
18707
18708         * modules/sh-quote: New file.
18709         * MODULES.html.sh (Executing programs): Add sh-quote.
18710
18711 2005-01-19  Bruno Haible  <bruno@clisp.org>
18712
18713         * lib/sh-quote.h: New file, from GNU gettext.
18714         * lib/sh-quote.c: New file, from GNU gettext.
18715
18716 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18717
18718         Merge from coreutils.
18719         * m4/ullong_max.m4: New file.
18720         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
18721         (gl_MACROS): Assume localeconv exists.
18722
18723 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18724
18725         Merge changes from coreutils, as described below in several
18726         changelogs dated today.
18727
18728         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
18729         (O_DIRECTORY): Remove; not needed here, since "." must be
18730         a directory.  All uses removed.
18731         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
18732         universal on Suns, and we also need to test for IRIX.
18733         Revamp code to use 'if' rather than '#if'.
18734         Avoid unnecessary comparison of cwd->desc to 0.
18735
18736         * lib/utimens.c (futimens): Robustify the previous patch, by checking
18737         for known valid error numbers rather than observed invalid ones.
18738
18739 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18740
18741         * modules/ullong_max: New file.
18742
18743         * modules/chdir-long, modules/openat: New files.
18744         * modules/save-cwd (Depends-on): Depend on chdir-long.
18745         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
18746
18747 2005-01-18  Jim Meyering  <jim@meyering.net>
18748
18749         Merge from coreutils.
18750         * m4/chdir-long.m4, m4/openat.m4: New files.
18751         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
18752         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
18753         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
18754         is sane and DOES follow symlinks.  Besides, testing 20 different
18755         systems found no broken chown implementations.
18756         Prompted by a change in rsync's copy of this macro.
18757         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
18758
18759         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
18760
18761         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
18762         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
18763         NULL-means-set-to-current-time semantics.
18764         Remove temporary file immediately, rather than waiting
18765         for configure's at-exit trap code to do it.
18766
18767 2005-01-18  Jim Meyering  <jim@meyering.net>
18768
18769         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18770
18771         * lib/utimens.c (futimens): Account for the fact that futimes
18772         can also fail with errno == ENOSYS or errno == ENOENT.
18773         Patch from Dmitry V. Levin.
18774
18775         Change the name of the robust chdir function from chdir to chdir_long.
18776         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
18777         (restore_cwd): Use chdir_long, not chdir.
18778         * lib/chdir-long.c: Renamed from chdir.c.
18779         * lib/chdir-long.h: Renamed from chdir.h.
18780         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
18781         Hurd.
18782
18783 2005-01-18  Bruno Haible  <bruno@clisp.org>
18784
18785         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
18786         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
18787         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
18788         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
18789         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
18790         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
18791         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
18792         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
18793         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
18794         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
18795         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
18796         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
18797         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
18798         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
18799         Use an all-permissive copyright notice, recommended by RMS.
18800
18801 2005-01-18  Bob Proulx  <bob@proulx.com>
18802
18803         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
18804         simplify offsetof() macro construct to avoid compile failure with
18805         native HP-UX 11.0 ANSI C compiler.
18806
18807 2005-01-17  Bruno Haible  <bruno@clisp.org>
18808
18809         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
18810         redundant because stpncpy.m4 takes care of it.
18811
18812 2005-01-17  Bruno Haible  <bruno@clisp.org>
18813
18814         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
18815
18816 2005-01-17  Bruno Haible  <bruno@clisp.org>
18817
18818         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
18819         used.
18820
18821 2005-01-17  Bruno Haible  <bruno@clisp.org>
18822
18823         * lib/fwriteerror.h (fwriteerror): Change specification to include
18824         fclose.
18825         * lib/fwriteerror.c: Include <stdbool.h>.
18826         (fwriteerror): At the end, close the file stream. Record whether
18827         stdout was already closed.
18828
18829 2005-01-17  Bruno Haible  <bruno@clisp.org>
18830
18831         * lib/execute.c (environ): Declare if needed.
18832         * lib/pipe.c (environ): Likewise.
18833         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
18834
18835 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18836
18837         * modules/argp: Depend on vsnprintf
18838
18839 2005-01-10  Jim Meyering  <jim@meyering.net>
18840
18841         * modules/closeout (Depends-on): Add atexit.
18842
18843 2005-01-06  Bruno Haible  <bruno@clisp.org>
18844
18845         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
18846
18847 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
18848
18849         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
18850         definitions to be after all include files, to avoid collisions.
18851         Problem reported by Bob Proulx.
18852
18853 2005-01-04  Jim Meyering  <jim@meyering.net>
18854
18855         Changes imported from coreutils.
18856         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
18857         as the mkstemp template, use a temporary directory and an
18858         8.3-friendly template to avoid trouble on systems like DJGPP.
18859         Reported by Juan M. Guerrero via Stepan Kasal.
18860         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
18861         close. Remove the temporary directory right away, rather than waiting
18862         for configure's at-exit trap code to do it.
18863         Suggestion from Stepan Kasal.
18864
18865 2005-01-01  Simon Josefsson  <jas@extundo.com>
18866
18867         * gnulib-tool: Print #include directives when --import'ing.
18868
18869 2004-12-28  Simon Josefsson  <jas@extundo.com>
18870
18871         * tests/test-base64.c: Include required header files.  Remove
18872         unused variables.
18873
18874 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18875
18876         * modules/error (Depends-on): Remove gettext.
18877
18878 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18879
18880         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
18881         not needed.  This removes a dependency on the gettext module.
18882         [defined _LIBC]: Do not include <libintl.h>; not needed.
18883
18884 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18885
18886         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
18887         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
18888
18889 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18890
18891         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
18892         HAVE_DECL_STRTOLD.
18893
18894 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18895
18896         * modules/getdate (Depends-on): Remove alloca-opt.
18897
18898 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18899
18900         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
18901
18902 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18903
18904         * lib/argp-parse.c: Include <stddef.h>.
18905         (alignof, alignto): New macros.
18906         (parser_init): Don't assume that void * is aligned sufficiently
18907         for struct option.
18908
18909         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
18910         need to extend the stack.
18911         (YYINITDEPTH): New macro, so that the initial stack isn't overly
18912         large.
18913
18914 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18915
18916         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
18917
18918 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18919
18920         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
18921         (2004-10-24) change.  Apparently this was a false alarm.
18922
18923         * modules/getdate: Depend on alloca-opt, not alloca.
18924
18925 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18926
18927         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
18928         Remove now-obsolete comment about AIX.
18929         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
18930         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
18931         (YYMAXDEPTH): New macro.
18932
18933 2004-12-18  Simon Josefsson  <jas@extundo.com>
18934
18935         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
18936
18937 2004-12-18  Bruno Haible  <bruno@clisp.org>
18938
18939         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
18940
18941 2004-12-18  Bruno Haible  <bruno@clisp.org>
18942
18943         * lib/fatal-signal.c (fatal_signals): Make non-const.
18944         (init_fatal_signals): New function.
18945         (uninstall_handlers, install_handlers): Ignore signals that were set to
18946         SIG_IGN.
18947         (at_fatal_signal): Call init_fatal_signals.
18948         (init_fatal_signal_set): Likewise. Ignore signals that were set to
18949         SIG_IGN.
18950         Reported by Paul Eggert.
18951
18952 2004-12-18  Bruno Haible  <bruno@clisp.org>
18953
18954         * doc/alloca.texi: New file.
18955         * doc/alloca-opt.texi: New file.
18956
18957 2004-12-17  Jim Meyering  <jim@meyering.net>
18958
18959         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
18960         Otherwise, install-sh could exit with improper exit status when
18961         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
18962
18963 2004-12-16  Simon Josefsson  <jas@extundo.com>
18964
18965         * tests/test-base64.c: Add license.
18966
18967 2004-12-15  Stepan Kasal  <address@hidden>
18968
18969         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
18970
18971 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
18972
18973         * modules/getcwd (Files): Add m4/d-ino.m4.
18974         Suggested by Mark D. Baushke.
18975
18976 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18977
18978         * lib/getdate.y (textint): New member "negative".
18979         (time_zone_hhmm): New function.
18980         Expect 14 shift-reduce conflicts, not 13.
18981         (o_colon_minutes): New rule.
18982         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
18983         (yylex): Set the "negative" member of signed numbers.
18984
18985 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18986
18987         * doc/getdate.texi (Time of day items, Time zone items):
18988         Describe new formats +00:00, UTC+00:00.
18989
18990 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
18991
18992         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
18993         spurious "-l"s.  Problem reported by Stepan Kasal.
18994
18995 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
18996
18997         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
18998         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
18999
19000 2004-12-04  Simon Josefsson  <jas@extundo.com>
19001
19002         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
19003         Vandoorselaere <yoann@prelude-ids.org>.
19004
19005 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
19006
19007         Changes imported from coreutils.
19008         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
19009         exist.
19010         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
19011
19012 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
19013
19014         Changes imported from coreutils.
19015         * lib/hard-locale.c: Assume <locale.h> exists.
19016         Include "strdup.h".
19017         (GLIBC_VERSION): New macro.
19018         (hard_locale): Assume setlocale exists.
19019         Rewrite to avoid #ifdef.
19020         Use strdup rather than malloc + strcpy.
19021         * lib/human.c: Assume <locale.h> exists.
19022         (human_readable): Assume localeconv exists.
19023
19024 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
19025
19026         * modules/hard-locale (Depends-on): Add strdup.
19027
19028 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
19029
19030         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
19031         convert T2, not T.  (Imported from libc.)
19032
19033 2004-11-30  Simon Josefsson  <jas@extundo.com>
19034
19035         * modules/restrict (License): Change to LGPL.
19036
19037 2004-11-30  Simon Josefsson  <jas@extundo.com>
19038
19039         * m4/restrict.m4: Add copyright and copying conditions.
19040
19041 2004-11-30  Simon Josefsson  <jas@extundo.com>
19042
19043         * m4/base64.m4: New file.
19044
19045 2004-11-30  Simon Josefsson  <jas@extundo.com>
19046
19047         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
19048         base64.
19049
19050         * tests/test-base64.c: New file.
19051
19052         * modules/base64: New file.
19053
19054 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
19055
19056         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
19057         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
19058
19059         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
19060
19061 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
19062
19063         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
19064         (__getcwd.c): Don't restore errno; glibc doesn't.
19065         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
19066         first, falling back to our code only if its results look suspicious.
19067         Ensure that the resulting buffer is only as large as necessary.
19068
19069         * lib/readutmp.c: Include readutmp.h first.
19070         Include <errno.h>, since readutmp.h no longer does that.
19071         * lib/readutmp.h: Don't include <errno.h>,
19072         <sys/param.h>, <time.h>; not needed to establish interface.
19073         (errno): Remove decl.
19074         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
19075         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
19076         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
19077
19078 2004-11-28  Simon Josefsson  <jas@extundo.com>
19079
19080         * lib/base64.h, base64.c: New file.
19081
19082 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
19083
19084         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
19085
19086 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
19087
19088         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
19089         (Depends-on): Remove pathmax, same.  Add mempcpy.
19090         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
19091         (Makefile.am): Append getcwd.h to lib_SOURCES.
19092         (Include): Add getcwd.h.
19093         (Maintainer): Change from Jim Meyering to "all, glibc",
19094         since getdate now uses intended-for-glibc code.
19095         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
19096         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
19097
19098 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
19099
19100         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
19101         HP's ANSI C compiler.
19102         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
19103         Declaring int functions causes warnings on some modern systems and
19104         shouldn't be needed to compile on ancient ones.
19105         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
19106         defined.
19107
19108         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
19109         with the following changes.
19110         (__set_errno): Parenthesize properly.
19111         Include <stdbool.h>.
19112         (MIN, MAX, MATCHING_INO): New macros.
19113         (__getcwd): Define with prototype, not K&R form.
19114         Use heuristics to allocate default buffer on stack if possible.
19115         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
19116         behavior, and to avoid the PATH_MAX limit when computing
19117         ../../../../...
19118         Use MATCHING_INO to compare inode number to file.
19119         Check for arithmetic overflow in size calculations.
19120         Fix bug in reallocation of dot array that caused getcwd to fail
19121         on directories nested deeper than 75.
19122         Be more careful about saving errno on error.
19123         Do not use realloc; use only free+malloc, as this is a bit
19124         more flexible and avoids a needless copy operation.
19125         Do not inspect st_dev and st_ino for symbolic links; POSIX
19126         doesn't specify the latter.
19127         Check for closedir errors.
19128         Avoid needless casts.
19129         Use "#ifdef weak_alias" around weak_alias, to be like other
19130         glibc code.
19131         The following changes to getcwd.c have effect only when used in
19132         gnulib; they have no effect inside glibc proper.
19133         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
19134         as alloca isn't used.
19135         (alloca, __alloca): Likewise.
19136         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
19137         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19138         unconditionally, as gnulib assumes C89 or better.
19139         Do not include <sys/param.h>.
19140         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
19141         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
19142         better.
19143         (NULL) [!defined NULL]: Remove; we assume C89 or better.
19144         Include <dirent.h> in a way that is compatible with modern Autoconf.
19145         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
19146         New macros, if not already defined.
19147         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
19148         Use "_LIBC", not "defined _LIBC", for consistency.
19149         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
19150         a mempcpy module.
19151         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
19152         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
19153         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
19154         credit only to Jim Meyering and adjust the copyright dates.
19155         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
19156         <stdlib.h>, <unistd.h>, "pathmax.h".
19157         Instead, include "xgetcwd.h" (first) and "getcwd.h".
19158         (INITIAL_BUFFER_SIZE): Remove.
19159         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
19160
19161 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
19162
19163         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
19164         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
19165         Use the _ONCE methods, for efficiency.
19166         Check for fcntl.h.  In test program, include <errno.h>
19167         and <fcntl.h> if available.  Remove old K&R cruft from
19168         test program.  Check for common errors in GNU/Linux,
19169         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
19170         don't do AC_LIBOBJ, as that's getcwd.m4's job.
19171         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
19172         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
19173         name accordingly.
19174         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
19175         accommodate new getcwd.c.
19176         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
19177         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
19178         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
19179         that's all we need now.
19180
19181 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19182
19183         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
19184         argp-parse.c depends on getopt internals, that means we should
19185         always use our getopt, to be on the safe side.
19186         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
19187         order not to spoil the result of an eventual previous invocation
19188         of gl_GETOPT_SUBSTITUTE.
19189
19190 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19191
19192         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
19193         redefinition warnings. To avoid them, include the defines
19194         in `#if !defined __need_getopt ... #endif'. The only place
19195         where __getopt_argv_const is used is in definitions
19196         of getopt_long and getopt_long_only below, which are as well
19197         protected by `#ifndef __need_getopt'.
19198         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
19199         __need_getopt after including <stdio.h> and <unistd.h> These
19200         headers might have defined it.
19201
19202 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
19203
19204         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
19205
19206 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
19207
19208         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
19209         (futimens): New function, which uses futimes if available.
19210         (futimens, utimens): Support timespec==NULL, with same semantics
19211         as utime and utimens.
19212         * lib/utimens.h (futimens): New decl.
19213
19214 2004-11-23  Jim Meyering  <jim@meyering.net>
19215
19216         * lib/getopt_.h: Remove trailing blanks.
19217
19218 2004-11-23  Jim Meyering  <jim@meyering.net>
19219
19220         * lib/__fpending.c: Add comment.
19221
19222 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
19223
19224         * modules/canonicalize (Depends-on): Add xreadlink.
19225         Problem reported by James Youngman.
19226
19227 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
19228
19229         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
19230         New macros.
19231         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
19232         optopt): Use them instead of invoking ## directly; otherwise, the
19233         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
19234
19235 2004-11-19  Bruno Haible  <bruno@clisp.org>
19236
19237         * lib/strtok_r.c: Move comments from here...
19238         * lib/strtok_r.h: ... to here.
19239
19240 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
19241
19242         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
19243         implementations that mishandle size_t overflow.
19244
19245 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
19246
19247         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
19248         might fail.  Problem reported by Yoann Vandoorselaere.
19249         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
19250         implementations that mishandle size_t overflow.
19251
19252 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19253
19254         * modules/canon-host (Depends-on): Add strdup.
19255
19256 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19257
19258         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
19259
19260 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19261
19262         * lib/canon-host.c: Include "strdup.h".
19263         (canon_host): Use getaddrinfo if available, so that IPv6 works.
19264         Use strdup instead of malloc/strcpy to duplicate strings.
19265
19266         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
19267         (human_space_before_unit): New constant.
19268         * lib/human.c (human_readable): Support it.
19269
19270         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
19271         (xgetcwd): Set errno correctly when failing.
19272         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
19273         the failure is actually due to a PATH_MAX problem.
19274
19275         Further getopt changes to make it more likely that glibc will
19276         buy the changes back.
19277         * lib/getopt.c (POSIXLY_CORRECT): New constant.
19278         (getopt): Use it, so to preserve glibc semantic
19279         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
19280         when compiling for libc.
19281         * lib/getopt_.h (__getopt_argv_const): Bring it back.
19282         (getopt_long, getopt_long_only): Use it.
19283
19284         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
19285         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
19286         (getopt): Argv is now char * const *, as per standard.
19287         (_getopt_internal_r, _getopt_internal): Argv is now char **,
19288         not char *__getopt_argv_const *.
19289         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
19290         _getopt_long_only_r): Likewise.
19291         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
19292         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
19293         _getopt_long_r, _getopt_long_only_r): Likewise.
19294         * lib/getopt_.h (__getopt_argv_const): Remove.
19295         (getopt): Argv is now char * const *, as per standard.
19296
19297         * lib/getdate.y (tORDINAL): New token.
19298         (day, relunit): Allow it for relative times.
19299         (relative_time_table): Use tORDINAL for ordinals.
19300
19301 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19302
19303         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
19304         Document that "second" isn't allowed as an ordinal number.
19305
19306 2004-11-16  Jim Meyering  <jim@meyering.net>
19307
19308         * modules/closeout (Depends-on): Add fpending.
19309
19310 2004-11-15  Jim Meyering  <jim@meyering.net>
19311
19312         * lib/closeout.c: Include "__fpending.h" once again.
19313         Include <stdbool.h>.
19314         (close_stdout): Don't fail just because stdout was closed initially,
19315         since some programs don't write to stdout in the normal course of
19316         operation (other than --version and --help), and we don't want this
19317         function to make e.g. `touch file >&-' fail.
19318         But do fail if it was closed and someone has tried to write to it.
19319         E.g., `printf foo >&-' must fail.
19320
19321 2004-11-13  Jim Meyering  <jim@meyering.net>
19322
19323         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
19324
19325 2004-11-12  Simon Josefsson  <jas@extundo.com>
19326
19327         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
19328         small doc fix is still pending.
19329
19330 2004-11-11  Simon Josefsson  <jas@extundo.com>
19331
19332         * modules/strtok_r: New file.
19333
19334         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19335         strtok_r.
19336
19337 2004-11-11  Simon Josefsson  <jas@extundo.com>
19338
19339         * m4/strtok_r.m4: New file.
19340
19341         * m4/getopt.m4: Replace opterr.
19342
19343 2004-11-11  Simon Josefsson  <jas@extundo.com>
19344
19345         * lib/strtok_r.h, strtok_r.c: New file.
19346
19347 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
19348
19349         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
19350         of replacing opterr, getopt, etc.  This should handle the
19351         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
19352
19353 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
19354
19355         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
19356         we can stop lying to compilers about the constness of argv when we
19357         are compiled outside glibc.
19358         (getopt, getopt_long, getopt_long_only): Use it.
19359         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
19360         _getopt_internal, getopt): Likewise.
19361         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
19362         _getopt_long_only_r): Likewise.
19363         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
19364         _getopt_long_r, _getopt_long_only_r): Likewise.
19365
19366         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
19367         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
19368         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
19369         the other external symbols.
19370         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
19371         declaration, since the above renaming now works around collisions.
19372
19373 2004-11-11  Jim Meyering  <jim@meyering.net>
19374
19375         * lib/linebreak.c: Remove trailing blanks.
19376         * lib/alloca_.h: Likewise.
19377         * lib/acosl.c: Likewise.
19378         * lib/euidaccess.c: Likewise.
19379         * lib/allocsa.h: Likewise.
19380
19381 2004-11-10  Simon Josefsson  <jas@extundo.com>
19382
19383         * m4/getaddrinfo.m4: New file.
19384
19385 2004-11-10  Simon Josefsson  <jas@extundo.com>
19386
19387         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
19388
19389 2004-11-10  Simon Josefsson  <jas@extundo.com>
19390
19391         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19392         getaddrinfo.
19393
19394         * modules/getaddrinfo: New file.
19395
19396 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
19397
19398         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
19399
19400 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
19401
19402         * lib/mktime.c (SHR): New macro, which is a portable
19403         substitute for >> that should work even on Crays.
19404         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
19405         Problem reported by Mark D. Baushke in
19406         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
19407         * lib/getdate.y (SHR): Likewise.
19408         (tm_diff): Use it.
19409         * lib/strftime.c (SHR): Likewise.
19410         (tm_diff): Use it.
19411         * lib/quotearg.c (struct quoting_options): Use unsigned int for
19412         quote_these_too, so that right shifts are well defined.  All uses
19413         changed.
19414
19415 2004-11-10  Jim Meyering  <jim@meyering.net>
19416
19417         Ensure that no close failure goes unreported.
19418         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
19419         return early when it seems there's nothing to flush.
19420         Don't include __fpending.h.
19421
19422 2004-11-10  Jim Meyering  <jim@meyering.net>
19423
19424         * modules/closeout (Depends-on): Remove fpending.
19425
19426 2004-11-10  Jim Meyering  <jim@meyering.net>
19427
19428         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
19429
19430 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19431
19432         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
19433         gl_FUNC_STRFTIME.
19434         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
19435         and AC_REQUIRE when possible, to avoid duplicate checks.
19436         Check for <wchar.h>.
19437
19438 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19439
19440         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
19441
19442 2004-11-09  Bruno Haible  <bruno@clisp.org>
19443
19444         * m4/sockpfaf.m4: New file.
19445
19446 2004-11-05  Bruno Haible  <bruno@clisp.org>
19447
19448         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
19449         Reported by Mark D. Baushke <mdb@cvshome.org>.
19450
19451 2004-11-04  Bruno Haible  <bruno@clisp.org>
19452
19453         2004-09-11  Bruno Haible  <bruno@clisp.org>
19454                 * allocsa.valgrind: New file.
19455         2004-02-06  Bruno Haible  <bruno@clisp.org>
19456                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
19457                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
19458                 Reported by Christopher Seip <chris.seip@hp.com>.
19459
19460 2004-11-04  Bruno Haible  <bruno@clisp.org>
19461
19462         * modules/allocsa (Files): Add lib/allocsa.valgrind.
19463         (Makefile.am): Distribute it.
19464
19465 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
19466
19467         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
19468         with errno == ERANGE if the buffer is too small.
19469         Problem reported by Mark D. Baushke.
19470
19471 2004-11-03  Albert Chin  <china@thewrittenword.com>
19472             Paul Eggert  <eggert@cs.ucla.edu>
19473
19474         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
19475         equivalent, substitute $ac_type for equivalent type rather than
19476         blindly using uint32_t *always* which won't work if uint32_t is not
19477         available.  Define _UINT32_T to work around typedef of uint32_t if
19478         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
19479         2.5.1.
19480
19481 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19482
19483         * m4/jm-macros.m4: Sync from coreutils.
19484         (gl_MACROS): Check for mbrlen, for pathchk.
19485         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
19486
19487 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19488
19489         * lib/xreadlink.c (MAXSIZE): New macro.
19490         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
19491         size does not exceed MAXSIZE.  Avoid cast.
19492         As suggested by Mark D. Baushke in
19493         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
19494         if readlink fails with buffer size just under MAXSIZE, try again
19495         with MAXSIZE.
19496
19497 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19498
19499         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
19500
19501 2004-11-02  Derek R. Price  <derek@ximbiot.com>
19502         and  Paul Eggert  <eggert@cs.ucla.edu>
19503
19504         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
19505         (get_date): Overparenthesize to avoid GCC warning.
19506
19507 2004-11-02  Bruno Haible  <bruno@clisp.org>
19508
19509         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
19510         returns void.
19511
19512 2004-11-02  Bruno Haible  <bruno@clisp.org>
19513
19514         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
19515         function returns void.
19516
19517 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19518
19519         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
19520         fflush_unlocked, flockfile, funlockfile, funlockfile,
19521         fputs_unlocked, putc_unlocked.
19522
19523 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19524
19525         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19526         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
19527         already declared.
19528
19529 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19530
19531         * modules/getdate (Files): Add doc/getdate.texi.
19532         (Depends-on): Add setenv, xalloc.
19533
19534 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19535
19536         * lib/getdate.y: Add support for TZ="foo" within a date string.
19537         Fix some bugs near time_t boundaries.  Reject dates with
19538         out-of-range components, e.g., "Sept 31".
19539         Include <stdlib.h>, "setenv.h", "xalloc.h".
19540         (ISDIGIT_LOCALE): Remove; unused.
19541         Note that the TZ and time functions used here are not reentrant.
19542         (mktime_ok, get_tz): New functions.
19543         (TZBUFSIZE): New constant.
19544         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
19545         This requires that we sometimes generate our own TZ="XXX..." setting.
19546
19547 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19548
19549         * doc/getdate.texi: New file, from coreutils with modifications for
19550         the new TZ parsing.
19551
19552 2004-10-27  Derek R. Price  <derek@ximbiot.com>
19553
19554         * lib/mktime.c (not_equal_tm): Remove redundant check.
19555
19556 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19557
19558         * modules/regex (lib_SOURCES): Add regex.c.
19559         Reported by James Youngman in
19560         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
19561
19562 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19563
19564         * lib/getdate.y: Use Bison 1.875 features, and some minor
19565         code cleanups.  This change does not affect semantics.
19566         Don't include <stdlib.h>; no longer needed.
19567         Don't include unlocked-io.h; only the "#if TEST" code uses
19568         stdio, and performance isn't crucial there.
19569         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
19570         Bison 1.875 features as described below.
19571         All uses of "PC." replaced by "pc->".
19572         (YYSTYPE): Add a forward declaration.
19573         (yylex, yyerror): Use full prototypes in forward decls.
19574         Use "%pure-parser" rather than obsolescent "%pure_parser".
19575         Use %parse-param and %lex-param instead of obsolescent
19576         YYPARSE_PARAM and YYLEX_PARAM.
19577         (meridian_table, month_and_day_table, time_units_table,
19578         relative_time_table, time_zone_table, military_table,
19579         lookup_zone, lookup_word, get_date):
19580         Use NULL instead of 0 where appropriate.
19581         (to_hour): Avoid abort (), to avoid a dependency on
19582         stdlib.h.
19583         (yyerror, yylex): Now accepts parser_control * arg.
19584         (main) [TEST]: Use '\0' rather than 0 for char.
19585
19586 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19587
19588         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
19589
19590 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19591
19592         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
19593         It's now the caller's responsibility to handle the case where
19594         !HAVE_GETPAGESIZE && !defined getpagesize.
19595
19596         * lib/mktime.c (leapyear): Arg is long int, not int.
19597
19598 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
19599
19600         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
19601
19602 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
19603
19604         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
19605         missing.  Problem reported by James Youngman.
19606
19607 2004-10-16  Simon Josefsson  <jas@extundo.com>
19608
19609         * gnulib-tool: Fix comments.  Fix parse problem.
19610         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
19611
19612 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
19613
19614         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
19615         implementation of getopt_long.  Problem reported by Alexander Taler in:
19616         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
19617
19618 2004-10-15  Bruno Haible  <bruno@clisp.org>
19619
19620         * gnulib-tool: Untabify. Initialize supplied_libname.
19621         (func_usage): More homogenous output.
19622         (func_modules_transitive_closure, func_modules_to_filelist,
19623         func_emit_lib_Makefile_am): New functions.
19624         (func_import): New function, extracted from big case statement. Use
19625         func_get_license, func_modules_transitive_closure,
19626         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
19627         opt_lgpl. Don't use test -a, as it's not portable.
19628         (func_create_testdir): Use func_modules_transitive_closure,
19629         func_modules_to_filelist, func_emit_lib_Makefile_am.
19630
19631 2004-10-15  Bruno Haible  <bruno@clisp.org>
19632
19633         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
19634
19635 2004-10-15  Bruno Haible  <bruno@clisp.org>
19636
19637         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
19638         the portions belonging to each module.
19639         Suggested by Derek Robert Price <derek@ximbiot.com>.
19640
19641 2004-10-12  Simon Josefsson  <jas@extundo.com>
19642
19643         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19644         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
19645         to real functions.
19646
19647 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19648
19649         * modules/vsnprintf: New file.
19650
19651 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19652
19653         * m4/vsnprintf.m4: New file.
19654
19655 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19656
19657         * lib/vsnprintf.h: New file.
19658         * lib/vsnprintf.c: New file.
19659
19660 2004-10-11  Bruno Haible  <bruno@clisp.org>
19661
19662         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
19663         vsnprintf.
19664
19665 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
19666
19667         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
19668
19669 2004-10-07  Bruno Haible  <bruno@clisp.org>
19670
19671         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
19672         fits into the provided buffer.
19673
19674 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
19675
19676         * lib/diacrit.c, diacrit.h: Add GPL notice.
19677
19678         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
19679         notice.
19680         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
19681         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
19682         This avoids a potential constant-folding bug.
19683
19684 2004-10-05  Bruno Haible  <bruno@clisp.org>
19685
19686         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
19687         for the declaration of strsep.
19688
19689 2004-10-05  Bruno Haible  <bruno@clisp.org>
19690
19691         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
19692
19693 2004-10-04  Simon Josefsson  <jas@extundo.com>
19694
19695         * modules/memmem: New file.
19696         * tests/test-memmem.c: New file.
19697         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
19698
19699 2004-10-04  Simon Josefsson  <jas@extundo.com>
19700
19701         * m4/memmem.m4: New file.
19702
19703 2004-10-04  Simon Josefsson  <jas@extundo.com>
19704
19705         * lib/memmem.h: New file.
19706         * lib/memmem.c: New file, taken from glibc.
19707
19708 2004-10-04  Simon Josefsson  <jas@extundo.com>
19709
19710         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
19711         '#ifdef USE_UNLOCKED_IO'.
19712
19713 2004-10-04  Simon Josefsson  <jas@extundo.com>
19714
19715         * config/srclist.txt: Add memmem from glibc.
19716
19717 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19718
19719         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
19720
19721         * modules/argmatch, modules/argp, modules/closeout, modules/error,
19722         modules/exclude, modules/getdate, modules/getline,
19723         modules/getndelim2, modules/getpass, modules/getpass-gnu,
19724         modules/getusershell, modules/linebuffer, modules/md5,
19725         modules/mountlist, modules/posixtm, modules/readtokens,
19726         modules/readutmp, modules/regex, modules/sha1,
19727         modules/version-etc, modules/yesno:
19728         Remove dependency on unlocked-io.
19729
19730 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19731
19732         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
19733
19734         * m4/unlocked-io.m4: Add copyright notice.
19735         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
19736
19737 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19738
19739         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
19740         * lib/xmalloc.c (xmemdup): Likewise.
19741         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
19742         XFREE): Remove these long-obsolescent macros.
19743         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
19744         * lib/xstrdup.c: Remove.
19745
19746         * lib/regex.c (re_comp): Cast gettext return value to char *,
19747         Problem reported by Martin Neitzel via Mark D. Baushke.
19748
19749 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19750
19751         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
19752         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
19753         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
19754         regex.c, sha1.c, version-etc.c, yesno.c:
19755         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
19756         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
19757         the includer's responsibility.
19758
19759         Sync from coreutils.
19760
19761         * lib/modechange.c (mode_compile): Don't decrement a pointer that
19762         points to the start of a string, as the C Standard says the
19763         resulting behavior is undefined.
19764
19765         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
19766         simple -> simple_backups, numbered_existing ->
19767         numbered_existing_backups, numbered -> numbered_backups
19768         to avoid shadowing problems.  All uses changed.
19769         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
19770         * lib/backupfile.c (check_extension, numbered_backup):
19771         Rename locals to avoid shadowing 'basename'.
19772         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
19773         once.
19774
19775         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
19776         * lib/.cvsignore: Add getopt.h.
19777
19778 2004-10-04  Bruno Haible  <bruno@clisp.org>
19779
19780         * modules/README: New file.
19781         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
19782         not a module.
19783
19784 2004-10-02  Jim Meyering  <jim@meyering.net>
19785
19786         * lib/dirfd.h, getpagesize.h: Add copyright notice.
19787
19788 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19789
19790         * modules/strsep: New file.
19791
19792 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19793
19794         * m4/strsep.m4: New file.
19795
19796 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19797
19798         * lib/strsep.h: New file.
19799         * lib/strsep.c: New file.
19800
19801 2004-10-01  Simon Josefsson  <jas@extundo.com>
19802
19803         * lib/snprintf.c (snprintf): Handle size==0.
19804
19805 2004-10-01  Simon Josefsson  <jas@extundo.com>
19806             Bruno Haible  <bruno@clisp.org>
19807
19808         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
19809         (snprintf): Declare 'args'.
19810
19811 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
19812
19813         * lib/snprintf.c: Remove comments as to why each header is needed.
19814
19815 2004-10-01  Bruno Haible  <bruno@clisp.org>
19816
19817         * MODULES.html.sh: Add strsep.
19818
19819 2004-09-30  Simon Josefsson  <jas@extundo.com>
19820
19821         * modules/snprintf: New file.
19822
19823 2004-09-30  Simon Josefsson  <jas@extundo.com>
19824
19825         * m4/snprintf.m4: New file.
19826
19827 2004-09-30  Simon Josefsson  <jas@extundo.com>
19828
19829         * lib/snprintf.h, lib/snprintf.c: New files.
19830
19831 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19832
19833         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
19834         (hol_entry_help): Never translate an empty string.
19835         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
19836         * lib/argp.h (OPTION_NO_TRANS): New option.
19837
19838 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19839
19840         * modules/argp (Maintainer): Replace Simon Josefsson
19841         by Sergey Poznyakoff.
19842
19843 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19844
19845         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
19846         changes merged back into glibc.
19847
19848 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19849
19850         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
19851
19852 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
19853
19854         * lib/xvasprintf.c: Include xalloc.h.
19855         (xvasprintf): Use xalloc_die, not xmalloc_die.
19856
19857 2004-09-29  Bruno Haible  <bruno@clisp.org>
19858
19859         * modules/alloca-opt: New file, derived from modules/alloca.
19860         * modules/allocsa: Depend on alloca-opt instead of alloca.
19861         * modules/setenv: Likewise.
19862         * modules/vasnprintf: Likewise.
19863         * MODULES.html.sh: Add alloca-opt.
19864
19865 2004-09-28  Simon Josefsson  <jas@extundo.com>
19866
19867         * gnulib-tool: New parameter --lgpl, to asseert that modules are
19868         LGPL, and to replace license template from GPL to LGPL.
19869
19870 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19871
19872         * modules/dummy: Change license to LGPL.
19873
19874 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19875
19876         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
19877
19878 2004-09-24  Simon Josefsson  <jas@extundo.com>
19879
19880         * modules/minmax (License): Change from GPL to LGPL.
19881
19882 2004-09-23  Simon Josefsson  <jas@extundo.com>
19883
19884         * gnulib-tool (--import): Typo.
19885
19886 2004-09-23  Simon Josefsson  <jas@extundo.com>
19887
19888         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
19889
19890 2004-09-22  Bruno Haible  <bruno@clisp.org>
19891
19892         * modules/*: Add 'License' field.
19893         * gnulib-tool: Accept --extract-license option.
19894         (func_get_license): New function.
19895
19896 2004-09-21  Bruno Haible  <bruno@clisp.org>
19897
19898         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
19899         Reported by Simon Josefsson.
19900
19901 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19902
19903         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
19904         gl_AC_TYPE_LONG_LONG.
19905
19906 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19907
19908         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
19909
19910 2004-09-18  Simon Josefsson  <jas@extundo.com>
19911         and  Paul Eggert  <eggert@cs.ucla.edu>
19912
19913         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
19914         calls with autoreconf.  Define GL_LIB.
19915
19916 2004-09-14  Karl Berry  <karl@gnu.org>
19917
19918         * config/srclist.txt: unsync setenv.c, sigh.
19919
19920 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19921
19922         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
19923         Problem reported by Bruno Haible in:
19924         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
19925
19926 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19927
19928         * config/srclist.txt: Comment out argp-pvh.c.
19929
19930 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
19931
19932         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
19933         in case some system header has #define'd it.  Problem reported by
19934         Soeren D. Schulze in
19935         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
19936
19937 2004-09-09  Karl Berry  <karl@gnu.org>
19938
19939         * regex.[ch]: delete from the root.  These were supposed to be
19940                 synced with emacs cvs, but this has not happened for about
19941                 a year, and anyway nothing else uses emacs regex.[ch].
19942                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
19943                 lib/regex[.ch] is untouched.
19944
19945 2004-09-09  Bruno Haible  <bruno@clisp.org>
19946
19947         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
19948
19949 2004-09-09  Bruno Haible  <bruno@clisp.org>
19950
19951         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
19952         modifications.
19953         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
19954
19955 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19956
19957         * modules/xvasprintf: New file.
19958         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
19959
19960 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19961
19962         * lib/xvasprintf.h: New file.
19963         * lib/xvasprintf.c: New file.
19964         * lib/xasprintf.c: New file.
19965
19966 2004-09-08  Bruno Haible  <bruno@clisp.org>
19967
19968         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
19969
19970 2004-09-08  Bruno Haible  <bruno@clisp.org>
19971
19972         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
19973         length is > INT_MAX.
19974         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
19975         more.
19976
19977 2004-09-08  Bruno Haible  <bruno@clisp.org>
19978
19979         * lib/stdint_.h: New file, taken from GNU clisp.
19980
19981 2004-09-08  Bruno Haible  <bruno@clisp.org>
19982             Oskar Liljeblad  <oskar@osk.mine.nu>
19983
19984         * modules/stdint: New file.
19985         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
19986
19987 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19988
19989         Import from coreutils.
19990         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
19991         strings on unbounded length.  alloca's performance benefits aren't
19992         that important here.
19993         (V_STRDUP): Remove.
19994         (parse_with_separator): New function, with most of the internals
19995         of the old parse_user_spec.  Allow user to omit both user and group,
19996         for compatibility with FreeBSD.
19997         Clone only the user name, not the entire spec.
19998         Do not set *uid, *gid unless entirely successful.
19999         Avoid memory leak in some failing cases.
20000         Fix regression for USER.GROUP reported by Dmitry V. Levin in
20001         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
20002         (parse_user_spec): Rewrite to use parse_with_separator.
20003
20004 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
20005
20006         * modules/userspec: Don't depend on alloca.
20007
20008 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
20009
20010         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
20011
20012 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
20013
20014         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
20015         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
20016         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
20017
20018 2004-08-16  Simon Josefsson  <jas@extundo.com>
20019
20020         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
20021         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
20022         Add --dry-run for --import.
20023         Let user provided command line parameters override configure.ac
20024         settings.
20025
20026 2004-08-12  Simon Josefsson  <jas@extundo.com>
20027
20028         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
20029         as discussed with Paul Eggert in threads rooted at
20030         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
20031         and
20032         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
20033         Before, the test was empty, and relied on ELIDE_CODE in source
20034         code.)
20035         (gl_PREREQ_GETOPT): New macro.
20036         (gl_GETOPT): Use them.
20037
20038 2004-08-12  Simon Josefsson  <jas@extundo.com>
20039
20040         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
20041         * lib/getopt_.h: Renamed from getopt.h.
20042
20043 2004-08-12  Simon Josefsson  <jas@extundo.com>
20044
20045         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
20046         Change default library name from libfoo to libgnu.
20047         Now, if you have a configure.ac that says:
20048                 gl_SOURCE_BASE(gl)
20049                 gl_M4_BASE(gl/m4)
20050                 gl_MODULES(error getopt etcetera)
20051                 gl_INIT
20052         you can import all you need by running:
20053                 ../gnulib/gnulib-tool --import
20054
20055         * modules/getopt (Files): Rename getopt.h to getopt_.h.
20056         (Makefile.am): Rewrite, use logic from argz.
20057         (Include): Use <getopt.h> instead of "getopt.h".
20058
20059 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20060
20061         * modules/argp (Files): Add m4/unlocked-io.m4.
20062         (Depends-on): Add extensions.
20063
20064 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20065
20066         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
20067         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
20068         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
20069         Check for program_invocation_name, program_invocation_short_name,
20070         flockfile, funlockfile, features.h, _getopt_long_only_r.
20071
20072 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20073
20074         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
20075         its complicated substitute.
20076         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
20077         and program_invocation_name.
20078         (__argp_basename) [!_LIBC]: Remove; the only use was
20079         replaced by its body.
20080         (__argp_short_program_name): Change condition from
20081         !defined __argp_short_program_name to
20082         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
20083         to match argp-namefrob.h.
20084         (__argp_failure): Don't assume strerror_r returns char *.
20085         * lib/argp-parse.c (N_): Define unconditionally.
20086         (argp_default_options): Fill out initializers with 0 to avoid
20087         gcc warnings.
20088
20089 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20090
20091         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
20092         getopt1.c.
20093
20094 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20095
20096         Merge from coreutils.
20097
20098         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
20099
20100         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
20101         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
20102
20103 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20104
20105         Merge from coreutils.
20106
20107         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
20108         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
20109         for Reliant Unix 5.43.
20110
20111         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
20112         (union fooround): Use uintmax_t, not long int.
20113         The rest is a merge from libc:
20114         [defined _LIBC]: Include <shlib-compat.h>.
20115         (_obstack) [defined _LIBC]: Remove after 2.3.4.
20116
20117         * lib/settime.c (settime): Recode to avoid warning with
20118         Sun Forte C 6U2.
20119
20120         * lib/strverscmp.c: Convert to UTF-8.
20121
20122 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20123
20124         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
20125         m4/uintmax_t.m4.
20126
20127 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
20128
20129         * modules/xalloc-die: New file.
20130         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
20131
20132         * modules/md5 (Files): Add m4/uint32_t.m4.
20133         * modules/sha1: Renamed from modules/sha.
20134         (Files):
20135         Rename lib/sha.h to lib/sha1.h.
20136         Rename lib/sha.c to lib/sha1.c.
20137         Rename m4/sha.m4 to m4/sha1.m4.
20138         (lib_SOURCES): Likewise.
20139         (configure.ac): Rename gl_SHA to gl_SHA1.
20140         (Include): sha.h -> sha1.h.
20141
20142 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
20143
20144         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
20145         * m4/sha1.m4: Renamed from sha.m4.
20146         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
20147
20148 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
20149
20150         * lib/obstack.h (obstack_empty_p):
20151         Don't assume that chunk->contents is suitably aligned.
20152         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
20153         Likewise. Problem reported by Benno in
20154         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
20155
20156         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
20157         readable.  This could be improved further but it'd take some work.
20158
20159 2004-08-08  Simon Josefsson  <jas@extundo.com>
20160
20161         * modules/xgethostname (Depends-on): Remove exit and error (not
20162         used).
20163
20164         * modules/getpass-gnu: Add getpass.h.
20165         (Depends-on): Add stdbool.
20166         * modules/getpass: Add getpass.h.
20167
20168 2004-08-08  Simon Josefsson  <jas@extundo.com>
20169
20170         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
20171         Check getpass declaration.
20172
20173 2004-08-08  Simon Josefsson  <jas@extundo.com>
20174
20175         * lib/xgethostname.c: Don't include error.h (not used).
20176
20177         * lib/getpass.h: Add.
20178         * lib/getpass.c: Include getpass.h first.
20179
20180 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
20181
20182         * lib/xalloc-die.c: New file.
20183         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
20184         All uses removed.
20185         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
20186         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
20187         xalloc-die.c.
20188         (_, N_, xalloc_die): Move to xalloc-die.c.
20189         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
20190         so that we needn't mess with xalloc_msg_memory_exhausted.
20191
20192         * lib/sha1.h: Renamed from sha.h.
20193         (SHA1_H): Renamed from _SHA_H.
20194         (sha1_ctx): Renamed from sha_ctx.
20195         (sha1_init_ctx): Renamed from sha_init_ctx.
20196         (sha1_process_block): Renamed from sha_process_block.
20197         (sha1_process_bytes): Renamed from sha_process_bytes.
20198         (sha1_finish_ctx): Renamed from sha_finish_ctx.
20199         (sha1_read_ctx): Renamed from sha_read_ctx.
20200         (sha1_stream): Renamed from sha_stream.
20201         (sha1_buffer): Renamed from sha_buffer.
20202         * lib/sha1.c: Likewise; renamed from sha.c.
20203         Do not include <sys/types.h>.
20204         Include <stddef.h> rather than <stdlib.h>.
20205
20206 2004-08-08  Bruno Haible  <bruno@clisp.org>
20207
20208         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
20209         FILESYSTEM_PREFIX_LEN.
20210         * lib/progreloc.c: Likewise.
20211         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
20212
20213 2004-08-06  Simon Josefsson  <jas@extundo.com>
20214
20215         * modules/progname (Depends-on): Don't depend on stdbool.
20216
20217 2004-08-06  Simon Josefsson  <jas@extundo.com>
20218
20219         * modules/getsubopt: New file.
20220         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20221         getsubopt.
20222
20223 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20224
20225         More merge from coreutils.
20226
20227         * m4/utimens.m4, m4/utimecmp.m4: New files.
20228         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
20229         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
20230         prereq.m4, sha.m4: Import changes from coreutils.
20231
20232 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20233
20234         More merge from coreutils.
20235         * modules/raise, modules/readtokens0, modules/utimens:
20236         * modules/utimecmp, module/xnanosleep: New files.
20237         * modules/strftime: Add lib/strftime.h.
20238         Change include from <time.h> to "strftime.h".
20239         * modules/yesno: Add lib/yesno.h.
20240         * modules/backupfile: Remove lib/addext.c.
20241         * modules/euidaccess: Add stat-macros.h.
20242         * modules/canonicalize, modules/euidaccess,
20243         modules/filemode, modules/lchown, modules/makepath,
20244         modules/rmdir, modules/stat: Likewise.
20245
20246 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20247
20248         Merge from tar.
20249         * lib/argp-help.c (make_hol, hol_append): Don't assume that
20250         SIZE_MAX is a valid preprocessor constant.
20251         (__argp_basename): Change from "#ifndef _LIBC"
20252         to "#ifndef __argp_short_program_name", so that
20253         we don't compile these functions for tar.
20254
20255         More merges from coreutils.
20256         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
20257         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
20258         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
20259         * lib/addext.c: Remove; no longer needed.
20260         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
20261         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
20262         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
20263         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
20264         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
20265         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
20266         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
20267         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
20268         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
20269         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20270         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
20271         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
20272         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
20273         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
20274         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
20275         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
20276         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
20277         Import changes from coreutils.
20278
20279 2004-08-05  Simon Josefsson  <jas@extundo.com>
20280
20281         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
20282
20283 2004-08-05  Simon Josefsson  <jas@extundo.com>
20284
20285         * m4/getsubopt.m4: New file.
20286
20287 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
20288
20289         Merge from coreutils.
20290
20291         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
20292         * m4/getcwd-path-max.m4: New files.
20293
20294         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
20295         FILESYSTEM_PREFIX_LEN ->
20296         FILE_SYSTEM_PREFIX_LEN.
20297         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
20298         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
20299         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
20300         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
20301
20302         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
20303         prerequisite modules now handle the DOS stuff.
20304         Don't check for unistd.h.
20305
20306 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
20307
20308         Merge from coreutils.
20309
20310         * lib/.gdb-history: Remove; this doesn't belong here.
20311
20312         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
20313         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
20314         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
20315         * lib/getcwd.c: New files.
20316
20317         * lib/dirname.h: Include <stdbool.h>.
20318         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
20319         for consistency with POSIX terminology.  All uses changed.
20320         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
20321         (strip_trailing_slashes): Use bool for booleans.
20322         * lib/stripslash.c (strip_trailing_slashes): Likewise.
20323
20324         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
20325         sometimes returns a positive errno value even when it succeeds.
20326         (print_errno_message) [!LIBC]: Fall back on strerror if
20327         __strerror_r fails.
20328
20329         * lib/path-concat.c (mempcpy): Don't define if a system header defines
20330         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
20331         (longest_relative_suffix): New function.
20332         (path_concat): Use it.  Assume first argument is not NULL.
20333         Port to DOS.  Omit redundant separators.
20334         Report an error instead of returning NULL.
20335         Use mempcpy instead of memcpy.
20336         (xpath_concat): Remove: not declared or used.
20337
20338         * lib/same.h: Include <stdbool.h>
20339         (same_name): Return bool, not int.
20340         * lib/same.c (same_name): Likewise.
20341         (errno): Don't declare; we assume C89 or better now.
20342
20343         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
20344         if not already defined.
20345
20346         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
20347         * lib/dup-safer.c (errno): Likewise.
20348
20349 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
20350
20351         Merge from coreutils.
20352         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
20353         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
20354         * modules/path-concat: Don't depend on strdup.
20355
20356 2004-08-03  Simon Josefsson  <jas@extundo.com>
20357
20358         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
20359         * lib/progname.h: Don't include stdbool.h.
20360
20361 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
20362
20363         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
20364         * MODULES.html.sh (func_all_modules): Remove fatal.
20365
20366 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
20367
20368         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
20369
20370 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
20371
20372         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
20373         working.
20374
20375 2004-08-02  Simon Josefsson  <jas@extundo.com>
20376
20377         * lib/getsubopt.h: New file, with comments from Bruno Haible.
20378         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
20379         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
20380
20381 2004-08-01  Simon Josefsson  <jas@extundo.com>
20382
20383         * lib/xgetdomainname.c: Include stdlib.h, for free().
20384
20385 2004-07-19  Bruno Haible  <bruno@clisp.org>
20386
20387         * MODULES.html.sh (func_all_modules): Add dummy.
20388
20389 2004-07-16  Simon Josefsson  <jas@extundo.com>
20390
20391         * modules/dummy: New file.
20392
20393 2004-07-16  Simon Josefsson  <jas@extundo.com>
20394
20395         * lib/dummy.c: New file.
20396
20397 2004-07-16  Bruno Haible  <bruno@clisp.org>
20398
20399         * lib/backupfile.h: Add extern "C" for C++.
20400         * lib/closeout.h: Likewise.
20401         * lib/copy-file.h: Likewise.
20402         * lib/findprog.h: Likewise.
20403         * lib/full-write.h: Likewise.
20404         * lib/pathname.h: Likewise.
20405         * lib/progname.h: Likewise.
20406         * lib/stpcpy.h: Likewise.
20407         * lib/stpncpy.h: Likewise.
20408         * lib/strcase.h: Likewise.
20409         * lib/strstr.h: Likewise.
20410         * lib/xalloc.h: Likewise.
20411
20412         * lib/mbswidth.h: Add extern "C" for C++.
20413         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
20414
20415 2004-07-13  Robert Millan  <robertmh@gnu.org>
20416
20417         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
20418
20419 2004-07-09  Simon Josefsson  <jas@extundo.com>
20420
20421         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
20422         failed without this.)
20423
20424 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
20425
20426         * modules/chown (Files): Add lib/fchown-stub.c, since
20427         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
20428
20429 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
20430
20431         * lib/fchown-stub.c: New file.
20432
20433 2004-06-24  Jim Meyering  <jim@meyering.net>
20434
20435         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
20436
20437 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20438
20439         * modules/argz: Omit "#include".
20440
20441         * MODULES.html.sh (func_all_modules): Add calloc, to match
20442         2004-06-01 addition of calloc module.
20443
20444 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20445
20446         * m4/argz.m4: New file, which is autoupdated from libtool.
20447
20448 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20449
20450         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
20451         libtool.
20452
20453 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20454
20455         * config/srclist-update: Don't insist on "USA." before the
20456         close-comment, as libtool omits the period and puts the */ on a
20457         separate line.
20458         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
20459         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
20460
20461 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
20462
20463         * modules/argz: New file.
20464         * MODULES.html.sh (func_all_modules): Add argz.
20465
20466 2004-06-12  Jim Meyering  <jim@meyering.net>
20467         and  Paul Eggert  <eggert@cs.ucla.edu>
20468
20469         * modules/hash (Files): Add lib/xalloc.h.
20470         * modules/pipe (Depends-on): Add wait-process.
20471         * modules/stat (Depends-on): Add xalloc.
20472         * modules/userspec (Files): Add lib/userspec.h.
20473         * modules/xstrto
20474
20475         Upgrade from gettext-0.13.
20476         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
20477         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
20478         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
20479
20480 2004-06-10  Jim Meyering  <jim@meyering.net>
20481
20482         * lib/calloc.c: New file.
20483
20484 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
20485
20486         * lib/getdate.y (yylex): Allow space between sign and number.
20487         Problem reported by Dan Jacobson.
20488
20489 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
20490
20491         Merge from coreutils CVS.
20492
20493         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
20494         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
20495         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
20496         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
20497         xstrtol.m4: Fix copyright date and/or serial number.
20498
20499         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
20500         See if we need an fchown replacement.
20501         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
20502         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
20503         and use the replacement function if we detect either defect.
20504
20505         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
20506         gl_UTIMECMP.
20507
20508 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
20509         and  Jim Meyering  <jim@meyering.net>
20510
20511         Merge from coreutils CVS.
20512
20513         * lib/stat-macros.h: New file, with contents from file-type.h
20514         and coreutils' system.h.
20515         * lib/file-type.c: Include "stat-macros.h".
20516         * lib/file-type.h (file_type): Move all macro definitions to new file,
20517         stat-macros.h.
20518
20519         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
20520         Wrap old code with this conditional.
20521         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
20522         function that does not dereference symlinks.
20523         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
20524
20525         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
20526         dependency problems.
20527         (xreadlink): Accept new arg SIZE, for efficiency.
20528         All decls and uses changed.
20529         * lib/xreadlink.h: Include <stddef.h>, for size_t.
20530
20531         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
20532         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
20533
20534         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
20535         sysexits.h.
20536
20537 2004-06-01  Jim Meyering  <jim@meyering.net>
20538
20539         * m4/calloc.m4: New file.
20540
20541 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
20542
20543         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
20544         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
20545         Also, fix a typo in a diagnostic.
20546
20547 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20548
20549         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
20550         or AC_FUNC_REALLOC.
20551
20552 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20553
20554         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
20555         macros to be defined.
20556         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
20557         the allocator returns NULL because the requested size is zero.
20558
20559 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20560
20561         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
20562         var.  Add comment explaining why libc still defines it.  This
20563         merges the following patch from glibc:
20564         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
20565
20566 2004-05-20  Andreas Schwab  <schwab@suse.de>
20567
20568         * m4/free.m4: Replace free if it not known to work, not the other
20569         way round.
20570
20571 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
20572
20573         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
20574         present in glibc since revision 1.1 of this file.
20575         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
20576         obstack_alignment_mask, obstack_alloc, obstack_base,
20577         obstack_blank, obstack_blank_fast, obstack_chunk_size,
20578         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
20579         obstack_grow0, obstack_init, obstack_int_grow,
20580         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
20581         obstack_next_free, obstack_object_size, obstack_ptr_grow,
20582         obstack_ptr_grow_fast, obstack_room): Remove declarations of
20583         nonexistent functions.
20584
20585 2004-05-18  Karl Berry  <karl@gnu.org>
20586
20587         * config/srclist.txt: break link for vasnprintf.c.
20588
20589 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20590
20591         Port obstack to the AS/400, where pointers are 16 bytes wide and
20592         you cannot cast an integer to a valid pointer.  This patch is
20593         currently waiting to be integrated into glibc; see
20594         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
20595
20596         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
20597         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
20598         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
20599         (struct obstack): temp member is now a union of a pointer and
20600         an integer, instead of an integer.  All integer uses changed.
20601         This does not affect the physical layout of struct obstack,
20602         except on hosts (like the AS/400) where the size or alignment of
20603         void * is greater than that of ptrdiff_t.
20604         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
20605         __STDC__)]: Store temporary in pointer member of union, not
20606         integer member.
20607         * lib/obstack.c: Include <stddef.h>, for offsetof.
20608         (struct fooalign): Remove; it doesn't need a name.
20609         (union fooround): Change double to long double, and add void *.
20610         (DEFAULT_ALIGNMENT): Use offsetof to compute.
20611         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
20612         not a macro.  Hence the values are always int; so remove all
20613         casts-to-int in uses.
20614
20615 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20616
20617         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
20618         we can get this patch merged into glibc.
20619
20620 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20621             Paul Eggert  <eggert@cs.ucla.edu>
20622
20623         * m4/argp: Depend on alloca.
20624
20625 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20626             Paul Eggert  <eggert@cs.ucla.edu>
20627
20628         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
20629         freecoding.
20630
20631 2004-05-17  Bruno Haible  <bruno@clisp.org>
20632
20633         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
20634         precision that consists of a '.' followed by an empty digit string.
20635         Patch by Tor Lillqvist <tml@iki.fi>.
20636
20637 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20638
20639         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
20640         for backward compatibility with older code.  We need our own
20641         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
20642         it under some other name, and our alloca.h will define it.
20643
20644 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20645             Derek Price  <derek@ximbiot.com>
20646
20647         * lib/alloca.c: Include <alloca.h>, to get our interface.
20648         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
20649         include <alloca.h> first.  Use C89 prototype for alloca; this
20650         requires including <stddef.h> for size_t.  Use extern "C" if C++.
20651         Use #elif for simplicity, since we can assume C89 now.
20652         Don't try to source the system alloca.h since it will not be found
20653         and to prevent recursively including its replacement.
20654         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
20655         * lib/regex.c: Likewise.
20656
20657 2004-05-16  Derek Price  <derek@ximbiot.com>
20658             Paul Eggert  <eggert@cs.ucla.edu>
20659
20660         getline cleanup.  This changes the getndelim2 API: both order of
20661         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
20662         no delimiter).
20663
20664         * lib/getline.c: Don't include stddef.h or stdio.h, since our
20665         interface does that.
20666         (getline): Always use getdelim, so that we don't have two
20667         copies of this code.
20668         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
20669         if available.
20670         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
20671         (GETNDELIM2_MAXIMUM): New macro.
20672         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
20673         instead of the old practice of delim2==0.  All callers changed.
20674         Return -1 on overflow, instead of returning junk.
20675         Do not set *linesize unless allocation succeeds.
20676         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
20677         that we include sys/types.h.
20678         * lib/getnline.h: Likewise.
20679         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
20680         (getndelim2): Reorder arguments.
20681         * lib/getnline.c (getnline, getndelim):
20682         Don't discard the NMAX argument.
20683         (getnline): Invoke getndelim, to avoid code duplication.
20684         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
20685         of (size_t) -1 by callers of the getnline family.
20686
20687 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20688
20689         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
20690         Check for gettimeofday.
20691         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
20692         Check for settimeofday, stime.
20693
20694 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20695
20696         * lib/nanosleep.c (suspended): Change its type from int to
20697         sig_atomic_t volatile.
20698         (first_call): Make it private to rpl_nanosleep, and have it
20699         be zero initially as that's a bit faster.
20700         (my_usleep): Round up fractional times instead of truncating them,
20701         as this is the usual meaning for 'sleep'.
20702
20703         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
20704         doesn't work.
20705         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
20706         (ENOSYS): Define if not defined.
20707         (settime): Fall back on stime if it exists and settimeofday fails.
20708         But don't bother with fallbacks if a method fails with errno == EPERM.
20709
20710 2004-05-11  Jim Meyering  <jim@meyering.net>
20711
20712         Prior to this change, the save_cwd caller required read access to the
20713         current directory on most systems (ones with the fchdir function).
20714
20715         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
20716         fails, try write-only, and finally, resort to using xgetcwd.
20717
20718 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20719
20720         * lib/obstack.c, obstack.h: Import changes from libc.
20721
20722 2004-04-28  Bruno Haible  <bruno@clisp.org>
20723
20724         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
20725         also implicitly appends .exe to executables.
20726         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
20727         accepts Windows pathnames.
20728         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20729         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20730         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20731         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20732         Reported by Derek Robert Price <derek@ximbiot.com>.
20733
20734 2004-04-21  Karl Berry  <karl@gnu.org>
20735
20736         * config/srclist.txt (localcharset.c): break sync.
20737
20738 2004-04-20  Paul Eggert  <eggert@twinsun.com>
20739
20740         * m4/host-os.m4: Add a copyright notice.
20741
20742 2004-04-20  Jim Meyering  <jim@meyering.net>
20743
20744         Change UTILS_ to gl_ in AC_DEFINE'd names.
20745         Change utils_- and jm_-prefixed variables, too.
20746         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
20747         UTILS_FUNC_MKDIR_TRAILING_SLASH.
20748         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
20749
20750         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
20751         Don't emit trailing blanks.
20752         Also rename jm_-prefixed variables to have gl_ prefix.
20753
20754         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
20755         Also rename jm_-prefixed variables to have gl_ prefix.
20756
20757         * m4/jm-macros.m4: Reflect the renamings.
20758         * m4/prereq.m4: Likewise.
20759
20760 2004-04-20  Jim Meyering  <jim@meyering.net>
20761
20762         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
20763         memory.
20764
20765 2004-04-20  Jim Meyering  <jim@meyering.net>
20766             Bruno Haible  <bruno@clisp.org>
20767
20768         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
20769         memory when realloc fails.
20770
20771 2004-04-19  Jim Meyering  <jim@meyering.net>
20772
20773         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
20774         now that readutmp.c may call `free (0)'.
20775
20776 2004-04-19  Bruno Haible  <bruno@clisp.org>
20777
20778         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
20779         * m4/inttypes_h.m4: Likewise.
20780         * m4/stdint_h.m4: Likewise.
20781         * m4/intmax_t.m4: Likewise.
20782         * m4/uintmax_t.m4: Likewise.
20783
20784 2004-04-18  Jim Meyering  <jim@meyering.net>
20785
20786         * m4/prereq.m4: Don't forbid jm_ prefix.
20787
20788         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
20789         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
20790         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
20791         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
20792         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
20793         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
20794         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
20795         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
20796         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
20797         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
20798         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
20799         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
20800         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
20801         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
20802         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
20803         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
20804         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
20805         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
20806         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
20807
20808 2004-04-18  Jim Meyering  <jim@meyering.net>
20809
20810         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
20811         failure, don't leak memory and do call END_UTMP_ENT.
20812
20813 2004-04-16  Jim Meyering  <jim@meyering.net>
20814
20815         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
20816         coreutils' stat program.
20817         (gl_PREREQ): Don't require jm_PREREQ_STAT.
20818
20819 2004-04-11  Paul Eggert  <eggert@twinsun.com>
20820
20821         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
20822         C89.
20823         (CHAR_BIT): Remove, since we assume C89.
20824         Include <stdint.h> if available, as per current Autoconf CVS advice.
20825
20826 2004-03-31  Jim Meyering  <jim@meyering.net>
20827
20828         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
20829         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
20830         * m4/xalloc.m4: Likewise.
20831
20832 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20833
20834         Merge from coreutils.
20835
20836         * m4/inttostr.m4: New file.
20837         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
20838         Require AM_STDBOOL_H and gl_TIMESPEC instead.
20839         Require gl_CLOCK_TIME.
20840         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
20841
20842 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20843
20844         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
20845         not bool, to be more consistent with Unix conventions.
20846         Suggested by Bruno Haible.
20847
20848         Merge from coreutils.
20849
20850         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
20851         * lib/umaxtostr.c: New files.
20852
20853         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
20854         the usual <time.h> dance.
20855         (get_date): Change signature to support fractional time stamps.
20856         All callers changed.
20857         * lib/getdate.y: Include "getdate.h" first, as we can now
20858         assume C89 and don't need to worry about 'const'.
20859         Similarly, include "unlocked-io.h" near start, not in middle.
20860         Include <limits.h>.
20861         (textint.value): Use long int rather than int.
20862         (textint.digits): Use size_t rather than int.
20863         (BILLION, LOG10_BILLION): New constants.
20864         (parser_control): New member rel_ns.  Members day_ordinal,
20865         time_zone, month, day, hour, minutes, rel_year, rel_month,
20866         rel_day, rel_hour, rel_minutes, rel_seconds
20867         are now long int, not int.  Member seconds is now struct timespec,
20868         not int.  New member timespec_seen.  Members dates_seen, days_seen,
20869         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
20870         not int.
20871         (%union.intval): Now long int, not int.
20872         New member timespec.
20873         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
20874         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
20875         (spec): Now is a timespec or an item list.
20876         (timespec, items): New nonterminals.
20877         (time, rel, relunit, number, get_date):
20878         Add support for fractional seconds.
20879         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
20880         (gmtime, localtime, mktime): Remove decls; not needed with C89.
20881         (to_hour): First arg is now long int, not int.
20882         (to_year): Returns long int, not int.
20883         Don't treat year -70 like 70.
20884         (tm_diff): Returns long int, not int.
20885         (lookup_word): Use bool instead of int when appropriate.
20886         (yylex): Use size_t for count, not int.
20887         Detect overflow when parsing large integer constants.
20888         Add support for fractions.
20889         (get_date): Make pointers 'const' if possible.
20890         Use more-portable code to detect integer overflow.
20891         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
20892         Don't use ctime; it's not reliable if the year has >4 digits.
20893
20894         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
20895         This is for compatibility with BSD.
20896
20897         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
20898         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
20899         From coreutils' system.h.
20900
20901         * lib/userspec.c: Don't include "posixver.h".
20902         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
20903         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
20904         compatible extension.  Simplify code by removing a boolean int
20905         that was always nonzero if a string was nonnull.
20906
20907 2004-03-30  Jim Meyering  <jim@meyering.net>
20908
20909         Merge from coreutils.
20910
20911         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
20912         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
20913         on some systems one must include <grp.h> before it.
20914         Reported by Christian Krackowizer.
20915
20916 2004-03-30  Jim Meyering  <jim@meyering.net>
20917
20918         Merge from coreutils.
20919
20920         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
20921
20922         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
20923         an empty input stream.
20924
20925         * lib/readtokens.c: Include <stdbool.h>.
20926         (readtoken): Use `size_t' rather than int/long.
20927         All callers adjusted.
20928         Use `bool' rather than `int' where appropriate.
20929         Use memset rather than an explicit loop.
20930         Use x2nrealloc rather than xrealloc.
20931         Allow the use of `\0' as a delimiter.
20932         (readtokens): Likewise.
20933         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
20934
20935 2004-03-30  Jim Meyering  <jim@meyering.net>
20936
20937         * m4/realloc.m4: Remove file, since now it does no more than
20938         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
20939         the `configure.ac' section of module/realloc.
20940         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
20941
20942 2004-03-30  Bruno Haible  <bruno@clisp.org>
20943
20944         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
20945         nonnull.
20946
20947 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20948
20949         Merge changes to getloadavg.c from coreutils and Emacs.
20950
20951         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
20952         Define to an expression, not to the empty string.
20953         Include cloexec.h and xalloc.h.
20954         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
20955         Use set_cloexec_flag rather than rolling our own.
20956         * lib/cloexec.c, lib/cloexec.h: New files.
20957
20958 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20959
20960         * m4/cloexec.m4: New file.
20961
20962 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20963
20964         * lib/getopt.h: Sync with libc CVS.
20965
20966 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20967             Bruno Haible  <bruno@clisp.org>
20968
20969         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
20970         mbswidth.
20971
20972 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20973             Bruno Haible  <bruno@clisp.org>
20974
20975         * lib/mbswidth.h: Include <wchar.h> only if
20976         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
20977         <wchar.h>.
20978         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
20979
20980 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20981
20982         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
20983         Sync with libc CVS.
20984         * lib/getopt_int.h: New file, also synced from libc.
20985
20986 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20987
20988         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
20989         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
20990         Bring back getopt.c, getopt.h, getopt1.c.
20991
20992 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20993
20994         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
20995         All uses changed.  Check for sa_sigaction member; this fixes
20996         a bug first reported by Jason Andrade in
20997         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20998
20999 2004-03-07  Paul Eggert  <eggert@twinsun.com>
21000
21001         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
21002         '#if' expressions.  Unlike the code it replaces, it does not
21003         depend on (defined _SC_PAGESIZE).  However, it does depend on
21004         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
21005         first reported by Jason Andrade in
21006         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
21007
21008 2004-02-25  Simon Josefsson  <jas@extundo.com>
21009
21010         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
21011
21012 2004-02-25  Simon Josefsson  <jas@extundo.com>
21013
21014         * lib/strdup.h: New file.
21015         * lib/strdup.c: Include it.
21016         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
21017         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
21018
21019 2004-02-23  Karl Berry  <karl@gnu.org>
21020
21021         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
21022         (from fencepost.gnu.org:/gd/gnuorg).
21023
21024 2004-02-23  Karl Berry  <karl@gnu.org>
21025
21026         * config/srclistvars.sh (GNUORG) [karl]: redefine.
21027         * config/srclist.txt: add maintain/standards documents.
21028
21029 2004-02-18  Bruno Haible  <bruno@clisp.org>
21030
21031         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
21032         Reported by Derek Robert Price <derek@ximbiot.com>.
21033
21034 2004-02-16  Karl Berry  <karl@gnu.org>
21035
21036         * config/mkinstalldirs, install-sh: update from automake.
21037
21038 2004-02-06  Karl Berry  <karl@gnu.org>
21039
21040         * m4/po.m4: update from gettext 0.14.1.
21041
21042 2004-02-06  Karl Berry  <karl@gnu.org>
21043
21044         * lib/config.charset: update from gettext 0.14.1.
21045
21046 2004-02-05  Paul Eggert  <eggert@twinsun.com>
21047
21048         Add comments and code, prompted by suggestions from Bruno Haible
21049         for sh-quote.
21050         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
21051         describing the enum quoting_style values.
21052         * lib/quotearg.c (quotearg_alloc): New function.
21053         (quotearg_buffer_restyled): Treat lone { and } as special.
21054         Treat = as special.  Work around bug with older shells
21055         that "see" a '\' that is really the 2nd byte of a multibyte char.
21056         Quote empty string with shell_quoting_style.
21057
21058 2004-02-03  Bruno Haible  <bruno@clisp.org>
21059
21060         * m4/pipe.m4: New file, from GNU gettext.
21061
21062 2004-02-03  Bruno Haible  <bruno@clisp.org>
21063
21064         * lib/pipe.h: New file, from GNU gettext.
21065         * lib/pipe.c: New file, from GNU gettext.
21066
21067 2004-01-27  Bruno Haible  <bruno@clisp.org>
21068
21069         * m4/execute.m4: New file, from GNU gettext.
21070
21071 2004-01-27  Bruno Haible  <bruno@clisp.org>
21072
21073         * lib/execute.h: New file, from GNU gettext.
21074         * lib/execute.c: New file, from GNU gettext.
21075         * lib/w32spawn.h: New file, from GNU gettext.
21076
21077 2004-01-24  Paul Eggert  <eggert@twinsun.com>
21078
21079         Merge from diffutils.
21080
21081         * lib/file-type.c (file_type): Add typed memory objects.
21082         * lib/file-type.h (S_TYPEISTMO): New macro.
21083
21084         * lib/c-stack.h (c_stack_action): Remove argv argument.
21085         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
21086         (die): Don't calculate message unless segv_action returns.
21087         (get_stack_location, min_address_from_argv, max_address_from_argv,
21088         volatile stack_base, volatile_stack_size): Remove.
21089         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
21090         that every segmentation violation is a stack overflow.  (Ouch!)
21091         See Debian bug 136249 (still outstanding) for more info about why
21092         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
21093
21094 2004-01-24  Paul Eggert  <eggert@twinsun.com>
21095
21096         Exit-status fix from coreutils.
21097
21098         Use exit_failure consistently in place of EXIT_FAILURE,
21099         so that program exit statuses are consistent on failure.
21100
21101         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
21102         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
21103         * lib/argmatch.h: Comment fix to match the above.
21104         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
21105         Now a macro referring to exit_failure, instead of a separate
21106         variable.  Include "exitfail.h" to get it.
21107         * lib/xstrtol.h: Include "exitfail.h".
21108         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
21109
21110         * lib/long-options.c (parse_long_options): Use prototype
21111         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
21112         for clarity.
21113
21114 2004-01-21  Jim Meyering  <jim@meyering.net>
21115
21116         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
21117         so as not to conflict with a different-sized __mktime_internal
21118         function in GNU libc.
21119         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
21120         Problem building statically-linked `ls' reported by Michael Brunnbauer.
21121
21122 2004-01-20  Karl Berry  <karl@gnu.org>
21123
21124         * config/config.guess: update from config.
21125
21126         * config/srclistvars.sh: GNUWWWLICENSES for karl.
21127
21128 2004-01-20  Bruno Haible  <bruno@clisp.org>
21129
21130         Safer stack allocation.
21131         * lib/setenv.c: Include allocsa.h.
21132         (alloca): Remove fallback definition.
21133         (freea): Remove macro.
21134         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
21135         instead of freea.
21136
21137 2004-01-20  Bruno Haible  <bruno@clisp.org>
21138
21139         * m4/eealloc.m4: New file, from GNU gettext.
21140
21141 2004-01-20  Bruno Haible  <bruno@clisp.org>
21142
21143         * m4/allocsa.m4: New file, from GNU gettext.
21144
21145 2004-01-20  Bruno Haible  <bruno@clisp.org>
21146
21147         * lib/xallocsa.h: New file, from GNU gettext.
21148         * lib/xallocsa.c: New file, from GNU gettext.
21149
21150 2004-01-20  Bruno Haible  <bruno@clisp.org>
21151
21152         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
21153
21154 2004-01-20  Bruno Haible  <bruno@clisp.org>
21155
21156         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
21157         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
21158         specially.
21159
21160 2004-01-20  Bruno Haible  <bruno@clisp.org>
21161
21162         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
21163         patch.
21164
21165 2004-01-20  Bruno Haible  <bruno@clisp.org>
21166
21167         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
21168
21169 2004-01-20  Bruno Haible  <bruno@clisp.org>
21170
21171         * lib/eealloc.h: New file.
21172
21173 2004-01-20  Bruno Haible  <bruno@clisp.org>
21174
21175         * lib/binary-io.h: Avoid warnings on Cygwin.
21176
21177 2004-01-20  Bruno Haible  <bruno@clisp.org>
21178
21179         * lib/allocsa.h: New file, from GNU gettext.
21180         * lib/allocsa.c: New file, from GNU gettext.
21181
21182 2004-01-18  Karl Berry  <karl@gnu.org>
21183
21184         * doc/gpl.texi, doc/lgpl.texi: new files.
21185
21186 2004-01-18  Karl Berry  <karl@gnu.org>
21187
21188         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
21189         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
21190
21191 2004-01-15  Paul Eggert  <eggert@twinsun.com>
21192
21193         Merge from coreutils.
21194
21195         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
21196         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
21197         (gl_DEFAULT_POSIX2_VERSION): Move
21198         the documentation from 'configure' into 'config.hin',
21199         so that 'configure --help' isn't burdened by it and
21200         we don't have to worry about its formatting there.
21201         Reword the documentation so that it's more succinct
21202         and can be run together into a single paragraph.
21203         * m4/same.m4 (gl_SAME): Check for pathconf.
21204
21205 2004-01-15  Paul Eggert  <eggert@twinsun.com>
21206
21207         Merge from coreutils.
21208
21209         * lib/posixver.c: Include posixver.h.
21210
21211         * lib/same.c: Include <stdbool.h>, <limits.h>.
21212         (_POSIX_NAME_MAX): Define if not defined.
21213         (MIN): New macro.
21214         (same_name): If file names are silently truncated, report
21215         that the file names are the same if they are the same after
21216         the silent truncation.
21217
21218         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
21219         conversion function.
21220         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
21221         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
21222         longer needed.
21223
21224 2004-01-15  Jim Meyering  <jim@meyering.net>
21225
21226         Merge from coreutils.
21227
21228         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
21229         if no library is required.
21230         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
21231         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
21232         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
21233         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
21234         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
21235         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
21236         value, $ac_cv_search_crypt, if it's "none required".
21237         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
21238         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
21239         not gl_FUNC_GETLOADAVG.
21240         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
21241         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
21242
21243 2004-01-15  Jim Meyering  <jim@meyering.net>
21244
21245         Merge from coreutils.
21246
21247         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
21248         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
21249         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
21250
21251         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
21252         optional configure-time default.
21253
21254         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21255
21256         * lib/xreadlink.c (xreadlink): Correct outdated comment.
21257
21258 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
21259
21260         Merge from coreutils.
21261
21262         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
21263         value, $ac_cv_search_nanosleep, if it's "none required".
21264
21265 2004-01-14  Paul Eggert  <eggert@twinsun.com>
21266
21267         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
21268         with like-named macro in fnmatch.c.
21269         (EXT): Use an internal constant instead.
21270
21271         Merge fnmatch patches from glibc.
21272         * lib/fnmatch.c (mbsinit): Remove define.
21273         Add libc_hidden_ver (__fnmatch, fnmatch).
21274         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
21275         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
21276
21277 2004-01-14  Karl Berry  <karl@gnu.org>
21278
21279         * config/install-sh: update from automake.
21280
21281 2004-01-13  Karl Berry  <karl@gnu.org>
21282
21283         * config/install-sh: update from automake.
21284
21285 2004-01-09  Karl Berry  <karl@gnu.org>
21286
21287         * config/install-sh: update from automake.
21288
21289 2004-01-05  Karl Berry  <karl@gnu.org>
21290
21291         * config/config.{sub,guess}: update from config.
21292
21293 2003-12-31  Karl Berry  <karl@gnu.org>
21294
21295         * config/depcomp: update from automake.
21296
21297 2003-12-14  Karl Berry  <karl@gnu.org>
21298
21299         * lib/config.charset: update from gettext-runtime.
21300
21301 2003-12-03  Paul Eggert  <eggert@twinsun.com>
21302
21303         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
21304         Bug reported by Alfred M. Szmidt.
21305
21306 2003-12-03  Bruno Haible  <bruno@clisp.org>
21307
21308         * m4/gettext.m4: Upgrade from gettext-0.13.
21309         * m4/po.m4: Upgrade from gettext-0.13.
21310         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
21311         * m4/intmax.m4: New file, from gettext-0.13.
21312         * m4/printf-posix.m4: New file, from gettext-0.13.
21313
21314 2003-11-29  Karl Berry  <karl@gnu.org>
21315
21316         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
21317
21318 2003-11-25  Paul Eggert  <eggert@twinsun.com>
21319             Bruno Haible  <bruno@clisp.org>
21320
21321         * lib/printf-parse.h: Don't include sys/types.h.
21322         (ARG_NONE): New macro.
21323         (char_directive): Change type of *arg_index fields to size_t.
21324         * lib/printf-parse.c: Don't include sys/types.h.
21325         (SSIZE_MAX): Remove macro.
21326         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
21327         Remove unnecessary overflow check.
21328         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
21329         fields.
21330
21331 2003-11-25  Bruno Haible  <bruno@clisp.org>
21332
21333         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
21334
21335 2003-11-25  Bruno Haible  <bruno@clisp.org>
21336
21337         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
21338         gt_TYPE_SSIZE_T.
21339
21340 2003-11-24  Paul Eggert  <eggert@twinsun.com>
21341
21342         * modules/alloca: Remove dependency on xalloc.
21343
21344 2003-11-24  Paul Eggert  <eggert@twinsun.com>
21345
21346         * lib/alloca.c: Remove dependency on xalloc module.
21347         (xalloc_die): Remove.
21348         (memory_full) [!defined emacs]: New macro.
21349         [!defined emacs]: Don't include xalloc.h.
21350         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
21351         address arithmetic overflows.  Change datatypes a bit to avoid
21352         unnecessary casts.
21353
21354 2003-11-22  Jim Meyering  <jim@meyering.net>
21355
21356         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
21357         s/size/size_t/.
21358
21359 2003-11-21  Karl Berry  <karl@gnu.org>
21360
21361         * config/config.{sub,guess}: update from config.
21362
21363 2003-11-18  Karl Berry  <karl@gnu.org>
21364
21365         * config/config.{sub,guess}: update from config.
21366
21367         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
21368
21369 2003-11-17  Paul Eggert  <eggert@twinsun.com>
21370
21371         * README: Mention that S+T cannot overflow if S is the size of
21372         an existing object and T is sufficiently small.
21373
21374 2003-11-17  Jim Meyering  <jim@meyering.net>
21375
21376         On systems without utime and without a utimes function capable of
21377         dealing with a NULL struct utimbuf* argument, this utime replacement
21378         could -- in unusual circumstances -- leak a file descriptor.
21379         * lib/utime.c: Include <unistd.h> and <errno.h>.
21380         (utime_null): Be sure to close `fd' and to preserve errno.
21381         Reported by Geoff Collyer via Arnold Robbins.
21382
21383 2003-11-17  Bruno Haible  <bruno@clisp.org>
21384
21385         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
21386         (Depends-on): Add xsize.
21387
21388 2003-11-17  Bruno Haible  <bruno@clisp.org>
21389
21390         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
21391
21392 2003-11-17  Bruno Haible  <bruno@clisp.org>
21393
21394         * lib/vasnprintf.c (alloca): Remove fallback definition.
21395         (freea): Remove definition.
21396         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
21397         Reported by Paul Eggert.
21398
21399 2003-11-16  Paul Eggert  <eggert@twinsun.com>
21400             Bruno Haible  <bruno@clisp.org>
21401
21402         Protect against address arithmetic overflow.
21403         * lib/printf-args.h: Include stddef.h.
21404         (arguments): Change type of field 'count' to size_t.
21405         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
21406         'unsigned int' where appropriate.
21407         * lib/printf-parse.h: Include sys/types.h.
21408         (char_directive): Change type of *arg_index fields to ssize_t.
21409         (char_directives): Change type of fields 'count', max_*_length to
21410         size_t.
21411         * lib/printf-parse.c: Include sys/types.h and xsize.h.
21412         (SSIZE_MAX): Define fallback value.
21413         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
21414         instead of 'int' where appropriate. Check a_allocated, d_allocated
21415         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
21416         * lib/vasnprintf.c: Include xsize.h.
21417         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
21418         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
21419         overflow. Avoid wraparound when converting a width or precision from
21420         decimal to binary.
21421
21422 2003-11-16  Bruno Haible  <bruno@clisp.org>
21423
21424         Update from GNU gettext.
21425         * lib/printf-parse.c: Generalize to it can be compiled for wide
21426         strings.
21427         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
21428         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
21429         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
21430         SNPRINTF): New macros.
21431         Don't include <alloca.h> if the file is used inside libintl.
21432         (local_wcslen): New function, for Solaris 2.5.1.
21433         (VASNPRINTF): Use it instead of wcslen.
21434
21435 2003-11-16  Bruno Haible  <bruno@clisp.org>
21436
21437         * lib/xsize.h (xmax): New function.
21438         (xsum, xsum3, xsum4): Declare as "pure" functions.
21439
21440 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21441
21442         * modules/xalloc (Files): Undo latest change, since xalloc.h
21443         no longer needs SIZE_MAX or PTRDIFF_MAX.
21444
21445 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21446
21447         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
21448         gl_PTRDIFF_MAX.
21449
21450 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21451
21452         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
21453         "return", to pacify some unknown compiler.  Problem reported
21454         by Joerg Schilling.
21455
21456 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21457
21458         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
21459         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
21460         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
21461         heuristic is just as accurate as far as we know, and it removes a
21462         dependency on size_max.m4 and ptrdiff_max.m4.
21463
21464 2003-11-11  Bruno Haible  <bruno@clisp.org>
21465
21466         * modules/xsize (Files): Add m4/size_max.m4.
21467         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
21468
21469 2003-11-11  Bruno Haible  <bruno@clisp.org>
21470
21471         * m4/size_max.m4: New file.
21472         * m4/ptrdiff_max.m4: New file.
21473         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
21474         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
21475         (gl_XALLOC): Invoke it.
21476
21477 2003-11-11  Bruno Haible  <bruno@clisp.org>
21478
21479         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
21480         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
21481         defined.
21482
21483 2003-11-10  Paul Eggert  <eggert@twinsun.com>
21484
21485         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
21486         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
21487         rejected some allocations of exactly SIZE_MAX - 2 bytes.
21488         From Bruno Haible.
21489         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
21490         not (size_t) -1, since it's defined here.
21491
21492 2003-11-09  Karl Berry  <karl@gnu.org>
21493
21494         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
21495
21496 2003-11-06  Paul Eggert  <eggert@twinsun.com>
21497
21498         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
21499         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
21500         Reject sizes of exactly SIZE_MAX bytes.
21501         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
21502         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
21503
21504 2003-11-05  Bruno Haible  <bruno@clisp.org>
21505
21506         * lib/xsize.h: Include limits.h, to avoid a possible collision with
21507         SIZE_MAX defined in <limits.h> on Solaris.
21508
21509 2003-11-04  Jim Meyering  <jim@meyering.net>
21510
21511         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
21512         variable names, rather than @VAR@.
21513         * modules/poll: Likewise.
21514
21515 2003-11-04  Bruno Haible  <bruno@clisp.org>
21516
21517         * modules/xsize: New file.
21518         * modules/linebreak: Depend on xsize.
21519         * MODULES.html.sh (func_all_modules): Add xsize.
21520
21521 2003-11-04  Bruno Haible  <bruno@clisp.org>
21522
21523         * m4/xsize.m4: New file.
21524
21525 2003-11-04  Bruno Haible  <bruno@clisp.org>
21526
21527         * lib/xsize.h: New file.
21528         * lib/linebreak.c: Include xsize.h.
21529         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
21530         argument for overflow.
21531         Suggested by Paul Eggert.
21532
21533 2003-11-03  Karl Berry  <karl@gnu.org>
21534
21535         * config/config.{guess,sub}: update from config.
21536
21537 2003-11-03  Jim Meyering  <jim@meyering.net>
21538
21539         * modules/userspec (lib_SOURCES): Add userspec.h.
21540         (Include): Add "userspec.h".
21541         Improve description.
21542
21543 2003-11-03  Jim Meyering  <jim@meyering.net>
21544
21545         * lib/userspec.c: Include "userspec.h".
21546         * lib/userspec.h: New file.
21547
21548 2003-11-03  Bruno Haible  <bruno@clisp.org>
21549
21550         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
21551
21552 2003-11-03  Bruno Haible  <bruno@clisp.org>
21553
21554         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
21555         available, to avoid (extremely rare) race condition.
21556         Suggested by Paul Eggert.
21557
21558 2003-11-02  Karl Berry  <karl@gnu.org>
21559
21560         * config/srclist.txt (vasprintf.c): sync broken, sigh.
21561
21562 2003-10-31  Paul Eggert  <eggert@twinsun.com>
21563
21564         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
21565         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
21566         (read_filesystem_list): Set and use me_type_malloced.
21567         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
21568         whatever the type happens to be), for brevity and consistency.
21569         Check for size calculation overflow on Alphas running OSF/1.
21570
21571 2003-10-31  Jim Meyering  <jim@meyering.net>
21572
21573         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
21574
21575         * lib/linebuffer.c: Include <string.h> for declaration of memset.
21576
21577 2003-10-30  Paul Eggert  <eggert@twinsun.com>
21578             Bruno Haible  <bruno@clisp.org>
21579
21580         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
21581         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
21582
21583 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
21584
21585         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
21586         netbsd*-gnu*.  Suggested by Robert Millan.
21587
21588 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21589
21590         * modules/group-member: Depend on stdbool.
21591
21592 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21593
21594         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
21595
21596 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21597
21598         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
21599         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
21600         after the 'gnu' in these cases.  This fixes some bugs in the
21601         previous change, and is based on suggestions by Robert Millan.
21602
21603 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21604
21605         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
21606         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
21607         no longer needed.
21608         * lib/quotearg.c (quotearg_n_options): Use it.
21609         * lib/group-member.c: Include <stdbool.h>.
21610         (free_group_info): Arg is now const *; don't free arg.
21611         (get_group_info): Now returns bool and accepts struct group_info *,
21612         rather than returning a malloc'ed struct group_info *.
21613         All uses changed.  Check for overflow in internal size calculation.
21614
21615         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
21616         rather than xmalloc/xrealloc.
21617         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
21618         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
21619         conformance bug: the old code used a pointer after freeing the
21620         storage that it addressed.
21621         * lib/hash.c (hash_initialize): Simplify the code by using
21622         xalloc_oversized rather than doing it by hand.
21623         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
21624         the buffer preserved.  Use free and xmalloc instead.
21625         * lib/quotearg.c (quotearg_n_options): Likewise.
21626         Use a simpler test for size overflow.  Don't use xalloc_oversized
21627         because unsigned int might be wider than size_t (!); this suggests
21628         that we should switch from unsigned int to size_t for slot numbers.
21629
21630 2003-10-28  Paul Eggert  <eggert@twinsun.com>
21631
21632         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
21633         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
21634         NetBSD kernels.  Requested by Richard Stallman.
21635
21636 2003-10-27  Paul Eggert  <eggert@twinsun.com>
21637
21638         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
21639         to allocate the returned structure.  Do not allocate a subarray,
21640         as x2nrealloc will do that.
21641         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
21642         instead of xnrealloc.
21643         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
21644
21645 2003-10-27  Bruno Haible  <bruno@clisp.org>
21646
21647         * lib/stdbool_.h: Better support for BeOS.
21648
21649 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21650
21651         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
21652         now uses inline.
21653
21654 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21655
21656         * lib/xalloc.h (xalloc_oversized): New static inline function, for
21657         callers that want to do their own size-overflow checking.  Include
21658         <stdbool.h>, since xalloc_oversized returns bool.
21659         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
21660         to use xalloc_oversized.
21661
21662         Add two functions x2realloc, x2nrealloc, for programs that grow
21663         arrays dynamically by doubling their sizes.
21664         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
21665         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
21666         New functions.
21667
21668         Port to C99 semantics for 'inline' of external functions.
21669         Bug reported by Bruno Haible.
21670         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
21671         with the old contents of xnmalloc.
21672         (xnmalloc, xmalloc): Use it.
21673         (xnrealloc_inline): New static inline function,
21674         with the old contents of xnrealloc.
21675         (xnrealloc, xrealloc): Use it.
21676
21677         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
21678         that.
21679
21680 2003-10-26  Karl Berry  <karl@gnu.org>
21681
21682         * config/srclist.txt (COPYING.DOC): no longer available from
21683         /gd/gnuorg; don't know where the ultimate source is.
21684
21685 2003-10-25  Paul Eggert  <eggert@twinsun.com>
21686
21687         Fix several address-calculation bugs in the hash modules,
21688         plus some minor code cleanup.
21689
21690         * lib/hash.h: Include <stdbool.h>, for bool.
21691         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
21692         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
21693         hash_get_n_entries, hash_get_max_bucket_length,
21694         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
21695         hash_rehash): Use size_t rather than unsigned.
21696         * lib/hash.c (struct hash_table, hash_get_n_buckets,
21697         hash_get_n_buckets_used, hash_get_n_entries,
21698         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
21699         hash_get_entries, hash_do_for_each, hash_string, is_prime,
21700         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
21701         Likewise.
21702         (SIZE_MAX): Define if not defined.
21703         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
21704         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
21705         hash_print):
21706         Use const * when possible.
21707         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
21708         (check_tuning): Fix bug: if tuning parameters were very close to
21709         0 or 1, rounding errors could have caused subscript violations.
21710         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
21711         (hash_initialize): Add 'fail:' label
21712         to free table and return NULL, and use it to simplify code.
21713         Use calloc rather than clearing the storage ourself.
21714         (hash_initialize, hash_rehash): Check for arithmetic overflow in
21715         buffer size calculations.
21716         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
21717         Include <stddef.h>, for size_t.
21718         * lib/hash-pjw.c (hash_pjw): Likewise.
21719         Switch to method described by Bruno Haible.
21720         Include <limits.h>, for CHAR_BIT.
21721         (SIZE_BITS): New macro.
21722
21723 2003-10-23  Paul Eggert  <eggert@twinsun.com>
21724
21725         * m4/getline.m4 (AM_FUNC_GETLINE):
21726         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
21727         hosts.  Problem reported by Derek Robert Price in
21728         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
21729         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
21730         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
21731
21732 2003-10-21  Paul Eggert  <eggert@twinsun.com>
21733
21734         * lib/getndelim2.c (getndelim2): When size calculation overflows,
21735         ceiling the allocation at NMAX bytes rather than silently
21736         discarding input bytes before NMAX is reached.  This makes
21737         a difference only if NMAX exceeds SIZE_MAX / 2.
21738
21739         * lib/obstack.c: Merge from glibc.
21740         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
21741         Add libc_hidden_def (_obstack_newchunk).
21742         (_obstack_free) [! defined _LIBC]: Remove.
21743         [defined _LIBC]: Make a strong alias from obstack_free, rather than
21744         a clone of the function body.
21745         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
21746         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
21747
21748         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
21749         glibc.
21750         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
21751         arg to memcpy.
21752
21753         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
21754         (obstack_ptr_grow_fast, obstack_int_grow_fast):
21755         Don't use lvalue casts, as GCC plans to remove support for them
21756         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
21757         was also present in the non-GCC version, indicating that this
21758         code had always been buggy and had never been widely used.
21759         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
21760         Use the fast variant of each macro, rather than copying the
21761         definiens of the fast variant; that way, we'll be more likely to
21762         catch future bugs in the fast variants.
21763
21764 2003-10-20  Bruno Haible  <bruno@clisp.org>
21765
21766         * modules/wait-process: New file.
21767         * MODULES.html.sh (func_all_modules): Add wait-process.
21768
21769 2003-10-20  Bruno Haible  <bruno@clisp.org>
21770
21771         * m4/wait-process.m4: New file.
21772
21773 2003-10-20  Bruno Haible  <bruno@clisp.org>
21774
21775         * lib/wait-process.h: New file, from GNU gettext.
21776         * lib/wait-process.c: New file, from GNU gettext.
21777
21778 2003-10-19  Jim Meyering  <jim@meyering.net>
21779
21780         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
21781         HPUX 10.20.
21782
21783 2003-10-18  Karl Berry  <karl@gnu.org>
21784
21785         * config/config.guess: update from config.
21786
21787 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21788
21789         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
21790         (getgroups): First arg is int, not size_t.
21791         Don't let 'free' mangle errno.
21792
21793 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21794
21795         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
21796
21797 2003-10-16  Karl Berry  <karl@gnu.org>
21798
21799         * config/config.{guess,sub}: update from config.
21800
21801 2003-10-16  Jim Meyering  <jim@meyering.net>
21802
21803         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
21804         memcpy.
21805
21806 2003-10-15  Paul Eggert  <eggert@twinsun.com>
21807
21808         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
21809         (SIZE_MAX): Remove.
21810         (new_exclude, add_exclude_file): Initial size no longer needs to
21811         be a power of 2.
21812         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
21813         our own address arithmetic overflow checking.
21814
21815         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
21816         (fnmatch): Do not alloca more than 2000 wide characters;
21817         instead, use malloc for large buffers.
21818         Check for address arithmetic overflow, and return -1
21819         with errno set to ENOMEM in that case.
21820         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
21821         (NEW_PATTERN): Do not alloca more than 8000 bytes;
21822         instead, return -1.  Check for address arithmetic overflow.
21823
21824 2003-10-14  Paul Eggert  <eggert@twinsun.com>
21825
21826         Handle invalid suffixes and overflow independently, so that
21827         callers can treat them independently as needed.  Fix some bugs in
21828         suffix handling, e.g., "100k@" was not diagnosed as an invalid
21829         suffix for a human-readable blocksize.  The major caller-visible
21830         change is the addition of a new
21831         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
21832         that both overflow and suffix chars were found.
21833
21834         * lib/human.c (humblock): Don't check separately for invalid suffix
21835         char; that is xstrtoumax's job (now that its bug is fixed).
21836         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
21837         INTMAX_MAX]: New macros.
21838         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
21839         TYPE_MAXIMUM): New macros.
21840         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
21841         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
21842         if overflow occurs, as it's what __strtol does and it's more useful
21843         in practice.
21844         (__xstrtol): If __strtol reports some error other than ERANGE,
21845         reflect it to the caller as LONGINT_INVALID.  If it reports
21846         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
21847         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
21848         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
21849         value.
21850         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
21851         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
21852         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
21853         [defined UINTMAX_MAX]: New macros.
21854
21855 2003-10-14  Bruno Haible  <bruno@clisp.org>
21856
21857         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
21858
21859 2003-10-14  Bruno Haible  <bruno@clisp.org>
21860
21861         * m4/sig_atomic_t: New file, from GNU gettext.
21862         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
21863
21864 2003-10-14  Bruno Haible  <bruno@clisp.org>
21865
21866         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
21867         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
21868         Also use volatile where needed.
21869
21870 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21871
21872         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
21873         Change maintainer from Bruno Haible to 'all'.
21874
21875 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21876
21877         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
21878
21879 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21880
21881         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
21882         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
21883         and define in terms of the other primitives.
21884         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
21885         (SIZE_MAX): Define if not already defined.
21886         (array_size_overflow): New function.
21887         (xalloc_die): Abort instead of exiting if 'error' returns.
21888         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
21889         (xmalloc, xrealloc): Use them.
21890         (xcalloc): Check for address arithmetic overflow.
21891         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
21892         a bit faster than strcpy.
21893
21894 2003-10-10  Simon Josefsson  <jas@extundo.com>
21895
21896         * modules/argp (Depends-on): Add restrict and strcase.
21897
21898 2003-10-10  Simon Josefsson  <jas@extundo.com>
21899
21900         * m4/argp.m4: Add AC_C_INLINE.
21901
21902 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21903
21904         Merge getpass from libc, plus a few fixes.
21905
21906         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
21907         Include <stdbool.h>.
21908         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
21909         __fsetlocking to empty.
21910         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
21911         do include <bits/libc-lock.h>.
21912         Do not include <fcntl.h>; not needed.
21913         [_LIBC]: Include <wchar.h>.
21914         (NOTCANCEL_MODE): New macro.
21915         (flockfile, funlockfile) [_LIBC]: New macros.
21916         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
21917         [!_LIBC]: New macros.
21918         (call_fclose): New function.
21919         (getpass): Use it.  Save tty stream separately; this simplifies the
21920         code and makes it more reliable if stdin happens to equal stdout.
21921         Invoke __fsetlocking on tty.
21922         Handle thread cancellation if needed.
21923         Namespace cleanup (use __tcgetattr, __getline).
21924         Use bool for Booleans.
21925         [USE_IN_LIBIO]: Handle wide streams.
21926         [!_LIBC]: Unconditionally do the fseek, since we don't know what
21927         stream might go where.
21928
21929         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
21930         doesn't have to include <stdio.h> before us.
21931         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
21932         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
21933         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
21934         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
21935         if not declared, so that we can use getpass.c code from libc without
21936         rewriting it.
21937         (flockfile, ftrylockfile, funlockfile): New macros.
21938
21939 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21940
21941         * modules/getpass: Depend on stdbool.
21942
21943 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21944
21945         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
21946
21947 2003-10-07  Karl Berry  <karl@gnu.org>
21948
21949         * config/config.{guess,sub}: update from config.
21950
21951 2003-10-06  Jim Meyering  <jim@meyering.net>
21952             Bruno Haible  <bruno@clisp.org>
21953
21954         This lets translators provide better translations for the
21955         "Written by ..." part of --version output.
21956         * lib/version-etc.h: Include stdarg.h.
21957         (version_etc_copyright): Declare as readonly.
21958         (version_etc): Make this function variadic with a NULL-terminated list
21959         of author name strings.
21960         (version_etc_va): New declaration.
21961         * lib/version-etc.c: Include stdarg.h, stdlib.h.
21962         (version_etc_copyright): Declare as readonly.
21963         (version_etc_va): New function. Provide a different translatable string
21964         for each possible number of authors < 10. Abbreviate when there are 10
21965         authors or more.
21966         (version_etc): Make this function variadic. Call version_etc_va.
21967         Suggestion from Gary V. Vaughan.
21968
21969         * lib/long-options.h (parse_long_options): Change prototype: the
21970         authors string is moved to the end and becomes variadic.
21971         * lib/long-options.c: Include stdarg.h.
21972         (parse_long_options): Make this function variadic, too.
21973         Call version_etc_va, not version_etc.
21974
21975 2003-10-06  Bruno Haible  <bruno@clisp.org>
21976
21977         * modules/version-etc-2: Remove file.
21978         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
21979
21980 2003-10-06  Bruno Haible  <bruno@clisp.org>
21981
21982         * modules/fatal-signal: New file.
21983         * MODULES.html.sh (func_all_modules): Add fatal-signal.
21984
21985 2003-10-06  Bruno Haible  <bruno@clisp.org>
21986
21987         * m4/fatal-signal.m4: New file.
21988         * m4/signalblocking.m4: New file, from GNU gettext.
21989
21990 2003-10-06  Bruno Haible  <bruno@clisp.org>
21991
21992         * lib/version-etc-2.h: Remove file.
21993         * lib/version-etc-2.c: Remove file.
21994
21995 2003-10-06  Bruno Haible  <bruno@clisp.org>
21996
21997         * lib/fatal-signal.h: New file, from GNU gettext.
21998         * lib/fatal-signal.c: New file, from GNU gettext.
21999
22000 2003-10-05  Paul Eggert  <eggert@twinsun.com>
22001
22002         * README: Rework advice for preventing empty .o files.
22003         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
22004         not <sys/types.h>.
22005
22006 2003-10-04  Karl Berry  <karl@gnu.org>
22007
22008         * lib/argp*: update from libc.
22009
22010 2003-10-04  Karl Berry  <karl@gnu.org>
22011
22012         * config/config.{guess,sub}: update from config.
22013
22014 2003-10-02  Bruno Haible  <bruno@clisp.org>
22015
22016         * modules/lchown (Include): Add lchown.h.
22017         * modules/time_r (Include): Use "..." syntax.
22018         * modules/xgetdomainname (Include): Add xgetdomainname.h.
22019
22020 2003-10-01  Simon Josefsson  <jas@extundo.com>
22021
22022         * MODULES.html.sh (func_all_modules): Move gethostname from section
22023         'based on' to section 'lacking' POSIX:2001.
22024
22025 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
22026
22027         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
22028         to output mode on the same stream.
22029
22030 2003-09-29  Paul Eggert  <eggert@twinsun.com>
22031
22032         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
22033         Fix arg typo in previous patch.
22034
22035 2003-09-28  Jim Meyering  <jim@meyering.net>
22036
22037         * lib/error.c: Correct cpp indentation.
22038
22039 2003-09-27  Paul Eggert  <eggert@twinsun.com>
22040
22041         * modules/free: New file.
22042
22043 2003-09-27  Paul Eggert  <eggert@twinsun.com>
22044
22045         * m4/free.m4: New file.
22046
22047 2003-09-27  Paul Eggert  <eggert@twinsun.com>
22048
22049         * lib/minmax.h (MIN, MAX)
22050         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
22051         Omit the special code that used __typeof__, since we worry that
22052         it could be more trouble than it's worth.  See:
22053         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
22054         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
22055
22056         * lib/free.c: New file.
22057
22058 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
22059
22060         Trivial fixes to Makefile.am parts of module listings.
22061         * modules/strstr: Append strstr.h to lib_SOURCES.
22062         * modules/strcase: Likewise, for strcase.h.
22063
22064 2003-09-27  Karl Berry  <karl@gnu.org>
22065
22066         * config/mkinstalldirs: update from automake.
22067
22068 2003-09-26  Paul Eggert  <eggert@twinsun.com>
22069
22070         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
22071         (error_tail): Do not loop, reallocating temporary buffer, since
22072         the output cannot contain more wide characters than the input
22073         contains bytes, the size must be big enough already.  This avoids
22074         one potential size overflow calculation.  Check for size overflow
22075         when calculating temporary buffer size.  Free temporary buffer
22076         when done, if it was allocated with malloc; this plugs a memory
22077         leak.  Remove casts from void * to pointers, that are no longer
22078         needed now that we're assuming C89 or better.
22079
22080         Merge error changes from glibc.
22081
22082         * lib/error.c, error.h: Update copyright notice header to match glibc.
22083         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
22084         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
22085         Disable cancellation while printing error.
22086         * lib/error.h: Prepend __ to parameter names.
22087
22088 2003-09-26  Jim Meyering  <jim@meyering.net>
22089
22090         * lib/error.c (error_tail): Move some declarations
22091         into inner scope where the local variables are used.
22092
22093 2003-09-26  Bruno Haible  <bruno@clisp.org>
22094
22095         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
22096         stpncpy().
22097         Don't define stpncpy through config.h; it's now done through stpncpy.h.
22098
22099 2003-09-26  Bruno Haible  <bruno@clisp.org>
22100
22101         * lib/stpncpy.h (gnu_stpncpy): New declaration.
22102         (stpncpy): Define as alias for gnu_stpncpy.
22103         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
22104
22105 2003-09-25  Simon Josefsson  <jas@extundo.com>
22106
22107         * lib/xgetdomainname.h: New file.
22108         * lib/xgetdomainname.c: New file.
22109
22110 2003-09-25  Simon Josefsson  <jas@extundo.com>
22111             Bruno Haible  <bruno@clisp.org>
22112
22113         * modules/getdomainname: New file.
22114         * modules/xgetdomainname: New file.
22115         * MODULES.html.sh (func_all_modules): Add getdomainname,
22116         xgetdomainname.
22117
22118 2003-09-25  Simon Josefsson  <jas@extundo.com>
22119             Bruno Haible  <bruno@clisp.org>
22120
22121         * m4/getdomainname.m4: New file.
22122
22123 2003-09-25  Simon Josefsson  <jas@extundo.com>
22124             Bruno Haible  <bruno@clisp.org>
22125
22126         * lib/getdomainname.h: New file.
22127         * lib/getdomainname.c: New file.
22128
22129 2003-09-25  Karl Berry  <karl@gnu.org>
22130
22131         * lib/argp-fmtstream.c, argp-help.c: update from libc.
22132
22133 2003-09-25  Karl Berry  <karl@gnu.org>
22134
22135         * config/install-sh: update from automake.
22136
22137 2003-09-25  Bruno Haible  <bruno@clisp.org>
22138
22139         * modules/version-etc-2: New file, from modules/version-etc with
22140         modifications.
22141         * MODULES.html.sh (func_all_modules): Add version-etc-2.
22142
22143 2003-09-25  Bruno Haible  <bruno@clisp.org>
22144
22145         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
22146         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
22147
22148 2003-09-24  Simon Josefsson  <jas@extundo.com>
22149
22150         * modules/xgethostname: Add xgethostname.h.
22151
22152 2003-09-24  Paul Eggert  <eggert@twinsun.com>
22153
22154         * lib/linebuffer.c (freebuffer): Don't free the argument, just
22155         the buffer associated with the argument.  Bug reported by
22156         Simon Josefsson.
22157
22158 2003-09-24  Paul Eggert  <eggert@twinsun.com>
22159
22160         * README: Document assumptions that 'int' is at least 32 bits
22161         wide, that integer arithmetic is 2's complement without overflow,
22162         that there are no holes in integer values, that adding sizes of
22163         two nonoverlapping objects can't overflow, and that all-bits-zero
22164         yields scalar zero.  Fix spelling and capitalization typos.
22165
22166 2003-09-19  Karl Berry  <karl@gnu.org>
22167
22168         * lib/argp.h: update from libc.
22169
22170 2003-09-17  Paul Eggert  <eggert@twinsun.com>
22171
22172         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
22173         to avoid spurious warnings like "AC_RUN_IFELSE was called before
22174         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
22175
22176 2003-09-17  Paul Eggert  <eggert@twinsun.com>
22177
22178         * gnulib-tool: Use "test -h", not "test -L", for portability
22179         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
22180         (tags_regexp): Remove, since \| doesn't conform to POSIX.
22181         (sed_extract_prog): Issue s commands one-by-one, rather than
22182         using \| in one s command.
22183
22184 2003-09-16  Paul Eggert  <eggert@twinsun.com>
22185
22186         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
22187         input error, instead of returning NULL the next time we are called
22188         (and therefore losing track of errno).
22189
22190 2003-09-16  Bruno Haible  <bruno@clisp.org>
22191
22192         * gnulib-tool (func_create_testdir): Warn about duplicated
22193         dependencies.
22194
22195 2003-09-15  Paul Eggert  <eggert@twinsun.com>
22196
22197         * modules/argmatch, modules/fatal, modules/obstack,
22198         modules/xalloc, modules/xgethostname: Sort dependencies by
22199         importance, not alphabetically.
22200
22201 2003-09-15  Paul Eggert  <eggert@twinsun.com>
22202
22203         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
22204         fails, so that the caller gets the proper errno.
22205
22206         * lib/readutmp.c (read_utmp): Likewise.
22207         Check for fstat error.  Close stream and free storage
22208         when failing.
22209
22210 2003-09-14  Karl Berry  <karl@gnu.org>
22211
22212         * config/srclist.txt (strdup.c): disable for c89 changes.
22213
22214 2003-09-14  Jim Meyering  <jim@meyering.net>
22215
22216         * lib/getloadavg.c: Correct cpp indentation.
22217         * lib/strdup.c: Likewise.
22218         * lib/vasnprintf.c: Likewise.
22219
22220 2003-09-14  Bruno Haible  <bruno@clisp.org>
22221
22222         * modules/fwriteerror: New file.
22223         * MODULES.html.sh (func_all_modules): Add fwriteerror.
22224
22225 2003-09-14  Bruno Haible  <bruno@clisp.org>
22226
22227         * lib/fwriteerror.h: New file.
22228         * lib/fwriteerror.c: New file.
22229
22230 2003-09-12  Paul Eggert  <eggert@twinsun.com>
22231
22232         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
22233         modules/xgethostname, modules/xalloc: Depend on exit.
22234
22235 2003-09-12  Paul Eggert  <eggert@twinsun.com>
22236
22237         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
22238
22239         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
22240         and AC_MINIX, too, so that their extensions are available.
22241
22242         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
22243         This macro has been superseded by gl_BACKUPFILE.
22244
22245         More patches to assume C89 or better.
22246
22247         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
22248
22249         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
22250         unconditionally.
22251         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
22252         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
22253         Include <string.h>, <stdlib.h> unconditionally.
22254         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
22255         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
22256         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
22257         headers or for string.h.
22258         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
22259         or strtoul.
22260
22261         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
22262         headers.
22263         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
22264         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22265         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
22266         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
22267         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22268         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
22269         memcpy, memset.
22270         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
22271         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
22272         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
22273         strtol.
22274         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
22275         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
22276         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
22277         strtoul.
22278
22279 2003-09-12  Paul Eggert  <eggert@twinsun.com>
22280
22281         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
22282         * lib/obstack.c [!defined _LIBC]: Likewise.
22283         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
22284         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
22285         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
22286
22287         More changes to assume C89 or better.
22288
22289         * lib/error.c (error_tail): Assume vprintf.
22290
22291         * lib/argmatch.c (getenv): Remove decl.
22292         * lib/progreloc.c (get_full_program_name): Define via prototype.
22293         * lib/setenv.c (clearenv): Likewise.
22294         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
22295         needed.
22296         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
22297         (malloc, memcpy): Remove decls.
22298         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
22299         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
22300         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
22301         (memcpy): Remove macro.
22302         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
22303         (__P): Remove.  All uses removed.
22304         (PTR): Remove.  All uses changed to void *.
22305         (CHAR_BIT, NULL): Remove.
22306         (spaces, zeros, memset_space, memset_zero)
22307         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
22308         Remove.
22309         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
22310         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
22311         Define with prototype.
22312         Remove now-unnecessary prototype decl.
22313         (extra_args_spec): Assume ANSI C.  All uses changed.
22314         (extra_args_spec_iso): Remove.
22315         (my_strftime, emacs_strftimeu): Define via prototype.
22316         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
22317         unconditionally.
22318         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
22319         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
22320         (strtoul, strtol): Remove decls.
22321         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
22322         LONG_MAX): Remove.
22323         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
22324         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
22325         (LOCALE_PARAM_PROTO): New macro.
22326         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
22327         (INTERNAL (strtol), strtol): Define with a prototype.
22328         (PARAMS): Remove.  All uses removed.
22329         * lib/tempname.c: Include <string.h> unconditionally.
22330         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
22331         * lib/xgethostname.c (main): Define with a prototype.
22332         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
22333         Include <stdlib.h> unconditionally.
22334         (calloc, malloc, realloc, free): Remove decls.
22335         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
22336         Include <stdlib.h> unconditionally.  Sort include file names.
22337         (strtod): Remove.
22338         (xstrtod): Define with a prototype.
22339         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
22340         (strtol, strtoul): Remove decls.
22341
22342 2003-09-11  Paul Eggert  <eggert@twinsun.com>
22343
22344         More patches to assume C89 or better.
22345         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
22346         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
22347         string.h, memchr, STDC_HEADERS.
22348
22349 2003-09-11  Paul Eggert  <eggert@twinsun.com>
22350
22351         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
22352         Include <stdlib.h>, <string.h> unconditionally.
22353         Remove now-unnecessary cast to char *.
22354         * lib/strnlen.c: Include <string.h> unconditionally.
22355         * lib/yesno.c (yesno): Define with a prototype.
22356
22357 2003-09-11  Bruno Haible  <bruno@clisp.org>
22358
22359         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
22360
22361 2003-09-10  Jim Meyering  <jim@meyering.net>
22362
22363         * lib/error.c: Correct indentation of cpp directives.
22364
22365 2003-09-10  Bruno Haible  <bruno@clisp.org>
22366
22367         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
22368         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
22369         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
22370         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
22371         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
22372         <stdlib.h> and <string.h> checks.
22373         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
22374         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
22375
22376 2003-09-10  Bruno Haible  <bruno@clisp.org>
22377
22378         * lib/strcspn.c: Include <string.h> unconditionally.
22379         * lib/strpbrk.c: Include <string.h> unconditionally.
22380         * lib/strstr.c: Include <string.h> unconditionally.
22381         * lib/unicodeio.c: Include <string.h> unconditionally.
22382         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
22383         * lib/unsetenv.c: Likewise.
22384         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
22385         * lib/yesno.c: Include <stdlib.h> unconditionally.
22386         (rpmatch): Add prototype.
22387
22388 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22389
22390         More patches to assume C89 or better.
22391         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
22392         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
22393         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
22394         or for string.h.
22395         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
22396         stdlib.h.
22397         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
22398         C headers.
22399         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
22400         string.h.
22401         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
22402         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
22403         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
22404         or for string.h.
22405         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
22406         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
22407         C headers.
22408         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
22409         memcpy.
22410         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
22411         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
22412         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
22413         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
22414         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
22415         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
22416         string.h, free.
22417         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
22418         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
22419         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
22420         C headers, or for string.h.
22421         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
22422         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
22423         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
22424         headers, memory.h, stdlib.h, string.h, strings.h.
22425         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
22426         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
22427         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
22428         strchr.
22429         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
22430         headers, memory.h, string.h.
22431         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
22432         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
22433         free.
22434         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
22435         headers.
22436         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
22437         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
22438         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
22439         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
22440         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
22441
22442 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22443
22444         More K&R removal.
22445
22446         * lib/acosl.c (main): Use a prototype.
22447         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
22448         tanl.c: Likewise.
22449
22450         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
22451
22452         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
22453         (getopt, etopt_long, getopt_long_only, _getopt_internal)
22454         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
22455         with a prototype.
22456         * lib/getopt.c (const): Remove macro.
22457         Include <string.h> unconditionally.
22458         (my_index): Remove; all uses changed to strchr.
22459         (strlen): Remove decl.
22460         (exchange): Remove forward decl; no longer needed.
22461         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
22462         Define with prototype.
22463         * lib/getopt1.c (const): Remove macro.
22464         (getopt_long, getopt_long_only, main): Define with prototype.
22465
22466         * lib/getugroups.c: Include <string.h> unconditionally.
22467
22468         * lib/getusershell.c: Include <stdlib.h> unconditionally.
22469         (getusershell, setusershell, endusershell, readname, main):
22470         Define with prototypes.
22471
22472         * lib/group-member.c: Include group-member.h first.
22473         Include <stdlib.h> unconditionally.
22474
22475         * lib/hard-locale.c: Include hard-locale.h first.
22476         Include <stdlib.h>, <string.h> unconditionally.
22477
22478         * lib/hash.c (free, malloc): Remove decls.
22479         Include <stdlib.h> unconditionally.
22480
22481         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
22482         (getenv): Do not declare.
22483
22484         * lib/idcache.c: Include <string.h> unconditionally.
22485
22486         * lib/long-options.c: Include long-options.h first, to test interface.
22487         Include <stdlib.h> unconditionally.
22488
22489         * lib/makepath.c: Include makepath.h first, to test interface.
22490         Include <stdlib.h> and <string.h> unconditionally.
22491
22492         * lib/linebuffer.c: Include <stdlib.h>.
22493         (free): Remove decl.
22494
22495         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
22496         stddef.h. rpl_malloc returns void *, not char *.
22497         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
22498         prototype.
22499
22500         * lib/md5.h: Include <limits.h> unconditionally.
22501         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
22502         (__P): Remove; all uses removed.
22503         * lib/md5.c: Include "md5.h" first.
22504         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
22505         md5_buffer, md5_process_bytes, md5_process_block):
22506         Define with prototypes.
22507         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
22508         * lib/sha.c: Include "sha.h" first.
22509         Include <stdlib.h>, <string.h> unconditionally.
22510
22511         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
22512         * lib/memcmp.c (__ptr_t): Likewise.
22513         * lib/memrchr.c (__ptr_t): Likewise.
22514         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
22515         Include <string.h> unconditionally.
22516         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
22517         * lib/memchr.c: Include <stdlib.h> unconditionally.
22518         * lib/memchr.c (LONG_MAX): Remove.
22519         * lib/memrchr.c (LONG_MAX): Likewise.
22520         * lib/memchr.c (__memchr): Define via a prototype.
22521         * lib/memrchr.c (__memrchr): Likewise.
22522         * lib/memcmp.c (__P): Remove, and remove all uses.
22523         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
22524         Remove forward decls; no longer needed.
22525         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
22526         Use types required by C89 in prototype.
22527
22528         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
22529         * lib/savedir.c: Likewise.
22530         * lib/mkdir.c (free): Remove decl.
22531         * lib/rmdir.c (rmdir): Define with a prototype.
22532         * lib/savedir.c: Include savedir.h first, to test interface.
22533
22534         * lib/mktime.c (STDC_HEADERS): Remove.
22535         Include <stdlib.h>, <string.h> unconditionally.
22536
22537         * lib/modechange.c: Include <stdlib.h> unconditionally.
22538         (malloc): Remove decl.
22539
22540         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
22541         (free): Remove decl.
22542
22543         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
22544         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
22545         (This type really should be intptr_t, but that's a C99ism.)
22546         (_obstack_memcpy): Remove: all uses changed to memcpy.
22547         Include <string.h> unconditionally.
22548         (struct obstack): Assume __STDC__ for types of members
22549         chunkfun, freefun, extra_arg.
22550         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
22551         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
22552         obstack_begin, obstack_specify_allocation,
22553         obstack_specify_allocation_with_arg, obstack_chunkfun,
22554         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
22555         Remove unprototyped decls and the macros that use them.
22556         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
22557         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
22558         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
22559         (defined __STDC__ && __STDC__)]:
22560         Remove nonprototyped code.
22561         Include <stdlib.h> unconditionally.
22562         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
22563         _obstack_allocated_p, _obstack_free, obstack_free,
22564         _obstack_memory_used, print_and_abort):
22565         Define using prototypes.
22566         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
22567         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
22568         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
22569         obstack_next_free, obstack_object_size, obstack_room) [0]:
22570         Remove unused, unprototyped code.
22571
22572         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
22573
22574         * lib/physmem.c (physmem_total, physmem_available, main): Define
22575         with prototypes.
22576
22577         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
22578         (main): Define with a prototype.
22579
22580         * lib/posixver.c (getenv): Remove decl.
22581
22582         * lib/putenv.c (malloc): Returns void *, not char *.
22583         Include <string.h> unconditionally.
22584         (strchr, memcpy, NULL): Do not define.
22585
22586         * lib/readtokens.c: Include readtokens.h first, to test interface.
22587         Include <stdlib.h>, <string.h> unconditionally.
22588         (init_tokenbuffer): Define with a prototype.
22589
22590         * lib/regex.c (PARAMS): Remove.  All uses removed.
22591         All uses of _RE_ARGS removed, too.
22592         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22593         unconditionally.
22594         (bzero): Assume memset exists.
22595         (memcmp, memcpy, NULL): Remove.
22596         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
22597         char, or assignments to local vars of type signed char.
22598         (init_syntax_once, PREFIX(extract_number_and_incr),
22599         PREFIX(print_partial_compiled_pattern),
22600         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
22601         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
22602         PREFIX(regex_grow_registers), PREFIX(regex_compile),
22603         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
22604         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
22605         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
22606         wcs_compile_range, byte_compile_range, truncate_wchar,
22607         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
22608         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
22609         count_mbs_length, wcs_re_match_2_internal,
22610         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
22611         PREFIX(alt_match_null_string_p),
22612         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
22613         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
22614         regfree, PREFIX(extract_number)): Define with prototype.  Remove
22615         now-unnecessary declaration, if any.
22616         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
22617         regcomp, regexec):
22618         Remove now-unnecessary casts among pointer types.
22619         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
22620
22621         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
22622         (free): Remove decl.
22623
22624         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
22625
22626         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
22627         (free): Remove decl.
22628
22629         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
22630         * lib/xgetcwd.c: Likewise.
22631
22632         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
22633         (free): Remove decl.
22634
22635         * lib/strchrnul.c (strchrnul): Define with a prototype.
22636         Fix bug: c_in was not converted to char before searching.
22637
22638         The following changes are not K&R related:
22639
22640         * lib/group-member.h: Include <sys/types.h>, so that this file is
22641         self-contained.
22642         * lib/makepath.h: Likewise.
22643
22644         * lib/getusershell.c (readname, default_index, line_size, readname):
22645         Use size_t, not int, for sizes.
22646         (readname): If the size overflows, report an error instead of
22647         looping forever.
22648
22649 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22650
22651         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
22652         libc.
22653
22654 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22655
22656         * README: New section: portability guidelines.
22657
22658 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22659
22660         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
22661         C89 spec.
22662
22663 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22664
22665         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
22666
22667 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22668
22669         Assume C89 or better; remove K&R cruft.
22670         A few of these changes were first proposed by Derek Robert Price
22671         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
22672
22673         * lib/addext.c: Include <string.h> unconditionally.
22674         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
22675         Don't declare getenv or malloc.
22676
22677         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
22678         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
22679         (NULL): Remove.
22680         (find_stack_direction, alloca): Use prototypes.
22681
22682         * lib/atexit.c (atexit): Define using a prototype.
22683
22684         * lib/basename.c, dirname.c, stripslash.c:
22685         Include <string.h> unconditionally.
22686
22687         * lib/bcopy.c: Include <stddef.h>.
22688         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
22689
22690         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
22691
22692         * lib/error.h (error, error_at_line, error_print_progname)
22693         [! (defined (__STDC__) && __STDC__)]: Remove decls.
22694         * lib/error.c: Include error.h first, to check interface.
22695         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22696         (VA_START): Remove; all uses changeed to va_start.
22697         (exit, strerror): Remove decls.
22698         (error_print_progname): Prototype uncondionally.
22699         Don't include <errno.h>; no longer needed.
22700         (private_strerror): Remove.
22701         (error_tail): Always define.
22702         (error, error_at_line): Assume C89 or better; always use prototypes.
22703         * lib/fatal.c: Include "fatal.h" first, to test interface.
22704         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22705         (VA_START): Remove; all uses changed to va_start.
22706         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
22707         this case.
22708         (exit): Remove decl.
22709         (fatal): Prototype unconditionally.  Assume va_start works.
22710         Abort at end, to pacify gcc.
22711
22712         * lib/euidaccess.c (main): Define with a prototype.
22713
22714         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
22715
22716         * lib/exitfail.c: Include <stdlib.h> unconditionally.
22717
22718         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
22719         prototypes.
22720         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
22721         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
22722         (getenv): Remove decl.
22723         (fnmatch): Define using a prototype.
22724         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
22725         (FCT): Define using a prototype.
22726
22727         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
22728
22729         * lib/gethostname.c: Include <stddef.h>.
22730         (gethostname): Define with prototype.  Length is size_t, not int.
22731
22732 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22733
22734         Assume C89 or better; remove K&R cruft.
22735         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
22736         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
22737         string.h, getenv, malloc.
22738         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
22739         headers.
22740         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
22741         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
22742         do not check for strerror.
22743         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
22744         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
22745         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
22746         do not check for doprnt or vprintf.
22747         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
22748         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
22749
22750 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22751
22752         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
22753         getversion.c should have been removed then, but was accidentally
22754         preserved.
22755
22756         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
22757         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
22758
22759 2003-09-08  Karl Berry  <karl@gnu.org>
22760
22761         * config/config.sub, config.guess, srclistvars.sh: update from savannah
22762                 config, forget about prep.
22763
22764         * config/depcomp, missing: update from automake.
22765
22766 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22767
22768         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
22769         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22770
22771 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22772
22773         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
22774         copy_tm_result.  Bug reported by Simon Josefsson in
22775         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22776
22777 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22778
22779         * m4/time_r.m4: New file.
22780         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
22781         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
22782         is. Check for timegm declaration.
22783         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
22784         Do not check for gmtime_r.
22785         Replace mktime if __mktime_internal does not exist and if mktime
22786         hasn't been replaced already.
22787
22788 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22789
22790         * lib/time_r.c, lib/time_r.h: New files.
22791
22792         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
22793         __localtime_r.
22794         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
22795         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
22796
22797         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
22798         __gmtime_r.
22799         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
22800         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
22801         Include <time_r.h>.
22802
22803         * lib/timegm.c: Switch to glibc implementation, with the following
22804         changes:
22805         [defined HAVE_CONFIG_H]: Include <config.h>.
22806         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
22807         (__mktime_internal) [!defined _LIBC]: New decl.
22808         (__gmtime_r) [!defined _LIBC]: New macro and function.
22809         (timegm): Use a prototype, since gnulib assumes C89.
22810         Do not bother declaring tmp to be const, as it's not really usefu.
22811         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
22812         (timegm): Declare only if HAVE_DECL_TIMEGM.
22813
22814 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22815
22816         * MODULES.html.sh (func_all_modules): Add time_r.
22817         * modules/time_r: New file.
22818         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
22819         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
22820
22821 2003-09-03  Paul Eggert  <eggert@twinsun.com>
22822
22823         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
22824         Bug reported by Lute Kamstra in
22825         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
22826
22827         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
22828         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
22829         course with correspondingly smaller numbers for tomorrow and
22830         yesterday.  From Tadayoshi Funaba.  Originally installed into
22831         sh-utils on 1999-08-07, but the patch got lost (I guess during the
22832         coreutils merge?).
22833
22834 2003-08-31  Simon Josefsson  <jas@extundo.com>
22835
22836         * modules/timegm: New file.
22837         * MODULES.html.sh (func_all_modules): Add timegm.
22838
22839 2003-08-31  Simon Josefsson  <jas@extundo.com>
22840
22841         * m4/timegm.m4: New file.
22842
22843 2003-08-31  Simon Josefsson  <jas@extundo.com>
22844
22845         * lib/timegm.h: New file.
22846         * lib/timegm.c: New file.  Based on
22847         wget-1.8.2/src/http.c:mktime_from_utc.
22848
22849 2003-08-31  Karl Berry  <karl@gnu.org>
22850
22851         * lib/argp.h: update from libc.
22852
22853 2003-08-28  Bruno Haible  <bruno@clisp.org>
22854
22855         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
22856         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
22857         followed by '#define fnmatch fnmatch_posix' gives an error.
22858
22859 2003-08-28  Bruno Haible  <bruno@clisp.org>
22860
22861         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
22862         warning on QNX, which defines O_BINARY to 000000.
22863
22864 2003-08-27  Jim Meyering  <jim@meyering.net>
22865
22866         * m4/mkstemp.m4: Require that the system mkstemp be able to create
22867         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
22868         would fail after 32.  Reported by Danny Levinson.  Details here:
22869         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
22870
22871 2003-08-24  Bruno Haible  <bruno@clisp.org>
22872
22873         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
22874         MSVC7 <stdio.h> is included later.
22875
22876 2003-08-22  Simon Josefsson  <jas@extundo.com>
22877
22878         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
22879
22880 2003-08-20  Karl Berry  <karl@gnu.org>
22881
22882         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
22883
22884 2003-08-20  Bruno Haible  <bruno@clisp.org>
22885
22886         * modules/progname: New file.
22887         * MODULES.html.sh (func_all_modules): Add progname.
22888
22889 2003-08-20  Bruno Haible  <bruno@clisp.org>
22890
22891         * lib/progname.h: New file, from GNU gettext.
22892         * lib/progname.c: New file, from GNU gettext.
22893         * lib/progreloc.c: New file, from GNU gettext.
22894
22895 2003-08-19  Jim Meyering  <jim@meyering.net>
22896
22897         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
22898         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
22899
22900 2003-08-19  Bruno Haible  <bruno@clisp.org>
22901
22902         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
22903         more.
22904
22905 2003-08-19  Bruno Haible  <bruno@clisp.org>
22906
22907         * lib/xstrdup.c: Assume <string.h> exists.
22908
22909 2003-08-18  Paul Eggert  <eggert@twinsun.com>
22910
22911         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
22912         in makefile rules.
22913
22914 2003-08-18  Jim Meyering  <jim@meyering.net>
22915
22916         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
22917         * m4/lib-ld.m4: Likewise.
22918
22919 2003-08-18  Jim Meyering  <jim@meyering.net>
22920
22921         * lib/setenv.h: Indent nested cpp directive.
22922         * lib/vasnprintf.c: Remove trailing blanks.
22923
22924 2003-08-17  Simon Josefsson  <jas@extundo.com>
22925
22926         * modules/xstrndup: New file.
22927         * MODULES.html.sh (func_all_modules): Add xstrndup.
22928
22929 2003-08-17  Simon Josefsson  <jas@extundo.com>
22930
22931         * modules/argp: Fix autoconf macro name. Add more dependencies.
22932
22933 2003-08-17  Simon Josefsson  <jas@extundo.com>
22934
22935         * m4/xstrndup.m4: New file.
22936
22937 2003-08-17  Simon Josefsson  <jas@extundo.com>
22938
22939         * m4/argp.m4: New file.
22940
22941 2003-08-17  Simon Josefsson  <jas@extundo.com>
22942             Bruno Haible  <bruno@clisp.org>
22943
22944         * lib/xstrndup.h: New file.
22945         * lib/xstrndup.c: New file.
22946
22947 2003-08-17  Bruno Haible  <bruno@clisp.org>
22948
22949         * modules/strndup (Files, Include): Add lib/strndup.h.
22950
22951 2003-08-17  Bruno Haible  <bruno@clisp.org>
22952
22953         * modules/euidaccess (Files): Add lib/euidaccess.h.
22954
22955 2003-08-17  Bruno Haible  <bruno@clisp.org>
22956
22957         * lib/strndup.h: New file.
22958
22959 2003-08-17  Bruno Haible  <bruno@clisp.org>
22960
22961         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
22962         like AC_GNU_SOURCE.
22963         * modules/extensions (configure.ac): Comment out the invocation of
22964         gl_USE_SYSTEM_EXTENSIONS.
22965
22966 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22967
22968         Merges from coreutils, etc.
22969         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
22970         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
22971         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
22972         fixing a typo.
22973         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
22974         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
22975
22976 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22977
22978         Document merge from coreutils.
22979         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
22980         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
22981         * modules/utime: Add m4/utimes-null.m4.
22982
22983 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22984
22985         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
22986         space, undoing this 2003-08-12 change:
22987         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22988
22989 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22990
22991         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
22992         strtoul.c from libc, undoing this 2003-08-12 change:
22993         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22994
22995 2003-08-16  Jim Meyering  <jim@meyering.net>
22996
22997         Merges from coreutils.
22998         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
22999         prefix.  Adjust cache variables similarly.  Create 500 rather than
23000         just 300 files, to exercise bug on Darwin6.5, too.
23001         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
23002         $missing_dir.
23003         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
23004         AM_SYS_POSIX_TERMIOS.
23005         Reported by mkc@mathdogs.com.
23006         Also change use of $am_cv_sys_posix_termios
23007         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
23008         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
23009         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
23010         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
23011         in /proc/mounts until it finds one with matching device number.  This
23012         is unnecessary when the FILE argument *is* a mount point.  No stat call
23013         is necessary in that case.  So, disable the statvfs-testing code on
23014         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
23015         as RedHat bug# 84846.
23016         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
23017         to 1MB, so as not to render systems with no stack size limit (e.g.,
23018         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
23019         Include <unistd.h>.  On some systems,
23020         it is required for the definition of _SC_PAGESIZE.
23021
23022 2003-08-16  Jim Meyering  <jim@meyering.net>
23023
23024         Merge from coreutils.
23025         * lib/xstrtoimax.c: #else #if -> #elif.
23026         * lib/xstrtoumax.c: Likewise.
23027
23028 2003-08-16  Jim Meyering  <jim@meyering.net>
23029
23030         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
23031         * m4/utimes.m4: Removed.
23032         * m4/utimes-null.m4: Renamed from utimes.m4.
23033
23034         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
23035         to 1MB, so as not to render systems with no stack size limit (e.g.,
23036         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
23037         Include <unistd.h>.  On some systems,
23038         it is required for the definition of _SC_PAGESIZE.
23039
23040 2003-08-16  Jim Meyering  <jim@meyering.net>
23041         and Paul Eggert  <eggert@cs.ucla.edu>
23042
23043         Merges from coreutils, etc.
23044
23045         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
23046         using the latest version from cvs.  This avoids problems with #line
23047         directives using a vendor (Sun) compiler.
23048         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
23049         Don't set GETGROUPS_LIB here; now it's
23050         done via getgroups.m4's wrapper function.
23051         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
23052         rather than just in sh-util/configure.in, so that the
23053         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
23054         same.
23055         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
23056         AC_FUNC_GETLOADAVG where to find getloadavg.c.
23057         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
23058         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
23059         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
23060         Remove code that is now done by the newly-required macros.
23061         Append $(EXEEXT) to DF_PROG.
23062         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
23063         Do not invoke or require the following here,
23064         since prereq.m4 or some gnulib .m4 now does this for us:
23065         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
23066         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
23067         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
23068         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
23069         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
23070         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
23071         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
23072         AC_FUNC_OBSTACK.
23073         Do not replace the following functions, as this is now the job
23074         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
23075         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
23076         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
23077         atexit getpass, strdup, getpagesize.
23078         Replace 'raise'.
23079         Do not check for the following functions, as this is now the job
23080         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
23081         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
23082         setregid.
23083         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
23084         Check for sys/sysctl.h.
23085         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
23086         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
23087         of checking for ssize_t ourselves.
23088
23089         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
23090         Require every macro that gnulib/modules/* suggests for us.
23091         (jm_PREREQ_ADDEXT): New macro.
23092         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
23093         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
23094
23095         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
23096         (gl_PHYSMEM): Use it.
23097         Also check for `table' function.
23098         Check for new headers and functions.
23099         Add check for sys/sysmp.h.
23100         With suggestions from Kaveh Ghazi.
23101         Ignore headers that are present but cannot be compiled.  This
23102         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
23103         C 5.4.
23104
23105 2003-08-15  Paul Eggert  <eggert@twinsun.com>
23106
23107         Document merge from coreutils.
23108         * modules/userspec: Depend on posixver.
23109         * modules/strftime: Depend on tzset.
23110
23111 2003-08-15  Paul Eggert  <eggert@twinsun.com>
23112
23113         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
23114         rather than tab, after '#' in shell-script copyright notices.
23115         Suggested by Bruno Haible.
23116
23117 2003-08-15  Paul Eggert  <eggert@twinsun.com>
23118
23119         * config/srclist-update: Use three spaces, rather than tab, after '#'
23120         in shell-script copyright notices.  Suggested by Bruno Haible.
23121         Remove unnecessary parenthesization in regular expression.
23122
23123 2003-08-15  Jim Meyering  <jim@meyering.net>
23124
23125         Merge from coreutils.
23126         * lib/xgethostname.c: Include <stdlib.h>.
23127         (xghostname): Don't exit for anything other than memory-related
23128         failure; just return NULL.
23129         * lib/userspec.c: Include "posixver.h".
23130         (parse_user_spec): Accept `.' as a separator only
23131         in pre-POSIX-200112 mode.
23132         * lib/strtoimax.c: Use #elif rather than #else #if.
23133         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
23134         Remove function, now that we can rely on a working tzset function.
23135         [!_LIBC]: Ensure that the required autoconf test has been run.
23136         [!defined _NL_CURRENT && HAVE_STRFTIME]:
23137         Use underlying_strftime for %r.
23138         * lib/sha.c: Merge in some clean-up and optimization changes from
23139         glibc.
23140         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
23141         Ensure that it is a multiple of 64.
23142         Rearrange loop exit tests so as to avoid performing an
23143         additional fread after encountering an error or EOF.
23144         * lib/realloc.c: Update copyright date.
23145
23146 2003-08-15  Jim Meyering  <jim@meyering.net>
23147         and Paul Eggert  <eggert@twinsun.com>
23148
23149         Merge from coreutils.
23150         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
23151         member but strut utmpx does not.  Needed for AIX 4.3.3.
23152         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
23153
23154 2003-08-15  Jim Meyering  <jim@meyering.net>
23155         and Paul Eggert  <eggert@cs.ucla.edu>
23156
23157         Merges from coreutils, etc.
23158         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
23159         Require gl_FUNC_TZSET_CLOBBER.
23160         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
23161         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
23162         members.
23163
23164 2003-08-14  Paul Eggert  <eggert@twinsun.com>
23165
23166         Help the merge from coreutils.
23167         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
23168         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
23169         * m4/tzset.m4: Use it too.
23170
23171 2003-08-14  Paul Eggert  <eggert@twinsun.com>
23172
23173         * modules/tzset: New file.
23174
23175 2003-08-14  Jim Meyering  <jim@meyering.net>
23176
23177         Merges from coreutils.
23178         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
23179         variable names, rather than @FNMATCH_H@.
23180         * modules/alloca: Likewise for $(ALLOCA_H).
23181
23182         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
23183         the three copies of the literal target, `fnmatch.h'.
23184         * modules/alloca (alloca.h): Likewise.
23185
23186 2003-08-14  Jim Meyering  <jim@meyering.net>
23187
23188         Merge from coreutils.
23189         * m4/tzset.m4: New file.
23190         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
23191         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
23192         otherwise, AIX 5.1 systems would end up using the latter.
23193         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
23194         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
23195         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
23196         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
23197
23198 2003-08-14  Jim Meyering  <jim@meyering.net>
23199
23200         Merge from coreutils.
23201         * lib/obstack.h: Whitespace changes.
23202         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
23203         and xcalloc return values.
23204         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
23205         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
23206         hang on OSF/1 5.1 for DIR on both local and remote file systems.
23207         Reported by (and fix confirmed by) Nelson H. F. Beebe.
23208         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23209         error from mntctl.
23210         Use mntctl's return value to drive the entry-processing loop, since
23211         we can't rely on the value of the vmt_length member in the last
23212         entry.  On some systems doing so could result in exhausting
23213         virtual memory.  Based in part on a patch from Mike Jetzer.
23214
23215 2003-08-14  Jim Meyering  <jim@meyering.net>
23216         and Paul Eggert  <eggert@twinsun.com>
23217
23218         Merges from coreutils, plus other fixes.
23219         * lib/physmem.c: Merge in portability changes from gcc/libiberty
23220         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
23221         for credits and details.  Thanks to Kaveh Ghazi for helping
23222         to keep these files in sync.
23223         (ARRAY_SIZE): Define it.
23224         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
23225         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
23226         (memcasecmp): Don't assume size_t fits in unsigned int.
23227         Remove casts and duplicate code.
23228         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
23229         (memcpy): Remove definition.
23230         Merge in some clean-up and optimization changes from glibc.
23231         [BLOCKSIZE]: Move definition to top of file.
23232         Ensure that it is a multiple of 64.
23233         Rearrange loop exit tests so as to avoid performing an
23234         additional fread after encountering an error or EOF.
23235         * lib/md5.h (md5_uintptr): Define.
23236         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
23237         return to the initial working directory.  Preserve errno
23238         for caller.
23239         * lib/idcache.c: Include "xalloc.h".
23240         (xmalloc, xrealloc): Remove decls.
23241         (getuser): Remove casts no longer required in C89.
23242         * lib/human.c: Include stdio.h, for sprintf.
23243         * lib/group-member.c: Include "xalloc.h".
23244         (xmalloc, xrealloc): Remove decls.
23245         (get_group_info): Remove casts no longer required in C89.
23246         * lib/getusershell.c (readname): Remove casts no longer required in
23247         C89.
23248         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
23249         * lib/getline.c: Whitespace fix, from coreutils.
23250
23251 2003-08-13  Paul Eggert  <eggert@twinsun.com>
23252
23253         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
23254         Check for isascii.
23255
23256         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
23257         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
23258         Undo previous (whitespace-only) change.
23259
23260 2003-08-13  Paul Eggert  <eggert@twinsun.com>
23261
23262         * lib/exclude.c: Include <ctype.h>
23263         (IN_CTYPE_DOMAIN): New macro.
23264         (is_space): New fn.
23265         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
23266         and empty lines.
23267
23268         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
23269         Undo previous (whitespace-only) change.
23270
23271 2003-08-13  Paul Eggert  <eggert@twinsun.com>
23272
23273         * config/srclist-update: Change update back to the old behavior,
23274         leaving whitespace alone.  Use one 'sed' command rather than a
23275         pipeline.
23276         (fixlicense): Now a variable, not a function.
23277         (remove_trailing_blanks): Remove.
23278         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
23279         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
23280         Undo previous (whitespace-only) change.
23281
23282 2003-08-12  Paul Eggert  <eggert@twinsun.com>
23283
23284         Merge from coreutils.
23285         * modules/euidaccess: Add lib_SOURCES, include for new
23286         file euidaccess.h
23287
23288 2003-08-12  Paul Eggert  <eggert@twinsun.com>
23289
23290         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
23291         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
23292         Normalize leading white space and remove trailing white space.
23293
23294         Merge from coreutils
23295         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
23296
23297         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
23298         0.12.1.  These files are now being upgraded automatically by
23299         ../config/srclist-update.
23300
23301 2003-08-12  Paul Eggert  <eggert@twinsun.com>
23302
23303         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
23304         Normalize leading white space and remove trailing white space.
23305         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
23306         notice, as per ../config/srclist-update.
23307
23308         Merge from coreutils.
23309         * lib/euidaccess.h: New file.
23310         * lib/euidaccess.c: Include it.
23311         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
23312         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
23313         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
23314
23315 2003-08-12  Paul Eggert  <eggert@twinsun.com>
23316
23317         * config/srclist-update: Add copyright notice.
23318         (remove_id_lines, remove_trailing_blanks): New constants.
23319         (fixfile): Use them to normalize spacing a bit in copied files.
23320         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
23321         Normalize leading white space and remove trailing white space.
23322
23323         * config/texinfo.tex: Sync with texinfo.
23324
23325         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
23326         strtoul.c from libc, to merge coreutils whitespace changes.
23327
23328         * config/srclist.txt: Get the following m4 files from gettext:
23329         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
23330         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
23331         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
23332         wint_t.m4.
23333
23334 2003-08-12  Karl Berry  <karl@gnu.org>
23335
23336         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
23337         been made.
23338
23339 2003-08-11  Paul Eggert  <eggert@twinsun.com>
23340
23341         * modules/gnu-source, m4/gnu-source.m4:
23342         Remove; we're assuming Autoconf 2.54 or later now.
23343         Suggested by Bruno Haible.
23344         * MODULES.html.sh (func_all_modules): Remove gnu-source.
23345
23346 2003-08-11  Bruno Haible  <bruno@clisp.org>
23347
23348         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
23349
23350 2003-08-11  Bruno Haible  <bruno@clisp.org>
23351
23352         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
23353         (vasnprintf): Use it instead of wcslen.
23354
23355 2003-08-11  Bruno Haible  <bruno@clisp.org>
23356
23357         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
23358         value to ensure that _Bool promotes to int. Use #define for _Bool when
23359         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
23360
23361 2003-08-10  Karl Berry  <karl@gnu.org>
23362
23363         * lib/regex.h: update from libc (whitespace fix).
23364
23365 2003-08-09  Paul Eggert  <eggert@twinsun.com>
23366
23367         Merge some files from coreutils.  These changes were
23368         originally made by Jim Meyering.
23369         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
23370         many older Unixes require this.
23371         * lib/alloca.c (alloca): Remove cast to argument of free;
23372         no longer needed in C89.
23373         * lib/alloca_.h, regex.h: Fix white space to match
23374         what GNU indent does.
23375
23376 2003-08-09  Paul Eggert  <eggert@twinsun.com>
23377
23378         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
23379         apparently Emacs's Unicode mode got confused before my 2003-08-05
23380         checkin.
23381
23382 2003-08-08  Paul Eggert  <eggert@twinsun.com>
23383
23384         * m4/extensions.m4: New file.
23385         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
23386         Require gl_USE_SYSTEM_EXTENSIONS.
23387         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
23388         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
23389
23390 2003-08-08  Paul Eggert  <eggert@twinsun.com>
23391
23392         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
23393         * modules/extensions, modules/gnu-source: New files.
23394         * modules/timespec, modules/unlocked-io: Depend on extensions.
23395
23396 2003-08-07  Paul Eggert  <eggert@twinsun.com>
23397
23398         * modules/restrict: New file.
23399         * MODULES.html.sh (func_all_modules): Add restrict.
23400         * modules/regex: Depend on restrict.
23401
23402 2003-08-07  Paul Eggert  <eggert@twinsun.com>
23403
23404         * m4/restrict.m4: New file.
23405         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
23406
23407 2003-08-07  Bruno Haible  <bruno@clisp.org>
23408
23409         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
23410         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
23411
23412 2003-08-07  Bruno Haible  <bruno@clisp.org>
23413
23414         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
23415         makes the module 'getndelim2' compatible with the module 'getline'.
23416
23417 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23418
23419         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
23420         byte with "\201" to avoid glitches when editing that source file
23421         with multi-gnome-terminal.
23422
23423 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23424
23425         * lib/bumpalloc.h: Remove.
23426
23427 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23428
23429         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
23430         * modules/bumpalloc: Remove.
23431
23432 2003-08-04  Paul Eggert  <eggert@twinsun.com>
23433
23434         * lib/getloadavg.c: Change copyright notice and spacing to conform to
23435         GNU coding style.
23436
23437         Merge from coreutils.
23438         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
23439         1. From glibc.
23440         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
23441         from Karl Berry, implemented by Jim Meyering.
23442         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
23443         from Dmitry V. Levin.
23444         Remove anachronistic cast of xrealloc.
23445         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
23446         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
23447         type. Otherwise, it wouldn't compile with at least /bin/cc on
23448         ymp-cray-unicos9.0.2.X.
23449         Combine two mostly-identical uses of alloca into one.
23450         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
23451
23452 2003-08-04  Dave Love  <d.love@dl.ac.uk>
23453
23454         [From Emacs.]
23455
23456         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
23457         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
23458         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
23459         obsolete NLIST_NAME_UNION.
23460         [__GNU__]: Undef BSD and FSCALE.
23461         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
23462
23463 2003-08-03  Paul Eggert  <eggert@twinsun.com>
23464
23465         * lib/stdbool_.h (_Bool): Make it signed char, instead of
23466         an enum type, so that it's guaranteed to promote to int.  See:
23467         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
23468
23469 2003-08-03  Karl Berry  <karl@gnu.org>
23470
23471         * config/depcomp: update from automake.
23472
23473 2003-07-31  Paul Eggert  <eggert@twinsun.com>
23474
23475         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
23476         (strerror): Don't assume that a printable int fits in 14 bytes.
23477
23478 2003-07-31  Bruno Haible  <bruno@clisp.org>
23479
23480         * modules/getpass-gnu: New file.
23481         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
23482
23483 2003-07-31  Bruno Haible  <bruno@clisp.org>
23484
23485         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
23486
23487 2003-07-24  Karl Berry  <karl@gnu.org>
23488
23489         * config/missing: update from automake.
23490
23491 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
23492             Bruno Haible  <bruno@clisp.org>
23493
23494         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
23495         * lib/getline.c (getline, getdelim): Likewise.
23496         Remove _GNU_SOURCE define; now it's defined in config.h through
23497         m4/getline.m4.
23498
23499 2003-07-23  Karl Berry  <karl@gnu.org>
23500
23501         * config/config.sub: update from prep.
23502
23503 2003-07-22  Paul Eggert  <eggert@twinsun.com>
23504
23505         * modules/xalloc (Depends-on): Add exitfail.
23506         * modules/xmemcoll: Likewise.
23507
23508 2003-07-22  Paul Eggert  <eggert@twinsun.com>
23509
23510         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
23511         over-parenthesization in macros.
23512
23513         Sync with coreutils.
23514
23515         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
23516         required by C99.
23517
23518         Use `exit_failure' for xalloc and xmemcoll instead of their own
23519         private exit-failure variables.
23520         * lib/xalloc.h (xalloc_exit_failure): Remove.
23521         * lib/xmalloc.c: Likewise.  Include exitfail.h.
23522         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
23523         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
23524         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
23525         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
23526
23527 2003-07-20  Jim Meyering  <jim@meyering.net>
23528
23529         * modules/closeout (Depends-on): Add exitfail.
23530         Suggestion from Bruno Haible.
23531
23532 2003-07-19  Karl Berry  <karl@gnu.org>
23533
23534         * config/config.sub: update from prep.
23535
23536 2003-07-18  Paul Eggert  <eggert@twinsun.com>
23537
23538         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
23539         Remove.
23540         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
23541         to test that it can stand by itself.  Include "exitfail.h".
23542         Clients should set exit_failure instead.
23543         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
23544
23545 2003-07-18  Bruno Haible  <bruno@clisp.org>
23546
23547         * modules/getndelim2: New file.
23548         * modules/getline: Share files with module getndelim2.
23549         * modules/getnline: Depend on getndelim2 instead of sharing files with
23550         it. Add getnline.c to lib_SOURCES.
23551         * MODULES.html.sh (func_all_modules): Add getndelim2.
23552
23553 2003-07-18  Bruno Haible  <bruno@clisp.org>
23554
23555         * m4/getndelim2.m4: New file.
23556         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
23557         invoke gl_PREREQ_GETNDELIM2.
23558         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
23559         gl_PREREQ_GETNDELIM2.
23560         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
23561         gl_GETNDELIM2.
23562
23563 2003-07-18  Bruno Haible  <bruno@clisp.org>
23564
23565         * lib/getndelim2.h: New file.
23566         * lib/getndelim2.c: Make into a module of its own. Include config.h,
23567         getndelim2.h.
23568         (getndelim2): Make non-static. Change return type to ssize_t.
23569         * lib/getline.h: Change argument names.
23570         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
23571         * lib/getnline.c: Include getndelim2.h.
23572
23573 2003-07-18  Andreas Schwab  <schwab@suse.de>
23574
23575         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
23576
23577 2003-07-17  Karl Berry  <karl@gnu.org>
23578
23579         * config/config.sub: update from prep.
23580
23581 2003-07-17  Bruno Haible  <bruno@clisp.org>
23582
23583         * modules/getnline: New file.
23584         * modules/getline: Add lib/getndelim2.c to source file list.
23585         * MODULES.html.sh (func_all_modules): Add getnline.
23586
23587 2003-07-17  Bruno Haible  <bruno@clisp.org>
23588
23589         * m4/getnline.m4: New file.
23590
23591 2003-07-17  Bruno Haible  <bruno@clisp.org>
23592
23593         * m4/Makefile.am.in: Remove file.
23594         * m4/Makefile.am: Remove file.
23595         * m4/Makefile.in: Remove file.
23596
23597 2003-07-17  Bruno Haible  <bruno@clisp.org>
23598
23599         * lib/getnline.h: New file.
23600         * lib/getnline.c: New file.
23601         * lib/getndelim2.c: New file, extracted from getline.c.
23602         (getndelim2): Renamed from getdelim2, with added nmax argument.
23603         * lib/getline.c: Include getndelim2.c.
23604         (getdelim2): Moved out to getndelim2.c.
23605         (getline, getdelim): Update.
23606
23607 2003-07-17  Bruno Haible  <bruno@clisp.org>
23608
23609         * lib/Makefile.am: Remove file.
23610         * lib/Makefile.in: Remove file.
23611
23612 2003-07-17  Bruno Haible  <bruno@clisp.org>
23613
23614         * configure.in: Remove file.
23615         * Makefile.in: Remove file.
23616
23617 2003-07-17  Bruno Haible  <bruno@clisp.org>
23618
23619         * MODULES.html.sh: Put the </BODY> right before </HTML>.
23620
23621 2003-07-16  Karl Berry  <karl@gnu.org>
23622
23623         * config/srclist-update: was running fixlicense twice, which caused
23624                 texinfo.tex to be nullified for some reason.  Simplify,
23625                 $gplsrc is no longer needed as far as I can see?
23626
23627 2003-07-16  Jim Meyering  <jim@meyering.net>
23628
23629         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
23630
23631 2003-07-15  Paul Eggert  <eggert@twinsun.com>
23632
23633         * config/srclist.txt: Get the following files from gettext-runtime/intl
23634         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
23635         ref-del.sin.  From Bruno Haible.
23636         * config/srclist-update (fixfile): Change grep pattern again, since the
23637         previous fix didn't work (there was another trailing $).  Use
23638         '[$]' to escape the $s.
23639
23640 2003-07-15  Karl Berry  <karl@gnu.org>
23641
23642         * lib/vasnprintf.c: update from gettext.
23643
23644 2003-07-15  Karl Berry  <karl@gnu.org>
23645
23646         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
23647         gets expanded when surrounded by '$'.
23648
23649 2003-07-15  Jim Meyering  <jim@meyering.net>
23650
23651         * modules/save-cwd: Don't depend on error.  From Derek Price.
23652
23653 2003-07-15  Jim Meyering  <jim@meyering.net>
23654
23655         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
23656
23657 2003-07-14  Simon Josefsson  <jas@extundo.com>
23658
23659         * modules/mempcpy: New file.
23660         * MODULES.html.sh (func_all_modules): Add mempcpy.
23661
23662 2003-07-14  Simon Josefsson  <jas@extundo.com>
23663
23664         * m4/mempcpy.m4: New file.
23665
23666 2003-07-14  Simon Josefsson  <jas@extundo.com>
23667
23668         * lib/mempcpy.h: New file.
23669         * lib/mempcpy.c: New file.
23670
23671 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23672
23673         * modules/getdate, modules/posixtm: Depend on mktime.
23674
23675 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23676
23677         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
23678         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
23679         unicodeio.c, unicodeio.h, unlocked-io.h:
23680         Switch from LGPL to GPL.
23681
23682 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23683
23684         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
23685         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
23686         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
23687         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
23688         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
23689         updated automatically by ../config/srclist-update.  This changes
23690         their license from LPGL to GPL.
23691
23692 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23693
23694         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
23695         assumed to refer to the root of the most recent stable gettext version.
23696         * config/srclistvars.sh: Add defaults for eggert.
23697         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
23698         Match "This program" as well as "The program".  This is needed
23699         for gettext.
23700
23701 2003-07-14  Jim Meyering  <jim@meyering.net>
23702
23703         Don't emit diagnostics.  Let callers do that.
23704         * lib/save-cwd.c: Don't include "error.h".
23705         (save_cwd): Don't call error.  Ensure that errno is valid
23706         when returning nonzero.
23707
23708         * lib/save-cwd.h (restore_cwd): Update prototype.
23709         * lib/save-cwd.c (restore_cwd): Remove two parameters.
23710         Simplify.  Don't call error upon failure.  Let callers do that.
23711         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
23712         when auditing is enabled.  But don't bother updating the #if.
23713
23714 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
23715
23716         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
23717         it breaks C++ compilation.
23718         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
23719
23720 2003-07-10  Simon Josefsson  <jas@extundo.com>
23721
23722         * modules/strchrnul (Makefile.am): Add strchrnul.h.
23723
23724 2003-07-10  Jim Meyering  <jim@meyering.net>
23725
23726         * m4/clock_time.m4: Remove trailing blank.
23727         * m4/intmax_t.m4: Likewise.
23728
23729 2003-07-10  Jim Meyering  <jim@meyering.net>
23730
23731         * lib/vasnprintf.c: Remove trailing blanks.
23732         Make cpp indentation consistent.
23733
23734 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23735
23736         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
23737         posixver.c, strftime.c, strnlen.c, strverscmp.c:
23738         Switch from LGPL to GPL.
23739
23740 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23741
23742         * config/srclist.txt: Sort sublists.  Add
23743         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
23744         that differ from gnulib for one reason or another; we'd like this list
23745         to be smaller but for now let's document what we have.
23746
23747 2003-07-08  Paul Eggert  <eggert@twinsun.com>
23748
23749         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
23750         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
23751         and sweeter "eval x=$x".
23752         * config/srclist.txt: Get lib/argp* from glibc.
23753
23754 2003-07-07  Paul Eggert  <eggert@twinsun.com>
23755
23756         * lib/mktime.c: Fix some boundary cases and remove need for floating
23757         point.
23758
23759         Issue a compile-time diagnostic if time_t is floating point, or if
23760         two's complement arithmetic is not in effect, or if arithmetic
23761         right shift does not propagate the sign.  These assumptions were
23762         all in the original code but they weren't checked.
23763
23764         (TIME_T_MIDPOINT, verify): New macros.
23765         (__isleap): Remove; it has integer overflow problems.
23766         (leapyear): New function, without those problems.
23767         (ydhms_tm_diff): Remove; splitting into two parts.
23768         (ydhms_diff): New function, containing the arithmetic part of
23769         the old ydhms_tm_diff function.  Issue a compile-time
23770         diagnostic if we are not using C99 integer division.
23771         Avoid casts when possible.
23772         (guess_time_tm): New function, containing the checking part of
23773         the old ydhms_tm_diff function.  Return the new value, rather than
23774         the difference between it and the old.  Accept a new argument T
23775         so that *T specifies the old value.  Check for overflow in the result.
23776
23777         (__mktime_internal): Use a time_t offset, not a long int offset.
23778         This undoes the 2003-06-04 change, which is no longer needed now
23779         that we have better overflow checking.
23780         (localtime_offset): Likewise.
23781
23782         (__mktime_internal): Avoid harmful overflow on hosts where time_t
23783         and long are 64-bit but int is only 32-bit.
23784         (ydhms_diff): Use long int to store year1 and yday1.
23785         Issue a compile-time diagnostic if long int is not wide enough.
23786
23787         (__mktime_internal): Use long int to store adjusted year and yday.
23788         Use plain C rather than preprocessor commands, if that doesn't
23789         affect efficiency.
23790         Check for overflow (and try to repair) after each probe
23791         rather than checking only at the very end.  This avoids some bugs
23792         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
23793         does not equal GMT offset at maximum time).
23794         Use integer to check for overflow rather than floating point; this
23795         is more portable to non-IEEE hosts, and is a tad faster.
23796         When we detect that we are oscillating between two values,
23797         don't check whether tm_isdst has the requested value, since
23798         we already know the answer.  When tm_isdst has the wrong value,
23799         use a different heuristic to find the right one, based on the
23800         extreme values actually observed in practice in tz2003a,
23801         rather than the (overly optimistic) "previous 3 calendar quarters".
23802
23803         (not_equal_tm, print_tm, check_result): Use "const T" rather than
23804         "T const" to accommodate glibc style.
23805         (check_result): Use less-confusing report format.  "long" -> "long int.
23806         (main): Likewise.
23807         Don't loop if the iteration overflows time_t.
23808         Allow a negative step in the iteration.
23809
23810 2003-07-06  Karl Berry  <karl@gnu.org>
23811
23812         * config/depcomp: update from automake.
23813         * config/config.sub: update from prep.
23814
23815 2003-07-03  Karl Berry  <karl@gnu.org>
23816
23817         * config/config.guess: update from prep.
23818
23819 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23820
23821         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
23822         xreadlink.c now includes it unconditionally.
23823
23824 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23825
23826         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
23827         having it depend on HAVE_SYS_TYPES_H.
23828
23829 2003-07-01  Bruno Haible  <bruno@clisp.org>
23830
23831         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
23832         <sys/types.h> should be sufficient.
23833         Reported by Paul Eggert.
23834
23835 2003-06-26  Karl Berry  <karl@gnu.org>
23836
23837         * config/depcomp: update from automake.
23838
23839 2003-06-26  Bruno Haible  <bruno@clisp.org>
23840
23841         * modules/human: Depend on module stdbool.
23842
23843 2003-06-25  Bruno Haible  <bruno@clisp.org>
23844
23845         * modules/readlink: New file.
23846         * modules/xreadlink: Depend on it.
23847         * MODULES.html.sh (func_all_modules): Add readlink.
23848
23849 2003-06-25  Bruno Haible  <bruno@clisp.org>
23850
23851         * m4/readlink.m4: New file.
23852
23853 2003-06-25  Bruno Haible  <bruno@clisp.org>
23854
23855         * lib/readlink.c: New file.
23856
23857 2003-06-22  Karl Berry  <karl@gnu.org>
23858
23859         * config/srclist.txt: update mkinstalldirs from automake.
23860         * config/mkinstalldirs: update.
23861
23862 2003-06-22  Bruno Haible  <bruno@clisp.org>
23863
23864         Portability to mingw32.
23865         * m4/ssize_t.m4: New file, from GNU gettext.
23866         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
23867         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
23868
23869 2003-06-22  Bruno Haible  <bruno@clisp.org>
23870
23871         * modules/safe-read: Add m4/ssize_t.m4.
23872         * modules/xreadlink: Add m4/ssize_t.m4.
23873
23874 2003-06-20  Bruno Haible  <bruno@clisp.org>
23875
23876         Assume C89, so PARAMS isn't needed.
23877         * lib/unicodeio.h (PARAMS): Remove.
23878         * lib/unicodeio.c: Don't use PARAMS.
23879
23880 2003-06-18  Karl Berry  <karl@gnu.org>
23881
23882         * config/config.{guess,sub}: update from prep.
23883
23884 2003-06-18  Jim Meyering  <jim@meyering.net>
23885
23886         Merge changes from coreutils.
23887         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
23888         Remove explicit declarations of xmalloc and realloc.
23889         Include xalloc.h.
23890         (read_utmp): Remove anachronistic cast of xmalloc.
23891
23892 2003-06-17  Paul Eggert  <eggert@twinsun.com>
23893
23894         Assume C89, so PARAMS isn't needed.
23895         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
23896         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
23897         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
23898         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
23899         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
23900         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
23901         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
23902         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
23903         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
23904         lib/xstrtod.h, lib/xstrtol.h: Likewise.
23905         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
23906         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
23907         no longer needed. Anyway, config.h should always be included before any
23908         other file.
23909
23910 2003-06-11  Simon Josefsson  <jas@extundo.com>
23911
23912         * modules/sysexits: New file.
23913         * MODULES.html.sh (func_all_modules): Add sysexits.
23914
23915 2003-06-11  Simon Josefsson  <jas@extundo.com>
23916
23917         * lib/sysexit_.h: New file.
23918
23919 2003-06-11  Derek Price  <derek@ximbiot.com>
23920
23921         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
23922         necessary.
23923
23924 2003-06-11  Bruno Haible  <bruno@clisp.org>
23925
23926         * m4/sysexits.m4: New file.
23927
23928 2003-06-10  Simon Josefsson  <jas@extundo.com>
23929
23930         * lib/argp.h: New file, from glibc.
23931         * lib/argp-ba.c: New file, from glibc.
23932         * lib/argp-eexst.c: New file, from glibc.
23933         * lib/argp-fmtstream.c: New file, from glibc.
23934         * lib/argp-fmtstream.h: New file, from glibc.
23935         * lib/argp-fs-xinl.c: New file, from glibc.
23936         * lib/argp-help.c: New file, from glibc.
23937         * lib/argp-namefrob.h: New file, from glibc.
23938         * lib/argp-parse.c: New file, from glibc.
23939         * lib/argp-pv.c: New file, from glibc.
23940         * lib/argp-pvh.c: New file, from glibc.
23941         * lib/argp-xinl.c: New file, from glibc.
23942
23943 2003-06-10  Simon Josefsson  <jas@extundo.com>
23944
23945         * modules/strchrnul: New file.
23946
23947 2003-06-10  Simon Josefsson  <jas@extundo.com>
23948
23949         * modules/argp: New file.
23950
23951 2003-06-10  Simon Josefsson  <jas@extundo.com>
23952
23953         * m4/strchrnul.m4: New file.
23954
23955 2003-06-10  Simon Josefsson  <jas@extundo.com>
23956
23957         * lib/strchrnul.h: New file.
23958         * lib/strchrnul.c: New file.
23959
23960 2003-06-10  Bruno Haible  <bruno@clisp.org>
23961
23962         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
23963
23964 2003-06-07  Karl Berry  <karl@gnu.org>
23965
23966         * config/config.{guess,sub}: update from prep.
23967
23968 2003-06-07  Jim Meyering  <jim@meyering.net>
23969
23970         * modules/strtod: Use $(...) notation, not @...@ for
23971         AC_REPLACE'd variables.
23972         * modules/localcharset: Likewise.
23973
23974 2003-06-07  Jim Meyering  <jim@meyering.net>
23975
23976         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
23977         in place of my name in the copyright comment.
23978         Remove definition and uses of __P.
23979
23980         From coreutils.
23981         * lib/stat.c: Don't declare xmalloc explicitly.
23982         Instead, include "xalloc.h".
23983         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
23984         xrealloc, and xcalloc return values.
23985         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
23986         Improve comment.
23987         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
23988
23989 2003-06-07  Bruno Haible  <bruno@clisp.org>
23990
23991         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
23992         avoid AC_CONFIG_LINKS.
23993         * modules/fnmatch (Makefile.am): Use explicit creation rule for
23994         fnmatch.h, to avoid AC_CONFIG_LINKS.
23995         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
23996
23997 2003-06-07  Bruno Haible  <bruno@clisp.org>
23998
23999         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
24000         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
24001         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
24002         directory.
24003         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
24004         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
24005         directory.
24006
24007 2003-06-06  Jim Meyering  <jim@meyering.net>
24008
24009         Merge from coreutils.
24010         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
24011         Consolidate declarations and initializations of *_base* locals.
24012
24013         Merge from coreutils.
24014         This avoids a core dump on systems without GNU putenv,
24015         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
24016         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
24017         (unsetenv): New static function, from GNU libc.
24018         (rpl_putenv): Use it.
24019
24020         * lib/modechange.c: Remove trailing blanks.
24021
24022         Merge from coreutils.
24023         * lib/fsusage.c: Remove declaration of statfs.
24024         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
24025
24026         * lib/posixtm.c: Include <stdbool.h> unconditionally.
24027
24028 2003-06-06  Jim Meyering  <jim@meyering.net>
24029
24030         * lib/stdbool_.h: Renamed from stdbool.h.in.
24031
24032 2003-06-06  Jim Meyering  <jim@meyering.net>
24033             Bruno Haible  <bruno@clisp.org>
24034
24035         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
24036         Adjust Makefile.am snippet not to redirect directly to target.
24037         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
24038
24039 2003-06-05  Paul Eggert  <eggert@twinsun.com>
24040
24041         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
24042         mismatch, look in future quarters as well as past.  This fixes a
24043         bug when processing fall-backwards gaps immediately after a long
24044         period of daylight-saving time.
24045
24046         * lib/mktime.c: Assume freestanding C89 or better.
24047         (HAVE_LIMITS_H): Remove.  Assume it's 1.
24048         (__P): Remove; not used.
24049         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
24050         (mktime, not_equal_tm, print_tm, check_result,
24051         main): Use prototypes.  Use const * where appropriate.
24052         (main): Fix typo in testing code that uncovered by above changes.
24053         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
24054
24055 2003-06-04  Paul Eggert  <eggert@twinsun.com>
24056
24057         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
24058         locale.h, localeconv.  This merges changes from coreutils.
24059
24060         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
24061         It can be removed after the next Autoconf is released.
24062         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
24063         needed.
24064
24065 2003-06-04  Paul Eggert  <eggert@twinsun.com>
24066
24067         * lib/mktime.c: Fix Debian bug 177940
24068         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
24069         (localtime_offset): Now long int, not time_t, because we want it
24070         to be guaranteed to be signed.  All uses changed.
24071         (__mktime_internal): If overflow would occur when adding offset,
24072         don't add it.
24073
24074         Merge 'human' changes from coreutils.  Rewrite to support
24075         locale-specific notations like thousands separators.
24076         * lib/human.c: Simplify authorship notice.
24077         Include human.h immediately after config.h.
24078         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
24079         <limits.h>: Do not include, since human.h does.
24080         (SIZE_MAX, UINTMAX_MAX): New macros.
24081         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
24082         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
24083         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
24084         (power_letter): Renamed from suffixes.
24085         (generate_suffix_backwards): Remove.
24086         (adjust_value): Now takes int style (because of human.h changes)
24087         and long double value (for greater precision on some platforms).
24088         (group_number): New function.
24089         (human_readable): Use it.  Use integer options, not enum.
24090         Put the options before the sizes in the arg list.
24091         Support all the new options.
24092         The old human_readable function has been removed;
24093         use inttostr.h instead.
24094         (human_readable, default_block_size, humblock):
24095         Use uintmax_t, not int, for block sizes.
24096         (human_readable_inexact, block_size_types): Remove.
24097         (block_size_opts): New constant.
24098         (human_options): Renamed from human_block_size, with new signature
24099         that allows block sizes up to UINTMAX_MAX.  All callers changed.
24100         * lib/human.h: Add copyright and authorship notice.
24101         Include <limits.h> and <stdbool.h> unconditionally.
24102         (PARAMS): Remove.  All uses removed.
24103         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
24104         (enum human_inexact_style): Remove tag; now a nameless enum.
24105         (human_floor, human_ceiling, human_round_to_even): Now have
24106         values 2, 0, 1 rather than -1, 1, 0.
24107         (human_group_digits, human_suppress_point_zero, human_autoscale,
24108         human_base_1024, human_SI, human_B): New constants.
24109         (human_readable_inexact, human_block_size): Remove.
24110         (human_readable): Size args are now uintmax_t, not int.
24111         (human_options): New decl.
24112
24113         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
24114         unnecessary now that we assume C89 or better.  This change
24115         imported from coreutils.
24116
24117         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
24118         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
24119         in the 2003-05-30 sync from glibc.
24120
24121         .h files should stand alone, but we shouldn't include <sys/types.h>
24122         if we can get away with just <stddef.h>.
24123
24124         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
24125         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
24126         rather than <sys/types.h>, as we merely need size_t.
24127         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
24128         to get size_t.
24129         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
24130         Include <stdio.h>, to get FILE.
24131         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
24132         memcasecmp.h has included <stddef.h> and all we need is size_t.
24133         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
24134         our interface, instead of including <sys/types.h>
24135
24136 2003-06-04  Paul Eggert  <eggert@twinsun.com>
24137
24138         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
24139         now, as glibc mktime is buggy on non-glibc systems.
24140
24141 2003-06-03  Karl Berry  <karl@gnu.org>
24142
24143         * config/config.sub: update from prep.
24144
24145 2003-06-02  Paul Eggert  <eggert@twinsun.com>
24146
24147         [from coreutils]
24148         Fix some minor time-related bugs with POSIX time arguments.
24149         Some valid time stamps were being rejected (notably -1, and
24150         time stamps before 1900 on 64-bit hosts).  And some invalid
24151         time stamps were being accepted, e.g. September 31.
24152
24153         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
24154         that we can return (time_t) -1 successfully.
24155         * lib/posixtm.c: Likewise.
24156         [HAVE_STDBOOL_H]: Include <stdbool.h>.
24157         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
24158         (t): Remove static var.
24159         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
24160         of static var.  All uses changed.
24161         (year): Do not reject years before 1900; they can occur with
24162         64-bit time_t.
24163         (posix_time_parse): Do not check for out-of-range components;
24164         that is now the caller's responsibility, since our checks were
24165         only approximations.
24166         (posixtime): Use mktime to check for out-of-range components,
24167         since it knows them exactly.
24168         If mktime returns (time_t) -1, check whether an error actually occurred
24169         by invoking localtime on -1.
24170         (main) [TEST_POSIXTIME]: Check for input data errors, and report
24171         posixtime failures better.
24172         Improve the test data (in comments only).
24173
24174 2003-06-02  Karl Berry  <karl@gnu.org>
24175
24176         * config/mkinstalldirs (version): new variable.
24177         (--version): new option.
24178         (usage): improve message.
24179
24180 2003-05-30  Karl Berry  <karl@gnu.org>
24181
24182         * lib/mktime.c: update from libc.
24183
24184 2003-05-30  Bruno Haible  <bruno@clisp.org>
24185
24186         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
24187         * config/config.rpath: Upgrade to gettext-0.12.1.
24188
24189 2003-05-30  Bruno Haible  <bruno@clisp.org>
24190
24191         * m4/gettext.m4: Upgrade to gettext-0.12.1.
24192         * m4/nls.m4: New file, from gettext-0.12.1.
24193         * m4/po.m4: New file, from gettext-0.12.1.
24194         * m4/progtest.m4: Upgrade to gettext-0.12.1.
24195
24196 2003-05-30  Bruno Haible  <bruno@clisp.org>
24197
24198         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
24199         * lib/localcharset.h: Likewise.
24200         * lib/localcharset.c: Likewise.
24201
24202 2003-05-29  Karl Berry  <karl@gnu.org>
24203
24204         * config/config.rpath: update from gettext.
24205
24206 2003-05-28  Paul Eggert  <eggert@twinsun.com>
24207
24208         Assume the headers required for C89 freestanding compilers.
24209         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
24210         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
24211         * m4/human.m4 (gl_HUMAN): Likewise.
24212         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
24213         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
24214         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24215         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
24216         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24217         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
24218
24219 2003-05-28  Paul Eggert  <eggert@twinsun.com>
24220
24221         Assume the headers required for C89 freestanding compilers.
24222         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
24223         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
24224         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
24225         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
24226         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
24227         define, since <limits.h> is guaranteed to do that.
24228         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
24229         * lib/exclude.c: Include <stdbool.h> unconditionally.
24230         * lib/tempname.c: Include <stddef.h> unconditionally.
24231         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
24232         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
24233         <stddef.h> does that.
24234         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
24235         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
24236         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
24237         needed.
24238         * lib/xstrtol.c: Likewise.
24239         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
24240         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
24241
24242         * lib/addext.c (addext): Use assignment rather than cast, to avoid
24243         warnings on some platforms.
24244
24245         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
24246         arbitrarily.
24247
24248 2003-05-26  Jim Meyering  <jim@meyering.net>
24249
24250         Merge in a change from coreutils:
24251         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
24252         that is guaranteed to be `no'.  Use `no_such_member' to indicate
24253         that condition, rather than `-1' which is slightly misleading.
24254         Change the name of the cache variable to have the gl_ prefix.
24255         Prompted by a patch from Richard Dawe for DJGPP.
24256
24257 2003-05-24  Karl Berry  <karl@gnu.org>
24258
24259         * config/config.guess: update from prep.
24260
24261 2003-05-22  Karl Berry  <karl@gnu.org>
24262
24263         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
24264
24265 2003-05-20  Karl Berry  <karl@gnu.org>
24266
24267         * config/config.guess: update from prep.
24268
24269 2003-05-18  Karl Berry  <karl@gnu.org>
24270
24271         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
24272         might actually be set by the user.
24273
24274         * config/depcomp, install-sh, mdate-sh: update from automake.
24275
24276 2003-05-17  Bruno Haible  <bruno@clisp.org>
24277
24278         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
24279         invalid expansion for AC_EGREP_CPP.
24280         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
24281         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
24282         Suggested by Akim Demaille <akim@epita.fr> in
24283         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
24284
24285 2003-05-12  Jim Meyering  <jim@meyering.net>
24286
24287         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
24288         the space-padded-by-default conversion specifiers, %e, %k, %l.
24289
24290 2003-05-12  Bruno Haible  <bruno@clisp.org>
24291
24292         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
24293         the string is longer than 4 KB.
24294
24295 2003-05-11  Karl Berry  <karl@gnu.org>
24296
24297         * config/config.{guess,sub}: update from prep.
24298
24299 2003-05-09  Bruno Haible  <bruno@clisp.org>
24300
24301         * modules/error: Add m4/strerror_r.m4 to file list.
24302
24303 2003-05-03  Bruno Haible  <bruno@clisp.org>
24304
24305         Upgrade to Unicode-4.0.
24306         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
24307         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
24308         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
24309         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
24310         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
24311         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
24312         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
24313         Change width of U+E0100..U+E01EF from 1 to 0.
24314
24315 2003-04-25  Jim Meyering  <jim@meyering.net>
24316
24317         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
24318         of type size_t, not int.
24319
24320 2003-04-25  Bruno Haible  <bruno@clisp.org>
24321
24322         * lib/copy-file.c: Include <stddef.h>, for size_t.
24323
24324 2003-04-21  Paul Eggert  <eggert@twinsun.com>
24325
24326         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
24327         code which expansion is under static control.  Patch imported from
24328         Akim Demaille's patch to Bison; see
24329         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
24330
24331 2003-04-14  Bruno Haible  <bruno@clisp.org>
24332
24333         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
24334
24335 2003-04-11  Jim Meyering  <jim@meyering.net>
24336
24337         Merge changes from Coreutils.
24338
24339         2003-03-22  Jim Meyering  <jim@meyering.net>
24340
24341         * lib/strftime.c (widen): Cast alloca return value to proper type.
24342
24343         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
24344
24345         From GNU libc.
24346         * lib/strftime.c (my_strftime): Handle very large width
24347         specifications for numeric values correctly.  Improve checks for
24348         overflow.
24349
24350         2003-01-19  Jim Meyering  <jim@meyering.net>
24351
24352         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
24353         definitions.
24354         (nl_get_alt_digit) [! defined my_strftime]: Define.
24355         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
24356         _nl_get_alt_digit and _nl_get_walt_digit.
24357
24358         * lib/strftime.c (my_strftime): Merge in locale-related changes from
24359         libc. These changes have no effect outside of _LIBC.
24360
24361 2003-04-10  Bruno Haible  <bruno@clisp.org>
24362
24363         * modules/findprog: New file.
24364         * MODULES.html.sh (func_all_modules): Add it.
24365
24366 2003-04-10  Bruno Haible  <bruno@clisp.org>
24367
24368         * m4/findprog.m4: New file.
24369         * m4/eaccess.m4: New file.
24370
24371 2003-04-10  Bruno Haible  <bruno@clisp.org>
24372
24373         * lib/findprog.h: New file, from GNU gettext.
24374         * lib/findprog.c: New file, from GNU gettext.
24375
24376 2003-04-05  Jim Meyering  <jim@meyering.net>
24377
24378         Merge changes from Coreutils.
24379
24380         * lib/exclude.h (PARAMS): Remove definition and uses.
24381         * lib/exclude.c: Remove uses of `PARAMS'.
24382
24383         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
24384         Add test-cases for DOS filenames. Declare program_name.
24385         (main): Set up program_name.  Patch by Rich Dawe.
24386
24387         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
24388         error from mntctl.
24389         Use mntctl's return value to drive the entry-processing loop, since
24390         we can't rely on the value of the vmt_length member in the last
24391         entry.  On some systems doing so could result in exhausting
24392         virtual memory.  Based in part on a patch from Mike Jetzer.
24393
24394 2003-04-04  Bruno Haible  <bruno@clisp.org>
24395
24396         * modules/linebreak: New file.
24397         * MODULES.html.sh (func_all_modules): Add it.
24398
24399 2003-04-04  Bruno Haible  <bruno@clisp.org>
24400
24401         * m4/linebreak.m4: New file.
24402
24403 2003-04-04  Bruno Haible  <bruno@clisp.org>
24404
24405         * lib/linebreak.h: New file, from GNU gettext.
24406         * lib/linebreak.c: New file, from GNU gettext with slight
24407         modifications.
24408         * lib/lbrkprop.h: New file, from GNU gettext.
24409
24410 2003-04-03  Bruno Haible  <bruno@clisp.org>
24411
24412         * modules/utf8-ucs4: New file.
24413         * modules/utf16-ucs4: New file.
24414         * modules/ucs4-utf8: New file.
24415         * modules/ucs4-utf16: New file.
24416         * MODULES.html.sh (func_all_modules): Add them.
24417
24418 2003-04-03  Bruno Haible  <bruno@clisp.org>
24419
24420         * m4/utf-ucs4.m4: New file.
24421         * m4/ucs4-utf.m4: New file.
24422
24423 2003-04-03  Bruno Haible  <bruno@clisp.org>
24424
24425         * lib/utf8-ucs4.h: New file, from GNU gettext.
24426         * lib/utf16-ucs4.h: New file, from GNU gettext.
24427         * lib/ucs4-utf8.h: New file, from GNU gettext.
24428         * lib/ucs4-utf16.h: New file, from GNU gettext.
24429
24430 2003-04-02  Bruno Haible  <bruno@clisp.org>
24431
24432         * modules/binary-io: New file.
24433         * MODULES.html.sh (func_all_modules): Add it.
24434
24435 2003-04-02  Bruno Haible  <bruno@clisp.org>
24436
24437         * lib/binary-io.h: New file, from GNU gettext.
24438
24439 2003-04-01  Bruno Haible  <bruno@clisp.org>
24440
24441         * modules/pathname: New file.
24442         * MODULES.html.sh (func_all_modules): Add it.
24443
24444 2003-04-01  Bruno Haible  <bruno@clisp.org>
24445
24446         * lib/pathname.h: New file, from GNU gettext.
24447         * lib/concatpath.c: New file, from GNU gettext.
24448
24449 2003-03-30  Bruno Haible  <bruno@clisp.org>
24450
24451         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
24452
24453 2003-03-30  Bruno Haible  <bruno@clisp.org>
24454
24455         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
24456         function chown() doesn't exist.
24457
24458 2003-03-28  Bruno Haible  <bruno@clisp.org>
24459
24460         * modules/copy-file: New file.
24461         * MODULES.html.sh (func_all_modules): Add it.
24462
24463 2003-03-28  Bruno Haible  <bruno@clisp.org>
24464
24465         * m4/copy-file.m4: New file.
24466
24467 2003-03-28  Bruno Haible  <bruno@clisp.org>
24468
24469         * lib/copy-file.h: New file, from GNU gettext.
24470         * lib/copy-file.c: New file, from GNU gettext.
24471
24472 2003-03-18  Jim Meyering  <jim@meyering.net>
24473
24474         * lib/quote.c (quote_n): Fix typo in comment.
24475
24476 2003-03-18  Bruno Haible  <bruno@clisp.org>
24477
24478         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
24479         checking.
24480         * m4/onceonly_2_57.m4: Likewise.
24481
24482 2003-03-17  Bruno Haible  <bruno@clisp.org>
24483
24484         * m4/onceonly.m4: Require autoconf 2.54 or newer.
24485         (m4_quote): Remove macro.
24486         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
24487
24488 2003-03-14  Jim Meyering  <jim@meyering.net>
24489
24490         Merge changes from Coreutils.
24491         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
24492         to be const, in order to avoid warnings.
24493         (obstack_room): Likewise.
24494         (obstack_empty_p): Likewise.
24495
24496 2003-03-14  Bruno Haible  <bruno@clisp.org>
24497
24498         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
24499         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
24500
24501 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24502
24503         Merge changes from Bison.
24504         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
24505         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
24506         when compiling Bison 1.875's `bitset bset = obstack_alloc
24507         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
24508         * lib/hash.c: Include <stdbool.h> unconditionally.
24509
24510 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24511
24512         * m4/onceonly.m4 (m4_quote): New macro.
24513         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
24514         Quote AC_FOREACH variable-expansions properly.
24515
24516 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24517
24518         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
24519
24520 2003-03-09  Paul Eggert  <eggert@twinsun.com>
24521
24522         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
24523         Reported by Bruce Becker; see:
24524         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
24525
24526 2003-03-03  Paul Eggert  <eggert@twinsun.com>
24527             Bruno Haible  <bruno@clisp.org>
24528
24529         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
24530         Reported by John Hughes, see
24531         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
24532
24533 2003-02-20  Bruno Haible  <bruno@clisp.org>
24534
24535         * MODULES.html.sh (func_all_modules): Add poll.
24536
24537 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24538
24539         * modules/poll: New file.
24540
24541 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24542
24543         * lib/poll_.h: New file.
24544         * lib/poll.c: New file.
24545
24546 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24547
24548         * m4/poll.m4: New file.
24549
24550 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24551
24552         * modules/mathl: New file.
24553
24554 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24555
24556         * lib/mathl.h: New file.
24557         * lib/acosl.c: New file.
24558         * lib/asinl.c: New file.
24559         * lib/atanl.c: New file.
24560         * lib/ceill.c: New file.
24561         * lib/cosl.c: New file.
24562         * lib/expl.c: New file.
24563         * lib/floorl.c: New file.
24564         * lib/frexpl.c: New file.
24565         * lib/ldexpl.c: New file.
24566         * lib/logl.c: New file.
24567         * lib/sincosl.c: New file.
24568         * lib/sinl.c: New file.
24569         * lib/sqrtl.c: New file.
24570         * lib/tanl.c: New file.
24571         * lib/trigl.c: New file.
24572         * lib/trigl.h: New file.
24573
24574 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24575
24576         * m4/mathl.m4: New file.
24577
24578 2003-02-18  Bruno Haible  <bruno@clisp.org>
24579
24580         * MODULES.html.sh (func_all_modules): Add mathl.
24581
24582 2003-02-17  Bruno Haible  <bruno@clisp.org>
24583
24584         * modules/mkdtemp: New module.
24585         * MODULES.html.sh (func_all_modules): Add it.
24586
24587 2003-02-17  Bruno Haible  <bruno@clisp.org>
24588
24589         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
24590
24591 2003-02-17  Bruno Haible  <bruno@clisp.org>
24592
24593         * lib/mkdtemp.h: New file, from GNU gettext.
24594         * lib/mkdtemp.c: New file, from GNU gettext.
24595
24596 2003-02-02  Jim Meyering  <jim@meyering.net>
24597
24598         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
24599         e.g. glibc-2.2.93.
24600
24601 2003-01-31  Bruno Haible  <bruno@clisp.org>
24602
24603         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
24604         'rpl_rename'.
24605         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
24606         'rpl_strnlen'.
24607         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
24608         'rpl_strtod'.
24609         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
24610         'rpl_utime'.
24611
24612 2003-01-31  Bruno Haible  <bruno@clisp.org>
24613
24614         * lib/rename.c: #undef rename before defining rpl_rename.
24615         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
24616
24617 2003-01-30  Bruno Haible  <bruno@clisp.org>
24618
24619         * modules/vasnprintf, modules/vasprintf: New modules.
24620         * MODULES.html.sh (func_all_modules): Add them.
24621
24622 2003-01-30  Bruno Haible  <bruno@clisp.org>
24623
24624         * m4/signed.m4: New file, from GNU gettext.
24625         * m4/longdouble.m4: New file, from GNU gettext.
24626         * m4/wchar_t.m4: New file, from GNU gettext.
24627         * m4/wint_t.m4: New file, from GNU gettext.
24628         * m4/vasnprintf.m4: New file.
24629         * m4/vasprintf.m4: New file.
24630
24631 2003-01-30  Bruno Haible  <bruno@clisp.org>
24632
24633         * lib/printf-args.h: New file, from GNU gettext.
24634         * lib/printf-args.c: New file, from GNU gettext.
24635         * lib/printf-parse.h: New file, from GNU gettext.
24636         * lib/printf-parse.c: New file, from GNU gettext.
24637         * lib/vasnprintf.h: New file, from GNU gettext.
24638         * lib/vasnprintf.c: New file, from GNU gettext.
24639         * lib/asnprintf.c: New file, from GNU gettext.
24640         * lib/vasprintf.h: New file, from GNU gettext with modifications.
24641         * lib/vasprintf.c: New file, from GNU gettext.
24642         * lib/asprintf.c: New file, from GNU gettext.
24643
24644 2003-01-29  Bruno Haible  <bruno@clisp.org>
24645
24646         * modules/stpncpy: New module.
24647         * MODULES.html.sh (func_all_modules): Add it.
24648
24649 2003-01-29  Bruno Haible  <bruno@clisp.org>
24650
24651         * m4/stpncpy.m4: New file.
24652
24653 2003-01-29  Bruno Haible  <bruno@clisp.org>
24654
24655         * lib/stpncpy.h: New file, from GNU gettext with modifications.
24656         * lib/stpncpy.c: New file, from GNU gettext with modifications.
24657
24658 2003-01-28  Bruno Haible  <bruno@clisp.org>
24659
24660         * modules/c-ctype: New module.
24661         * MODULES.html.sh (func_all_modules): Add it.
24662
24663 2003-01-28  Bruno Haible  <bruno@clisp.org>
24664
24665         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
24666         Paul Eggert.
24667         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
24668         Paul Eggert.
24669
24670 2003-01-27  Bruno Haible  <bruno@clisp.org>
24671
24672         * modules/xsetenv: New module.
24673         * MODULES.html.sh (func_all_modules): Add it.
24674
24675 2003-01-27  Bruno Haible  <bruno@clisp.org>
24676
24677         * lib/xsetenv.h: New file, from GNU gettext.
24678         * lib/xsetenv.c: New file, from GNU gettext.
24679
24680 2003-01-23  Jim Meyering  <jim@meyering.net>
24681
24682         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
24683         from working on systems without dirfd (at least Irix and OSF1/Tru64).
24684
24685 2003-01-23  Bruno Haible  <bruno@clisp.org>
24686
24687         * modules/minmax: New module.
24688         * MODULES.html.sh (func_all_modules): Add it.
24689
24690 2003-01-23  Bruno Haible  <bruno@clisp.org>
24691
24692         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
24693         Eggert.
24694
24695 2003-01-22  Bruno Haible  <bruno@clisp.org>
24696
24697         * modules/exit: New module.
24698         * MODULES.html.sh (func_all_modules): Add it.
24699
24700 2003-01-22  Bruno Haible  <bruno@clisp.org>
24701
24702         * lib/exit.h: New file, from GNU gettext.
24703
24704 2003-01-19  Bruno Haible  <bruno@clisp.org>
24705
24706         * gnulib-tool: Recognize option --extract-maintainer.
24707         (func_get_maintainer): New function.
24708         * modules/*: Add Maintainer entry.
24709
24710 2003-01-16  Jim Meyering  <jim@meyering.net>
24711
24712         * m4/regex.m4: The `regex' struct is both input and output.
24713         Initialize it before each use.  Patch by Tim Waugh.
24714
24715 2003-01-16  Bruno Haible  <bruno@clisp.org>
24716
24717         * MODULES.html.sh: Add a table of contents. Add the module name as
24718         leftmost column. Add hyperlinks.
24719
24720 2003-01-15  Bruno Haible  <bruno@clisp.org>
24721
24722         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
24723
24724 2003-01-15  Bruno Haible  <bruno@clisp.org>
24725
24726         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
24727         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
24728         suffix.
24729
24730 2003-01-15  Bruno Haible  <bruno@clisp.org>
24731
24732         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
24733
24734 2003-01-15  Bruno Haible  <bruno@clisp.org>
24735
24736         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
24737         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
24738
24739 2003-01-14  Jim Meyering  <jim@meyering.net>
24740
24741         * lib/same.c (same_name): Tweak a comment.
24742
24743 2003-01-14  Bruno Haible  <bruno@clisp.org>
24744
24745         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
24746         when a string comparison is sufficient.
24747
24748 2003-01-14  Bruno Haible  <bruno@clisp.org>
24749
24750         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
24751         'unsigned int'.
24752
24753 2003-01-14  Bruno Haible  <bruno@clisp.org>
24754
24755         * lib/hash-pjw.c: Add comment about low quality of this function.
24756
24757 2003-01-13  Bruno Haible  <bruno@clisp.org>
24758
24759         * modules/stpcpy: Distribute lib/stpcpy.h.
24760         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
24761
24762 2003-01-13  Bruno Haible  <bruno@clisp.org>
24763
24764         * modules/*: Add a description.
24765         * modules/strpbrk: Fix Makefile.am snippet.
24766         * modules/strtoimax: Fix dependencies.
24767         * modules/strtoumax: Likewise.
24768
24769 2003-01-13  Bruno Haible  <bruno@clisp.org>
24770
24771         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
24772         * modules/alloca (Makefile.am): All object files depend on alloca.h.
24773         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
24774
24775 2003-01-13  Bruno Haible  <bruno@clisp.org>
24776
24777         * gnulib-tool (func_create_testdir): Store config/* files in the main
24778         directory.
24779         * config.rpath: Move to ...
24780         * config/config.rpath: ... here.
24781         * modules/gettext: Contains config/config.rpath, not config.rpath.
24782         * modules/iconv: Likewise.
24783
24784 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24785
24786         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24787         to avoid collisions with libcurses and libreadline.
24788
24789         * m4/getstr.m4: Remove.
24790         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
24791
24792 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24793
24794         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24795         to avoid collisions with libcurses and libreadline.
24796
24797         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
24798         * lib/getstr.h, getstr.c: Remove.
24799         * lib/getline.c: Include "getline.h", to check interface.
24800         Move body of old getstr.c here: this defines MIN_CHUNK and
24801         declares getdelim2, which is renamed from getstr.
24802         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
24803
24804         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
24805         All uses changed.
24806         * lib/linebuffer.h: Likewise.
24807         (readline): Remove backward-compatibility macro.
24808
24809 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24810
24811         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24812         to avoid collisions with libcurses and libreadline.
24813         * getstr: Remove.
24814         * MODULES.html.sh: Remove getstr.
24815         * modules/getline: Depend on unlocked-io, not getstr.
24816
24817 2003-01-12  Jim Meyering  <jim@meyering.net>
24818
24819         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
24820
24821 2003-01-10  Bruno Haible  <bruno@clisp.org>
24822
24823         * modules/alloca: Change Makefile.am requirements. Simplify Include
24824         requirements. Add lib/alloca_.h to file list.
24825
24826 2003-01-10  Bruno Haible  <bruno@clisp.org>
24827
24828         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
24829
24830 2003-01-10  Bruno Haible  <bruno@clisp.org>
24831
24832         * lib/alloca_.h: New file.
24833         * lib/getdate.y: Unconditionally include alloca.h.
24834         * lib/makepath.c: Likewise.
24835         * lib/setenv.c: Likewise.
24836         * lib/userspec.c: Likewise.
24837
24838 2003-01-09  Karl Berry  <karl@gnu.org>
24839
24840         * MODULES.html.sh: include `dirname $0` in PATH, to find
24841         gnulib-tool.
24842
24843 2003-01-09  Bruno Haible  <bruno@clisp.org>
24844
24845         * modules/stdbool: Change configure.ac, Makefile.am requirements.
24846         Simplify Include requirements. Add lib/stdbool.h.in to file list.
24847
24848 2003-01-09  Bruno Haible  <bruno@clisp.org>
24849
24850         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
24851
24852 2003-01-09  Bruno Haible  <bruno@clisp.org>
24853
24854         * lib/stdbool.h.in: New file.
24855
24856 2003-01-09  Bruno Haible  <bruno@clisp.org>
24857
24858         * gnulib-tool (func_all_modules): Ignore files ending in ~.
24859         * MODULES.html.sh: Likewise.
24860
24861 2003-01-08  Jim Meyering  <jim@meyering.net>
24862
24863         * lib/full-write.c: Undefine and define-away `const' after inclusion
24864         of errno.h, not before.  Suggestion from Bruno Haible.
24865
24866 2003-01-08  Bruno Haible  <bruno@clisp.org>
24867
24868         * modules/full-read: Depend on full-write.
24869
24870 2003-01-08  Bruno Haible  <bruno@clisp.org>
24871
24872         * lib/safe-read.c: Include specification header first, to ensure its
24873         selfcontainedness.
24874         * lib/full-write.c: Likewise.
24875
24876 2003-01-07  Jim Meyering  <jim@meyering.net>
24877
24878         * lib/full-write.c: Rework so that it may serve to define full_read,
24879         too.
24880         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
24881
24882 2003-01-07  Bruno Haible  <bruno@clisp.org>
24883
24884         * lib/strtoimax.c: Include <stdint.h> as an alternative to
24885         <inttypes.h>.
24886         * lib/xstrtol.h: Likewise.
24887         * lib/xstrtoimax.c: Likewise.
24888         * lib/xstrtoumax.c: Likewise.
24889         * lib/human.h: Likewise.
24890
24891         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
24892         on systems that have <inttypes.h> but not <stdint.h>.
24893
24894 2003-01-07  Bruno Haible  <bruno@clisp.org>
24895
24896         * MODULES.html.sh: Add copyright notice.
24897         (missed_files): Omit CVS directory entries.
24898         (func_module): Make it work with sed-3.02.
24899         * MODULES.txt: Remove file.
24900
24901 2003-01-06  Jim Meyering  <jim@meyering.net>
24902
24903         * lib/version-etc.c: Update year in translatable copyright string.
24904
24905 2003-01-03  Karl Berry  <karl@gnu.org>
24906
24907         * config/config.{guess,sub}: update from prep.
24908
24909 2003-01-02  Karl Berry  <karl@gnu.org>
24910
24911         * doc/COPYING.DOC: belatedly updated to 1.2.
24912
24913 2003-01-01  Karl Berry  <karl@gnu.org>
24914
24915         * gnulib-tool (func_verify_module): report module name $module in
24916         error message, not $1.
24917         * gnulib-tool (create-testdir): don't complain if destdir couldn't
24918         be created, only if it doesn't exist.
24919         * gnulib-tool (last_checkin_date): don't expand the $Date here.
24920
24921 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24922
24923         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
24924
24925 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24926
24927         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
24928         memcmp if strcoll doesn't work.
24929
24930 2002-12-31  Bruno Haible  <bruno@clisp.org>
24931
24932         * lib/utime.c (utime_null): No need to call ftruncate if the file was
24933         nonempty.
24934
24935 2002-12-31  Bruno Haible  <bruno@clisp.org>
24936
24937         * lib/memcoll.c (STRCOLL): New macro.
24938         (memcoll): Use it.
24939
24940 2002-12-31  Bruno Haible  <bruno@clisp.org>
24941
24942         * lib/localcharset.h: New file.
24943         * lib/localcharset.c: Include it.
24944         * lib/unicodeio.c: Likewise.
24945
24946 2002-12-31  Bruno Haible  <bruno@clisp.org>
24947
24948         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
24949         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
24950
24951 2002-12-31  Bruno Haible  <bruno@clisp.org>
24952
24953         * lib/getline.h: Include <stddef.h>, for size_t.
24954
24955         * lib/unicodeio.h: Include <stddef.h>, for size_t.
24956         * lib/unicodeio.c: Don't include <stddef.h>.
24957
24958 2002-12-31  Bruno Haible  <bruno@clisp.org>
24959
24960         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
24961         HAVE_TM_ZONE.
24962
24963 2002-12-24  Karl Berry  <karl@gnu.org>
24964
24965         * config/config.guess: update from prep.
24966
24967 2002-12-24  Bruno Haible  <bruno@clisp.org>
24968
24969         General infrasructure.
24970         * m4/README: Rewritten.
24971         * m4/onceonly.m4: New file.
24972         * m4/onceonly_2_57.m4: New file.
24973
24974         Module atexit.
24975         * m4/atexit.m4: New file.
24976
24977         Module strtod.
24978         * m4/strtod.m4: New file.
24979
24980         Module strtol.
24981         * m4/strtol.m4: New file.
24982
24983         Module strtoul.
24984         * m4/strtoul.m4: New file.
24985
24986         Module memchr.
24987         * m4/memchr.m4: New file.
24988
24989         Module memcmp.
24990         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
24991         (jm_FUNC_MEMCMP): Invoke it.
24992
24993         Module memcpy.
24994         * m4/memcpy.m4: New file.
24995
24996         Module memmove.
24997         * m4/memmove.m4: New file.
24998
24999         Module memset.
25000         * m4/memset.m4: New file.
25001
25002         Module strcspn.
25003         * m4/strcspn.m4: New file.
25004
25005         Module strpbrk.
25006         * m4/strpbrk.m4: New file.
25007
25008         Module strstr.
25009         * m4/strstr.m4: New file.
25010
25011         Module strerror.
25012         * m4/strerror.m4: New file.
25013
25014         Module mktime.
25015         * m4/mktime.m4: Renamed from jm-mktime.m4.
25016         (gl_PREREQ_MKTIME): New macro.
25017         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
25018
25019         Module malloc.
25020         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
25021         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
25022         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
25023
25024         Module realloc.
25025         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
25026         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
25027         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
25028
25029         Module strftime.
25030         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
25031         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
25032         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
25033         gl_TM_GMTOFF.
25034         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
25035
25036         Module xalloc.
25037         * m4/xalloc.m4: New file.
25038
25039         Module alloca.
25040         * m4/alloca.m4: New file.
25041
25042         Module putenv.
25043         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
25044         (jm_FUNC_PUTENV): Invoke it.
25045
25046         Module setenv.
25047         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
25048         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
25049         when invoked twice.
25050         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
25051         gt_FUNC_SETENV.
25052
25053         Module memrchr.
25054         * m4/memrchr.m4: New file.
25055
25056         Module stpcpy.
25057         * m4/stpcpy.m4: New file.
25058
25059         Module strcase.
25060         * m4/strcase.m4: New file.
25061
25062         Module strdup.
25063         * m4/strdup.m4: New file.
25064
25065         Module strnlen.
25066         * m4/strnlen.m4: New file.
25067
25068         Module strndup.
25069         * m4/strndup.m4: New file.
25070
25071         Module xstrtod.
25072         * m4/xstrtod.m4: New file.
25073
25074         Module xstrtol.
25075         * m4/xstrtol.m4: New file.
25076
25077         Module getdate.
25078         * m4/getdate.m4: New file.
25079
25080         Module unlocked-io.
25081         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
25082         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
25083         * m4/jm-glibc-io.m4n: Remove file.
25084
25085         Module long-options.
25086         * m4/long-options.m4: New file.
25087
25088         Module md5.
25089         * m4/md5.m4: New file.
25090
25091         Module sha.
25092         * m4/sha.m4: New file.
25093
25094         Module getstr.
25095         * m4/getstr.m4: New file.
25096
25097         Module getline.
25098         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
25099         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
25100         <sys/types.h>, for size_t. Use the function name gnu_getline, not
25101         simply getline. Infoke gl_PREREQ_GETLINE.
25102
25103         Module obstack.
25104         * m4/obstack.m4: New file.
25105
25106         Module hash.
25107         * m4/hash.m4: New file.
25108
25109         Module readtokens.
25110         * m4/readtokens.m4: New file.
25111
25112         Module strverscmp.
25113         * m4/strverscmp.m4: New file.
25114
25115         Module stdbool.
25116         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
25117         OSF/1.
25118
25119         Module strtoll.
25120         * m4/strtoll.m4: New file.
25121
25122         Module strtoull.
25123         * m4/strtoull.m4: New file.
25124
25125         Module strtoimax.
25126         * m4/strtoimax.m4: New file.
25127
25128         Module strtoumax.
25129         * m4/strtoumax.m4: New file.
25130
25131         Module xstrtoimax.
25132         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
25133         jm_AC_PREREQ_XSTRTOIMAX.
25134         Moved the strtol prerequisites to strtol.m4.
25135         Moved the strtoll prerequisites to strtoll.m4.
25136         Moved the strtoimax prerequisites to strtoimax.m4.
25137
25138         Module xstrtoumax.
25139         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
25140         jm_AC_PREREQ_XSTRTOUMAX.
25141         Moved the strtoul prerequisites to strtoul.m4.
25142         Moved the strtoull prerequisites to strtoull.m4.
25143         Moved the strtoumax prerequisites to strtoumax.m4.
25144
25145         Module chown.
25146         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
25147         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
25148
25149         Module dup2.
25150         * m4/dup2.m4: New file.
25151
25152         Module ftruncate.
25153         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
25154         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
25155
25156         Module getgroups.
25157         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
25158         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
25159
25160         Module gettimeofday.
25161         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
25162         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
25163         gl_PREREQ_GETTIMEOFDAY.
25164
25165         Module mkdir.
25166         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
25167         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
25168
25169         Module mkstemp.
25170         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
25171         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
25172         jm_AC_TYPE_UINTMAX_T.
25173         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
25174
25175         Module stat.
25176         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
25177         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
25178
25179         Module lstat.
25180         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
25181         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
25182
25183         Module timespec.
25184         * m4/timespec.m4 (gl_TIMESPEC): New macro.
25185         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
25186         * m4/st_mtim.m4: Indentation.
25187
25188         Module nanosleep.
25189         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
25190         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
25191         gl_PREREQ_NANOSLEEP.
25192
25193         Module regex.
25194         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
25195         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
25196         (gl_REGEX): New macro.
25197
25198         Module rename.
25199         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
25200         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
25201
25202         Module rmdir.
25203         * m4/rmdir.m4: New file.
25204
25205         Module utime.
25206         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
25207         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
25208         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
25209
25210         Module dirname.
25211         * m4/dirname.m4: New file.
25212
25213         Module getopt.
25214         * m4/getopt.m4: New file.
25215
25216         Module unistd-safer.
25217         * m4/unistd-safer.m4: New file.
25218
25219         Module fnmatch.
25220         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
25221         declaration.
25222         (gl_PREREQ_FNMATCH_EXTRA): New macro.
25223         (gl_FUNC_FNMATCH_POSIX): New macro.
25224         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
25225         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
25226         simply fnmatch.
25227
25228         Module exclude.
25229         * m4/exclude.m4: New file.
25230
25231         Module human.
25232         * m4/human.m4: New file.
25233
25234         Module acl.
25235         * m4/acl.m4: Nop.
25236
25237         Module backupfile.
25238         * m4/backupfile.m4: New file.
25239         * m4/d-ino.m4: Indentation.
25240
25241         Module fsusage.
25242         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
25243         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
25244         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
25245
25246         Module dirfd.
25247         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
25248         requirements.
25249
25250         Module euidaccess.
25251         * m4/euidaccess.m4: New file.
25252
25253         Module file-type.
25254         * m4/file-type.m4: New file.
25255
25256         Module fileblocks.
25257         * m4/fileblocks.m4: New file.
25258
25259         Module filemode.
25260         * m4/filemode.m4: New file.
25261
25262         Module isdir.
25263         * m4/isdir.m4: New file.
25264
25265         Module lchown.
25266         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
25267         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
25268
25269         Module makepath.
25270         * m4/makepath.m4: New file.
25271
25272         Module modechange.
25273         * m4/modechange.m4: New file.
25274
25275         Module mountlist.
25276         * m4/mountlist.m4: New file.
25277         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
25278         Indentation.
25279
25280         Module path-concat.
25281         * m4/path-concat.m4: New file.
25282
25283         Module pathmax.
25284         * m4/pathmax.m4: New file.
25285
25286         Module same.
25287         * m4/same.m4: New file.
25288
25289         Module save-cwd.
25290         * m4/save-cwd.m4: New file.
25291
25292         Module savedir.
25293         * m4/savedir.m4: New file.
25294
25295         Module xgetcwd.
25296         * m4/xgetcwd.m4: New file.
25297         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
25298
25299         Module xreadlink.
25300         * m4/xreadlink.m4: New file.
25301
25302         Module safe-read.
25303         * m4/safe-read.m4: New file.
25304
25305         Module safe-write.
25306         * m4/safe-write.m4: New file.
25307
25308         Module closeout.
25309         * m4/closeout.m4: New file.
25310
25311         Module stdio-safer.
25312         * m4/stdio-safer.m4: New file.
25313
25314         Module getpass.
25315         * m4/getpass.m4: New file.
25316
25317         Module getugroups.
25318         * m4/getugroups.m4: New file.
25319
25320         Module group-member.
25321         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
25322         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
25323
25324         Module idcache.
25325         * m4/idcache.m4: New file.
25326
25327         Module userspec.
25328         * m4/userspec.m4: New file.
25329
25330         Module gettime.
25331         * m4/clock_time.m4: New file.
25332         * m4/gettime.m4: New file.
25333
25334         Module settime.
25335         * m4/settime.m4: New file.
25336
25337         Module posixtm.
25338         * m4/posixtm.m4: New file.
25339
25340         Module gethostname.
25341         * m4/gethostname.m4: New file.
25342
25343         Module canon-host.
25344         * m4/canon-host.m4: New file.
25345
25346         Module gettext.
25347         * m4/codeset.m4: New file, from gettext-0.11.5.
25348         * m4/gettext.m4: New file, from gettext-0.11.5.
25349         * m4/glibc21.m4: New file, from gettext-0.11.5.
25350         * m4/iconv.m4: New file, from gettext-0.11.5.
25351         * m4/intdiv0.m4: New file, from gettext-0.11.5.
25352         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
25353         * m4/inttypes.m4: New file, from gettext-0.11.5.
25354         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
25355         * m4/isc-posix.m4: New file, from gettext-0.11.5.
25356         * m4/lcmessage.m4: New file, from gettext-0.11.5.
25357         * m4/lib-ld.m4: New file, from gettext-0.11.5.
25358         * m4/lib-link.m4: New file, from gettext-0.11.5.
25359         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
25360         * m4/progtest.m4: New file, from gettext-0.11.5.
25361         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
25362         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
25363         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
25364
25365         Module localcharset.
25366         * m4/localcharset.m4: New file.
25367
25368         Module hard-locale.
25369         * m4/hard-locale.m4: New file.
25370
25371         Module mbswidth.
25372         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
25373         onceonly macros.
25374         * m4/mbrtowc.m4: Add comment.
25375
25376         Module memcasecmp.
25377         * m4/memcasecmp.m4: New file.
25378
25379         Module memcoll.
25380         * m4/memcoll.m4: New file.
25381
25382         Module unicodeio.
25383         * m4/unicodeio.m4: New file.
25384
25385         Module rpmatch.
25386         * m4/rpmatch.m4: New file.
25387
25388         Module yesno.
25389         * m4/yesno.m4: New file.
25390
25391         Module exitfail.
25392         * m4/exitfail.m4: New file.
25393
25394         Module c-stack.
25395         * m4/c-stack.m4 (gl_C_STACK): New macro.
25396         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
25397
25398         Module error.
25399         * m4/error.m4 (gl_ERROR): New macro.
25400         (jm_PREREQ_ERROR): Use onceonly macros.
25401
25402         Module fatal.
25403         * m4/fatal.m4: New file.
25404
25405         Module getloadavg.
25406         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
25407         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
25408
25409         Module getpagesize.
25410         * m4/getpagesize.m4: New file.
25411
25412         Module getusershell.
25413         * m4/getusershell.m4: New file.
25414
25415         Module physmem.
25416         * m4/physmem.m4: New file.
25417
25418         Module posixver.
25419         * m4/posixver.m4: New file.
25420
25421         Module quotearg.
25422         * m4/quotearg.m4: New file.
25423
25424         Module quote.
25425         * m4/quote.m4: New file.
25426
25427         Module readutmp.
25428         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
25429
25430         Module sig2str.
25431         * m4/sig2str.m4: New file.
25432
25433         Other.
25434         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
25435         ulonglong.m4.
25436         * m4/intmax_t.m4: New file.
25437         * m4/d-type.m4: Indentation.
25438         * m4/jm-macros.m4: Update.
25439         * m4/prereq.m4 (jm_PREREQ): Update.
25440         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
25441         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
25442         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
25443         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
25444         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
25445         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
25446         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
25447         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
25448         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
25449         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
25450         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
25451         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
25452         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
25453         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
25454         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
25455         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
25456         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
25457         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
25458         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
25459
25460 2002-12-24  Bruno Haible  <bruno@clisp.org>
25461
25462         * MODULES.txt: Update according to m4/ changes.
25463
25464         Module gettext.
25465         * config.rpath: New file, from gettext-0.11.5.
25466
25467         * modules/*: New module descriptions.
25468         * gnulib-tool: New file.
25469         * MODULES.html.sh: New file.
25470
25471 2002-12-21  Karl Berry  <karl@gnu.org>
25472
25473         * doc/fdl.texi: update to version 1.2.
25474
25475 2002-12-19  Karl Berry  <karl@gnu.org>
25476
25477         * config/config.guess: update from prep.
25478
25479 2002-12-18  Bruno Haible  <bruno@clisp.org>
25480
25481         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
25482         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
25483
25484 2002-12-17  Bruno Haible  <bruno@clisp.org>
25485
25486         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
25487         stdlib.h, string.h.
25488
25489 2002-12-17  Bruno Haible  <bruno@clisp.org>
25490
25491         * lib/canon-host.c (strdup): Remove unused declaration.
25492
25493         * lib/fsusage.c: Include full_read.h.
25494         (get_fs_usage): Use full_read instead of safe_read.
25495
25496         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
25497
25498 2002-12-12  Karl Berry  <karl@gnu.org>
25499
25500         * config/config.guess: update from prep.
25501
25502 2002-12-11  Bruno Haible  <bruno@clisp.org>
25503
25504         * m4/setenv.m4: New file, from gettext-0.11.5.
25505
25506 2002-12-11  Bruno Haible  <bruno@clisp.org>
25507
25508         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
25509         not unsetenv().
25510         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
25511         modifications:
25512
25513         2002-12-11  Bruno Haible  <bruno@clisp.org>
25514
25515                 * setenv.c (alloca): Fall back to malloc.
25516                 (freea): New macro.
25517                 (setenv): Use freea() to free memory allocated with alloca().
25518
25519         2002-11-13  Bruno Haible  <bruno@clisp.org>
25520
25521                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
25522                 function declarations.
25523                 * unsetenv.c (unsetenv): Likewise.
25524
25525         2002-03-04  Bruno Haible  <bruno@clisp.org>
25526
25527                 Portability to AIX 4.3.3.
25528                 * unsetenv.c: New file, extracted from setenv.c.
25529                 * setenv.c: Move the unsetenv() function to unsetenv.c.
25530
25531         2001-12-20  Bruno Haible  <bruno@clisp.org>
25532
25533                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
25534                 use malloc instead. For SunOS 4.
25535
25536         2001-12-11  Bruno Haible  <bruno@clisp.org>
25537
25538                 * setenv.c: Declare alloca.
25539                 (compar_fn_t): New typedef.
25540                 (KNOWN_VALUE, STORE_VALUE): Use it.
25541
25542         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
25543         setenv.h.
25544
25545 2002-12-10  Paul Eggert  <eggert@twinsun.com>
25546
25547         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
25548         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
25549         Choose values that are less likely to collide with system fnmatch
25550         options.
25551         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
25552         defined (e.g., a pure POSIX system).
25553         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
25554         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
25555
25556 2002-12-06  Paul Eggert  <eggert@twinsun.com>
25557
25558         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
25559         a pain in practice to deal with generated m4 files.  This change
25560         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
25561
25562         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
25563         and jm-glibc-io.m4, as they are no longer a special case.
25564         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
25565         kludge and the auto-generation stuff.  Check only whether the
25566         functions are declared, not whether they exist, since older hosts
25567         that don't declare the functions can't use the optimization anyway.
25568
25569 2002-12-06  Jim Meyering  <jim@meyering.net>
25570
25571         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
25572
25573         Merge in changes from libc's misc/error.c, in preparation
25574         for the merge of gnulib's changes back into libc.
25575
25576         * lib/error.c (_): Define only if not already defined.
25577         Move definition to follow all #include directives.
25578         Include unlocked-io.h only if !_LIBC.
25579         [_LIBC]: Include <libio/libioP.h>.
25580         [USE_IN_LIBIO]: Include <libio/iolibio.h>
25581         (fflush): Tweak definition to use INTUSE.
25582         (putc): Define.
25583
25584 2002-12-05  Paul Eggert  <eggert@twinsun.com>
25585
25586         * lib/alloca.c [defined emacs]: Include "lisp.h".
25587         (xalloc_die) [defined emacs]: New macro.
25588         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
25589         [! defined emacs]: Include <xalloc.h>.
25590         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
25591         (pointer): Typedef to POINTER_TYPE *.
25592         (malloc): Remove decl; we now always use xmalloc.
25593         (alloca): Use old-style definition, since Emacs needs this.
25594         Check for arithmetic overflow when computing combined size.
25595
25596 2002-12-04  Paul Eggert  <eggert@twinsun.com>
25597
25598         Do not generate unlocked-io.h automatically, since it's easier to
25599         maintain it by hand.
25600
25601         * lib/unlocked-io.h: New file, from GNU diffutils,
25602         but with proper copyright notice and attribution.
25603         * lib/gen-uio: Remove.
25604         * lib/Makefile.am: Add copyright notice.
25605         (libfetish_a_SOURCES): Add unlocked-io.h.
25606         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
25607         (DISTCLEANFILES, io_functions): Remove macros.
25608         (EXTRA_DIST): Remove gen_uio.
25609         (unlocked-io.h): Remove rule.
25610
25611 2002-12-04  Jim Meyering  <jim@meyering.net>
25612
25613         Reflect the fact that stat.c and lstat.c are no longer generated.
25614         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
25615         (DISTCLEANFILES): Likewise.
25616         (EXTRA_DIST): Likewise.
25617         (all_local): Don't depend on stat.c or lstat.c.
25618         (stat.c, lstat.c): Remove rules.
25619         (EXTRA_DIST): Remove xstat.in.
25620
25621         * lib/xstat.in: Remove file.  Contents moved into stat.c.
25622         * lib/stat.c: New file.  Contents mostly from xstat.in.
25623         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
25624         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
25625
25626         * lib/safe-read.c: Rework so that it may serve to define safe_write,
25627         too.
25628         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
25629
25630 2002-12-03  Jim Meyering  <jim@meyering.net>
25631
25632         * lib/safe-read.c, safe-write.c: Change variable names and comments,
25633         but not semantics, to minimize the differences between these two files.
25634         (safe_read): Change comment to mention SAFE_READ_ERROR.
25635
25636         * lib/safe-read.c (IS_EINTR): Define.
25637         (safe_read): Use IS_EINTR in place of in-function cpp directives.
25638
25639 2002-12-02  Jim Meyering  <jim@meyering.net>
25640
25641         * lib/safe-read.c (EINTR): Define.
25642         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25643         (INT_MAX): Provide fallback.
25644         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
25645
25646         * lib/safe-read.h (SAFE_READ_ERROR): Define.
25647
25648 2002-12-02  Bruno Haible  <bruno@clisp.org>
25649
25650         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
25651         Define, taken from safe-read.c.
25652         (INT_MAX): Provide fallback.
25653         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
25654         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
25655
25656         * lib/safe-read.c (EINTR): Remove definition.
25657         (safe_read): Don't use EINTR if it is absent.
25658
25659 2002-12-01  Jim Meyering  <jim@meyering.net>
25660
25661         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
25662         zero.
25663         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
25664
25665 2002-11-27  Paul Eggert  <eggert@twinsun.com>
25666
25667         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
25668         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
25669         with `if (! (value < limit)) abort ();', for readability.
25670
25671 2002-11-26  Karl Berry  <karl@gnu.org>
25672
25673         * lib/strdup.c: copy from libc again, with jim's ok.
25674         * lib/.cppi-disable: re-add strdup.c
25675
25676 2002-11-25  Karl Berry  <karl@gnu.org>
25677
25678         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
25679         instead of "strtol.c".
25680
25681 2002-11-25  Karl Berry  <karl@gnu.org>
25682
25683         * config/install-sh: update from automake for variable quoting, $0 in
25684         error msgs, etc.
25685
25686         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
25687         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
25688         entry.
25689
25690 2002-11-25  Jim Meyering  <jim@meyering.net>
25691
25692         * lib/mktime.c: Sync from libc, now that it has the latest fix.
25693
25694 2002-11-24  Karl Berry  <karl@gnu.org>
25695
25696         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
25697         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
25698
25699 2002-11-24  Jim Meyering  <jim@meyering.net>
25700
25701         Update from coreutils:
25702
25703         * lib/mktime.c: Merge in changes from libc.
25704
25705         Avoid a link-time failure on some Linux systems.
25706         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
25707         (otherwise).
25708         (__mon_yday): Declare with the STATIC attribute.
25709         (__mktime_internal): Likewise.
25710         Based on a report from Greg Schafer.
25711
25712 2002-11-23  Jim Meyering  <jim@meyering.net>
25713
25714         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
25715         Use `unsigned', not `int', as type of index.
25716
25717         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
25718
25719         * lib/fsusage.c: Remove unneeded parentheses around operands of
25720         `defined'.
25721
25722 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25723
25724         * lib/quotearg.h: Allow multiple inclusion by surrounding with
25725         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
25726         so that we can be included first.
25727         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
25728         * lib/quotearg.c: Include quotearg.h immediately after config.h.
25729         No need to include stddef.h or sys/types.h any more.
25730         Surround local include files with "", not "<>".
25731         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
25732         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
25733         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
25734         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
25735         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
25736         (ISPRINT): Remove; no longer needed now that we assume C89.
25737
25738         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
25739         Preserve errno.
25740
25741         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
25742         quotearg_char): Use SIZE_MAX rather than
25743         (size_t) -1 when we are talking about "infinity".
25744
25745         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
25746
25747 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25748
25749         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
25750         hint that one should use `if (! x) abort ();' rather than `assert
25751         (x);', and anyway it's one less thing to worry about configuring.
25752         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
25753         hash_rehash, hash_insert): Use abort rather than assert.
25754
25755 2002-11-22  Bruno Haible  <bruno@clisp.org>
25756
25757         * lib/safe-read.h: Assume C89. Add comments.
25758         (safe_read): Change return type to size_t.
25759         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
25760         byte counts > SSIZE_MAX correctly.
25761         * lib/safe-write.h: New file.
25762         * lib/safe-write.c: New file.
25763         * lib/full-read.h: New file.
25764         * lib/full-read.c: New file.
25765         * lib/full-write.h: Assume C89. Add comments.
25766         * lib/full-write.c: Include safe-write.h.
25767         (full_write): Rewritten to use safe_write.
25768         Suggested by Jim Meyering and Paul Eggert.
25769
25770 2002-11-21  Jim Meyering  <jim@meyering.net>
25771
25772         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
25773
25774         Merge in changes from the coreutils.
25775
25776         2002-09-25  Paul Eggert  <eggert@twinsun.com>
25777         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
25778         <stdint.h>.
25779         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
25780         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
25781         int.  Work more efficiently if X is the same width as uintmax_t.
25782         Do not compare X to -1, to avoid bogus compiler warning.
25783         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
25784         Don't assume that f_frsize and f_bsize are the same type.
25785
25786         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
25787         warning on FreeBSD.
25788
25789         * lib/makepath.c (make_path): Restore umask *before* creating the final
25790         component.
25791         (make_path): Minor reformatting.
25792
25793         * lib/xmalloc.c: Adjust to work with new autoconf macros,
25794         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
25795         HAVE_MALLOC/HAVE_REALLOC.
25796
25797         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
25798         dummy ones.  At least on GNU/Linux systems, `auto' means something
25799         else.
25800         From Michael Stone.
25801
25802 2002-11-21  Bruno Haible  <bruno@clisp.org>
25803
25804         Remove case insensitive option matching.
25805         * lib/argmatch.h (argcasematch): Remove declaration.
25806         (ARGCASEMATCH): Remove macro.
25807         (__xargmatch_internal): Remove case_sensitive argument.
25808         (XARGMATCH): Update.
25809         (XARGCASEMATCH): Remove macro.
25810         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
25811         case_sensitive argument.
25812         (argcasematch): Remove function.
25813         (__xargmatch_internal): Remove case_sensitive argument.
25814         (main): Use XARGMATCH instead of XARGCASEMATCH.
25815
25816         * lib/xmalloc.c: Change compile-time error message. Add comment about
25817         required autoconf version.
25818
25819 2002-11-20  Paul Eggert  <eggert@twinsun.com>
25820
25821         Merge argmatch cleanups from Bison.  Assume C89.
25822
25823         * lib/argmatch.c: Include config.h here, not in argmatch.h.
25824         Include stdlib.h, for EXIT_FAILURE.
25825         Always include <string.h>, since we assume C89.
25826         (EXIT_FAILURE): Remove pre-C89 bug workaround.
25827         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
25828         Include <stddef.h> instead, since it's all we need for size_t.
25829         (PARAMS): Remove.  All uses removed.
25830         (ARRAY_CARDINALITY): Do not bother to #undef.
25831         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
25832         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25833         Remove unnecessary parentheses.
25834         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25835         Insert necessary parentheses.
25836         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
25837         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
25838
25839 2002-11-19  Bruno Haible  <bruno@clisp.org>
25840
25841         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
25842         * lib/mbswidth.h: Include <stddef.h>, for size_t.
25843
25844         * lib/mbswidth.h (PARAMS): Remove macro.
25845         (mbswidth, mbsnwidth): Use ANSI C function declarations.
25846         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
25847
25848         * lib/gcd.h (PARAMS): Remove macro.
25849         (gcd): Use ANSI C function declarations.
25850         * lib/gcd.c (gcd): Likewise.
25851
25852 2002-11-15  Bruno Haible  <bruno@clisp.org>
25853
25854         * lib/strcspn.c: Include <stddef.h>.
25855         (strcspn): Use ANSI C function declaration. Change return type to
25856         size_t. Use NULL.
25857         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
25858         (strpbrk): Use NULL.
25859         * lib/strpbrk.h (PARAMS): Remove macro.
25860         (strpbrk): Use ANSI C function declaration.
25861         * lib/strstr.c: Don't include <sys/types.h>.
25862         * lib/strstr.h (PARAMS): Remove macro.
25863         (strstr): Use ANSI C function declarations.
25864
25865 2002-11-14  Karl Berry  <karl@gnu.org>
25866
25867         * config/mkinstalldirs: `do' on separate line, instead of
25868         `for var; do'.
25869
25870 2002-11-06  Bruno Haible  <bruno@clisp.org>
25871
25872         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
25873         * lib/gcd.c (gcd): Likewise.
25874
25875 2002-11-05  Bruno Haible  <bruno@clisp.org>
25876
25877         * lib/gcd.h: New file, from gettext-0.11.5.
25878         * lib/gcd.c: New file, from gettext-0.11.5.
25879
25880 2002-11-05  Bruno Haible  <bruno@clisp.org>
25881
25882         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25883         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25884         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25885         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25886
25887         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
25888         <libintl.h>.
25889         * lib/makepath.c: Include gettext.h instead of <locale.h> and
25890         <libintl.h>.
25891
25892         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
25893         * lib/human.c: Include gettext.h instead of <libintl.h>.
25894         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
25895         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
25896         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
25897         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
25898         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
25899         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
25900         (textdomain): Remove definition.
25901         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
25902
25903         * lib/long-options.c: Remove include of <libintl.h> and definition of
25904         _.
25905         * lib/same.c: Remove include of <libintl.h> and definition of _.
25906
25907 2002-11-04  Owen Taylor  <otaylor@redhat.com>
25908
25909         * lib/config.charset: A few additions for Solaris.
25910
25911 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25912
25913         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
25914         * lib/localcharset.c (locale_charset): Declare as extern "C".
25915
25916 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25917
25918         * lib/config.charset: msdos in uk_UA uses CP1125.
25919
25920 2002-11-04  Bruno Haible  <bruno@clisp.org>
25921
25922         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
25923         * lib/strcase.h: New file, from GNU gettext-0.11.5.
25924         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
25925         * lib/strstr.h: New file, from GNU gettext-0.11.5.
25926         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
25927
25928 2002-11-04  Bruno Haible  <bruno@clisp.org>
25929
25930         * lib/localcharset.c (locale_charset): Don't return an empty string.
25931
25932 2002-11-04  Bruno Haible  <bruno@clisp.org>
25933
25934         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
25935         aliases.
25936
25937 2002-11-04  Bruno Haible  <bruno@clisp.org>
25938
25939         * lib/config.charset: Update for newest glibc. Add canonical names
25940         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
25941
25942 2002-11-04  Bruno Haible  <bruno@clisp.org>
25943
25944         * lib/config.charset: Add support for NetBSD.
25945
25946 2002-11-04  Bruno Haible  <bruno@clisp.org>
25947
25948         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
25949
25950 2002-11-01  Bruno Haible  <bruno@clisp.org>
25951
25952         * configure.in: Add AC_CONFIG_AUX_DIR call.
25953         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
25954         test/Makefile.
25955         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
25956
25957 2002-09-28  Karl Berry  <karl@gnu.org>
25958
25959         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
25960         installed automake until the next release, since changes have been
25961         made.
25962
25963 2002-09-25  Karl Berry  <karl@gnu.org>
25964
25965         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
25966         * lib/getopt*: copy from libc/posix.
25967         * lib/gettext.h: copy from gettext.
25968         * lib/.cppi-disable: add strdup.c, gettext.h.
25969
25970 2002-09-25  Karl Berry  <karl@gnu.org>
25971
25972         * config/srclist.txt: enable gettext.h check.
25973         * config/config.{guess,sub}: update from prep.
25974         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
25975                 from automake 1.6.3.
25976         See srclist*.
25977
25978 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
25979
25980         * regex.c (PATFETCH): Remove the translating fetch.
25981         (PATFETCH_RAW): Rename to PATFETCH.
25982         (set_image_of_range): New fun.
25983         (SET_RANGE_TABLE_WORK_AREA): Use it.
25984         (regex_compile): Don't translate the pattern chars so eagerly.
25985         Only do it when inserting an `exactn' bytecode or when handling
25986         a char-range.
25987         (mutually_exclusive_p): Avoid empty statement.
25988
25989 2002-07-06  Jim Meyering  <meyering@lucent.com>
25990
25991         * m4/README: Don't mention Makefile.am.in.
25992         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
25993
25994 2002-07-01  Jim Meyering  <meyering@lucent.com>
25995
25996         * lib/c-stack.c: Include sys/time.h.
25997         From Volker Borchert.
25998
25999 2002-06-26  Paul Eggert  <eggert@twinsun.com>
26000
26001         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
26002
26003 2002-06-26  Paul Eggert  <eggert@twinsun.com>
26004
26005         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
26006         New macro.  Use it uniformly instead of
26007         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
26008         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
26009         reported by Vin Shelton.
26010
26011 2002-06-22  Paul Eggert  <eggert@twinsun.com>
26012
26013         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
26014         Do not assume SA_SIGINFO behavior.
26015         Bug reported by Jim Meyering on NetBSD 1.5.2.
26016
26017 2002-06-22  Jim Meyering  <meyering@lucent.com>
26018
26019         * m4/c-stack.m4: New file, from diffutils-2.8.2.
26020         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
26021
26022         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
26023         now that configure.ac uses AC_GNU_SOURCE.
26024         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
26025         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
26026
26027         Update to latest tools.  Suggestions from Paul Eggert.
26028         * m4/stdbool.m4: New file, from diffutils-2.8.2.
26029         * m4/gnu-source.m4: Update from diffutils-2.8.2.
26030         * m4/fnmatch.m4: Likewise.
26031         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
26032         to AC_HEADER_STDBOOL
26033
26034 2002-06-22  Jim Meyering  <meyering@lucent.com>
26035
26036         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
26037         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
26038
26039 2002-06-22  Jim Meyering  <meyering@lucent.com>
26040
26041         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
26042
26043         * lib/exitfail.c, exitfail.h: Likewise.
26044         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
26045
26046         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
26047         of fnmatch.h.
26048         (EXTRA_DIST): Add fnmatch_loop.c.
26049         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
26050
26051         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
26052         * lib/fnmatch.c: Update from diffutils-2.8.2.
26053         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
26054         * lib/fnmatch.h: Remove file.
26055
26056 2002-06-21  Jim Meyering  <meyering@lucent.com>
26057
26058         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
26059         * m4/mbrtowc.m4: Likewise.
26060
26061         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
26062         * m4/mbswidth.m4: Reflect name change:
26063         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
26064         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
26065
26066         * m4/lib-link.m4: Update from gettext-0.11.2.
26067         * m4/gettext.m4: Likewise.
26068
26069         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
26070         From Alfred M. Szmidt.
26071
26072 2002-06-18  Paul Eggert  <eggert@twinsun.com>
26073
26074         * lib/file-type.h: Report an error if neither S_ISREG nor
26075         S_IFREG is defined, instead of using a test specific to glibc
26076         2.2.  This should be safe, since POSIX requires S_ISREG and
26077         Unix Version 7 had S_IFREG.  We don't need to check for
26078         <sys/types.h> since we don't use any symbols that it defines.
26079
26080 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
26081
26082         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
26083         $@-t, so that each temporary file name is unique and valid in the first
26084         8 characters, for operation under DOS.
26085
26086 2002-06-15  Paul Eggert  <eggert@twinsun.com>
26087
26088         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
26089
26090 2002-06-15  Jim Meyering  <meyering@lucent.com>
26091
26092         Work even with DJGPP 2.03, which lacks support for symlinks.
26093         From Richard Dawe.
26094         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
26095         is defined.
26096         * lib/lchown.c (S_ISLNK): Likewise.
26097
26098 2002-06-15  Jim Meyering  <meyering@lucent.com>
26099
26100         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
26101         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
26102         have been included before this file.
26103
26104 2002-06-14  Jim Meyering  <meyering@lucent.com>
26105
26106         * lib/file-type.h: Use the version from diffutils-2.8.2.
26107         * lib/file-type.c: Likewise.
26108
26109 2002-06-07  Jim Meyering  <meyering@lucent.com>
26110
26111         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
26112         They're needed at least for NetBSD 1.5.2.
26113         ($statxfs_includes): Include those same headers.
26114         ($statxfs_includes): Include sys/vfs.h if available.
26115         ($statxfs_includes): Likewise for sys/statvfs.h.
26116         Check for the following members in both structs statfs and statvfs:
26117         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
26118
26119 2002-06-01  Jim Meyering  <meyering@lucent.com>
26120
26121         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
26122         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
26123
26124 2002-05-28  Jim Meyering  <meyering@lucent.com>
26125
26126         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
26127         Reported by Volker Borchert.
26128
26129 2002-05-27  Jim Meyering  <meyering@lucent.com>
26130
26131         Fix a problem seen only on nonconforming systems whereby ls.c's
26132         use of localtime, and then of gettimeofday would cause trouble:
26133         the localtime call used to initialize rpl_gettimeofday's save
26134         mechanism would clobber ls's current local time information so
26135         that in any long listing the first file would always be listed
26136         with date 1970-01-01.  Analysis by Volker Borchert.
26137
26138         * lib/gettimeofday.c (localtime): Undefine.
26139         (rpl_localtime): New function.
26140
26141 2002-05-27  Jim Meyering  <meyering@lucent.com>
26142
26143         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
26144         localtime.
26145
26146         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
26147         use the replacement function; it wouldn't resolve at link time.
26148         Reported by Volker Borchert.
26149
26150 2002-05-22  Jim Meyering  <meyering@lucent.com>
26151
26152         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
26153         file-type.h.
26154         * lib/file-type.h: New file.
26155         * lib/file-type.c (file_type): New file/function.  Extracted from
26156         diffutils.
26157
26158 2002-04-30  Jim Meyering  <meyering@lucent.com>
26159
26160         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
26161
26162 2002-04-29  Paul Eggert  <eggert@twinsun.com>
26163
26164         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
26165
26166 2002-04-29  Paul Eggert  <eggert@twinsun.com>
26167
26168         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
26169         Do not check for alloca.h (no longer used) or stdbool.h (was never
26170         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
26171
26172 2002-04-29  Paul Eggert  <eggert@twinsun.com>
26173
26174         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
26175
26176 2002-04-29  Jim Meyering  <meyering@lucent.com>
26177
26178         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
26179         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
26180         Use AC_FUNC_STRNLEN here instead.
26181
26182         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
26183         With autoconf-2.53a, it's part of AC_PROG_CC.
26184
26185 2002-04-28  Paul Eggert  <eggert@twinsun.com>
26186
26187         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
26188         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
26189
26190 2002-04-28  Paul Eggert  <eggert@twinsun.com>
26191
26192         * lib/sig2str.h, lib/sig2str.c: New files.
26193         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
26194
26195 2002-04-28  Paul Eggert  <eggert@twinsun.com>
26196
26197         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
26198         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
26199         of 127, since 64 is the largest conceivable number for ancient
26200         nonstandard hosts.
26201         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
26202
26203 2002-04-28  Jim Meyering  <meyering@lucent.com>
26204
26205         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
26206
26207 2002-04-24  Jim Meyering  <meyering@lucent.com>
26208
26209         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
26210         (jm_PREREQ): Use it.
26211
26212         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
26213         mach/mach.h fcntl.h.
26214         Check for this function: setlocale.
26215
26216 2002-04-24  Jim Meyering  <meyering@lucent.com>
26217
26218         * lib/gettext.h: New file, from Gettext.
26219         * lib/Makefile.am (INCLUDES): Remove -I../intl.
26220         (libfetish_a_SOURCES): Add gettext.h.
26221
26222 2002-04-16  Jim Meyering  <meyering@lucent.com>
26223
26224         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
26225         ut_pid, ut_id, ut_exit.
26226
26227 2002-04-16  Jim Meyering  <meyering@lucent.com>
26228
26229         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
26230         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
26231         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
26232
26233 2002-04-12  Jim Meyering  <meyering@lucent.com>
26234
26235         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
26236         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
26237         existence of the getmntinfo function.  Needed for Darwin 5.3.
26238
26239         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
26240         This is necessary at least on Darwin 5.3.
26241
26242         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
26243         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
26244         strnlen.o in the library, and that makes some versions of ranlib
26245         object.
26246
26247 2002-04-12  Jim Meyering  <meyering@lucent.com>
26248
26249         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
26250
26251 2002-04-09  Jim Meyering  <meyering@lucent.com>
26252
26253         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
26254         to be more precise.  Rather than saying we're checking whether the
26255         function `works', say what we're testing.
26256         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
26257         Reported by Bruno Haible.
26258
26259 2002-03-10  Jim Meyering  <meyering@lucent.com>
26260
26261         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
26262         Suggestion from Santiago Vila.
26263
26264 2002-03-08  Jim Meyering  <meyering@lucent.com>
26265
26266         * lib/rename.c: Mention that this wrapper is needed also on
26267         mips-dec-ultrix4.4 systems.
26268
26269 2002-03-02  Jim Meyering  <meyering@lucent.com>
26270
26271         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
26272         not HAVE_CLOCK_SETTIME.
26273
26274 2002-02-27  Paul Eggert  <eggert@twinsun.com>
26275
26276         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
26277         Check for clock_settime.
26278
26279 2002-02-27  Paul Eggert  <eggert@twinsun.com>
26280
26281         * lib/nanosleep.h: Rename to....
26282         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
26283
26284         * lib/gettime.c: New file.
26285         * lib/settime.c: New file.
26286         * lib/stime.c: Remove.
26287
26288         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
26289         timespec.h.  Remove nanosleep.h.
26290
26291 2002-02-25  Paul Eggert  <eggert@twinsun.com>
26292
26293         * m4/acl.m4: New file.
26294         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
26295         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
26296
26297 2002-02-25  Paul Eggert  <eggert@twinsun.com>
26298
26299         * lib/acl.c, lib/acl.h: New files.
26300         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
26301
26302 2002-02-24  Jim Meyering  <meyering@lucent.com>
26303
26304         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
26305         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
26306         cause trouble.  Reported by Nelson Beebe.
26307
26308 2002-02-23  Paul Eggert  <eggert@twinsun.com>
26309
26310         * lib/path-concat.c (xpath_concat): Reorder code to pacify
26311         compilers that don't know that xalloc_die never returns.
26312
26313 2002-02-20  Jim Meyering  <meyering@lucent.com>
26314
26315         * lib/getdate.c: Regenerate using bison-1.33.
26316
26317 2002-02-17  Jim Meyering  <meyering@lucent.com>
26318
26319         * config/config.guess (main): Don't use `head -1'; it's no longer
26320         portable. Use `sed 1q' instead.
26321
26322 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
26323
26324         * m4/codeset.m4: Upgrade to gettext-0.11.
26325         * m4/gettext.m4: Upgrade to gettext-0.11.
26326         * m4/glibc21.m4: Upgrade to gettext-0.11.
26327         * m4/iconv.m4: Upgrade to gettext-0.11.
26328         * m4/isc-posix.m4: Upgrade to gettext-0.11.
26329         * m4/lcmessage.m4: Upgrade to gettext-0.11.
26330         * m4/lib-ld.m4: New file, from gettext-0.11.
26331         * m4/lib-link.m4: New file, from gettext-0.11.
26332         * m4/lib-prefix.m4: New file, from gettext-0.11.
26333         * m4/progtest.m4: Upgrade to gettext-0.11.
26334
26335 2002-02-15  Paul Eggert  <eggert@twinsun.com>
26336
26337         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
26338         (jm_PREREQ): Use it.
26339
26340 2002-02-15  Paul Eggert  <eggert@twinsun.com>
26341
26342         * lib/posixver.c, lib/posixver.h: New files.
26343         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
26344
26345 2002-02-02  Paul Eggert  <eggert@twinsun.com>
26346             Bruno Haible  <bruno@clisp.org>
26347
26348         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
26349         (fwrite_success_callback): New declaration.
26350         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
26351         print_unicode_char. Call failure callback instead of error.
26352         (fwrite_success_callback): New function.
26353         (exit_failure_callback): New function.
26354         (fallback_failure_callback): New function.
26355         (print_unicode_char): Call unicode_to_mb.
26356
26357 2002-01-26  Jim Meyering  <meyering@lucent.com>
26358
26359         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
26360         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
26361
26362 2002-01-26  Jim Meyering  <meyering@lucent.com>
26363
26364         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
26365
26366 2002-01-22  Paul Eggert  <eggert@twinsun.com>
26367
26368         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
26369
26370 2002-01-22  Jim Meyering  <meyering@lucent.com>
26371
26372         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
26373         Otherwise, some versions of automake would omit the rule that makes
26374         Makefile from Makefile.in.
26375
26376 2002-01-21  Paul Eggert  <eggert@twinsun.com>
26377
26378         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
26379         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
26380         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
26381         (memcoll): Set errno to zero if there is no error.
26382
26383         * lib/quotearg.c (quotearg_buffer_restyled):
26384         Fix bug with quoting buffers containing NUL when backslashing escapes.
26385         This bug was exposed by the other changes in this patch.
26386         (quotearg_n_options): New arg ARGSIZE.
26387         All callers changed.
26388         (quoting_options_from_style): New function.
26389         (quotearg_n_style): Use it.
26390         (quotearg_n_style_mem): New function.
26391
26392         * lib/quotearg.h (quotearg_n_style_mem): New function.
26393
26394 2002-01-19  Jim Meyering  <meyering@lucent.com>
26395
26396         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
26397         Remove useless quotes: DF_PROG="df".
26398         * m4/strnlen.m4: New file.
26399
26400 2002-01-16  Paul Eggert  <eggert@twinsun.com>
26401
26402         * lib/backupfile.c (ISDIGIT): Comment fix.
26403         * lib/getdate.y (ISDIGIT): Likewise.
26404         * lib/posixtm.c (ISDIGIT, year): Likewise.
26405         * lib/strverscmp.c (ISDIGIT): Likewise.
26406         * lib/userspec.c (ISDIGIT): Likewise.
26407
26408 2002-01-16  Jim Meyering  <meyering@lucent.com>
26409
26410         * lib/getdate.y: Add three semicolons, each just before a closing
26411         brace. Bison (as of version 1.31) no longer papers over that mistake.
26412
26413 2002-01-05  Jim Meyering  <meyering@lucent.com>
26414
26415         * lib/version-etc.c (version_etc_copyright): Update copyright year.
26416
26417 2001-12-19  Paul Eggert  <eggert@twinsun.com>
26418
26419         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
26420         not silently exit merely because the output buffer happens to
26421         have nothing pending.
26422
26423 2001-12-18  Paul Eggert  <eggert@twinsun.com>
26424
26425         See the big note in ../ChangeLog.
26426         * lib/human.c (suffixes): Prefer K to k for 1024.
26427         (generate_suffix_backwards): New function.
26428         (human_readable_inexact): Use it.
26429         * lib/xstrtol.c (__xstrtol): If there is no number but there
26430         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
26431         Accept 'K' as well as 'k'.
26432
26433 2001-12-15  Jim Meyering  <meyering@lucent.com>
26434
26435         * lib/regex.h (__restrict_arr): Update from libc.
26436
26437         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
26438         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
26439         (STREQ): Define.
26440
26441 2001-12-14  Jim Meyering  <meyering@lucent.com>
26442
26443         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
26444         Suggestion from Bruno Haible.
26445
26446 2001-12-10  Jim Meyering  <meyering@lucent.com>
26447
26448         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
26449         xrealloc, Instead, include "xalloc.h".
26450         (initbuffer): Don't cast xmalloc return value to char*.
26451         (readline): Reword comment.
26452         Don't cast xrealloc return value to char*
26453         Return NULL, not 0.
26454
26455 2001-12-09  Jim Meyering  <meyering@lucent.com>
26456
26457         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
26458         about `signed and unsigned type in conditional expression'.
26459         * lib/posixtm.c (posix_time_parse): Likewise.
26460
26461         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
26462
26463         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
26464         to avoid a pedantic warning.
26465
26466         * lib/getstr.c: Don't include assert.h.
26467         (getstr): Remove warning-evoking assertions.
26468         Return -1 if offset parameter is out of bounds.
26469         Change the type of a local from int to size_t.
26470
26471         * lib/strftime.c (my_strftime_localtime_r): Include this function
26472         definition in the `#if ! HAVE_TM_GMTOFF' block.
26473
26474         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
26475         Include xalloc.h instead.
26476
26477 2001-12-02  Jim Meyering  <meyering@lucent.com>
26478
26479         * lib/tempname.c: Don't declare getenv, thus reverting the change of
26480         2001-11-18.  It's no longer necessary, now that stdlib.h is always
26481         included.
26482
26483         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
26484         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
26485
26486 2001-11-30  Akim Demaille  <akim@epita.fr>
26487
26488         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
26489         before being defined.
26490
26491 2001-11-27  Paul Eggert  <eggert@twinsun.com>
26492
26493         * lib/quotearg.h (quotearg_n, quotearg_n_style):
26494         First arg is int, not unsigned.
26495         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
26496         (SIZE_MAX, UINT_MAX): New macros.
26497         (quotearg_n_options): Abort if N is negative.
26498         Avoid overflow check on hosts where size_t is 64 bits and int
26499         is 32 bits, as overflow is impossible there.
26500         Fix off-by-one typo that caused unnecessary reallocation.
26501
26502 2001-11-27  Jim Meyering  <meyering@lucent.com>
26503
26504         * lib/tempname.c: Merge with version from libc.
26505         * lib/regex.c: Likewise.
26506
26507         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
26508         systems for which STDC_HEADERS is 0, it was not included, resulting in
26509         a warning about an integer-to-pointer conversion problem with getenv.
26510         Reported by Volker Borchert.
26511
26512 2001-11-26  Jim Meyering  <meyering@lucent.com>
26513
26514         * lib/gtod.h: Remove file.
26515         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
26516         * lib/gettimeofday.c: Don't include gtod.h.
26517         (GTOD_init): Remove function.
26518         (rpl_gettimeofday): Do its job here instead, rather than aborting.
26519         Suggestion from Volker Borchert.
26520
26521 2001-11-23  Jim Meyering  <meyering@lucent.com>
26522
26523         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
26524         it.
26525         * lib/hash.c (struct hash_table): Define it here instead.
26526
26527 2001-11-22  Jim Meyering  <meyering@lucent.com>
26528
26529         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
26530
26531 2001-11-20  Jim Meyering  <meyering@lucent.com>
26532
26533         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
26534         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
26535
26536 2001-11-19  Jim Meyering  <meyering@lucent.com>
26537
26538         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
26539         directory.  Use "conftestXXXXXX" as the template.
26540         Suggestion from Paul Eggert.
26541
26542         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
26543         immediately, so the test doesn't mistakenly hit the max-open-files
26544         limit.
26545
26546 2001-11-18  Paul Eggert  <eggert@twinsun.com>
26547
26548         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
26549         (TEMPORARIES): New macro.
26550         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
26551         removes an artificial limitation (e.g. HP-UX 10.20, where
26552         TMP_MAX is 17576).
26553
26554 2001-11-18  Jim Meyering  <meyering@lucent.com>
26555
26556         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
26557
26558 2001-11-18  Jim Meyering  <meyering@lucent.com>
26559
26560         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
26561         on SunOS 4.
26562
26563         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
26564         files will be created before anything else.
26565
26566 2001-11-17  Paul Eggert  <eggert@twinsun.com>
26567
26568         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
26569         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
26570
26571 2001-11-17  Jim Meyering  <meyering@lucent.com>
26572
26573         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
26574         Prompted by a report from Bob Proulx.
26575
26576         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
26577         Instead, require UTILS_FUNC_MKSTEMP.
26578
26579 2001-11-17  Jim Meyering  <meyering@lucent.com>
26580
26581         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
26582         Now, that's done as part of AC_FUNC_STRTOD.
26583
26584 2001-11-17  Jim Meyering  <meyering@lucent.com>
26585
26586         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
26587         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
26588         rather than group writable.  Patch by Juan F. Codagnone.
26589
26590         * lib/readtokens.c: Remove explicit declarations of xmalloc and
26591         xrealloc, Instead, include "xalloc.h".
26592
26593         * lib/mountlist.c: Include unlocked-io.h after all system headers.
26594         Remove explicit declarations of xmalloc, xrealloc,
26595         and xstrdup.  Instead, include "xalloc.h".
26596
26597         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
26598         unlocked-io.h.
26599         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
26600         Likewise.
26601         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
26602
26603         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
26604         Reported by Padraig Brady.
26605
26606         * lib/mkstemp.c: #undef mkstemp.
26607         Include config.h.
26608         (rpl_mkstemp): Rename from mkstemp.
26609         Protoize.
26610
26611 2001-11-16  Jim Meyering  <meyering@lucent.com>
26612
26613         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
26614         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
26615         determine the amount of total physical memory, use pstat_getstatic.
26616         HPUX-11 doesn't define _SC_PHYS_PAGES.
26617         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
26618         If sysconf couldn't be used to determine the amount of available
26619         physical memory, use both pstat_getstatic and pstat_getdynamic.
26620         Based on a patch from Bob Proulx.
26621
26622 2001-11-10  Jim Meyering  <meyering@lucent.com>
26623
26624         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
26625         (jm_PREREQ): Use it.
26626
26627 2001-11-09  Jim Meyering  <meyering@lucent.com>
26628
26629         * m4/jm-macros.m4: Require autoconf-2.52f.
26630         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
26631         Use these AC_-prefixed names, not the AM_-prefixed ones.
26632
26633         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
26634
26635 2001-11-05  Jim Meyering  <meyering@lucent.com>
26636
26637         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
26638
26639 2001-11-04  Jim Meyering  <meyering@lucent.com>
26640
26641         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
26642         $DEFS.
26643
26644 2001-11-03  Jim Meyering  <meyering@lucent.com>
26645
26646         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
26647         of AC_DEFUN.
26648
26649         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
26650         know the name of the variable in the macro definition.
26651
26652 2001-11-03  Jim Meyering  <meyering@lucent.com>
26653
26654         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
26655         in argmatch_to_argument call.
26656
26657         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
26658         argument.
26659
26660         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
26661         e.g., a fault due to an attempt to free a NULL pointer.
26662
26663 2001-11-01  Jim Meyering  <meyering@lucent.com>
26664
26665         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
26666         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
26667
26668 2001-11-01  Jim Meyering  <meyering@lucent.com>
26669
26670         * lib/dirfd.c, lib/dirfd.h: New files.
26671         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
26672
26673         * lib/hash.c (hash_print) [TESTING]: Clean up.
26674
26675 2001-10-22  Paul Eggert  <eggert@twinsun.com>
26676
26677         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
26678         to avoid a warning if -Wall.
26679
26680 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
26681
26682         * README: New file
26683         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
26684         (per RMS's instructions, this is now the canonical source)
26685         * lgpl/, gpl/: New directories.
26686
26687 2001-10-21  Paul Eggert  <eggert@twinsun.com>
26688
26689         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
26690
26691 2001-10-21  Jim Meyering  <meyering@lucent.com>
26692
26693         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
26694         this code would end up calling gettext even in packages built
26695         with --disable-nls.
26696         * lib/getopt.c (_): Likewise.
26697         * lib/regex.c (_): Likewise.
26698
26699 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26700
26701         * m4/error.m4 (jm_PREREQ_ERROR):
26702         Do not invoke AC_CHECK_FUNCS with strerror_r, as
26703         AC_FUNC_STRERROR_R does that.
26704         Check for strerror declaration.
26705
26706         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
26707         are supposed to have them these days.
26708         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
26709         Merge changes from latest Autoconf CVS.
26710         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
26711         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
26712         POSIX decided to standardize on the int flavor of strerror_r.
26713
26714 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26715
26716         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
26717         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
26718         Use strerror_r that is only a macro, even if it is not a function.
26719         (strerror): Check for HAVE_DECL_STRERROR before declaring.
26720         (private_strerror): Use prototypes, not old-style function definition.
26721         (print_errno_message): New function.
26722         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
26723         char*-flavored one.
26724         (error_tail, error, error_at_line): Use it.
26725
26726 2001-10-11  Jim Meyering  <meyering@lucent.com>
26727
26728         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
26729         and quote_n (1, ... to avoid clobbering a buffer.
26730
26731 2001-10-05  Jim Meyering  <meyering@lucent.com>
26732
26733         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
26734         hash-pjw.h.
26735         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
26736         * lib/hash-pjw.h: New file.
26737
26738 2001-09-30  Jim Meyering  <meyering@lucent.com>
26739
26740         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
26741         `struct fsstat' has the `f_fstypename' member.
26742         Use that to define FS_TYPE, which is now used to make
26743         the getfsstat link test tighter.
26744
26745 2001-09-30  Jim Meyering  <meyering@lucent.com>
26746
26747         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
26748         Include <sys/ucred.h>, for Apple Darwin.
26749         Include sys/mount.h and sys/fs_types.h only if available.
26750         (FS_TYPE): Define.
26751         (read_filesystem_list): Use FS_TYPE.
26752
26753 2001-09-29  Paul Eggert  <eggert@twinsun.com>
26754
26755         * lib/exclude.c (excluded_filename): 0 -> false, since it's
26756         a boolean context.
26757
26758 2001-09-29  Jim Meyering  <meyering@lucent.com>
26759
26760         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26761         [one-argument getmntent function]): Include stdio.h before mntent.h.
26762         SunOS 4.1.x needs it for the declaration of `FILE'.
26763         Patch by Volker Borchert.
26764
26765         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26766         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
26767         sys/fs_types.h, and make the link-test for getfsstat guard #include
26768         directives with appropriate #if HAVE_*_H tests so that we can
26769         detect getfsstat on Apple Darwin1.3.7 systems.
26770         Reported by Nelson Beebe.
26771         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
26772
26773 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26774
26775         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26776         #defines strtoimax.  Also treat the other strto* functions
26777         like strtoimax.
26778
26779         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26780         Check for strtoul and strtoumax,
26781         as those declarations are made even in the signed case.
26782         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
26783         Likewise, for strtol and strtoimax.
26784
26785 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26786
26787         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26788         #defines strtoimax.  Also treat the other strto* functions
26789         like strtoimax.
26790
26791         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
26792         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
26793         (strtoimax, strtoumax): Do not declare if already defined as a macro.
26794
26795 2001-09-26  Jim Meyering  <meyering@lucent.com>
26796
26797         Most macros in unlocked-io.h had the wrong number of arguments.
26798         * lib/gen-uio: New script.
26799         (USE_UNLOCKED_IO): Define to 1 if not already defined.
26800         * lib/unlocked-io.hin: Remove file.
26801         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
26802         rather than trying to embed it here.
26803         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
26804         Reported by Padraig Brady.
26805
26806 2001-09-25  Volker Borchert  <bt@teknon.de>
26807
26808         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
26809         `result'.
26810
26811 2001-09-24  Jim Meyering  <meyering@lucent.com>
26812
26813         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
26814
26815 2001-09-23  Jim Meyering  <meyering@lucent.com>
26816
26817         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
26818         instead of the mere test for existence of mntent.h.  The latter
26819         would get a false-positive on AIX 3.4 systems.
26820         In the outer getmntent if-block, don't die if neither of the getmntent
26821         tests succeeds.  Instead, just fall through and continue with the
26822         remaining tests.
26823
26824 2001-09-23  Jim Meyering  <meyering@lucent.com>
26825
26826         * lib/mountlist.c: Remove useless parentheses in #if directives.
26827         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
26828         the deprecated MOUNTED symbol is no longer defined in mntent.h.
26829
26830 2001-09-22  Jim Meyering  <meyering@lucent.com>
26831
26832         * m4/gettext.m4: New file.  From gettext.
26833         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
26834         * m4/progtest.m4: Likewise
26835         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
26836         * m4/glibc21.m4: Likewise.
26837
26838         * m4/libintl.m4: Remove.  No longer used.
26839
26840 2001-09-22  Jim Meyering  <meyering@lucent.com>
26841
26842         * lib/localcharset.c: Update from latest gettext.
26843         * lib/config.charset: Likewise.
26844
26845 2001-09-20  Jim Meyering  <meyering@lucent.com>
26846
26847         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
26848         strtoimax.
26849         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
26850         strtoumax.
26851
26852 2001-09-20  Jim Meyering  <meyering@lucent.com>
26853
26854         * lib/xstrtol.c (strtoimax): Guard declaration with
26855         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
26856         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
26857         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
26858         (strtoumax): Likewise, for completeness (it wasn't necessary).
26859
26860 2001-09-17  Paul Eggert  <eggert@twinsun.com>
26861
26862         * lib/strtoimax.c (HAVE_LONG_LONG):
26863         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
26864         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
26865         to work around bug in IBM C compiler.
26866
26867 2001-09-17  Jim Meyering  <meyering@lucent.com>
26868
26869         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
26870         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
26871         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
26872         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
26873         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
26874         whenever the right hand side need not be expanded by the shell.
26875
26876 2001-09-16  Paul Eggert  <eggert@twinsun.com>
26877
26878         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
26879         library.  It's not correct, as some older glibcs are buggy.
26880         fnmatch wasn't fixed until glibc 2.2.
26881
26882         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
26883         special shell magic here.
26884
26885 2001-09-16  Jim Meyering  <meyering@lucent.com>
26886
26887         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
26888         * m4/jm-macros.m4: Require it.
26889
26890 2001-09-16  Jim Meyering  <meyering@lucent.com>
26891
26892         * lib/mkdir.c: New file.
26893
26894 2001-09-15  Jim Meyering  <meyering@lucent.com>
26895
26896         * m4/jm-macros.m4: Check for help2man.
26897
26898 2001-09-11  Jim Meyering  <meyering@lucent.com>
26899
26900         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
26901         The body, by Paul Eggert, was moved here from configure.in.
26902         * m4/jm-macros.m4: Require UTILS_HOST_OS.
26903
26904 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26905
26906         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
26907         (jm_PREREQ): Use it.
26908
26909 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26910
26911         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
26912         Use ssize_t, not int, to store result of readlink.
26913         Check for ssize_t overflow as well as size_t overflow,
26914         as POSIX says the result of readlink is implementation-defined
26915         when ssize_t overflows.
26916         Remove unnecessary cast to char*.
26917         Use free+malloc instead of realloc, as the storage doesn't need
26918         to be preserved and it's clearer and can be more efficient that way.
26919         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
26920         * lib/xreadlink.h (xreadlink): Update prototype.
26921
26922 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26923
26924         * lib/xgetcwd.c: Revert some of the previous change; intead,
26925         fix the HAVE_GETCWD_NULL code to behave more like the
26926         !HAVE_GETCWD_NULL code used to.
26927
26928         Include "xalloc.h".
26929         (xgetcwd): Do not return NULL when memory is exhausted; instead,
26930         invoke xalloc_die.
26931
26932 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26933
26934         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
26935         sys/param.h, as pathmax.h includes them.
26936
26937 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26938
26939         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
26940         (jm_PREREQ_XGETCWD): New macro.
26941
26942         * m4/getcwd.m4: New file.
26943
26944 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26945
26946         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
26947         like the HAVE_GETCWD_NULL code.
26948         Include pathmax.h if not HAVE_GETCWD.
26949         Do not include xalloc.h.
26950         (INITIAL_BUFFER_SIZE): New symbol.
26951         Do not use xmalloc / xrealloc, since the caller is responsible for
26952         handling errors.  Preserve errno around `free' during failure.
26953         Do not overrun buffer when using getwd.
26954
26955 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26956
26957         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
26958         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
26959         getcwd (NULL, 0).
26960
26961 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26962
26963         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
26964         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
26965         spotted by Jim Meyering.
26966
26967 2001-09-03  Jim Meyering  <meyering@lucent.com>
26968
26969         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
26970         failure.
26971
26972 2001-09-02  Jim Meyering  <meyering@lucent.com>
26973
26974         * lib/error.c: Update from GNU libc.
26975
26976 2001-09-01  Jim Meyering  <meyering@lucent.com>
26977
26978         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
26979         Used by df.
26980
26981 2001-09-01  Jim Meyering  <meyering@lucent.com>
26982
26983         * lib/xreadlink.c: New file.
26984         * lib/xreadlink.h: New file.
26985         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
26986         xreadlink.h.
26987
26988         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
26989         doesn't conflict with sparc Solaris 7's definition in
26990         /usr/include/sys/int_types.h.
26991
26992         * lib/exclude.c: Use `""', not `<>' to #include non-system header
26993         files.
26994         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
26995         and strncasecmp as r-values.  Unixware didn't have declarations.
26996
26997 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26998
26999         * lib/xstrtol.h: Add copyright notice.
27000         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
27001         LONGINT_INVALID_SUFFIX_CHAR.
27002
27003 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27004
27005         * lib/xstrtol.c (strtoimax): New decl.
27006
27007 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27008
27009         * lib/xgetcwd.c: Don't include pathmax.h.
27010         Include stdlib.h and unistd.h if available.
27011         Include xalloc.h.
27012         (xmalloc, xstrdup, free): Remove decls.
27013         (xgetcwd): Don't assume sizes fit in unsigned.
27014         Check for overflow when computing sizes.
27015         Simplify reallocation code.
27016
27017 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27018
27019         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
27020         a directory's st_size can have an arbitrary value, so the old
27021         usage could waste an arbitrary amount of memory.  All uses
27022         changed.
27023         * lib/savedir.h: Update prototype.
27024
27025 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27026
27027         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
27028
27029         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
27030         old strtoimax.c.
27031
27032         Also, make the following further changes to make this file's
27033         configuration more similar to that of strtol.c:
27034         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
27035         (strtoumax, uintmax_t, strtoull, strtol): Remove.
27036         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
27037         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
27038         changed to signed values.
27039
27040         And make the following changes as well:
27041         Fix copyright notice, as 1999 was missing.
27042         (verify): New macro.
27043         (strtoimax): Check sizes at compile-time, not run-time.
27044         Prefer strtol to strtoll if both work.
27045         (main): Remove; it was not that useful and was a pain to maintain.
27046
27047         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
27048
27049 2001-08-31  Jim Meyering  <meyering@lucent.com>
27050
27051         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
27052         Use an initial, malloc'd, buffer of length 128 rather than
27053         a statically allocated one of length 1024.
27054
27055 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27056
27057         Simplify code, partly by assuming autoconf 2.52 semantics.
27058
27059         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
27060
27061         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
27062         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
27063         All uses removed.
27064         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
27065         Move AC_REQUIRE to next-to-top level, to avoid confusion.
27066         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
27067         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
27068         jm_AC_HEADER_INTTYPES_H.
27069         * m4/jm-macros.m4 (jm_MACROS): Likewise.
27070
27071         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
27072
27073         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
27074         Quote first arg of AC_DEFUN.
27075         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
27076         since they are needed to parse the include file even if we need
27077         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
27078         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
27079         but with opposite signedness.
27080
27081 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27082
27083         Merge 'exclude' changes from tar 1.13.22.
27084         This fixes one or two unlikely storage allocation overflow bugs,
27085         but doesn't change user-visible behavior otherwise.
27086
27087 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27088
27089         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
27090         (jm_PREREQ_EXCLUDE): New macro.
27091
27092 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27093
27094         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
27095         tm to be declared.
27096
27097 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27098
27099         * lib/hash.c: Remove '2001' from copyright notice.
27100
27101 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27102
27103         * lib/full-write.h: New file.
27104         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
27105         * lib/full-write.c: Correct credits, as cccp.c no longer
27106         exists and anyway it was so heavily changed from the old cccp
27107         code as to be unrecognizable.  Include full-write.h.
27108         (full_write) Return size_t, with short writes meaning failure.
27109         All callers changed.  This fixes a bug with large buffers
27110         on 64-bit hosts.
27111         * lib/utime.c: Include full-write.h.
27112
27113 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27114
27115         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
27116         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
27117         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
27118         Include if available.
27119         (<xalloc.h>): Include
27120         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
27121         (verify): New macro.  Use it to verify that EXCLUDE macros do not
27122         collide with FNM macros.
27123         (struct patopts): New struct.
27124         (struct exclude): Use it, as exclude patterns now come with options.
27125         (new_exclude): Support above changes.
27126         (new_exclude, add_exclude_file):
27127         Initial size must now be a power of two to simplify overflow checking.
27128         (free_exclude, fnmatch_no_wildcards): New function.
27129         (excluded_filename): No longer requires options arg, as the options
27130         are determined by add_exclude.  Now returns bool, not int.
27131         (excluded_filename, add_exclude):
27132         Add support for the fancy new exclusion options.
27133         (add_exclude, add_exclude_file): Now takes int options arg.
27134         Check for arithmetic overflow when computing sizes.
27135         (add_exclude_file): xrealloc might modify errno, so don't
27136         realloc until after errno might be used.
27137
27138         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
27139         New macros.
27140         (free_exclude): New decl.
27141         (add_exclude, add_exclude_file): Now takes int options arg.
27142         (excluded_filename): No longer requires options arg, as the options
27143         are determined by add_exclude.  Now returns bool, not int.
27144
27145 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27146
27147         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
27148
27149 2001-08-27  Jim Meyering  <meyering@lucent.com>
27150
27151         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
27152
27153         * lib/version-etc.c (N_): Remove definition.
27154         Revert most of last change.
27155         Instead, simply don't mark the `Copyright...' string for translation.
27156         Based on advice from Paul Eggert.
27157
27158         * lib/strtoxmax.c: Tweak comment.
27159
27160 2001-08-26  Jim Meyering  <meyering@lucent.com>
27161
27162         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
27163
27164         * m4/xstrtoimax.m4: New file.
27165         * m4/xstrtoumax.m4: Add comments explaining why we
27166         AC_REPLACE_FUNCS(strtol).
27167
27168 2001-08-26  Jim Meyering  <meyering@lucent.com>
27169
27170         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
27171         of copyright with `%s' so translators don't get an untranslated
27172         message in 2002.
27173         (COPYRIGHT_YEAR): Define.
27174         (version_etc): Use fprintf rather than fputs.
27175         Suggestion from Ulrich Drepper.
27176
27177         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
27178
27179         * lib/strtoll.c: New file, from GNU libc.
27180         * lib/xstrtoimax.c: New file.
27181
27182         * lib/xstrtol.h: Add xstrtoimax.
27183         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
27184         * lib/strtoimax.c: New file.  Likewise, but first define
27185         STRTOUXMAX_SIGNED.
27186
27187         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
27188         ...
27189         * lib/strtoxmax.c: ... then renamed to this.
27190
27191 2001-08-18  Paul Eggert  <eggert@twinsun.com>
27192
27193         * m4/inttypes.m4: Add AC_PREREQ(2.13).
27194         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
27195         (jm_AC_TYPE_INTMAX_T): New macro.
27196         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
27197
27198         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
27199
27200         * m4/longlong.m4: Renamed from ulonglong.m4.
27201         * m4/inttypes.m4: Renamed from inttypes_h.m4.
27202         * m4/uintmax_t.m4: Removed.
27203
27204 2001-08-13  Paul Eggert  <eggert@twinsun.com>
27205
27206         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
27207         Port to Solaris 8, where 'sed' requires a space after the 'r'
27208         command, and where sh dislikes "$/".  Clean up the spacing a bit.
27209         Redirect output to $tmp just once.
27210
27211 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
27212
27213         * lib/addext.c (<errno.h>): Include.
27214         (errno): Declare if not defined.
27215         (addext): Work correctly when pathconf returns -1 and leaves
27216         errno alone because there is no limit.  Also, work even if
27217         pathconf returns a value greater than SIZE_MAX.
27218
27219 2001-08-12  Jim Meyering  <meyering@lucent.com>
27220
27221         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
27222         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
27223         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
27224         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
27225         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
27226         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
27227         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
27228         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
27229         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
27230         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
27231         utime.m4, utimes.m4, xstrtoumax.m4:
27232         Quote the first argument in each use of AC_DEFUN.
27233
27234 2001-08-12  Jim Meyering  <meyering@lucent.com>
27235
27236         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
27237         Simply `return getcwd (NULL, 0);'.
27238         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
27239         Use 1300 as initial value for length, not PATH_MAX.
27240
27241         * lib/pathmax.h: Clean up cpp syntax.
27242
27243 2001-08-12  Jim Meyering  <meyering@lucent.com>
27244
27245         * lib/gettimeofday.c: New file.
27246         * lib/gtod.h: New file.
27247         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
27248
27249 2001-08-05  Jim Meyering  <meyering@lucent.com>
27250
27251         * m4/jm-macros.m4: Require autoconf-2.52.
27252
27253 2001-08-04  Jim Meyering  <meyering@lucent.com>
27254
27255         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
27256         stmt, to get in sync with glibc.
27257
27258 2001-08-03  Paul Eggert  <eggert@twinsun.com>
27259
27260         The following changes are from gettext 0.10.39 as maintained by
27261         Bruno Haible.
27262
27263         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
27264         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
27265         with inverted sense.  All uses changed.
27266
27267         * lib/mbswidth.c: Don't include <limits.h>.
27268         Include <stdlib.h> and <string.h> unconditionally.
27269         (iswcntrl, mbsinit, ISCNTRL): New macros.
27270         (mbsnwidth): Use K&R style function declarations.
27271         Don't bother checking for MB_LEN_MAX == 1, since the compiler
27272         can optimize it when MB_CUR_MAX == 1.
27273         The width of control characters is zero, not 1.
27274
27275 2001-08-03  Paul Eggert  <eggert@twinsun.com>
27276
27277         The following changes are from gettext 0.10.39 as maintained by
27278         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
27279
27280         * m4/codeset.m4: Upgrade to serial AM1.
27281         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
27282         all uses changed.  Quote first arg of AC_DEFUN.
27283         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
27284
27285         * m4/iconv.m4: Upgrade to serial AM2.
27286         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
27287         Add --with-libconv-prefix.
27288         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
27289         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
27290         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
27291         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
27292         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
27293
27294         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
27295         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
27296         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
27297         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
27298         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
27299         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
27300         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
27301         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
27302         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
27303
27304         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
27305         string.h any more.
27306
27307         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
27308         not the default value.
27309
27310         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
27311         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
27312         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
27313         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
27314         Also check for iswcntrl, used for wcwidth fallback.
27315         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
27316         to Autoconf 2.13.
27317
27318 2001-08-03  Jim Meyering  <meyering@lucent.com>
27319
27320         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
27321         as it was in the original.  Reported by Paul Eggert.
27322
27323 2001-07-16  Jim Meyering  <meyering@lucent.com>
27324
27325         * m4/gettimeofday.m4: New file.
27326         Prompted by a report from Bernhard Baehr.
27327
27328 2001-07-15  Jim Meyering  <meyering@lucent.com>
27329
27330         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
27331         stuff. Now it's in ../Makefile.cfg.
27332
27333 2001-07-15  Jim Meyering  <meyering@lucent.com>
27334
27335         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
27336         (BUILT_SOURCES): Add unlocked-io.h.
27337         (io_functions): Define.
27338         (unlocked-io.h): New rule.
27339         (DISTCLEANFILES): Add unlocked-io.h.
27340         (all-local): Depend on unlocked-io.h, to ensure it is created.
27341
27342         * lib/unlocked-io.hin: New file
27343
27344         * lib/regex.c: Update from glibc.
27345
27346 2001-07-05  Jim Meyering  <meyering@lucent.com>
27347
27348         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
27349         recommendation.
27350         (libfetish_a_SOURCES): Put all .h files here instead.
27351         Remove a thus-exposed (better checks in automake) duplicate and
27352         two unnecessary .h files.
27353
27354 2001-07-04  Jim Meyering  <meyering@lucent.com>
27355
27356         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
27357         that generates jm-glibc-io.m4 so that it doesn't trigger any make
27358         distcheck failure.
27359
27360 2001-07-02  Jim Meyering  <meyering@lucent.com>
27361
27362         The following changes were prompted by suggestions from Bruno Haible.
27363
27364         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
27365         is now generated.
27366         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
27367         definition of EXTRA_DIST.
27368         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
27369         ensure that the generated file is created/updated whenever the list
27370         of $(unlocked_functions) is changed.
27371         (jm-glibc-io.m4): New rule.
27372         (unlocked-io.h): New rule -- currently unused.
27373
27374 2001-06-24  Jim Meyering  <meyering@lucent.com>
27375
27376         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
27377         unmatched right bracket, rather than kludging it with an extra,
27378         falsely-matching quote in a comment.  Patch by Akim Demaille.
27379
27380 2001-06-11  Jim Meyering  <meyering@lucent.com>
27381
27382         * lib/regex.c: Update from GNU libc.
27383
27384 2001-05-27  Jim Meyering  <meyering@lucent.com>
27385
27386         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
27387         Check for ut_type in struct utmp.
27388
27389 2001-05-27  Jim Meyering  <meyering@lucent.com>
27390
27391         * lib/readutmp.h (UT_TYPE): Define.
27392
27393 2001-05-24  Jim Meyering  <meyering@lucent.com>
27394
27395         * lib/argmatch.c: Include "quote.h".
27396         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
27397         quote function.  Reported by Göran Uddeborg.
27398
27399 2001-05-22  Jim Meyering  <meyering@lucent.com>
27400
27401         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
27402         now that we use the package-supplied version unconditionally.
27403         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
27404
27405 2001-05-21  Jim Meyering  <meyering@lucent.com>
27406
27407         * m4/regex.m4: Change a couple backticks to single quotes to avoid
27408         shell syntax errors.
27409
27410 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
27411
27412         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
27413
27414 2001-05-20  Paul Eggert  <eggert@twinsun.com>
27415
27416         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
27417         Don't bother to check library strftime, since
27418         we'll be using our own my_strftime function anyway.
27419         Define my_strftime instead of strftime.
27420
27421 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
27422
27423         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
27424         which is not yet declared.
27425
27426 2001-05-15  Jim Meyering  <meyering@lucent.com>
27427
27428         * m4/regex.m4: Use proper quoting so brackets appear in the test
27429         program.
27430         Reported by, and with help from, Bruno Haible.
27431
27432 2001-05-13  Jim Meyering  <meyering@lucent.com>
27433
27434         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
27435         undefined.
27436
27437 2001-05-11  Paul Eggert  <eggert@twinsun.com>
27438
27439         dirname code cleanup.  base_name now behaves more compatibly
27440         with POSIX basename when given file names that have trailing
27441         slashes, and similarly for dir_name.  Add new primitives
27442         base_len and dir_len.  Put the directory-name-related decls
27443         into dirname.h.
27444
27445         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
27446         * lib/backupfile.c (base_name): Likewise.
27447         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
27448         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
27449         * lib/makepath.c (strip_trailing_slashes): Likewise.
27450         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
27451         ISSLASH): Likewise.
27452         * lib/rename.c (strip_trailing_slashes): Likewise.
27453         * lib/same.c (base_name): Likewise.
27454         * lib/stripslash.c (ISSLASH): Likewise.
27455
27456         * lib/addext.c: Include <dirname.h> after size_t is defined.
27457         * lib/backupfile.c: Likewise.
27458
27459         * lib/addext.c (addext): Use base_len to trim redundant
27460         trailing slashes instead of doing it ourselves.
27461         But do not trim the last slash if it is not redundant.
27462
27463         * lib/backupfile.c (find_backup_file_name,
27464         max_backup_version): Use base_len instead of rolling it ourselves.
27465         Handle the case of "" and (on DOS) "C:" correctly.
27466
27467         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
27468         needed. Include <string.h>, <dirname.h>.
27469         (base_name): Allow file names ending in slashes, other than names
27470         that are all slashes.  In this case, return the basename followed
27471         by the slashes.  This is more general, and can be used in places
27472         where the original base_name purposely had an assertion failure.
27473         (base_len): New function.
27474
27475         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
27476         Do not include <assert.h>; no longer needed.
27477         Include xalloc.h.
27478         (memrchr): Remove decl.
27479         (dir_name_r): Remove.
27480         (dir_len): Renamed from dirlen.  All callers changed.
27481         Rewrite in terms of base_name, for simplicity and consistency.
27482         (dir_name): Never return NULL.  All callers changed.
27483         Do not include <stdlib.h> in test program; no longer needed.
27484         return 0; is fine for test program.
27485
27486         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
27487         New macros.
27488         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
27489
27490         * lib/path-concat.c (path_concat): Use base_len to compute
27491         base length, not strlen; this means we cannot rely on memcpy
27492         to null-terminate.
27493
27494         * lib/same.c (STREQ): Remove.
27495         (same_name): Handle the case where the basename ends in trailing '/'.
27496
27497         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
27498         a slash was stripped.  Do not strip the last slash after a
27499         file system prefix.
27500
27501 2001-05-11  Paul Eggert  <eggert@twinsun.com>
27502
27503         * lib/Makefile.am (libfetish_a_SOURCES):
27504         Add strftime.c, since we now compile it on all hosts.
27505
27506         * lib/strftime.c (my_strftime):
27507         Define to nstrftime if emacs, but only if my_strftime is not defined.
27508         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
27509         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
27510         Add one more extra argument: a nanoseconds value.
27511         All uses changed.
27512         (ns): New macro.
27513         (my_strftime function): Add %N format.
27514         (emacs_strftimeu): Renamed from emacs_strftime,
27515         with extra ut argument.
27516
27517 2001-05-09  Paul Eggert  <eggert@twinsun.com>
27518
27519         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
27520
27521 2001-04-21  Jim Meyering  <meyering@lucent.com>
27522
27523         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
27524         doesn't interfere.
27525
27526 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
27527
27528         * m4/ftruncate.m4: Check for chsize.
27529         Link with ftruncate.o unconditionally if ftruncate is missing.
27530         This was required when cross-compiling to i586-mingw32msvc.
27531
27532 2001-04-08  Jim Meyering  <meyering@lucent.com>
27533
27534         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
27535         recomputed; that's necessary when the offset spans a DST transition.
27536         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
27537
27538 2001-04-02  Jim Meyering  <meyering@lucent.com>
27539
27540         * lib/regex.h, regex.c: Update from GNU libc.
27541
27542 2001-03-24  Jim Meyering  <meyering@lucent.com>
27543
27544         * m4/jm-macros.m4: Require autoconf-2.49d.
27545
27546 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
27547
27548         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
27549
27550 2001-03-19  Paul Eggert  <eggert@twinsun.com>
27551
27552         * lib/version-etc.c (version_etc_copyright): Update to 2001.
27553
27554 2001-03-17  Jim Meyering  <meyering@lucent.com>
27555
27556         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
27557         now that the version in autoconf is equivalent.
27558         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
27559
27560         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
27561         Suggestion from Akim Demaille.
27562
27563         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
27564         (jm_PREREQ_TEMPNAME): New function.
27565
27566 2001-03-16  Paul Eggert  <eggert@twinsun.com>
27567
27568         * lib/tempname.c (uint64_t): Define to uintmax_t if
27569         not defined, and if UINT64_MAX is not defined.
27570         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
27571         Reported by John David Anglin.
27572
27573 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
27574
27575         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
27576         resolve alias if codeset is empty.
27577         * lib/config.charset (BeOS): Use wildcard syntax.
27578
27579 2001-03-13  Jim Meyering  <meyering@lucent.com>
27580
27581         * lib/path-concat.c (path_concat)
27582         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
27583         concatenating e.g., `C:' and `foo'.
27584         From Bruno Haible.
27585
27586 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27587
27588         * lib/localcharset.c (locale_charset): Don't use
27589         setlocale(LC_CTYPE,NULL). Don't return NULL.
27590         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
27591
27592 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27593
27594         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
27595         support for DOS/DJGPP.
27596
27597 2001-03-01  Paul Eggert  <eggert@twinsun.com>
27598
27599         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
27600         lacks mkstemp.  Compile our own tempname.c if we compile our own
27601         mkstemp.c, as mkstemp relies on tempname.
27602
27603 2001-03-01  Jim Meyering  <meyering@lucent.com>
27604
27605         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
27606         AH_VERBATIM really does output its argument verbatim.
27607
27608 2001-02-28  Paul Eggert  <eggert@twinsun.com>
27609
27610         * lib/Makefile.am (libfetish_a_SOURCES):
27611         Add dup-safer.c, fopen-safer.c.
27612         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
27613
27614         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
27615         * lib/unistd-safer.h: New files.
27616
27617 2001-02-25  Paul Eggert  <eggert@twinsun.com>
27618
27619         The mkstemp replacement is taken from glibc 2.2.2, with some
27620         portability fixes for use outside glibc, as follows:
27621
27622         * lib/tempname.c (struct_stat64): New macro.
27623         (direxists, __gen_tempname): Use it.
27624         This avoids a portability problem with Solaris 8.
27625
27626         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
27627         (<stddef.h>, <stdint.h>, <string.h>):
27628         Include only if STDC_HEADERS || _LIBC.
27629         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
27630         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
27631         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
27632         (__set_errno): Define this macro if <errno.h> doesn't.
27633         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
27634         Define these macros if <stdio.h> doesn't.
27635         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
27636         Define these macros if <sys/stat.h>
27637         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
27638         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
27639         __xstat64): Define if not _LIBC.
27640         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
27641         (__gen_tempname): Invoke gettimeofday only if
27642         HAVE_GETTIMEOFDAY || _LIBC;
27643         otherwise, fall back on plain "time".
27644         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
27645
27646         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
27647
27648         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
27649
27650 2001-02-18  Paul Eggert  <eggert@twinsun.com>
27651
27652         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
27653
27654 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27655
27656         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
27657         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
27658         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
27659         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27660
27661 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27662
27663         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
27664         Remove workaround macros for hosts that have mbrtowc but not
27665         mbstate_t, as we now insist on proper declarations for both
27666         before using mbrtowc.
27667
27668 2001-02-17  Jim Meyering  <meyering@lucent.com>
27669
27670         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
27671         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
27672         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
27673         UnixWare 7.1.1.
27674
27675         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
27676         rather than AC_CACHE_VAL.
27677
27678 2001-02-17  Jim Meyering  <meyering@lucent.com>
27679
27680         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
27681         around included file name.
27682
27683         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
27684
27685         * lib/strftime.c: Update from GNU libc (the only changes were to
27686         comments).
27687
27688 2001-02-17  Jim Meyering  <meyering@lucent.com>
27689
27690         * lib/regex.c: Update from libc.
27691
27692 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
27693
27694         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
27695         clash.
27696
27697 2001-02-16  Paul Eggert  <eggert@twinsun.com>
27698
27699         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
27700         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
27701         Reported by Mark Hounschell via Paul Eggert.
27702
27703 2001-02-07  Jim Meyering  <meyering@lucent.com>
27704
27705         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
27706
27707 2001-02-05  Jim Meyering  <meyering@lucent.com>
27708
27709         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
27710         it includes the patch required for `large file' support with at least
27711         HP-UX's 10.20 /bin/cc.
27712
27713 2001-02-03  Jim Meyering  <meyering@lucent.com>
27714
27715         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
27716         AS_IF, now that it works once again (mysteriously).
27717         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27718
27719 2001-01-30  Jim Meyering  <meyering@lucent.com>
27720
27721         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
27722         * m4/chown.m4: Rename conftestchown to conftest.chown.
27723         * m4/rename.m4: s/conftestdir/conftest.d1/ and
27724         s/conftestdir2/conftest.d2/.
27725         * m4/utimes.m4: s/conftestdata/conftest.data/
27726         Inspired by Pavel Roskin's change in autoconf.
27727
27728 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
27729
27730         * lib/config.charset: Update for FreeBSD 4.2.
27731
27732 2001-01-27  Jim Meyering  <meyering@lucent.com>
27733
27734         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
27735         a use of AS_IF.
27736         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27737
27738 2001-01-26  Jim Meyering  <meyering@lucent.com>
27739
27740         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
27741         quotearg.c includes it.
27742
27743 2001-01-26  Jim Meyering  <meyering@lucent.com>
27744
27745         * lib/quotearg.c: Include stddef.h.
27746         * lib/quote.c: Include stddef.h.
27747         Reported by Axel Kittenberger.
27748
27749         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
27750         line in double quotes so that it evokes a better diagnostic.
27751         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
27752         Reported by Axel Kittenberger.
27753
27754 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
27755
27756         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
27757         as if it was a `charset'.
27758
27759 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27760
27761         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
27762         has const.
27763
27764 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27765
27766         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
27767         to avoid a warning.  Add back 'const' to inptr.
27768
27769 2001-01-20  Jim Meyering  <meyering@lucent.com>
27770
27771         Be sure that headers are checked before used in code compiled
27772         for the type checks.
27773         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
27774         In place of that, invoke jm_CHECK_ALL_TYPES.
27775         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
27776         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
27777         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
27778         The check for ssize_t was mistakenly run before the test for unistd.h.
27779
27780         The configure-time check for stdbool.h was missing.
27781         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
27782         (jm_PREREQ_HASH): New function.
27783
27784 2001-01-17  Jim Meyering  <meyering@lucent.com>
27785
27786         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
27787         for autoconf-2.49c.
27788         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
27789
27790 2001-01-16  Jim Meyering  <meyering@lucent.com>
27791
27792         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
27793         From Bruno Haible.
27794
27795 2001-01-14  Jim Meyering  <meyering@lucent.com>
27796
27797         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
27798         foo and bar.  Create conftestdir/ in the script, not in the C code.
27799         Remove directories in the script, not in the C code.
27800         Remove conftestdir{,2} before trying to create the directory.
27801         Make the entire configure script fail if the mkdir fails.
27802
27803 2001-01-14  Jim Meyering  <meyering@lucent.com>
27804
27805         * lib/rename.c: New file.  From Volker Borchert.
27806         Include stdlib.h, string.h or strings.h, and xalloc.h.
27807         Use strip_trailing_slashes rather than open-coding it.
27808
27809 2001-01-03  Paul Eggert  <eggert@twinsun.com>
27810
27811         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
27812
27813 2001-01-03  Jim Meyering  <meyering@lucent.com>
27814
27815         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
27816         of local `inptr' to avoid warning with some system declarations of
27817         iconv.
27818
27819 2001-01-02  Volker Borchert  <bt@teknon.de>
27820
27821         * m4/rename.m4: New file.
27822         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
27823
27824 2001-01-01  Jim Meyering  <meyering@lucent.com>
27825
27826         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
27827         even on systems with utmpx.h.  It's necessary for the declaration of
27828         utmp's ut_user member.  Reported by Andreas Jaeger.
27829
27830         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
27831         available. They are required for the declarations of getgrgid and
27832         getpwuid resp.
27833         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
27834         Reported by Andreas Jaeger.
27835
27836 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
27837
27838         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
27839         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
27840         so `make install' also works in VPATH builds.
27841
27842 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
27843
27844         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
27845         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
27846         can be used in subdirectories.
27847
27848 2000-12-29  Paul Eggert  <eggert@twinsun.com>
27849
27850         * lib/modechange.c: Do not assume that mode_t uses the
27851         traditional octal encoding.  E.g. "chmod 1 FOO" should set
27852         the other-execute bit of FOO even if S_IXOTH != 1.
27853
27854         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
27855         WOTH, XOTH, ALLM): New macros.
27856         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
27857          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
27858         Use them.
27859         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
27860         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
27861         (mode_compile):
27862         No need to use uintmax_t; unsigned long is long enough.
27863         Don't bother to get suffix since we don't use it.
27864
27865 2000-12-26  Jim Meyering  <meyering@lucent.com>
27866
27867         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
27868         better with autoheader.
27869
27870 2000-12-24  Jim Meyering  <meyering@lucent.com>
27871
27872         * lib/hash.c (is_prime): Return explicit boolean values.
27873         (hash_get_first): Return NULL to appease Irix5.6's 89.
27874         Reported by Nelson Beebe.
27875
27876 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
27877
27878         * lib/localcharset.c (locale_charset): Add support for Win32.
27879
27880 2000-12-18  Paul Eggert  <eggert@twinsun.com>
27881
27882         * lib/physmem.h, lib/physmem.c: New files.
27883
27884         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
27885         (noinst_HEADERS): Add physmem.h.
27886
27887         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
27888         't' for compatibility with Solaris 8 sort.
27889
27890 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
27891
27892         * lib/config.charset: Add support for BeOS.
27893
27894 2000-12-17  Jim Meyering  <meyering@lucent.com>
27895
27896         * m4/dos.m4 (jm_AC_DOS): New file and macro.
27897         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
27898
27899 2000-12-16  Jim Meyering  <meyering@lucent.com>
27900
27901         This bug had a serious impact on chown: `chown N:M FILE' (for integer
27902         N and M) would have treated it like `chown N:N FILE'.
27903
27904         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
27905
27906 2000-12-16  Jim Meyering  <meyering@lucent.com>
27907
27908         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
27909         SHELLS_FILE to a file name that's useful on djgpp systems.
27910         Include stdlib.h.
27911         (ADDITIONAL_DEFAULT_SHELLS): Define.
27912         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
27913         Based mostly on a patch from Prashant TR.
27914
27915 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
27916
27917         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
27918         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
27919         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
27920
27921 2000-12-08  Andreas Schwab  <schwab@suse.de>
27922
27923         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
27924         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
27925
27926 2000-12-07  Jim Meyering  <meyering@lucent.com>
27927
27928         * lib/stripslash.c (ISSLASH): Define.
27929         (strip_trailing_slashes): Use ISSLASH rather than comparing against
27930         `/'.
27931         From Prashant TR.
27932
27933         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
27934         (dir_name_r): Declare this function as static.
27935         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
27936         manifest itself on a name containing a mix of slashes and
27937         backslashes.
27938         Make this function work with names starting with a DOS-style
27939         drive letter and colon prefix.
27940         (dir_name): Append `.' if necessary.
27941         Based mostly on patches from Prashant TR and Eli Zaretskii.
27942
27943         * lib/dirname.h (dir_name_r): Remove prototype.
27944
27945 2000-12-06  Paul Eggert  <eggert@twinsun.com>
27946
27947         * m4/off_t-format.m4: Remove this file.
27948         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
27949
27950 2000-12-06  Jim Meyering  <meyering@lucent.com>
27951
27952         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
27953         replacement strtoull, we may well need the replacement strtoul, too.
27954         Check for declarations of strtoul and strtoull.
27955         Check for strtol.  Mainly as a cue to cause automake to include
27956         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
27957         Check for limits.h -- strtol.c needs it.
27958
27959 2000-12-05  Jim Meyering  <meyering@lucent.com>
27960
27961         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
27962
27963 2000-12-04  Jim Meyering  <meyering@lucent.com>
27964
27965         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
27966         Also include memory.h, stdlib.h, unistd.h if appropriate.
27967         Reported by Andreas Jaeger (conflicting declaration of malloc).
27968
27969 2000-12-02  Jim Meyering  <meyering@lucent.com>
27970
27971         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
27972         * m4/jm-macros.m4 (jm_MACROS): require it.
27973
27974 2000-12-02  Jim Meyering  <meyering@lucent.com>
27975
27976         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
27977
27978 2000-12-01  Paul Eggert  <eggert@twinsun.com>
27979
27980         * lib/memrchr.c: Include <config.h> before any system include file.
27981
27982 2000-11-30  Jim Meyering  <meyering@lucent.com>
27983
27984         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
27985
27986 2000-11-30  Jim Meyering  <meyering@lucent.com>
27987
27988         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
27989
27990 2000-11-29  Paul Eggert  <eggert@twinsun.com>
27991
27992         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
27993
27994 2000-11-26  Jim Meyering  <meyering@lucent.com>
27995
27996         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
27997
27998 2000-11-22  Paul Eggert  <eggert@twinsun.com>
27999
28000         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
28001         size of (size_t) -1; it's not portable.
28002
28003 2000-11-17  Jim Meyering  <meyering@lucent.com>
28004
28005         * lib/strstr.c: Update from GNU libc.
28006
28007 2000-11-17  Akim Demaille  <akim@epita.fr>
28008
28009         * lib/obstack.h: Formatting changes.
28010         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
28011         prevent type checking.
28012         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
28013         cast the value to (void *): assigning a `foo *' to a `void *'
28014         variable is valid.
28015         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
28016
28017 2000-11-16  Jim Meyering  <meyering@lucent.com>
28018
28019         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
28020
28021 2000-11-11  Jim Meyering  <meyering@lucent.com>
28022
28023         * lib/error.c: Add a couple #includes, merging from GNU libc version.
28024
28025 2000-11-10  Jim Meyering  <meyering@lucent.com>
28026
28027         * lib/obstack.h: Update from GNU libc.
28028         * lib/obstack.c: Likewise.
28029
28030 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
28031
28032         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
28033
28034 2000-11-06  Paul Eggert  <eggert@twinsun.com>
28035
28036         * lib/getusershell.c (setusershell): Use rewind rather than
28037         fseek/fseeko, to avoid configuration hassles with fseeko.
28038         Don't bother opening SHELLS_FILE if shellstream is NULL;
28039         it's not necessary.
28040
28041 2000-11-05  Jim Meyering  <meyering@lucent.com>
28042
28043         * lib/makepath.h (make_dir): Declare.
28044         * lib/makepath.c (make_dir): Remove `static' attribute.
28045         Tweak a comment.
28046
28047 2000-11-04  Jim Meyering  <meyering@lucent.com>
28048
28049         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
28050
28051 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
28052
28053         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
28054         last one in a bucket, advance to the next bucket.
28055
28056 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
28057
28058         * lib/fnmatch.c: Do not comment out all the code if we are using
28059         the GNU C library, because in some cases we are replacing buggy
28060         code in the GNU C library itself.
28061
28062 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
28063
28064         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
28065         (regex_compile): Catch bogus \(\1\).
28066
28067 2000-10-30  Paul Eggert  <eggert@twinsun.com>
28068
28069         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
28070         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
28071         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
28072
28073 2000-10-30  Paul Eggert  <eggert@twinsun.com>
28074
28075         * lib/error.h, getline.h, modechange.h:
28076         Remove "2000" from Copyright line, as the file hasn't been
28077         changed this year other than in the copyright notice.
28078
28079         * lib/xalloc.h: Add "2000" to Copyright line, as this file
28080         was changed this year.
28081
28082 2000-10-29  Jim Meyering  <meyering@lucent.com>
28083
28084         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
28085         renaming.
28086         * m4/ls-mntd-fs.m4: Likewise
28087
28088 2000-10-29  Jim Meyering  <meyering@lucent.com>
28089
28090         * lib/xstat.in: Fix grammar in comment.
28091
28092 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
28093
28094         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
28095         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
28096         doesn't define __restrict_arr.
28097
28098 2000-10-28  Jim Meyering  <meyering@lucent.com>
28099
28100         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
28101         (jm_PREREQ_MEMCHR): New function.
28102
28103 2000-10-28  Jim Meyering  <meyering@lucent.com>
28104
28105         * lib/memchr.c: Update from libc.
28106         Adjust for portability:
28107         [HAVE_STDLIB_H]: Include stdlib.h.
28108         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
28109         Undef __memchr, too.
28110         [!weak_alias]: Define __memchr to memchr.
28111
28112         * lib/regex.c: Update from libc.
28113         * lib/regex.h: Likewise.
28114         * lib/getopt1.c: Likewise.
28115         * lib/memcmp.c: Likewise.
28116
28117         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
28118         Avoid using fseek, when possible -- it's broken by design.
28119         Patch by Ulrich Drepper.
28120
28121 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
28122
28123         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
28124         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
28125         Giving in to popular pressure to shut up the compiler with casts.
28126
28127 2000-10-26  Jim Meyering  <meyering@lucent.com>
28128
28129         * lib/strftime.c: Update from libc.
28130
28131 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
28132
28133         * regex.c: More `unsigned char' -> `re_char' changes.
28134         Also change several `int' into `re_wchar_t'.
28135         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
28136         (PUSH_FAILURE_POINTER): Don't cast any more.
28137         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
28138         We want GCC to complain, since this piece of code makes
28139         re_match non-reentrant, which *should* be fixed.
28140         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
28141         (EXTEND_BUFFER): Use RETALLOC.
28142         (SET_LIST_BIT): Don't cast.
28143         (re_wchar_t): New type.
28144         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
28145         that those two functions will always properly return.
28146         (IMMEDIATE_QUIT_CHECK): Cast to void.
28147         (analyse_first): Use recursion rather than an explicit stack.
28148         (re_compile_fastmap): Can't fail anymore.
28149         (re_search_2): Don't check re_compile_fastmap for failure.
28150         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
28151         Now also sets the new value (passed in a new argument).
28152         (re_match_2_internal): Use it.
28153         Also, use a new var `reg' of type size_t when looping through regs
28154         rather than reuse the inappropriate `mcnt'.
28155
28156 2000-10-25  Jim Meyering  <meyering@lucent.com>
28157
28158         * lib/obstack.c: Update from libc.
28159
28160 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
28161
28162         * regex.c (regex_compile): Change the way of handling a range from
28163         a char less than 256 to a char not less than 256.
28164
28165 2000-10-24  Andrew Innes  <andrewi@gnu.org>
28166
28167         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
28168         NT-Emacs only.
28169         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
28170         so that re_search functions only quit when callers expect them to.
28171
28172 2000-10-23  Jim Meyering  <meyering@lucent.com>
28173
28174         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
28175         wrong.  That set_locale call must not have any side effects.
28176         From Paul Eggert.
28177
28178 2000-10-22  Jim Meyering  <meyering@lucent.com>
28179
28180         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
28181         [CYCLIC]: Remove now-unused definition.
28182
28183         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
28184         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
28185         Suggestion from Ulrich Drepper.
28186
28187 2000-10-21  Jim Meyering  <meyering@lucent.com>
28188
28189         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
28190         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
28191         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
28192
28193 2000-10-21  Jim Meyering  <meyering@lucent.com>
28194
28195         * lib/dirname.c (memrchr): Declare if necessary.
28196         (dir_name): Remove the restriction that there be no
28197         trailing slashes.  Now, this code skips past them, effectively
28198         ignoring them.
28199         [TEST_DIRNAME] (main): New unit tests.
28200
28201         * lib/memrchr.c: New file from GNU libc.
28202         Undef __memrchr, too.
28203         [!weak_alias]: Define __memrchr to memrchr.
28204         Guard weak_alias use with `#ifdef weak_alias'.
28205
28206 2000-10-21  Jim Meyering  <meyering@lucent.com>
28207
28208         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
28209         (dir_name): Use dir_name_r.
28210         * lib/dirname.h (dir_name_r): Declare it.
28211
28212 2000-10-17  Jim Meyering  <meyering@lucent.com>
28213
28214         * lib/quote.h (PARAMS): Define and use.
28215         Reported by Akim Demaille.
28216
28217         * lib/getopt.c: Update from libc.
28218
28219 2000-10-16  Jim Meyering  <meyering@lucent.com>
28220
28221         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
28222         setlocale.
28223         From Jan Fedak.
28224
28225 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
28226
28227         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
28228
28229 2000-09-25  Jim Meyering  <meyering@lucent.com>
28230
28231         * lib/md5.h (rol): Define (from GnuPG).
28232
28233         * lib/sha.c: Give credit (GnuPG) where due.
28234         (M): Use rol rather than open-coding it.
28235         Add a FIXME comment.
28236
28237 2000-09-21  Jim Meyering  <meyering@lucent.com>
28238
28239         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
28240         Reported by Michael Stone.
28241
28242 2000-09-20  Jim Meyering  <meyering@lucent.com>
28243
28244         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
28245         (noinst_HEADERS): Add sha.h.
28246         Based on code from Scott G. Miller and from GnuPG.
28247
28248 2000-09-18  Jim Meyering  <meyering@lucent.com>
28249
28250         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
28251         LIBS. Otherwise, everyone ends up linking with -lelf for some
28252         configurations.
28253         Reported by Mike Stone.
28254
28255 2000-09-15  Jim Meyering  <meyering@lucent.com>
28256
28257         * lib/regex.c: Update from libc.
28258
28259 2000-09-10  Jim Meyering  <meyering@lucent.com>
28260
28261         * lib/getopt.c (_getopt_internal): Update from glibc.
28262
28263 2000-09-09  Jim Meyering  <meyering@lucent.com>
28264
28265         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
28266         think it should be used as a general replacement for isascii.
28267         * lib/fnmatch.c: Likewise.
28268         * lib/mbswidth.c: Likewise
28269         * lib/regex.c: Likewise.
28270
28271         Don't use atoi.
28272         * lib/userspec.c: Include sys/param.h and limits.h.
28273         Include xstrtol.h.
28274         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28275         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
28276         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
28277         UID, GID.  Check range.
28278
28279 2000-09-06  Jim Meyering  <meyering@lucent.com>
28280
28281         * lib/getopt.c (_getopt_internal): Update from glibc.
28282
28283 2000-08-30  Jim Meyering  <meyering@lucent.com>
28284
28285         * lib/strftime.c: Merge in changes from GNU libc.
28286
28287 2000-08-26  Jim Meyering  <meyering@lucent.com>
28288
28289         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
28290         * m4/fpending.m4: New file.
28291
28292 2000-08-26  Jim Meyering  <meyering@lucent.com>
28293
28294         * lib/closeout.c: Include "__fpending.h".
28295         (close_stdout_status): Return right away if there's nothing to flush.
28296
28297         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
28298         * lib/__fpending.c: New file.
28299         * lib/__fpending.h: New file.
28300
28301 2000-08-20  Jim Meyering  <meyering@lucent.com>
28302
28303         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
28304         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
28305         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
28306
28307 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
28308
28309         Improve fileutils installation on systems where running
28310         programs (like install) can't be unlinked.
28311         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
28312         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
28313
28314 2000-08-07  Paul Eggert  <eggert@twinsun.com>
28315
28316         Standardize on "memory exhausted" instead of "Memory exhausted"
28317         or "virtual memory exhausted".
28318         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
28319         "virtual memory exhausted".
28320         * lib/same.c (same_name): Invoke xalloc_die instead of printing
28321         our own message.
28322         * lib/userspec.c (parse_user_spec): Likewise.
28323         * lib/bumpalloc.h: comment fix
28324         * lib/same.c, userspec.c: Include xalloc.h.
28325
28326         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
28327         not char *const and pointing to a constant array.
28328         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
28329         (xrealloc): Comment fix.
28330
28331         * lib/userspec.c (parse_user_spec):
28332         Don't translate a message until just before returning,
28333         to avoid unnecessary translation.
28334
28335 2000-08-07  Jim Meyering  <meyering@lucent.com>
28336
28337         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
28338         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
28339         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
28340         getgroups.c, gethostname.c, getopt.h, group-member.c,
28341         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
28342         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
28343         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
28344         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
28345         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
28346         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
28347         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
28348         yesno.c: Back out Copyright date changes for each file with no change
28349         this year.  This eases coordination with other programs using the same
28350         source code modules.  From Paul Eggert.
28351
28352 2000-08-06  Paul Eggert  <eggert@twinsun.com>
28353
28354         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
28355         not char, for compatibility with glibc 2.1.3 strftime.c.
28356
28357 2000-08-03  Greg McGary  <greg@mcgary.org>
28358
28359         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
28360         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
28361         (EXTEND_BUFFER): Use them.
28362
28363 2000-08-01  Jim Meyering  <meyering@lucent.com>
28364
28365         * lib/dirname.c (ISSLASH): Define.
28366         (BACKSLASH_IS_PATH_SEPARATOR): Define.
28367         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
28368         both `\' and `/' may be use as path separators.
28369         Based on a patch from Prashant TR.
28370
28371 2000-07-31  Paul Eggert  <eggert@twinsun.com>
28372
28373         * lib/quotearg.c (quotearg_n_options): Don't make the initial
28374         slot vector a constant, since it might get modified.
28375
28376 2000-07-31  Jim Meyering  <meyering@lucent.com>
28377
28378         * lib/xmalloc.c: Use `virtual memory exhausted', not
28379         `Memory exhausted'.
28380         * lib/obstack.c (print_and_abort): Likewise.
28381
28382 2000-07-30  Paul Eggert  <eggert@twinsun.com>
28383
28384         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
28385         buffer, so that the caller can always quote one small
28386         component of a "memory exhausted" message in slot 0.
28387         From a suggestion by Jim Meyering.
28388
28389 2000-07-30  Jim Meyering  <meyering@lucent.com>
28390
28391         * lib/makepath.c (make_path): Quote the other instance, too.
28392
28393         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
28394         (STATIC_BUF_SIZE): Define.
28395         (quotearg_n_options): Use only statically allocated storage when
28396         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
28397         than STATIC_BUF_SIZE.
28398
28399 2000-07-29  Jim Meyering  <meyering@lucent.com>
28400
28401         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
28402         * lib/dirname.c (dir_name): Likewise.
28403
28404         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
28405         `/'.
28406
28407         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
28408         (dir_name): Assert that there are no trailing slashes.
28409
28410 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
28411
28412         * lib/mbswidth.h (mbswidth): Add a flags argument.
28413         (mbswidth): New declaration.
28414         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
28415         * lib/mbswidth.c (mbswidth): Add a flags argument.
28416         (mbsnwidth): New function.
28417
28418 2000-07-24  Jim Meyering  <meyering@lucent.com>
28419
28420         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
28421
28422 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28423
28424         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
28425
28426 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28427
28428         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
28429         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
28430         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
28431         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
28432         invoke multibyte primitives.
28433
28434 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28435
28436         * lib/quotearg.c:
28437         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
28438         so that mbstate_t is always defined.
28439
28440         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
28441         be 1 in at least one GCC installation, and this configuration
28442         error is likely to be common.  Ignoring MB_LEN_MAX hurts
28443         performance on hosts that have mbrtowc but have only unibyte
28444         locales, but I assume these hosts are rare.
28445
28446 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28447
28448         * lib/mbswidth.c (_XOPEN_SOURCE):
28449         Don't define; this causes problems on Solaris 7.
28450         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
28451
28452 2000-07-23  Jim Meyering  <meyering@lucent.com>
28453
28454         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
28455         too: getgrgid, getpwuid, getuid.
28456
28457 2000-07-23  Jim Meyering  <meyering@lucent.com>
28458
28459         * lib/basename.c (base_name): Add an assertion.
28460
28461 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
28462
28463         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
28464         shadow its mbsinit function.
28465
28466 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
28467
28468         * lib/mbswidth.h: New file.
28469         * lib/mbswidth.c: New file.
28470         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
28471         (noinst_HEADERS): Add mbswidth.h.
28472
28473 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
28474
28475         * lib/config.charset: Add support for FreeBSD. Improve support for
28476         HP-UX and IRIX 6.
28477
28478 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
28479
28480         * m4/mbswidth.m4: New file.
28481         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
28482
28483 2000-07-15  Jim Meyering  <meyering@lucent.com>
28484
28485         * lib/makepath.c: Include quote.h.
28486         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
28487         corresponding argument in a `quote (...)' call.
28488         Give better diagnostics.
28489
28490         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
28491         (noinst_HEADERS): Add quote.h.
28492
28493         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
28494         from tar's src/misc.c.
28495         * lib/quote.h: New file.  Prototypes for same.
28496
28497 2000-07-14  Paul Eggert  <eggert@twinsun.com>
28498
28499         From a suggestion by Bruno Haible.
28500         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
28501         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
28502         to decide whether to define the BeOS workaround macro;
28503         this adjusts to the change to AC_MBSTATE_T.
28504
28505 2000-07-14  Jim Meyering  <meyering@lucent.com>
28506
28507         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
28508         jm_AC_TYPE_UINTMAX_T.
28509
28510 2000-07-13  Paul Eggert  <eggert@twinsun.com>
28511
28512         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
28513
28514         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
28515         quotearg_buffer_restyled): Add support for
28516         clocale_quoting_style.  Undo previous change to
28517         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
28518         and "{RIGHT QUOTATION MARK}" msgids.
28519
28520 2000-07-10  Paul Eggert  <eggert@twinsun.com>
28521
28522         From a suggestion by Bruno Haible.
28523         * m4/mbstate_t.m4 (AC_MBSTATE_T):
28524         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
28525         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
28526         and mbstate_t, to a single-part test that simply defines mbstate_t.
28527         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
28528         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
28529
28530 2000-07-10  Jim Meyering  <meyering@lucent.com>
28531
28532         * m4/strerror_r.m4: Mirror the correction made in autoconf.
28533
28534         * m4/gnu-source.m4: Output to confdefs.h directly.
28535         Suggestion from Akim Demaille.
28536
28537 2000-07-09  Paul Eggert  <eggert@twinsun.com>
28538
28539         The old behavior of quoting `like this' doesn't look good with
28540         newer, ISO-style fonts.  See:
28541         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
28542
28543         Instead, quote "like this" by default.  Let the translator
28544         tailor the locale-specific quoting behavior by providing
28545         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
28546
28547         * lib/quotearg.c (N_): New macro.
28548         (gettext_default): New function.
28549         (quotearg_buffer_restyled): Use
28550         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
28551         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
28552
28553 2000-07-09  Jim Meyering  <meyering@lucent.com>
28554
28555         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
28556         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
28557
28558         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
28559         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
28560
28561 2000-07-09  Jim Meyering  <meyering@lucent.com>
28562
28563         * lib/Most files: Update copyright dates to include 2000.
28564
28565 2000-07-08  Jim Meyering  <meyering@lucent.com>
28566
28567         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
28568         if not defined.
28569         (xgethostname): Remove now-unnecessary #ifdef.
28570         Move declaration of `err' into loop where it's used.
28571
28572 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28573         and Bruno Haible  <haible@clisp.cons.org>
28574
28575         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
28576         only if the test for an object-type mbstate_t fails.  This
28577         prevents us from mistakenly reporting that mbstate_t is a
28578         system object type after we "#define mbstate_t int" to work
28579         around its lack.
28580
28581 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28582         and Bruno Haible  <haible@clisp.cons.org>
28583
28584         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
28585
28586 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28587
28588         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
28589         to strerror_r.
28590         Include <ctype.h> for use of isalpha.
28591
28592 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28593
28594         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
28595         by allocating a larger buffer. Test the gethostname return value for
28596         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
28597         returns an error and ENAMETOOLONG isn't defined.
28598
28599 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28600
28601         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
28602         dimension.
28603
28604 2000-07-04  Jim Meyering  <meyering@lucent.com>
28605
28606         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
28607         of the deprecated AC_CHECKING.
28608
28609 2000-07-04  Jim Meyering  <meyering@lucent.com>
28610
28611         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
28612         Reported by Bruno Haible.
28613
28614 2000-07-04  Jim Meyering  <meyering@lucent.com>
28615
28616         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
28617         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
28618         lacks mbrtowc.
28619
28620 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28621
28622         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
28623         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
28624
28625 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28626         and Bruno Haible  <haible@clisp.cons.org>
28627
28628         * lib/quotearg.c (mbrtowc):
28629         Assign to *pwc, and return 1 only if result is nonzero.
28630         (iswprint): Use ISPRINT when substituting our own mbrtowc.
28631
28632 2000-07-03  Jim Meyering  <meyering@lucent.com>
28633
28634         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
28635
28636 2000-07-03  Jim Meyering  <meyering@lucent.com>
28637
28638         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
28639         This is necessary to get a definition of e.g., UTMP_FILE on
28640         HP-UX 10.20.
28641         From Bob Proulx.
28642
28643 2000-07-02  Jim Meyering  <meyering@lucent.com>
28644
28645         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
28646
28647         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
28648         AC_LIBOBJ(function_name).
28649         * m4/chown.m4: Likewise.
28650         * m4/fnmatch.m4: Likewise.
28651         * m4/ftruncate.m4: Likewise.
28652         * m4/getgroups.m4: Likewise.
28653         * m4/getline.m4: Likewise.
28654         * m4/group-member.m4: Likewise.
28655         * m4/jm-macros.m4: Likewise.
28656         * m4/lstat.m4: Likewise.
28657         * m4/malloc.m4: Likewise.
28658         * m4/memcmp.m4: Likewise.
28659         * m4/nanosleep.m4: Likewise.
28660         * m4/putenv.m4: Likewise.
28661         * m4/realloc.m4: Likewise.
28662         * m4/regex.m4: Likewise.
28663         * m4/stat.m4: Likewise.
28664         * m4/strftime.m4: Likewise.
28665
28666 2000-07-02  Jim Meyering  <meyering@lucent.com>
28667
28668         * lib/quotearg.c (mbstate_t): Don't define here.
28669
28670 2000-07-02  Jim Meyering  <meyering@lucent.com>
28671
28672         * lib/nanosleep.c (SIGCONT): Define if not already defined.
28673
28674 2000-07-01  Jim Meyering  <meyering@lucent.com>
28675
28676         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
28677
28678 2000-07-01  Jim Meyering  <meyering@lucent.com>
28679
28680         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
28681         problem.
28682
28683 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28684
28685         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
28686         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
28687
28688 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28689
28690         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
28691         per change in ../m4/ls-mntd-fs.m4.
28692         (read_filesystem_list): Ignore symbolic links.
28693
28694 2000-06-29  Jim Meyering  <meyering@lucent.com>
28695
28696         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
28697         for declaration of strcmp.
28698
28699         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
28700
28701         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
28702         Avoid warning by casting result to `char *' to remove `const'.
28703
28704 2000-06-28  Jim Meyering  <meyering@lucent.com>
28705
28706         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
28707         included by quotearg.c, for which we perform this test.  From
28708         Bruno Haible.
28709
28710 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28711
28712         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
28713         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
28714         <utmpx.h> exists, put readutmp.o into LIBOBJS.
28715
28716 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28717
28718         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
28719
28720 2000-06-26  Paul Eggert  <eggert@twinsun.com>
28721
28722         savedir now sets errno on failure and invokes xmalloc to get memory.
28723         Fix a couple of other minor bugs while we're at it.
28724
28725         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
28726         (NAMLEN): Remove macro.
28727         (malloc, realloc): Remove decls.
28728         (stpcpy): Likewise.
28729         ("xalloc.h"): Include.
28730         (NAME_SIZE_DEFAULT): New macro.
28731         (savedir): Use xmalloc / xrealloc to allocate memory.
28732         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
28733         Skip "" directory entries.
28734         Use strlen to calculate directory entry length, since the old method
28735         is rarely used these days and isn't worth supporting.
28736         Don't use a pointer after freeing it.
28737         Check for integer overflow when calculating allocation size.
28738         Use memcpy to copy entries, instead of stpcpy.
28739         Set errno properly when returning NULL.
28740         Check for readdir error.
28741
28742 2000-06-26  Jim Meyering  <meyering@lucent.com>
28743
28744         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
28745
28746 2000-06-25  Jim Meyering  <meyering@lucent.com>
28747
28748         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
28749         Linux header bug when _XOPEN_SOURCE is defined to 500.
28750
28751 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28752
28753         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
28754         deficiency.
28755
28756 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28757
28758         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
28759         Include xalloc.h.
28760         Don't include <stdlib.h>.  Don't declare malloc, realloc.
28761
28762 2000-06-24  Jim Meyering  <meyering@lucent.com>
28763
28764         * m4/strerror_r.m4: Revive this file -- to try out an experimental
28765         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
28766         for which strerror does return char*, but which lacks a conveniently
28767         accessible declaration of the function.  If the compile-test says
28768         strerror_r doesn't work, then resort to a `run'-test that works on
28769         BeOS and segfaults on DEC Unix.
28770
28771 2000-06-24  Jim Meyering  <meyering@lucent.com>
28772
28773         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
28774
28775 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28776
28777         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
28778         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
28779
28780 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28781
28782         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
28783         (mbrtowc, mbstate_t): Define substitutes if
28784         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
28785         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
28786         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
28787
28788 2000-06-23  Jim Meyering  <meyering@lucent.com>
28789
28790         * m4/afs.m4: Add missing AC_MSG_RESULT.
28791         Reported by Bruno Haible.
28792
28793         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
28794         Suggestion from Bruno Haible.
28795
28796 2000-06-23  Jim Meyering  <meyering@lucent.com>
28797
28798         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
28799
28800 2000-06-21  Jim Meyering  <meyering@lucent.com>
28801
28802         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
28803
28804 2000-06-21  Jim Meyering  <meyering@lucent.com>
28805
28806         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
28807         (noinst_HEADERS): Add getstr.h.
28808
28809         * lib/getline.c (getstr): Move into a separate file.
28810         * lib/getstr.c (getstr): New file, extracted from getline.c, with
28811         the following changes: new parameter, delim2; both delim[12]
28812         parameters have type `int', not `char'.  The latter would lose
28813         with 8-bit delimiters.
28814         * lib/getstr.h: New file.
28815
28816 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28817
28818         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
28819         than 1024, return a memory chunk of least possible size, instead
28820         of size PATH_MAX + 2. In the loop, increment the size proportionally.
28821         Use free/xmalloc instead of xrealloc to avoid copying for very long
28822         paths.
28823
28824 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28825
28826         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
28827         the empty string.
28828
28829 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28830
28831         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
28832         address, not strdup.  Include <stdlib.h> and don't declare free().
28833
28834 2000-06-19  Jim Meyering  <meyering@lucent.com>
28835
28836         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
28837
28838 2000-06-18  Jim Meyering  <meyering@lucent.com>
28839
28840         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
28841
28842         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
28843         `checking whether...' message to be consistent with that of the
28844         lstat test.
28845
28846 2000-06-18  Jim Meyering  <meyering@lucent.com>
28847
28848         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
28849         Besides, these days every porting target provides a mkdir function.
28850
28851         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
28852         needed. (this snippet comes from src/system.h).
28853
28854 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
28855
28856         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
28857
28858 2000-06-15  Paul Eggert  <eggert@twinsun.com>
28859
28860         * lib/human.c (adjust_value): New function.
28861         (human_readable_inexact): Apply rounding style even when
28862         printing approximate values.
28863
28864 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28865
28866         * lib/human.c (human_readable_inexact): Allow an input block
28867         size that is not a multiple of the output block size, and vice versa.
28868         Reported by Piergiorgio Sartor.
28869
28870 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28871
28872         * lib/getdate.y (get_date): Apply relative times after time
28873         zone indicator, not before.  Reported by Todd A. Jacobs.
28874
28875 2000-06-13  Jim Meyering  <meyering@lucent.com>
28876
28877         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
28878
28879         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
28880
28881 2000-06-12  Paul Eggert  <eggert@twinsun.com>
28882
28883         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
28884
28885 2000-06-12  Jim Meyering  <meyering@lucent.com>
28886
28887         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
28888         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
28889         optional argument.
28890         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
28891         the optional argument, `lib'.
28892
28893 2000-06-08  Jim Meyering  <meyering@lucent.com>
28894
28895         * m4/largefile.m4: Remove file (now that it's part of autoconf).
28896
28897 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28898
28899         Rewrite largefile configuration so that we don't need to run
28900         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
28901         AC_CANONICAL_HOST in configure.in -- jmm]
28902
28903         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
28904         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
28905         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
28906         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
28907         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
28908         All uses changed.
28909         Instead of inspecting the output of getconf, try to compile the
28910         test program without and with the macro definition.
28911         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
28912         for getconf.  Instead, check for the needed flags by compiling
28913         test programs.
28914
28915 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28916
28917         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
28918
28919 2000-06-04  Jim Meyering  <meyering@lucent.com>
28920
28921         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
28922         SunOS 4.1.4 for which gid_t is an unsigned type.
28923
28924 2000-06-03  Jim Meyering  <meyering@lucent.com>
28925
28926         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
28927         now that autoconf requires that.
28928
28929         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
28930         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
28931         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
28932
28933 2000-06-03  Jim Meyering  <meyering@lucent.com>
28934
28935         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
28936
28937 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28938
28939         * m4/glibc21.m4: New file.
28940         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
28941
28942 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28943
28944         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
28945         newer, don't install charset.alias.
28946         * lib/config.charset: Change the Linux/glibc rules so they become empty
28947         on glibc-2.1 or newer.
28948
28949 2000-06-02  Jim Meyering  <meyering@lucent.com>
28950
28951         * lib/mountlist.c: Back out last change.  Instead, do this...
28952         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
28953         me_dummy member using the same `ignore'-testing code.
28954         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
28955         fs_type strings.
28956         From Mark D. Roth.
28957
28958 2000-05-29  Jim Meyering  <meyering@lucent.com>
28959
28960         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
28961         mounts with the `ignore' attribute.  Based on a patch from
28962         Mark D. Roth.
28963
28964 2000-05-28  Jim Meyering  <meyering@lucent.com>
28965
28966         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
28967         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28968         * m4/stat.m4: Likewise.
28969         * m4/lstat.m4: Likewise.
28970         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
28971
28972         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
28973         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
28974
28975 2000-05-26  Jim Meyering  <meyering@lucent.com>
28976
28977         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
28978
28979 2000-05-24  Jim Meyering  <meyering@lucent.com>
28980
28981         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
28982         autoconf requires that.
28983         * m4/lib-check.m4: Likewise.
28984         * m4/jm-macros.m4: Likewise.
28985         * m4/strftime.m4: Likewise.
28986
28987         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
28988         AC_CHECK_DECLS, now that autoconf requires that.
28989
28990 2000-05-22  Jim Meyering  <meyering@lucent.com>
28991
28992         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28993         * m4/lstat.m4: Likewise.
28994
28995 2000-05-22  Jim Meyering  <meyering@lucent.com>
28996
28997         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
28998
28999 2000-05-20  Jim Meyering  <meyering@lucent.com>
29000
29001         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
29002         (jm_PREREQ): Use it.
29003
29004 2000-05-18  Jim Meyering  <meyering@lucent.com>
29005
29006         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
29007         back, too, since it may have been modified by allocate_entry.
29008         (hash_delete): Rewrite to use neither the assignment operator
29009         nor the comma operator in an if-expression.
29010
29011 2000-05-15  Paul Eggert  <eggert@twinsun.com>
29012
29013         * lib/closeout.c:
29014         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
29015         Remove; no longer needed.
29016         "quotearg.h": Add include.
29017         (file_name): Do not bother to explicitly initialize to NULL; it's less
29018         efficient on some hosts.
29019         (close_stdout_status): Remove test as to whether stdout was already
29020         closed; it breaks for the case "echo x | sort >&-".
29021         Quote file name colons.
29022         Do not assume that _("write error") lacks format strings.
29023
29024 2000-05-15  Jim Meyering  <meyering@lucent.com>
29025
29026         * lib/version-etc.c (version_etc_copyright): Update the copyright
29027         string used in all --version output.
29028
29029 2000-05-14  Jim Meyering  <meyering@lucent.com>
29030
29031         * lib/closeout.c (close_stdout_set_file_name): New function.
29032         (close_stdout_status): Use new file-scoped global.
29033         Return right away if fstat says the stdout file descriptor is invalid.
29034         * lib/closeout.h (close_stdout_set_file_name): Declare.
29035
29036 2000-05-10  Jim Meyering  <meyering@lucent.com>
29037
29038         * lib/closeout.c [default_exit_status]: New file-scoped variable.
29039         (close_stdout_set_status): New function.
29040         * lib/closeout.h (close_stdout_set_status): Declare.
29041
29042 2000-05-09  Jim Meyering  <meyering@lucent.com>
29043
29044         * m4/gettext.m4: Rename this...
29045         * m4/libintl.m4: ...to this.
29046
29047 2000-05-08  Jim Meyering  <meyering@lucent.com>
29048
29049         * lib/long-options.c: Don't include closeout.h.
29050         (parse_long_options): Don't call close_stdout for --version.
29051
29052 2000-05-06  Paul Eggert  <eggert@twinsun.com>
29053
29054         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
29055         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
29056         2.1.3 bug.  This avoids a clash when files like regex.c define
29057         _GNU_SOURCE.
29058
29059 2000-05-06  Jim Meyering  <meyering@lucent.com>
29060
29061         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
29062         (AC_REPLACE_FUNCS): Add strnlen.
29063
29064         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
29065         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
29066
29067         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
29068         AC_SEARCH_LIBS call for nanosleep.
29069         (LIB_NANOSLEEP): Set and AC_SUBST.
29070
29071 2000-05-06  Jim Meyering  <meyering@lucent.com>
29072
29073         * lib/strnlen.c: Undefine __strnlen and strnlen.
29074         [!weak_alias]: Define __strnlen to strnlen.
29075
29076         * lib/atexit.c: New file, from libiberty.
29077
29078 2000-05-06  Jim Meyering  <meyering@lucent.com>
29079
29080         * lib/closeout.c (close_stdout_status): Also check for errors on the
29081         stderr stream.
29082
29083 2000-05-05  Jim Meyering  <meyering@lucent.com>
29084
29085         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
29086         AC_SEARCH_LIBS call for clock_gettime.
29087         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
29088
29089         * m4/search-libs.m4: Update from autoconf.
29090
29091         su doesn't work on Solaris 2.6.
29092         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
29093         <shadow.h>.  Reported by Dragos Harabor.
29094
29095 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
29096
29097         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
29098         memcpy instead of xmalloc, xrealloc, path_concat.
29099         (locale_charset): Treat empty environment variables as absent.
29100         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
29101
29102 2000-05-04  Jim Meyering  <meyering@lucent.com>
29103
29104         * lib/getopt.c: Update from glibc.
29105         * lib/obstack.c: Likewise.
29106         * lib/obstack.h: Likewise.
29107         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
29108         file
29109
29110         * lib/regex.h: Likewise.
29111         * lib/strndup.c: Likewise.
29112         * lib/strnlen.c: New file, from glibc.
29113
29114 2000-05-03  Jim Meyering  <meyering@lucent.com>
29115
29116         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
29117
29118 2000-05-02  Paul Eggert  <eggert@twinsun.com>
29119
29120         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
29121         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
29122         compile-time test, rather than inspecting host and OS, to
29123         decide whether to define _LARGEFILE_SOURCE.
29124
29125 2000-05-01  Jim Meyering  <meyering@lucent.com>
29126
29127         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
29128
29129         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
29130         Based on a patch from Bruno Haible.
29131
29132 2000-05-01  Jim Meyering  <meyering@lucent.com>
29133
29134         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
29135
29136 2000-04-29  Jim Meyering  <meyering@lucent.com>
29137
29138         * lib/path-concat.c: Declare strdup only if it's not defined.
29139         * lib/canon-host.c: Likewise.
29140
29141 2000-04-28  Jim Meyering  <meyering@lucent.com>
29142
29143         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
29144         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
29145         is included first, then limits.h is included by locale.h by libintl.h.
29146         From John David Anglin.
29147
29148 2000-04-25  Jim Meyering  <meyering@lucent.com>
29149
29150         * lib/makepath.c (S_IRWXUGO): Define.
29151         (make_path): Always perform explicit chmod if MODE specifies any
29152         of the `special' permission bits.  Prompted by a bug report against
29153         install from Mate Wierdl and Joost van Baal.
29154
29155 2000-04-18  Jim Meyering  <meyering@lucent.com>
29156
29157         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
29158         (jm_PREREQ): Use it.
29159
29160 2000-04-18  Jim Meyering  <meyering@lucent.com>
29161
29162         * lib/README: New file.
29163
29164         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
29165         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
29166
29167 2000-04-17  Jim Meyering  <meyering@lucent.com>
29168
29169         Get it right :-)
29170         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
29171         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
29172         Suggestion from Akim Demaille.
29173
29174 2000-04-17  Jim Meyering  <meyering@lucent.com>
29175
29176         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
29177         the definition of it to rpl_strftime also defined-away the system's
29178         declaration.
29179
29180 2000-04-15  Jim Meyering  <meyering@lucent.com>
29181
29182         Use `C' to denote so-called `contiguous' files, the same way
29183         that tar does.
29184         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
29185         (ftypelet): Use S_ISCTG.
29186         From Michael Deutschmann.
29187
29188 2000-04-14  Jim Meyering  <meyering@lucent.com>
29189
29190         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
29191         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
29192         clobbered.
29193
29194 2000-04-14  Jim Meyering  <meyering@lucent.com>
29195
29196         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
29197
29198 2000-04-13  Jim Meyering  <meyering@lucent.com>
29199
29200         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
29201         AH_VERBATIM to insert required #ifndef into config.h.in.
29202         Suggestion from Akim Demaille.
29203
29204 2000-04-12  Jim Meyering  <meyering@lucent.com>
29205
29206         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
29207         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
29208         Christian Krackowizer.
29209
29210         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
29211         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
29212         (AC_SYS_LARGEFILE): Require.
29213         (AM_C_PROTOTYPES): Require.
29214
29215 2000-04-08  Jim Meyering  <meyering@lucent.com>
29216
29217         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
29218         names don't conflict.  Reported by Eli Zaretskii.
29219
29220 2000-04-07  Jim Meyering  <meyering@lucent.com>
29221
29222         * lib/putenv.c: Move inclusion of errno.h so it follows that of
29223         sys/types.h, to work around system header problems on AIX 3.2.5.
29224         From Bruno Haible.
29225
29226 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
29227
29228         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
29229         bug.  Deal with the different error behavior of Irix iconv.
29230
29231 2000-04-05  Paul Eggert  <eggert@twinsun.com>
29232
29233         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
29234         IRIX if the installer said otherwise.
29235
29236 2000-04-05  Jim Meyering  <meyering@lucent.com>
29237
29238         Portability tweaks required for ultrix4.3.
29239         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
29240         (jm_CHECK_DECLS): Add getutent to the list of functions.
29241         (_jm_DECL_HEADERS): Add utmpx.h.
29242         From John David Anglin.
29243
29244         * m4/strftime.m4: Back out the 2000-04-02 change.
29245         Instead of that change, simply undefine putenv in the test program.
29246
29247 2000-04-05  Jim Meyering  <meyering@lucent.com>
29248
29249         Portability tweaks required for ultrix4.3.
29250         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
29251         getutent.
29252         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
29253         * lib/canon-host.c: Declare strdup.
29254         * lib/path-concat.c: Likewise.
29255         From John David Anglin.
29256
29257 2000-04-04  Jim Meyering  <meyering@lucent.com>
29258
29259         Be more DOS 8.3-friendly.
29260         * lib/ref-add.sin: Renamed from ref-add.sed.in.
29261         * lib/ref-del.sin: Renamed from ref-del.sed.in.
29262         * lib/Makefile.am: Reflect renaming.
29263         Reported by Eli Zaretskii.
29264
29265         Use a temporary file name that won't clash with `charset.alias'
29266         in the DOS 8.3 name space.
29267         * lib/Makefile.am (charset_tmp): Define.
29268         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
29269         (uninstall-local): Likewise.
29270         Reported by Eli Zaretskii.
29271
29272 2000-04-03  Jim Meyering  <meyering@lucent.com>
29273
29274         * m4/gettext.m4: Fix typo in comment.
29275
29276         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
29277         textutils/configure.in).  Suggestion from Paul Eggert.
29278         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
29279
29280 2000-04-02  Paul Eggert  <eggert@twinsun.com>
29281
29282         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
29283         variable in the shell rather than using putenv, which isn't
29284         portable.  This avoids the configure-time inter-test dependency
29285         on the potentially-renamed putenv function.
29286
29287 2000-03-30  Paul Eggert  <eggert@twinsun.com>
29288
29289         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
29290         before checking struct stat.st_blksize, so that
29291         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
29292
29293 2000-03-29  Paul Eggert  <eggert@twinsun.com>
29294
29295         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
29296         since strftime.c uses HAVE_STRFTIME to decide whether to use
29297         the underlying strftime.
29298
29299 2000-03-29  Paul Eggert  <eggert@twinsun.com>
29300
29301         * lib/time/strftime.c (my_strftime): Make sure we call the system
29302         strftime, not ourselves, when invoking the underlying strftime.
29303
29304 2000-03-24  Jim Meyering  <meyering@lucent.com>
29305
29306         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
29307         (charset_alias): Define.
29308         (install-exec-local): Factor out common code.
29309         (uninstall-local): Split lines longer than 80.
29310         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
29311         (SUFFIXES): Define.
29312         (.sed.in.sed): New rule.  Don't redirect directly to $@.
29313         (CLEANFILES): Add ref-add.sed and ref-del.sed.
29314
29315 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
29316
29317         * lib/config.charset: Output a line containing "Packages using this
29318         file".
29319         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
29320         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
29321         ref-del.sed): New rules.
29322
29323 2000-03-17  Jim Meyering  <meyering@lucent.com>
29324
29325         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
29326         Otherwise, include <strings.h>
29327
29328 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
29329
29330         * lib/unicodeio.c (utf8_wctomb): New function.
29331         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
29332         format instead of in UCS-4 with platform dependent endianness.
29333
29334 2000-03-10  Jim Meyering  <meyering@lucent.com>
29335
29336         * m4/lib-check.m4: Look for getspnam in -lgen, too.
29337         From Marco Franzen.
29338
29339 2000-03-07  Paul Eggert  <eggert@twinsun.com>
29340
29341         * lib/savedir.c (savedir): Work even if directory size is
29342         negative; this can happen with some screwy NFS configurations.
29343
29344 2000-03-06  Jim Meyering  <meyering@lucent.com>
29345
29346         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
29347         if it's NULL (because we ran out of memory).  From Bruno Haible.
29348
29349 2000-03-05  Jim Meyering  <meyering@lucent.com>
29350
29351         * lib/localcharset.c ("path-concat.h"): Include.
29352         (get_charset_aliases): Use path_concat instead of ANSI string
29353         concatenation.
29354
29355         * lib/unicodeio.h (PARAMS): Define.
29356         Use it to guard prototype.
29357
29358 2000-03-04  Jim Meyering  <meyering@lucent.com>
29359
29360         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
29361         for lib/localcharset.c.
29362
29363 2000-03-04  Jim Meyering  <meyering@lucent.com>
29364
29365         * lib/Makefile.am (install-exec-local): Create $(libdir) before
29366         installing into it.
29367         (uninstall-local): Uncomment this rule so `make distcheck' works
29368         once again.
29369
29370         * lib/unicodeio.c (<errno.h>): Include it.
29371         (errno): Declare if not defined.
29372
29373         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
29374
29375         * lib/config.charset: New version, incorporating remarks from a linux
29376         i18n mailing list.  From Bruno Haible.
29377
29378 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
29379
29380         * m4/codeset.m4: New file.
29381         * m4/iconv.m4: New file.
29382         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
29383
29384 2000-03-03  Jim Meyering  <meyering@lucent.com>
29385
29386         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
29387
29388 2000-03-02  Jim Meyering  <meyering@lucent.com>
29389
29390         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
29391         the messages come out on separate lines.
29392
29393         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
29394         rather than jm_CHECK_DECLARATIONS.
29395         * m4/decl.m4: Remove now-unused file.
29396
29397         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
29398         geteuid.
29399
29400 2000-03-02  Jim Meyering  <meyering@lucent.com>
29401
29402         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
29403
29404 2000-03-01  Jim Meyering  <meyering@lucent.com>
29405
29406         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
29407         * lib/unicodeio.c: Likewise.
29408
29409 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
29410
29411         * lib/config.charset: New file.
29412         * lib/localcharset.c: New file.
29413         * lib/unicodeio.h, lib/unicodeio.c: New files.
29414         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
29415         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
29416         (noinst_HEADERS): Add unicodeio.h.
29417         (all-local, install-exec-local, charset.alias): New targets.
29418
29419 2000-02-28  Paul Eggert  <eggert@twinsun.com>
29420
29421         * lib/quotearg.c (ALERT_CHAR): New macro.
29422         (quotearg_buffer_restyled): Use it.
29423
29424 2000-02-27  Jim Meyering  <meyering@lucent.com>
29425
29426         * m4/check-decl.m4: Add getenv to the list.
29427
29428 2000-02-27  Jim Meyering  <meyering@lucent.com>
29429
29430         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
29431         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
29432
29433         * lib/backupfile.c: Guard inclusion of stdlib.h with
29434         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
29435         Declare malloc if needed.
29436
29437         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
29438         `#ifndef HAVE_DECL..'
29439         now that autoconf always defines the HAVE_DECL_ symbols.
29440         * lib/human.c: Likewise.
29441         * lib/same.c: Likewise.
29442         * lib/strtoumax.c: Likewise.
29443
29444         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
29445         declaration check was not run.
29446         * lib/hash.c: Likewise.
29447         * lib/human.c: Likewise.
29448         * lib/same.c: Likewise.
29449         * lib/strtoumax.c: Likewise.
29450
29451         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
29452         `.', then first look up the entire `.'-containing string as a login
29453         name.
29454
29455 2000-02-23  Jim Meyering  <meyering@lucent.com>
29456
29457         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
29458         in place of my hack.
29459
29460 2000-02-18  Paul Eggert  <eggert@twinsun.com>
29461
29462         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
29463         (textint): New typedef.
29464         (parser_control): Member year changed from int to textint.
29465         All uses changed.
29466         (YYSTYPE): Removed; replaced by %union with int and textint members.
29467         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
29468         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
29469         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
29470         (tSNUMBER, tUNUMBER): Now of type <textintval>.
29471         (date, number, to_year): Use width of number in digits, not its value,
29472         to determine whether it's a 2-digit year, or a 2-digit time.
29473         (yylex): Store number of digits of numeric tokens.
29474         Reported by John Kendall.
29475
29476         (parser_control): Changed from struct parser_control to typedef (for
29477         consistency).  All uses changed.
29478
29479         (tID): Removed; not used.
29480         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
29481
29482 2000-02-14  Paul Eggert  <eggert@twinsun.com>
29483
29484         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
29485         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
29486
29487 2000-02-12  Jim Meyering  <meyering@lucent.com>
29488
29489         * lib/userspec.c (ISDIGIT): Define it.
29490         (isdigit): Remove definition.
29491         (is_number): Use ISDIGIT, not isdigit.
29492         <libintl.h>: Include.
29493         (_ and N_): Define.
29494         (parse_user_spec): Mark translatable strings.
29495
29496 2000-02-10  Jim Meyering  <meyering@lucent.com>
29497
29498         With these changes, nanosleep.[ch] are finally enough like the other
29499         lib/* replacement files to compile on a few more losing systems.
29500
29501         * lib/nanosleep.h: Don't include config.h.
29502         Remove prototype from declaration of nanosleep.
29503         (PARAMS): Remove now-unneeded definition.
29504         * lib/nanosleep.c: #undef nanosleep.
29505         (rpl_nanosleep): Rename from nanosleep.
29506
29507 2000-02-10  Jim Meyering  <meyering@lucent.com>
29508
29509         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
29510         gnu_nanosleep to rpl_nanosleep.
29511
29512 2000-02-09  Jim Meyering  <meyering@lucent.com>
29513
29514         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
29515         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
29516
29517 2000-02-08  Akim Demaille  <akim@epita.fr>
29518
29519         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
29520         `[' and `]' and remove uses of `changequote'.
29521         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
29522         (AC_SYS_LARGEFILE): Likewise.
29523         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
29524         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
29525         of changequote.
29526         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
29527         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
29528         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
29529         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
29530
29531 2000-02-05  Jim Meyering  <meyering@lucent.com>
29532
29533         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
29534         Remove explicit use of AC_HEADER_TIME.  It is required by
29535         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
29536         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
29537         in autoconf whereby the expansion of the latter ended up preceding
29538         the expansion of its prerequisite, AC_HEADER_TIME.
29539         Reported by Volker Borchert.
29540
29541 2000-02-03  Jim Meyering  <meyering@lucent.com>
29542
29543         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
29544
29545 2000-02-03  Jim Meyering  <meyering@lucent.com>
29546
29547         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
29548         rather than with `#if HAVE_UTMPNAME'.
29549
29550 2000-02-02  Jim Meyering  <meyering@lucent.com>
29551
29552         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
29553         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
29554         Reported by Eli Zaretskii.
29555
29556 2000-02-01  Jim Meyering  <meyering@lucent.com>
29557
29558         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
29559
29560 2000-01-31  Jim Meyering  <meyering@lucent.com>
29561
29562         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
29563         functions.  Add the time.h and sys/time.h headers along with the
29564         AC_REQUIRE'ment of AC_HEADER_TIME.
29565
29566 2000-01-31  Jim Meyering  <meyering@lucent.com>
29567
29568         * lib/nanosleep.h (nanosleep): Guard declaration with
29569         `#if ! HAVE_DECL_NANOSLEEP'.
29570         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
29571         the declaration in that vendor's sys/timers.h.
29572         Reported by Christian Krackowizer.
29573
29574         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
29575         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
29576         (ISPRINT): Likewise.
29577         Reported by Tom Tromey.
29578
29579 2000-01-30  Jim Meyering  <meyering@lucent.com>
29580
29581         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
29582
29583         * m4/prereq.m4 (utmp_includes): Define.
29584         Check for ut_user and ut_name members in both struct utmpx
29585         and struct utmp.
29586
29587 2000-01-30  Jim Meyering  <meyering@lucent.com>
29588
29589         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
29590         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
29591         header files where only utmpx.ut_user is declared.
29592
29593         * lib/readutmp.h (UT_USER): Define.
29594
29595 2000-01-29  Jim Meyering  <meyering@lucent.com>
29596
29597         * m4/lib-check.m4: New file containing library-related checks from
29598         fileutils and sh-utils (textutils had none).
29599
29600 2000-01-28  Jim Meyering  <meyering@lucent.com>
29601
29602         * m4/perl.m4: Change format of warning message to look more like that
29603         from the missing script.  Suggestion from François Pinard.
29604
29605 2000-01-25  Jim Meyering  <meyering@lucent.com>
29606
29607         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
29608         well as time.h in the compile check.
29609         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
29610         Fix typo in cross-compiling case: s/yes/no/.
29611
29612 2000-01-23  Jim Meyering  <meyering@lucent.com>
29613
29614         * m4/jm-macros.m4: Move df-related tests here from
29615         fileutils/configure.in
29616
29617         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
29618         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
29619
29620         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
29621         s/space/ac_fsusage_space/.
29622         (jm_FILE_SYSTEM_USAGE): Take two parameters.
29623
29624         * m4/ftruncate.m4: New file (derived from part of
29625         fileutils/configure.in).
29626         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
29627         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
29628
29629         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
29630         AC_SUBST these here, rather than just in sh-util/configure.in, so
29631         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
29632         all the same.
29633         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
29634         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
29635         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
29636         (AC_SUBST(POW_LIBM)): Likewise.
29637         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
29638
29639 2000-01-23  Jim Meyering  <meyering@lucent.com>
29640
29641         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
29642         obstack.c.
29643
29644 2000-01-22  Jim Meyering  <meyering@lucent.com>
29645
29646         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
29647
29648         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
29649
29650         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
29651         configure.in
29652         (AC_CHECK_HEADERS): Likewise for sh-utils.
29653         (AC_CHECK_HEADERS): Likewise for textutils.
29654         Merge the three lists of headers.
29655
29656         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
29657         from fileutils' configure.in.
29658
29659         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
29660         code. Moved tests into their own function (_jm_DECL_HEADERS) in
29661         check-decl.m4.
29662
29663         * m4/check-decl.m4: Use #if rather than #ifdef.
29664         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
29665         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
29666         (_jm_DECL_HEADERS): Define new function.
29667         (jm_CHECK_DECLARATIONS): Require it.
29668
29669 2000-01-22  Jim Meyering  <meyering@lucent.com>
29670
29671         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
29672         [! HAVE_DECL_STRTOULL]: Declare strtoull.
29673         Required for some AIX systems.  Reported by Christian Krackowizer.
29674         [TESTING] (main): New function.
29675
29676         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
29677         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
29678         letters.
29679
29680         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
29681         iswprint.
29682
29683         * lib/strverscmp.c (ISDIGIT): Define.
29684         (strverscmp): Use ISDIGIT, not isdigit.
29685
29686 2000-01-19  Jim Meyering  <meyering@lucent.com>
29687
29688         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
29689         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
29690         defines `struct timespec' in <sys/time.h>
29691
29692         * m4/c-bs-a.m4: Remove uses of changequote altogether.
29693         Thanks to Akim for explaining.
29694
29695 2000-01-17  Paul Eggert  <eggert@twinsun.com>
29696
29697         * lib/nanosleep.c (nanosleep):
29698         Don't use SA_INTERRUPT to decide whether to call sigaction, as
29699         POSIX.1 doesn't require SA_INTERRUPT and some systems
29700         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
29701         it's been part of POSIX.1 since day 1 (in 1988).
29702
29703 2000-01-17  Jim Meyering  <meyering@lucent.com>
29704
29705         * lib/interlock: Remove unused file.  Reported by François Pinard.
29706
29707 2000-01-16  Paul Eggert  <eggert@twinsun.com>
29708
29709         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
29710         alert, backslash, formfeed, and vertical tab unnecessarily in
29711         shell quoting style.
29712
29713 2000-01-16  Jim Meyering  <meyering@lucent.com>
29714
29715         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
29716         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
29717         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
29718         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
29719
29720 2000-01-16  Jim Meyering  <meyering@lucent.com>
29721
29722         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
29723         because the latter didn't work.
29724
29725 2000-01-15  Jim Meyering  <meyering@lucent.com>
29726
29727         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
29728         (AC_REPLACE_FUNCS): Add memcpy and memset.
29729         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
29730         Add strpbrk.
29731         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
29732
29733 2000-01-12  Jim Meyering  <meyering@lucent.com>
29734
29735         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
29736         (jm_PREREQ): Use it.
29737         (jm_PREREQ_READUTMP): New macro.
29738         (jm_PREREQ): Use it.
29739
29740 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29741
29742         Quote multibyte characters correctly.
29743         * m4/c-bs-a.m4: New file.
29744         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
29745         (jm_PREREQ): Use it.
29746
29747 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29748
29749         * m4/uintmax_t.m4: Port to autoconf 2.13.
29750
29751 2000-01-08  Jim Meyering  <meyering@ascend.com>
29752
29753         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
29754         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
29755
29756 2000-01-04  Jim Meyering  <meyering@ascend.com>
29757
29758         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
29759         jm_STRUCT_DIRENT_D_TYPE.
29760         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
29761         jm_STRUCT_DIRENT_D_INO.
29762         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
29763         jm_STRUCT_UTIMBUF.
29764         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
29765         renamings.
29766         * m4/utime.m4: Likewise.
29767
29768         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
29769         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
29770
29771 2000-01-03  Paul Eggert  <eggert@twinsun.com>
29772
29773         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
29774         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
29775
29776 2000-01-02  Jim Meyering  <meyering@ascend.com>
29777
29778         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
29779         remember if this is necessary.
29780
29781 1999-12-26  Jim Meyering  <meyering@ascend.com>
29782
29783         * m4/jm-macros.m4: Use it here.
29784         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
29785
29786 1999-12-23  Jim Meyering  <meyering@ascend.com>
29787
29788         * m4/jm-macros.m4: Check for clock_gettime (moved from
29789         fileutils/configure.in)
29790         Check for gettimeofday.
29791
29792 1999-12-20  Jim Meyering  <meyering@ascend.com>
29793
29794         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
29795         autoconf-2.14a-1999-12-20.
29796
29797 1999-12-19  Jim Meyering  <meyering@ascend.com>
29798
29799         * m4/lstat-slash.m4: New file.
29800         * m4/jm-macros.m4: Use the new macro:
29801         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29802
29803 1999-12-07  Jim Meyering  <meyering@ascend.com>
29804
29805         * m4/perl.m4: Require that File::Compare be available, too.
29806         Too many systems seem to lack it.
29807
29808         * m4/strftime.m4: Add checks for most of the cpp macros tested in
29809         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
29810
29811 1999-11-18  Paul Eggert  <eggert@twinsun.com>
29812
29813         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
29814         problem with the QNX 4.25 shell, which doesn't propagate exit
29815         status of failed commands inside shell assignments.
29816
29817 1999-11-17  Jim Meyering  <meyering@ascend.com>
29818
29819         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
29820
29821 1999-11-07  Jim Meyering  <meyering@ascend.com>
29822
29823         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
29824
29825 1999-11-06  Jim Meyering  <meyering@ascend.com>
29826
29827         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
29828         * m4/jm-macros.m4 (jm_MACROS): Use it here.
29829
29830 1999-11-05  Jim Meyering  <meyering@ascend.com>
29831
29832         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
29833         configure.in of textutils, fileutils, and sh-utils into this one
29834         (shared between those packages) file.
29835         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
29836         AC_STRUCT_ST_BLKSIZE.
29837
29838 1999-11-03  Jim Meyering  <meyering@ascend.com>
29839
29840         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
29841         of AC_CHECK_TYPE checks includes unistd.h.
29842         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
29843         Suggestion from Akim Demaille.
29844
29845 1999-10-30  Jim Meyering  <meyering@ascend.com>
29846
29847         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
29848         m4-quoted string.
29849         * m4/ls-mntd-fs.m4: Likewise.
29850         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
29851         * m4/jm-winsz1.m4: Likewise.
29852
29853         * m4/const.m4: Remove file, since the fix made it into the experimental
29854         version of autoconf.
29855         * m4/mktime.m4: Likewise.
29856
29857         * m4/check-type.m4: Remove file, now that the latest version of
29858         AC_CHECK_TYPE takes a third arg to specify additional #includes.
29859
29860         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
29861         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
29862         AC_CHECK_TYPE.
29863
29864 1999-10-04  Jim Meyering  <meyering@ascend.com>
29865
29866         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
29867
29868 1999-09-22  Paul Eggert  <eggert@twinsun.com>
29869
29870         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
29871         2.95.1 bug with HP-UX 10.20.
29872
29873 1999-09-17  Jim Meyering  <meyering@ascend.com>
29874
29875         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
29876         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
29877         due to missing strdup (against sh-utils-2.0).
29878
29879 1999-08-29  Jim Meyering  <meyering@ascend.com>
29880
29881         * m4/jm-macros.m4: Require jm_BISON.
29882         * m4/bison.m4: New file.
29883
29884 1999-08-17  Paul Eggert  <eggert@twinsun.com>
29885
29886         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
29887         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
29888
29889 1999-08-05  Jim Meyering  <meyering@ascend.com>
29890
29891         * m4/getline.m4: Rename test file from conftestdata to conftest.data
29892         to avoid conflicts with `conftest' on 8+3 filesystems.
29893         Suggestion from Eli Zaretskii.
29894
29895 1999-08-04  Jim Meyering  <meyering@ascend.com>
29896
29897         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
29898         fileutils and sh-utils (textutils's getline test was inadequate).
29899         (AM_FUNC_GETLINE): Run this test.
29900         (AC_CHECK_FUNCS): Check for getdelim.
29901         Reported by Bob Proulx.
29902
29903 1999-08-02  Jim Meyering  <meyering@ascend.com>
29904
29905         * m4/jm-macros.m4: Add a comment.
29906
29907 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29908
29909         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
29910         <inttypes.h> defines strtoumax as a macro (and not as a
29911         function).
29912
29913 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29914
29915         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
29916         that we can shift, multiply and divide unsigned long long
29917         values; Ultrix cc can't do it.
29918
29919 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29920
29921         * m4/mktime.m4: New file, which is a preview of what should appear
29922         in the next public autoconf release.
29923
29924 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29925
29926         * m4/lfs.m4: Remove this file.
29927         * m4/largefile.m4: New file.  It contains the old contents of
29928         lfs.m4, except that all names with prefix AC_LFS have been
29929         changed to use the prefix AC_SYS_LARGEFILE instead, to be
29930         compatible with future autoconf versions.  Also, some minor m4
29931         quoting problems have been fixed.
29932
29933 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29934
29935         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
29936         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
29937         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
29938         and simplify the shell code.
29939
29940 1999-08-01  Jim Meyering  <meyering@ascend.com>
29941
29942         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
29943         m4.
29944
29945 1999-07-20  Jim Meyering  <meyering@ascend.com>
29946
29947         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
29948
29949 1999-07-15  Jim Meyering  <meyering@ascend.com>
29950
29951         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
29952
29953 1999-05-22  Jim Meyering  <meyering@ascend.com>
29954
29955         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
29956
29957 1999-05-20  Jim Meyering  <meyering@ascend.com>
29958
29959         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
29960         Add a colon after each `then' in case $4 is empty.
29961
29962 1999-05-16  Jim Meyering  <meyering@ascend.com>
29963
29964         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
29965
29966 1999-05-10  Jim Meyering  <meyering@ascend.com>
29967
29968         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
29969
29970         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
29971         AC_FUNC_MKTIME.
29972
29973 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
29974
29975         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
29976
29977 1999-05-04  Paul Eggert  <eggert@twinsun.com>
29978
29979         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
29980         not CPPFLAGS, so that linking works correctly in IRIX.
29981
29982 1999-04-30  Paul Eggert  <eggert@twinsun.com>
29983
29984         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
29985
29986 1999-04-20  Paul Eggert  <eggert@twinsun.com>
29987
29988         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
29989         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
29990         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
29991         jm_AC_TYPE_UNSIGNED_LONG_LONG.
29992         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
29993
29994         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
29995
29996 1999-04-20  Jim Meyering  <meyering@ascend.com>
29997
29998         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
29999         AC_REPLACE xstroull if necessary.  From Paul Eggert.
30000         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
30001
30002 1999-04-18  Jim Meyering  <meyering@ascend.com>
30003
30004         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
30005         * m4/jm-macros.m4: Use it.
30006
30007 1999-04-06  Jim Meyering  <meyering@ascend.com>
30008
30009         * m4/strftime.m4: Remove test for %f.
30010
30011 1999-03-29  Jim Meyering  <meyering@ascend.com>
30012
30013         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
30014         superset of the AC_TYPE_* checks in the textutils, fileutils,
30015         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
30016         AC_TYPE_PID_T.
30017
30018 1999-03-28  Jim Meyering  <meyering@ascend.com>
30019
30020         * m4/jm-macros.m4: Define GNU_PACKAGE here.
30021         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
30022         replaced e.g., in the *.sh files of the sh-utils.
30023
30024 1999-03-20  Jim Meyering  <meyering@ascend.com>
30025
30026         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
30027         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
30028         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
30029
30030 1999-03-19  Jim Meyering  <meyering@ascend.com>
30031
30032         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
30033
30034 1999-03-12  Jim Meyering  <meyering@ascend.com>
30035
30036         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
30037
30038 1999-03-07  Jim Meyering  <meyering@ascend.com>
30039
30040         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
30041         declared.
30042
30043 1999-02-17  Jim Meyering  <meyering@ascend.com>
30044
30045         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
30046         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
30047
30048 1999-02-07  Jim Meyering  <meyering@ascend.com>
30049
30050         * m4/group-member.m4: New file -- extracted from sh-utils'
30051         configure.in.
30052
30053         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
30054         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
30055
30056 1999-02-06  Jim Meyering  <meyering@ascend.com>
30057
30058         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
30059         * m4/fnmatch.m4: Likewise.
30060         * m4/getgroups.m4: Likewise.
30061         * m4/lstat.m4: Likewise.
30062         * m4/malloc.m4: Likewise.
30063         * m4/putenv.m4: Likewise.
30064         * m4/realloc.m4: Likewise.
30065         * m4/regex.m4: Likewise.
30066         * m4/stat.m4: Likewise.
30067         * m4/strftime.m4: Likewise.
30068         Suggestion from Alain Magloire.
30069
30070         * m4/chown.m4: Use `.$ac_objext', not `.o'.
30071         * m4/fnmatch.m4: Likewise.
30072         * m4/getgroups.m4: Likewise.
30073         * m4/getline.m4: Likewise.
30074         * m4/lstat.m4: Likewise.
30075         * m4/malloc.m4: Likewise.
30076         * m4/memcmp.m4: Likewise.
30077         * m4/putenv.m4: Likewise.
30078         * m4/realloc.m4: Likewise.
30079         * m4/regex.m4: Likewise.
30080         * m4/stat.m4: Likewise.
30081         * m4/strftime.m4: Likewise.
30082         Suggestion from Alain Magloire.
30083
30084         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
30085         an argument.
30086
30087         * m4/regex.m4: Add a run-time Test for proper operation of
30088         re_compile_pattern.
30089
30090 1999-01-31  Jim Meyering  <meyering@ascend.com>
30091
30092         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
30093
30094 1999-01-30  Jim Meyering  <meyering@ascend.com>
30095
30096         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
30097
30098         * m4/jm-mktime.m4: Make this a wrapper around the official
30099         AM_FUNC_MKTIME rather than my private copy, now that the official one
30100         is up to date.
30101         * m4/mktime.m4: Remove file.
30102
30103         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
30104         * m4/uptime.m4: Likewise.
30105         * m4/uintmax_t.m4: Likewise.
30106
30107 1999-01-28  Jim Meyering  <meyering@ascend.com>
30108
30109         * m4/jm-macros.m4: Use jm_AFS.
30110         * m4/afs.m4: New file (from fileutils' configure.in).
30111
30112         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
30113         * m4/chown.m4: Likewise.
30114         * m4/d-ino.m4: Likewise.
30115         * m4/d-type.m4: Likewise.
30116         * m4/fnmatch.m4: Likewise.
30117         * m4/getgroups.m4: Likewise.
30118         * m4/gettext.m4: Likewise.
30119         * m4/jm-mktime.m4: Likewise.
30120         * m4/jm-winsz2.m4: Likewise.
30121         * m4/lcmessage.m4: Likewise.
30122         * m4/ls-mntd-fs.m4: Likewise.
30123         * m4/malloc.m4: Likewise.
30124         * m4/memcmp.m4: Likewise.
30125         * m4/putenv.m4: Likewise.
30126         * m4/realloc.m4: Likewise.
30127         * m4/st_mtim.m4: Likewise.
30128         * m4/strftime.m4: Likewise.
30129
30130 1999-01-16  Jim Meyering  <meyering@ascend.com>
30131
30132         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
30133         (ARGMATCH_DIE_DECL): Define.
30134
30135 1999-01-12  Jim Meyering  <meyering@ascend.com>
30136
30137         * m4/Makefile.am.in: Rewrite to avoid using fmt.
30138         Reported by Lars Hecking.
30139
30140 1999-01-10  Jim Meyering  <meyering@ascend.com>
30141
30142         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
30143         gross kludge.
30144         * m4/inttypes_h.m4: Likewise.
30145         * m4/lstat.m4: Likewise.
30146         * m4/malloc.m4: Likewise.
30147         * m4/readdir.m4: Likewise.
30148         * m4/realloc.m4: Likewise.
30149         * m4/st_dm_mode.m4: Likewise.
30150         * m4/stat.m4: Likewise.
30151         * m4/utimbuf.m4: Likewise.
30152         * m4/utimes.m4: Likewise.
30153
30154         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
30155         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
30156         comments in config.h.in are meaningful.
30157
30158         * m4/jm-macros.m4: Require autoconf-2.13 here.
30159
30160         * m4/regex.m4: By default, don't use the included regex.c on systems
30161         with glibc 2.  Suggestion from Uli Drepper.
30162
30163 1999-01-02  Jim Meyering  <meyering@ascend.com>
30164
30165         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
30166
30167 1998-12-18  Jim Meyering  <meyering@ascend.com>
30168
30169         * m4/Makefile.am.in (Makefile.am): Simplify rule.
30170         Based on a suggestion from Lars Hecking.
30171
30172 1998-11-16  Paul Eggert  <eggert@twinsun.com>
30173
30174         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
30175
30176 1998-11-16  Jim Meyering  <meyering@ascend.com>
30177
30178         * m4/lfs.m4: Double-quote the `uname...` expression.
30179
30180 1998-11-14  Jim Meyering  <meyering@ascend.com>
30181
30182         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
30183         * m4/stat.m4: Likewise.
30184
30185 1998-11-03  Jim Meyering  <meyering@ascend.com>
30186
30187         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
30188         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
30189
30190 1998-10-18  Jim Meyering  <meyering@ascend.com>
30191
30192         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
30193
30194 1998-10-17  Jim Meyering  <meyering@ascend.com>
30195
30196         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
30197         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
30198         calls for those previously hard-coded headers.  Instead, take a new
30199         parameter.
30200         (jm_CHECK_DECLARATIONS): Reflect interface change.
30201         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
30202         (jm_CHECK_DECL_LOCALTIME_R): New macro.
30203
30204         * m4/mktime.m4: Test for spring-forward gap before long-running test.
30205
30206 1998-10-14  Jim Meyering  <meyering@ascend.com>
30207
30208         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
30209         instead of "TZ=America/Vancouver".  From Paul Eggert.
30210
30211 1998-10-11  Jim Meyering  <meyering@ascend.com>
30212
30213         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
30214         This adds a test for a recently added compatibility fix for mktime.c.
30215         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
30216
30217 1998-09-27  Jim Meyering  <meyering@ascend.com>
30218
30219         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
30220
30221         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
30222         ../configure.in, including a change from Gordon Matzigkeit to allow
30223         cross-compiling for the Hurd.
30224
30225         * m4/glibc.m4: New file/macro to test for the GNU C Library
30226         versions 1 and 2.  From Gordon Matzigkeit.
30227         Indent.
30228
30229 1998-09-21  Jim Meyering  <meyering@ascend.com>
30230
30231         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
30232
30233 1998-08-18  Paul Eggert  <eggert@twinsun.com>
30234
30235         Port nanosecond-resolution times to UnixWare 2.1.2 and
30236         pedantic Solaris 2.6.
30237
30238         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
30239         AC_STRUCT_ST_MTIM.
30240         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
30241         Generate name of ns member, instead of just 1 or undef.
30242         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
30243
30244 1998-08-15  Jim Meyering  <meyering@ascend.com>
30245
30246         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
30247         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
30248         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
30249         instead of jm_TYPE_SSIZE_T.
30250
30251 1998-08-12  Jim Meyering  <meyering@ascend.com>
30252
30253         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
30254
30255 1998-08-02  Jim Meyering  <meyering@ascend.com>
30256
30257         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
30258         in acconfig.h manually.
30259
30260 1998-07-31  Paul Eggert  <eggert@twinsun.com>
30261
30262         * m4/st_mtim.m4: New file.
30263
30264 1998-07-28  Jim Meyering  <meyering@ascend.com>
30265
30266         * m4/utimes.m4: Undef stat.
30267
30268 1998-07-25  Jim Meyering  <meyering@ascend.com>
30269
30270         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
30271         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
30272
30273 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
30274
30275         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
30276         uid and gid actually remain unchanged.
30277
30278 1998-07-07  Jim Meyering  <meyering@ascend.com>
30279
30280         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
30281
30282 1998-07-04  Jim Meyering  <meyering@ascend.com>
30283
30284         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
30285         to prove that this macro can be used in packages without regex.c.
30286
30287 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
30288
30289         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
30290         is to be used.
30291
30292 1998-07-03  Jim Meyering  <meyering@ascend.com>
30293
30294         * m4/gettext.m4: Add -lintl if it's found to be necessary.
30295
30296         * m4/gettext.m4: New file -- from gettext-0.10.35.
30297         * m4/lcmessage.m4: Likewise.
30298         * m4/progtest.m4: Likewise.
30299
30300         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
30301         * m4/jm-macros.m4: Require the new macro.
30302
30303 1998-06-29  Jim Meyering  <meyering@ascend.com>
30304
30305         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
30306         for the definition of NGROUPS (used in a system header included
30307         by sys/mount.h).
30308
30309 1998-06-28  Jim Meyering  <meyering@ascend.com>
30310
30311         * m4/ls-mntd-fs.m4: New file.
30312         * m4/fstypename.m4: New file.
30313
30314         * m4/jm-macros.m4: Require the new macro.
30315         * m4/jm-glibc-io.m4: New file.
30316
30317 1998-05-19  Jim Meyering  <meyering@ascend.com>
30318
30319         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
30320         * m4/lchown.m4: New file.
30321
30322         * m4/Makefile.am.in: New file.
30323         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
30324
30325 1998-05-14  Jim Meyering  <meyering@ascend.com>
30326
30327         * m4/Makefile.am (EXTRA_DIST): Add them.
30328         * m4/jm-macros.m4: New file.
30329         * m4/utimbuf.m4: New file.
30330
30331 1998-05-12  Jim Meyering  <meyering@ascend.com>
30332
30333         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
30334
30335 1998-05-11  Jim Meyering  <meyering@ascend.com>
30336
30337         * m4/isc-posix.m4: New file.
30338
30339 1998-05-10  Jim Meyering  <meyering@ascend.com>